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

Commit

Permalink
Merge branch 'master' into change-snap-to-classic
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Holbach authored Dec 10, 2019
2 parents 24702e4 + e7568b2 commit 5227556
Show file tree
Hide file tree
Showing 98 changed files with 2,783 additions and 1,179 deletions.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
working_directory: /home/circleci/go/src/github.com/fluxcd/flux
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
GO_VERSION: 1.13.1
# We don't need a GOPATH but CircleCI defines it, so we override it
Expand Down Expand Up @@ -90,7 +91,10 @@ jobs:
sudo killall apt-get || true
sudo apt-get update
sudo apt-get install -y git rng-tools memcached
sudo apt-get install -y git rng-tools memcached parallel
# avoid needing to invoke parallel with --will-cite,
# see e.g see https://bugs.launchpad.net/ubuntu/+source/parallel/+bug/1779764
mkdir -p "$HOME/.parallel" && touch "$HOME/.parallel/will-cite"
git version
docker version
- restore_cache:
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,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
130 changes: 129 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
## 1.16.0 (2019-11-22)

This is a feature release with minor new features. New flags
`--manifest-generation` and `--read-only` have been added to
`fluxctl install`.

This release also incorporates a few fixes and enhacements. Namely:
* The pressure on the Kubernetes API server has been reduced when
Flux operates in all namespaces.
* The error handling of manifest generation has been improved.

Additionally, the end-to-end testing infrastructure has been rewritten and
numerous new end-to-end tests have been added.

### Fixes

- Exclude the metrics APIs from resource discovery [fluxcd/flux#2606][]
- Parse image refs in HelmReleases with >2 elements [fluxcd/flux#2620][]
- Ignore timestamp labels during sorting and release of images [fluxcd/flux#2594][]
- Security: Stop showing value of `GIT_AUTHKEY` in the `fluxctl` output [fluxcd/flux#2549][]

### Enhacements

- Improve experience with `.flux.yaml` files
fluxcd/flux#{[2565][fluxcd/flux#2565], [2603][fluxcd/flux#2603],
[2604][fluxcd/flux#2604]}
- Performance: Reduce pressure on Kubernetes' API server when Flux operates on
all namespaces fluxcd/flux#{[2520][fluxcd/flux#2520],
[2539][fluxcd/flux#2539], [2622][fluxcd/flux#2622]}
- Add manifest generation flag to `fluctl install` command [fluxcd/flux#2583][]
- Add a read-only flag to `fluxctl install` command [fluxcd/flux#2530][]
- Create Prometheus metric for flux manifest errors [fluxcd/flux#2535][]

### Maintenance and Documentation

- Rewrite end-to-end test infrastructure and add numerous new end-to-end tests
fluxcd/flux#{[2543][fluxcd/flux#2543], [2552][fluxcd/flux#2552],
[2559][fluxcd/flux#2559], [2560][fluxcd/flux#2560], [2562][fluxcd/flux#2562],
[2567][fluxcd/flux#2567], [2569][fluxcd/flux#2569], [2572][fluxcd/flux#2572],
[2574][fluxcd/flux#2574], [2575][fluxcd/flux#2575], [2576][fluxcd/flux#2576],
[2577][fluxcd/flux#2577], [2579][fluxcd/flux#2579], [2581][fluxcd/flux#2581],
[2587][fluxcd/flux#2587], [2596][fluxcd/flux#2596], [2597][fluxcd/flux#2597],
[2598][fluxcd/flux#2598]}
- Bump alpine to 3.10 [fluxcd/flux#2609][]
- Break code generation cycle [fluxcd/flux#2525][]
- Fix indents in `.flux.yaml` example [fluxcd/flux#2607][]
- Remove redundant return code [fluxcd/flux#2585][]
- Remove replace directives in `go.mod` [fluxcd/flux#2590][]
- Support unwrapping `NotReadyError` [fluxcd/flux#2617][]
- Fix incorrect use of `strings.Trim()` [fluxcd/flux#2527][]
- Add Cybrary, bimspot.io, Limejump and Yad2 as production users to `README.md`
fluxcd/flux#{[2592][fluxcd/flux#2592], [2499][fluxcd/flux#2499],
[2503][fluxcd/flux#2503], [2509][fluxcd/flux#2509]}
- Clarify use of pre-release versions by semver [fluxcd/flux#2582][]
- Fix some steps in README.md to install flux by helm [fluxcd/flux#2532][]
- Fix command in fluxyaml config example [fluxcd/flux#2531][]
- Docs: fix namespace in `kubectl logs` example [fluxcd/flux#2526][]
- Document sync-state and git-readonly daemon flags [fluxcd/flux#2511][]
- Update FAQ advice on using ignore annotation [fluxcd/flux#2502][]
- Fix typo in guide index docs [fluxcd/flux#2506][]
- Fix link to flux-kustomize-example [fluxcd/flux#2497][]

### Thanks

Thanks to @2opremio, @at-ishikawa, @bboreham, @beautytiger, @carnott-snap,
@denysvitali, @ducksecops, @erdii, @eriadam, @gsf, @hiddeco, @idobry, @jmymy,
@mbellgb, @mosesyou, @mpashka, @palemtnrider, @sebikul, @squaremo, @srueg,
@stefanprodan, @translucens, @vic3lord and @waseem-h for their contributions
to this release!

[fluxcd/flux#2622]: https://github.com/fluxcd/flux/pull/2622
[fluxcd/flux#2620]: https://github.com/fluxcd/flux/pull/2620
[fluxcd/flux#2617]: https://github.com/fluxcd/flux/pull/2617
[fluxcd/flux#2609]: https://github.com/fluxcd/flux/pull/2609
[fluxcd/flux#2607]: https://github.com/fluxcd/flux/pull/2607
[fluxcd/flux#2606]: https://github.com/fluxcd/flux/pull/2606
[fluxcd/flux#2604]: https://github.com/fluxcd/flux/pull/2604
[fluxcd/flux#2603]: https://github.com/fluxcd/flux/pull/2603
[fluxcd/flux#2599]: https://github.com/fluxcd/flux/pull/2599
[fluxcd/flux#2598]: https://github.com/fluxcd/flux/pull/2598
[fluxcd/flux#2597]: https://github.com/fluxcd/flux/pull/2597
[fluxcd/flux#2596]: https://github.com/fluxcd/flux/pull/2596
[fluxcd/flux#2594]: https://github.com/fluxcd/flux/pull/2594
[fluxcd/flux#2592]: https://github.com/fluxcd/flux/pull/2592
[fluxcd/flux#2590]: https://github.com/fluxcd/flux/pull/2590
[fluxcd/flux#2587]: https://github.com/fluxcd/flux/pull/2587
[fluxcd/flux#2585]: https://github.com/fluxcd/flux/pull/2585
[fluxcd/flux#2583]: https://github.com/fluxcd/flux/pull/2583
[fluxcd/flux#2582]: https://github.com/fluxcd/flux/pull/2582
[fluxcd/flux#2581]: https://github.com/fluxcd/flux/pull/2581
[fluxcd/flux#2579]: https://github.com/fluxcd/flux/pull/2579
[fluxcd/flux#2577]: https://github.com/fluxcd/flux/pull/2577
[fluxcd/flux#2576]: https://github.com/fluxcd/flux/pull/2576
[fluxcd/flux#2575]: https://github.com/fluxcd/flux/pull/2575
[fluxcd/flux#2574]: https://github.com/fluxcd/flux/pull/2574
[fluxcd/flux#2573]: https://github.com/fluxcd/flux/pull/2573
[fluxcd/flux#2572]: https://github.com/fluxcd/flux/pull/2572
[fluxcd/flux#2569]: https://github.com/fluxcd/flux/pull/2569
[fluxcd/flux#2567]: https://github.com/fluxcd/flux/pull/2567
[fluxcd/flux#2566]: https://github.com/fluxcd/flux/pull/2566
[fluxcd/flux#2565]: https://github.com/fluxcd/flux/pull/2565
[fluxcd/flux#2562]: https://github.com/fluxcd/flux/pull/2562
[fluxcd/flux#2560]: https://github.com/fluxcd/flux/pull/2560
[fluxcd/flux#2559]: https://github.com/fluxcd/flux/pull/2559
[fluxcd/flux#2552]: https://github.com/fluxcd/flux/pull/2552
[fluxcd/flux#2549]: https://github.com/fluxcd/flux/pull/2549
[fluxcd/flux#2543]: https://github.com/fluxcd/flux/pull/2543
[fluxcd/flux#2542]: https://github.com/fluxcd/flux/pull/2542
[fluxcd/flux#2539]: https://github.com/fluxcd/flux/pull/2539
[fluxcd/flux#2535]: https://github.com/fluxcd/flux/pull/2535
[fluxcd/flux#2532]: https://github.com/fluxcd/flux/pull/2532
[fluxcd/flux#2531]: https://github.com/fluxcd/flux/pull/2531
[fluxcd/flux#2530]: https://github.com/fluxcd/flux/pull/2530
[fluxcd/flux#2527]: https://github.com/fluxcd/flux/pull/2527
[fluxcd/flux#2526]: https://github.com/fluxcd/flux/pull/2526
[fluxcd/flux#2525]: https://github.com/fluxcd/flux/pull/2525
[fluxcd/flux#2520]: https://github.com/fluxcd/flux/pull/2520
[fluxcd/flux#2511]: https://github.com/fluxcd/flux/pull/2511
[fluxcd/flux#2509]: https://github.com/fluxcd/flux/pull/2509
[fluxcd/flux#2506]: https://github.com/fluxcd/flux/pull/2506
[fluxcd/flux#2503]: https://github.com/fluxcd/flux/pull/2503
[fluxcd/flux#2502]: https://github.com/fluxcd/flux/pull/2502
[fluxcd/flux#2500]: https://github.com/fluxcd/flux/pull/2500
[fluxcd/flux#2499]: https://github.com/fluxcd/flux/pull/2499
[fluxcd/flux#2497]: https://github.com/fluxcd/flux/pull/2497
[fluxcd/flux#2495]: https://github.com/fluxcd/flux/pull/2495
[fluxcd/flux#2493]: https://github.com/fluxcd/flux/pull/2493
[fluxcd/flux#2492]: https://github.com/fluxcd/flux/pull/2492

## 1.15.0 (2019-10-02)

This feature release adds secure support for Git over HTTPS, updates
Expand Down Expand Up @@ -1664,4 +1793,3 @@ Initial semver release.
- Refactored registry code and improved coverage

See https://github.com/weaveworks/flux/milestone/7?closed=1 for full details.

74 changes: 59 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.DEFAULT: all
.PHONY: all release-bins clean realclean test integration-test generate-deploy check-generated
.PHONY: all release-bins clean realclean test integration-test generate-deploy 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/kustomize.version
include docker/helm.version
Expand All @@ -15,7 +19,8 @@ include docker/helm.version
ifeq ($(ARCH),)
ARCH=amd64
endif
CURRENT_OS_ARCH=$(shell echo `go env GOOS`-`go env GOARCH`)
CURRENT_OS=$(shell go env GOOS)
CURRENT_OS_ARCH=$(shell echo $(CURRENT_OS)-`go env GOARCH`)
GOBIN?=$(shell echo `go env GOPATH`/bin)

godeps=$(shell go list -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1) | sed "s%${PWD}/%%g")
Expand All @@ -29,9 +34,11 @@ BUILD_DATE:=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')

DOCS_PORT:=8000

GENERATED_TEMPLATES_FILE=pkg/install/generated_templates.gogen.go

all: $(GOBIN)/fluxctl $(GOBIN)/fluxd build/.flux.done

release-bins:
release-bins: $(GENERATED_TEMPLATES_FILE)
for arch in amd64; do \
for os in linux darwin windows; do \
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build -o "build/fluxctl_"$$os"_$$arch" $(LDFLAGS) -ldflags "-X main.version=$(shell ./docker/image-tag)" ./cmd/fluxctl/; \
Expand All @@ -51,11 +58,23 @@ clean:
realclean: clean
rm -rf ./cache

test: test/bin/helm test/bin/kubectl test/bin/kustomize
test: test/bin/helm test/bin/kubectl test/bin/kustomize $(GENERATED_TEMPLATES_FILE)
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/fluxcd/flux/vendor" | sort -u)

e2e: test/bin/helm test/bin/kubectl build/.flux.done
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.sh
e2e: lint-e2e test/bin/helm test/bin/kubectl test/e2e/bats $(GOBIN)/fluxctl build/.flux.done
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.bash

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 @@ -78,9 +97,11 @@ build/helm: cache/linux-$(ARCH)/helm-$(HELM_VERSION)
test/bin/helm: cache/$(CURRENT_OS_ARCH)/helm-$(HELM_VERSION)
build/kustomize: cache/linux-amd64/kustomize-$(KUSTOMIZE_VERSION)
test/bin/kustomize: cache/$(CURRENT_OS_ARCH)/kustomize-$(KUSTOMIZE_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/kustomize test/bin/kustomize build/helm test/bin/helm:
mkdir -p build
build/kubectl test/bin/kubectl build/kustomize test/bin/kustomize build/helm test/bin/helm test/bin/shellcheck test/bin/shfmt:
mkdir -p $(@D)
cp $< $@
if [ `basename $@` = "build" -a $(CURRENT_OS_ARCH) = "linux-$(ARCH)" ]; then strip $@; fi
chmod a+x $@
Expand All @@ -104,7 +125,25 @@ cache/%/helm-$(HELM_VERSION): docker/helm.version
tar -m -C ./cache -xzf cache/$*/helm-$(HELM_VERSION).tar.gz $*/helm
mv cache/$*/helm $@

$(GOBIN)/fluxctl: $(FLUXCTL_DEPS)
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

$(GOBIN)/fluxctl: $(FLUXCTL_DEPS) $(GENERATED_TEMPLATES_FILE)
go install ./cmd/fluxctl

$(GOBIN)/fluxd: $(FLUXD_DEPS)
Expand All @@ -113,14 +152,19 @@ $(GOBIN)/fluxd: $(FLUXD_DEPS)
integration-test: all
test/bin/test-flux

generate-deploy: pkg/install/generated_templates.gogen.go
cd deploy && go run ../pkg/install/generate.go deploy
generate-deploy: $(GOBIN)/fluxctl
$(GOBIN)/fluxctl install -o ./deploy \
--git-url [email protected]:fluxcd/flux-get-started \
--git-email [email protected] \
--git-user 'Flux automation' \
--git-label flux-sync \
--namespace flux

pkg/install/generated_templates.gogen.go: pkg/install/templates/*
cd pkg/install && go run generate.go embedded-templates
$(GENERATED_TEMPLATES_FILE): pkg/install/templates/*.tmpl pkg/install/generate.go
go generate ./pkg/install

check-generated: generate-deploy pkg/install/generated_templates.gogen.go
git diff --exit-code -- integrations/apis integrations/client pkg/install/generated_templates.gogen.go
check-generated: generate-deploy
git diff --exit-code -- deploy/

build-docs:
@cd docs && docker build -t flux-docs .
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,31 @@ container images and config changes are propagated to the cluster.
- [Avisi](https://avisi.nl)
- [Babylon Health](https://www.babylonhealth.com/)
- [bimspot](https://bimspot.io)
- [Canva](https://www.canva.com/)
- [CLVR Cloud Ltd](https://clvr.cloud)
- [College of William & Mary](https://www.wm.edu)
- [Control Plane](https://control-plane.io)
- [Crowd Riff](https://crowdriff.com)
- [Cybrary](https://cybrary.it)
- [FireHydrant](https://firehydrant.io)
- [Gini](https://gini.net)
- [HMCTS](https://www.gov.uk/government/organisations/hm-courts-and-tribunals-service)
- [IBM Cloudant](https://www.ibm.com/cloud/cloudant)
- [Improwised Technologies](https://www.improwised.com/)
- [Infabode](https://infabode.com)
- [iQmetrix](https://www.iqmetrix.com)
- [karriere tutor GmbH](https://www.karrieretutor.de)
- [Limejump](https://limejump.com)
- [loveholidays](https://www.loveholidays.com/)
- [LUNAR](https://www.lunarway.com/)
- [Mettle](https://mettle.co.uk)
- [Omise](https://www.omise.co)
- [Payout](https://payout.one)
- [Qordoba](https://qordoba.com)
- [Rakuten](https://rakuten.com)
- [Replicated](https://replicated.com)
- [Rungway](https://rungway.com)
- [Sage AI Labs](https://www.sage.com)
- [Starbucks](https://www.starbucks.com/)
- [Troii](https://troii.com/)
- [Under Armour](https://www.underarmour.com)
Expand Down
16 changes: 16 additions & 0 deletions chart/flux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.16.0 (2019-11-28)

### Improvements

- Updated Flux to `1.16.0`
[fluxcd/flux#2639](https://github.com/fluxcd/flux/pull/2639)
- Allow `git.verifySignature` to be `"false"`
[fluxcd/flux#2573](https://github.com/fluxcd/flux/pull/2573)
- Update the automation interval flag in the chart
[fluxcd/flux#2551](https://github.com/fluxcd/flux/pull/2551)

### Bug fixes

- Fix memcached PSP
[fluxcd/flux#2542](https://github.com/fluxcd/flux/pull/2542)

## 0.15.0 (2019-10-07)

**Note** The Helm Operator options will be **removed** from this chart in the next major release.
Expand Down
4 changes: 2 additions & 2 deletions chart/flux/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "1.15.0"
version: 0.15.0
appVersion: "1.16.0"
version: 0.16.0
kubeVersion: ">=1.9.0-0"
name: flux
description: Flux is a tool that automatically ensures that the state of a cluster matches what is specified in version control
Expand Down
Loading

0 comments on commit 5227556

Please sign in to comment.