Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Release v1.0.0-rc5 (#157)
Browse files Browse the repository at this point in the history
Release v1.0.0-rc5
  • Loading branch information
hiddeco authored Dec 23, 2019
2 parents 10cbb3c + 716de45 commit 59fe83f
Show file tree
Hide file tree
Showing 99 changed files with 4,533 additions and 2,007 deletions.
26 changes: 22 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ jobs:
working_directory: /home/circleci/go/src/github.com/fluxcd/helm-operator
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
GO_VERSION: 1.12.5
GO_VERSION: 1.13.3
# We don't need a GOPATH but CircleCI defines it, so we override it
GOPATH: /home/circleci/go
GO111MODULE: 'on'
GOPROXY: https://proxy.golang.org
PATH: /bin:/usr/bin:/usr/local/go/bin:/home/circleci/go/bin
steps:
- checkout
Expand All @@ -33,8 +34,10 @@ jobs:
sudo killall apt-get || true
sudo apt-get update
sudo apt-get install jq
git version
docker version
jq --version
- restore_cache:
keys:
- cache-{{ checksum "Makefile" }}
Expand All @@ -52,7 +55,16 @@ jobs:
- run: make test TEST_FLAGS="-race -timeout 60s"
- run: make all
- run: make test-docs
- run: make e2e
- run:
name: End-to-end Helm v2
command: E2E_KIND_CLUSTER_NUM=4 make e2e
environment:
HELM_VERSION: v2
- run:
name: End-to-end Helm v3
command: E2E_KIND_CLUSTER_NUM=4 make e2e
environment:
HELM_VERSION: v3
- save_cache:
key: cache-{{ checksum "Makefile" }}
paths:
Expand All @@ -71,6 +83,12 @@ jobs:
if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then
echo "$DOCKER_FLUXCD_PASSWORD" | docker login --username "$DOCKER_FLUXCD_USER" --password-stdin
docker tag "docker.io/fluxcd/helm-operator:$(docker/image-tag)" "docker.io/fluxcd/helm-operator-prerelease:$(docker/image-tag)"
docker push "docker.io/fluxcd/helm-operator-prerelease:$(docker/image-tag)"
fi
if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "helm-v3-dev" ]; then
echo "$DOCKER_FLUXCD_PASSWORD" | docker login --username "$DOCKER_FLUXCD_USER" --password-stdin
docker tag "docker.io/fluxcd/helm-operator:$(docker/image-tag)" "docker.io/fluxcd/helm-operator-prerelease:$(docker/image-tag)"
docker push "docker.io/fluxcd/helm-operator-prerelease:$(docker/image-tag)"
fi
Expand All @@ -96,7 +114,7 @@ jobs:
helm:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.13
steps:
- checkout
- run:
Expand Down
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/helm_v3_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Helm v3 bug report
about: Create a bug report for Flux Helm operator with Helm v3
title: ''
labels: blocked needs validation, bug, helm-v3
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:
0. What's your setup?
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, please provide logs. In a standard stand-alone installation, you'd get this by running `kubectl logs -n default deploy/flux-helm-operator`.

**Additional context**
Add any other context about the problem here, e.g
- Helm operator version:
- Targeted Helm version:
- Kubernetes version:
- Git provider:
- Container registry provider:
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ testdata/sidecar/sidecar-linux-amd64
testdata/sidecar/.sidecar
docker/fluxy-dumbconf.priv
test/profiles
test/bin/kubectl
test/bin/kustomize
test/bin/helm
test/bin/kind
test/bin/
test/e2e/bats

# Docs
docs/_build
84 changes: 83 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
## 1.0.0-rc5 (2019-12-23)

> **Notice:** upgrading to this version from `<=0.10.x` by just
> updating your Helm Operator image tag is not possible as the
> CRD domain and version have changed. An upgrade guide can be
> found [here](./docs/guides/upgrading-to-ga.md).
> **Notice:** due to the added `helmVersion` field, you need
> to re-apply the `HelmRelease` CRD.
This release brings Helm v3 support to the release candidate,
Helm v3 functionalities should be considered _beta_. Support for
Helm v2 and v3 is enabled by default. To target Helm v3, set the
`.spec.helmVersion` in a `HelmRelease` to `v3`.

Enabling _just_ Helm v3 is possible by configuring
`--enabled-helm-versions=v3`, this will also make the
`.spec.helmVersion` default to `v3`.

To be able to support multiple Helm versions large parts of the
operator had to be rewritten, which lead to several improvements
around release deciscion making and keeping track of charts from
Git sources. We also no longer shell out to the `helm` binary
to achieve certain functionalities but instead make directly use
of the available Helm packages, this will also ease the support
of charts from OCI sources in upcoming releases.

Extensive documentation will be added in the next release candidate,
which will likely also be the last RC before moving to GA.

### Improvements

- Helm v3 support (`v3.0.1`)
[fluxcd/helm-operator#156][#156]

With a subset of notable PRs:
- Include of `helm2` and `helm3` binaries in Docker image
[fluxcd/helm-operator#118][#118]
- Support for importing Helm v2 and v3 repositories using
the `--helm-repository-import` flag
[fluxcd/helm-operator#141][#141]
- Refactor of downloads from Helm chart repositories; it
now uses the download manager from Helm instead of our
own logic
[fluxcd/helm-operator#145][#145]
- Refactor of dependency updates; it now uses the download
manager from Helm instead of shelling out to the `helm`
binary
[fluxcd/helm-operator#145][#145]
- Decoupling of release reconciliation from chart source sync
[fluxcd/helm-operator#99][#99]

### Maintenance and documentation

- Build: upgrade Go to `1.13.3`
[fluxcd/helm-operator#104][#90]
- Pkg: only use `fluxcd/flux`
[fluxcd/helm-operator#104][#104]
- Build: end-to-end tests
[fluxcd/helm-operator#]{[#110][], [#118][], [#148][], [#150][]}

### Thanks

Thanks @carnott-snap, @karuppiah7890, @hiddeco, @stefanprodan,
@2opremio and @stefansedich for contributions to this release.

Plus a special thanks to users testing the alpha version with Helm
v3 support, notably @gsf, @dminca, @rowecharles, @eschereisin,
@stromvirvel, @timja, @dragonsmith, @maxstepanov, @jan-schumacher,
@StupidScience, @brew, and all others that may have gone unnoticed.

[#90]: https://github.com/fluxcd/helm-operator/pull/90
[#99]: https://github.com/fluxcd/helm-operator/pull/99
[#104]: https://github.com/fluxcd/helm-operator/pull/104
[#110]: https://github.com/fluxcd/helm-operator/pull/110
[#118]: https://github.com/fluxcd/helm-operator/pull/118
[#141]: https://github.com/fluxcd/helm-operator/pull/141
[#145]: https://github.com/fluxcd/helm-operator/pull/145
[#148]: https://github.com/fluxcd/helm-operator/pull/148
[#150]: https://github.com/fluxcd/helm-operator/pull/150
[#156]: https://github.com/fluxcd/helm-operator/pull/156

## 1.0.0-rc4 (2019-11-22)

> **Notice:** upgrading to this version from `<=0.10.x` by just
Expand All @@ -18,7 +100,7 @@
[fluxcd/helm-operator#101][#101]
- Documentation: document `timeout`, `resetValues` and `forceUpgrade`
`HelmRelease` fields
[fluxcd/helm-operator#882[#82]
[fluxcd/helm-operator#82][#82]

### Thanks

Expand Down
82 changes: 64 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.DEFAULT: all
.PHONY: all clean realclean test integration-test check-generated
.PHONY: all clean realclean test integration-test check-generated lint-e2e

SUDO := $(shell docker info > /dev/null 2> /dev/null || echo "sudo")

TEST_FLAGS?=

BATS_COMMIT := 3a1c2f28be260f8687ff83183cef4963faabedd6
SHELLCHECK_VERSION := 0.7.0
SHFMT_VERSION := 2.6.4

include docker/kubectl.version
include docker/helm.version
include docker/helm2.version
include docker/helm3.version

# NB default target architecture is amd64. If you would like to try the
# other one -- pass an ARCH variable, e.g.,
Expand All @@ -32,16 +37,28 @@ all: $(GOBIN)/bin/helm-operator build/.helm-operator.done
clean:
go clean ./cmd/helm-operator
rm -rf ./build
rm -f test/bin/kubectl test/bin/helm test/bin/kind
rm -f test/bin/kubectl test/bin/helm2 test/bin/helm3 test/bin/kind

realclean: clean
rm -rf ./cache

test: test/bin/helm
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" GO111MODULES=on go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/weaveworks/flux/vendor" | sort -u)
test: test/bin/helm2 test/bin/helm3
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/weaveworks/flux/vendor" | sort -u)

e2e: test/bin/helm2 test/bin/helm3 test/bin/kubectl test/e2e/bats build/.helm-operator.done
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.bash

e2e: test/bin/helm test/bin/kubectl build/.helm-operator.done
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.sh
E2E_BATS_FILES := test/e2e/*.bats
E2E_BASH_FILES := test/e2e/run.bash test/e2e/lib/*
SHFMT_DIFF_CMD := test/bin/shfmt -i 2 -sr -d
SHFMT_WRITE_CMD := test/bin/shfmt -i 2 -sr -w
lint-e2e: test/bin/shfmt test/bin/shellcheck
@# shfmt is not compatible with .bats files, so we preprocess them to turn '@test's into functions
for I in $(E2E_BATS_FILES); do \
( cat "$$I" | sed 's%@test.*%test() {%' | $(SHFMT_DIFF_CMD) ) || ( echo "Please correct the diff for file $$I"; exit 1 ); \
done
$(SHFMT_DIFF_CMD) $(E2E_BASH_FILES) || ( echo "Please run '$(SHFMT_WRITE_CMD) $(E2E_BASH_FILES)'"; exit 1 )
test/bin/shellcheck $(E2E_BASH_FILES) $(E2E_BATS_FILES)

build/.%.done: docker/Dockerfile.%
mkdir -p ./build/docker/$*
Expand All @@ -52,17 +69,21 @@ build/.%.done: docker/Dockerfile.%
-f build/docker/$*/Dockerfile.$* ./build/docker/$*
touch $@

build/.helm-operator.done: build/helm-operator build/kubectl build/helm docker/ssh_config docker/known_hosts.sh docker/helm-repositories.yaml
build/.helm-operator.done: build/helm-operator build/kubectl build/helm2 build/helm3 docker/ssh_config docker/known_hosts.sh docker/helm-repositories.yaml

build/helm-operator: $(HELM_OPERATOR_DEPS)
build/helm-operator: cmd/helm-operator/*.go
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -o $@ $(LDFLAGS) -ldflags "-X main.version=$(shell ./docker/image-tag)" ./cmd/helm-operator
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -o $@ $(LDFLAGS) -ldflags "-X main.version=$(shell ./docker/image-tag)" ./cmd/helm-operator

build/kubectl: cache/linux-$(ARCH)/kubectl-$(KUBECTL_VERSION)
test/bin/kubectl: cache/$(CURRENT_OS_ARCH)/kubectl-$(KUBECTL_VERSION)
build/helm: cache/linux-$(ARCH)/helm-$(HELM_VERSION)
test/bin/helm: cache/$(CURRENT_OS_ARCH)/helm-$(HELM_VERSION)
build/kubectl test/bin/kubectl build/helm test/bin/helm:
build/helm2: cache/linux-$(ARCH)/helm-$(HELM2_VERSION)
build/helm3: cache/linux-$(ARCH)/helm-$(HELM3_VERSION)
test/bin/helm2: cache/$(CURRENT_OS_ARCH)/helm-$(HELM2_VERSION)
test/bin/helm3: cache/$(CURRENT_OS_ARCH)/helm-$(HELM3_VERSION)
test/bin/shellcheck: cache/$(CURRENT_OS_ARCH)/shellcheck-$(SHELLCHECK_VERSION)
test/bin/shfmt: cache/$(CURRENT_OS_ARCH)/shfmt-$(SHFMT_VERSION)
build/kubectl test/bin/kubectl build/helm2 build/helm3 test/bin/helm2 test/bin/helm3 test/bin/shellcheck test/bin/shfmt:
mkdir -p build
cp $< $@
if [ `basename $@` = "build" -a $(CURRENT_OS_ARCH) = "linux-$(ARCH)" ]; then strip $@; fi
Expand All @@ -75,25 +96,50 @@ cache/%/kubectl-$(KUBECTL_VERSION): docker/kubectl.version
tar -m --strip-components 3 -C ./cache/$* -xzf cache/$*/kubectl-$(KUBECTL_VERSION).tar.gz kubernetes/client/bin/kubectl
mv ./cache/$*/kubectl $@

cache/%/helm-$(HELM_VERSION): docker/helm.version
cache/%/helm-$(HELM2_VERSION): docker/helm2.version
mkdir -p cache/$*
curl --fail -L -o cache/$*/helm-$(HELM2_VERSION).tar.gz "https://storage.googleapis.com/kubernetes-helm/helm-v$(HELM2_VERSION)-$*.tar.gz"
[ $* != "linux-$(ARCH)" ] || echo "$(HELM2_CHECKSUM_$(ARCH)) cache/$*/helm-$(HELM2_VERSION).tar.gz" | shasum -a 256 -c
tar -m -C ./cache -xzf cache/$*/helm-$(HELM2_VERSION).tar.gz $*/helm
mv cache/$*/helm $@

cache/%/helm-$(HELM3_VERSION): docker/helm3.version
mkdir -p cache/$*
curl --fail -L -o cache/$*/helm-$(HELM_VERSION).tar.gz "https://storage.googleapis.com/kubernetes-helm/helm-v$(HELM_VERSION)-$*.tar.gz"
[ $* != "linux-$(ARCH)" ] || echo "$(HELM_CHECKSUM_$(ARCH)) cache/$*/helm-$(HELM_VERSION).tar.gz" | shasum -a 256 -c
tar -m -C ./cache -xzf cache/$*/helm-$(HELM_VERSION).tar.gz $*/helm
curl --fail -L -o cache/$*/helm-$(HELM3_VERSION).tar.gz "https://get.helm.sh/helm-v$(HELM3_VERSION)-$*.tar.gz"
[ $* != "linux-$(ARCH)" ] || echo "$(HELM3_CHECKSUM_$(ARCH)) cache/$*/helm-$(HELM3_VERSION).tar.gz" | shasum -a 256 -c
tar -m -C ./cache -xzf cache/$*/helm-$(HELM3_VERSION).tar.gz $*/helm
mv cache/$*/helm $@

$(GOBIN)/bin/helm-operator: $(HELM_OPERATOR_DEPS)
GO111MODULE=on go install ./cmd/helm-operator
go install ./cmd/helm-operator

pkg/install/generated_templates.gogen.go: pkg/install/templates/*
cd pkg/install && go run generate.go embedded-templates

cache/%/shellcheck-$(SHELLCHECK_VERSION):
mkdir -p cache/$*
curl --fail -L -o cache/$*/shellcheck-$(SHELLCHECK_VERSION).tar.xz "https://storage.googleapis.com/shellcheck/shellcheck-v$(SHELLCHECK_VERSION).$(CURRENT_OS).x86_64.tar.xz"
tar -C cache/$* --strip-components 1 -xvJf cache/$*/shellcheck-$(SHELLCHECK_VERSION).tar.xz shellcheck-v$(SHELLCHECK_VERSION)/shellcheck
mv cache/$*/shellcheck $@

cache/%/shfmt-$(SHFMT_VERSION):
mkdir -p cache/$*
curl --fail -L -o $@ "https://github.com/mvdan/sh/releases/download/v$(SHFMT_VERSION)/shfmt_v$(SHFMT_VERSION)_`echo $* | tr - _`"

test/e2e/bats: cache/bats-core-$(BATS_COMMIT).tar.gz
mkdir -p $@
tar -C $@ --strip-components 1 -xzf $<

cache/bats-core-$(BATS_COMMIT).tar.gz:
# Use 2opremio's fork until https://github.com/bats-core/bats-core/pull/255 is merged
curl --fail -L -o $@ https://github.com/2opremio/bats-core/archive/$(BATS_COMMIT).tar.gz

generate-deploy: pkg/install/generated_templates.gogen.go
cd deploy && go run ../pkg/install/generate.go deploy

check-generated: generate-deploy pkg/install/generated_templates.gogen.go
git diff --exit-code -- pkg/install/generated_templates.gogen.go
GO111MODULE=on ./hack/verify-codegen.sh
./hack/update/verify.sh

build-docs:
@cd docs && docker build -t flux-docs .
Expand Down
13 changes: 13 additions & 0 deletions chart/helm-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 0.3.0 (2019-11-22)

### Improvements

- Update Helm Operator to `1.0.0-rc4`
[fluxcd/helm-operator#114](https://github.com/fluxcd/helm-operator/pull/114)
- Fix upgrade command install instructions in `README.md`
[fluxcd/helm-operator#92](https://github.com/fluxcd/helm-operator/pull/92)
- Add `git.defaultRef` option for configuring an alternative Git default ref
[fluxcd/helm-operator#83](https://github.com/fluxcd/helm-operator/pull/83)
- Allow for deploying Tiller as a sidecar by setting `tillerSidecar.enabled`
[fluxcd/helm-operator#79](https://github.com/fluxcd/helm-operator/pull/79)

## 0.2.1 (2019-10-18)

### Improvements
Expand Down
4 changes: 2 additions & 2 deletions chart/helm-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "1.0.0-rc3"
version: 0.2.1
appVersion: "1.0.0-rc5"
version: 0.3.0
kubeVersion: ">=1.11.0-0"
name: helm-operator
description: Flux Helm Operator is a CRD controller for declarative helming
Expand Down
Loading

0 comments on commit 59fe83f

Please sign in to comment.