Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fluxcd/flagger
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.22.2
Choose a base ref
...
head repository: fluxcd/flagger
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.23.0
Choose a head ref
  • 20 commits
  • 44 files changed
  • 8 contributors

Commits on Aug 30, 2022

  1. Add app.kubernetes.io/version label to chart

    Add `app.kubernetes.io/version` label as described in https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
    
    This is useful if you have many deployments in different clusters and want to be able to monitor what versions you have deployed using something like `kube_pod_labels` from kube-state-metrics.
    
    Signed-off-by: Gustaf Lindstedt <gustaf.lindstedt@embark-studios.com>
    glindstedt authored Aug 30, 2022
    Copy the full SHA
    0ae53e4 View commit details

Commits on Sep 1, 2022

  1. Merge pull request #1264 from glindstedt/patch-1

    Add `app.kubernetes.io/version` label to chart
    aryan9600 authored Sep 1, 2022
    Copy the full SHA
    89b0487 View commit details

Commits on Sep 2, 2022

  1. Update kubernetes-blue-green.md

    Signed-off-by: Edwar Baron <edwar.baron@gmail.com>
    ebar0n authored Sep 2, 2022
    Copy the full SHA
    b97a87a View commit details

Commits on Sep 26, 2022

  1. logCmdOutput to logger instead of stdout

    Signed-off-by: Øistein Sletten Løvik <oistein@oistein.org>
    oistein committed Sep 26, 2022
    Copy the full SHA
    6d72050 View commit details

Commits on Sep 27, 2022

  1. Merge pull request #1267 from oistein/log-cmd-output-to-log

    logCmdOutput to logger instead of stdout
    aryan9600 authored Sep 27, 2022
    Copy the full SHA
    1b2df99 View commit details

Commits on Oct 5, 2022

  1. Include cluster name in all alerts

    Signed-off-by: ashokhein <ashokhein@gmail.com>
    ashokhein committed Oct 5, 2022
    Copy the full SHA
    4dbeec0 View commit details

Commits on Oct 6, 2022

  1. Merge pull request #1275 from ashokhein/include-cluster-name

    Include cluster name in all alerts
    stefanprodan authored Oct 6, 2022
    Copy the full SHA
    7b6c37e View commit details

Commits on Oct 10, 2022

  1. gatewayapi: fix reconcilation of nil hostnames

    Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
    Sanskar Jaiswal committed Oct 10, 2022
    Copy the full SHA
    e593f2e View commit details
  2. Merge pull request #1276 from aryan9600/fix-hostnames

    gatewayapi: fix reconcilation of nil hostnames
    aryan9600 authored Oct 10, 2022
    Copy the full SHA
    b96f6f0 View commit details

Commits on Oct 12, 2022

  1. update Go to 1.19

    Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
    Sanskar Jaiswal authored and aryan9600 committed Oct 12, 2022
    Copy the full SHA
    3418488 View commit details
  2. Merge pull request #1279 from aryan9600/go-1.19

    update Go to 1.19
    aryan9600 authored Oct 12, 2022
    Copy the full SHA
    8d8b99d View commit details

Commits on Oct 18, 2022

  1. Bump Contour to v1.22 in e2e tests

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Oct 18, 2022
    Copy the full SHA
    e06334c View commit details
  2. Slack bot token authentication

    Signed-off-by: Ricardo Lorenzo <rlorenzo@payfone.com>
    Ricardo Lorenzo committed Oct 18, 2022
    Copy the full SHA
    3dd667f View commit details
  3. Merge pull request #1282 from fluxcd/contour-1.22

    Bump Contour to v1.22 in e2e tests
    stefanprodan authored Oct 18, 2022
    Copy the full SHA
    310111b View commit details
  4. Merge pull request #1270 from RicardoLorenzo/slack_bot_token_authenti…

    …cation
    
    Slack bot token authentication
    stefanprodan authored Oct 18, 2022
    Copy the full SHA
    8197073 View commit details
  5. Merge pull request #1265 from ebar0n/patch-1

    Use Helm to install loadtester in kubernetes-blue-green docs
    stefanprodan authored Oct 18, 2022
    Copy the full SHA
    e7e1550 View commit details

Commits on Oct 20, 2022

  1. Update Kubernetes packages to v1.25.3

    Update dependencies and fix CVE-2022-32149 of `golang.org/x/text`
    
    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Oct 20, 2022
    Copy the full SHA
    5e47ae2 View commit details
  2. Merge pull request #1283 from fluxcd/kubernetes-1.25.3

    Update Kubernetes packages to v1.25.3
    stefanprodan authored Oct 20, 2022
    Copy the full SHA
    283de16 View commit details
  3. Release v1.23.0

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Oct 20, 2022
    Copy the full SHA
    08d7520 View commit details
  4. Merge pull request #1284 from fluxcd/release-1.23.0

    Release v1.23.0
    stefanprodan authored Oct 20, 2022
    Copy the full SHA
    a4f5a98 View commit details
Showing with 593 additions and 714 deletions.
  1. +1 −1 .github/workflows/build.yaml
  2. +28 −0 CHANGELOG.md
  3. +1 −1 Dockerfile
  4. +1 −1 Dockerfile.loadtester
  5. +1 −1 Makefile
  6. +1 −1 artifacts/flagger/deployment.yaml
  7. +2 −2 charts/flagger/Chart.yaml
  8. +2 −0 charts/flagger/templates/deployment.yaml
  9. +1 −1 charts/flagger/values.yaml
  10. +2 −2 charts/loadtester/Chart.yaml
  11. +1 −1 charts/loadtester/values.yaml
  12. +4 −1 cmd/flagger/main.go
  13. +1 −1 cmd/loadtester/main.go
  14. +1 −1 docs/gitbook/dev/dev-guide.md
  15. +2 −1 docs/gitbook/tutorials/kubernetes-blue-green.md
  16. +4 −0 docs/gitbook/usage/alerting.md
  17. +22 −19 go.mod
  18. +41 −281 go.sum
  19. +1 −1 kustomize/base/flagger/kustomization.yaml
  20. +1 −1 kustomize/tester/deployment.yaml
  21. +13 −11 pkg/apis/gatewayapi/v1alpha2/httproute_types.go
  22. +141 −113 pkg/apis/istio/v1alpha3/destination_rule.go
  23. +250 −221 pkg/apis/istio/v1alpha3/virtual_service.go
  24. +3 −1 pkg/apis/projectcontour/v1/detailedconditions.go
  25. +1 −1 pkg/canary/daemonset_controller.go
  26. +7 −7 pkg/client/clientset/versioned/fake/register.go
  27. +7 −7 pkg/client/clientset/versioned/scheme/register.go
  28. +21 −12 pkg/controller/events.go
  29. +1 −1 pkg/loadtester/bash.go
  30. +1 −1 pkg/loadtester/helmv3.go
  31. +1 −2 pkg/loadtester/task_shell.go
  32. +3 −2 pkg/metrics/observers/kuma.go
  33. +5 −1 pkg/notifier/client.go
  34. +1 −1 pkg/notifier/client_test.go
  35. +1 −1 pkg/notifier/discord.go
  36. +4 −2 pkg/notifier/factory.go
  37. +1 −1 pkg/notifier/gchat.go
  38. +1 −1 pkg/notifier/rocket.go
  39. +7 −5 pkg/notifier/slack.go
  40. +1 −1 pkg/notifier/slack_test.go
  41. +1 −1 pkg/notifier/teams.go
  42. +2 −2 pkg/router/gateway_api.go
  43. +1 −1 pkg/version/version.go
  44. +1 −1 test/contour/install.sh
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: Download modules
run: |
go mod download
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,34 @@

All notable changes to this project are documented in this file.

## 1.23.0

**Release date:** 2022-10-20

This release comes with support for Slack bot token authentication.

#### Improvements:

- alerts: Add support for Slack bot token authentication
[#1270](https://github.com/fluxcd/flagger/pull/1270)
- loadtester: logCmdOutput to logger instead of stdout
[#1267](https://github.com/fluxcd/flagger/pull/1267)
- helm: Add app.kubernetes.io/version label to chart
[#1264](https://github.com/fluxcd/flagger/pull/1264)
- Update Go to 1.19
[#1264](https://github.com/fluxcd/flagger/pull/1264)
- Update Kubernetes packages to v1.25.3
[#1283](https://github.com/fluxcd/flagger/pull/1283)
- Bump Contour to v1.22 in e2e tests
[#1282](https://github.com/fluxcd/flagger/pull/1282)

#### Fixes:

- gatewayapi: Fix reconciliation of nil hostnames
[#1276](https://github.com/fluxcd/flagger/pull/1276)
- alerts: Include cluster name in all alerts
[#1275](https://github.com/fluxcd/flagger/pull/1275)

## 1.22.2

**Release date:** 2022-08-29
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

ARG TARGETPLATFORM
ARG REVISON
2 changes: 1 addition & 1 deletion Dockerfile.loadtester
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

ARG TARGETPLATFORM
ARG TARGETARCH
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ build:
CGO_ENABLED=0 go build -a -o ./bin/flagger ./cmd/flagger

tidy:
rm -f go.sum; go mod tidy -compat=1.18
rm -f go.sum; go mod tidy -compat=1.19

vet:
go vet ./...
2 changes: 1 addition & 1 deletion artifacts/flagger/deployment.yaml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ spec:
serviceAccountName: flagger
containers:
- name: flagger
image: ghcr.io/fluxcd/flagger:1.22.2
image: ghcr.io/fluxcd/flagger:1.23.0
imagePullPolicy: IfNotPresent
ports:
- name: http
4 changes: 2 additions & 2 deletions charts/flagger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: flagger
version: 1.22.2
appVersion: 1.22.2
version: 1.23.0
appVersion: 1.23.0
kubeVersion: ">=1.19.0-0"
engine: gotpl
description: Flagger is a progressive delivery operator for Kubernetes
2 changes: 2 additions & 0 deletions charts/flagger/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ metadata:
app.kubernetes.io/name: {{ template "flagger.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
spec:
replicas: {{ .Values.leaderElection.replicaCount }}
{{- if eq .Values.leaderElection.enabled false }}
@@ -22,6 +23,7 @@ spec:
labels:
app.kubernetes.io/name: {{ template "flagger.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- if .Values.podLabels }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value | quote }}
2 changes: 1 addition & 1 deletion charts/flagger/values.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

image:
repository: ghcr.io/fluxcd/flagger
tag: 1.22.2
tag: 1.23.0
pullPolicy: IfNotPresent
pullSecret:

4 changes: 2 additions & 2 deletions charts/loadtester/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: loadtester
version: 0.24.0
appVersion: 0.24.0
version: 0.25.0
appVersion: 0.25.0
kubeVersion: ">=1.19.0-0"
engine: gotpl
description: Flagger's load testing services based on rakyll/hey and bojand/ghz that generates traffic during canary analysis when configured as a webhook.
2 changes: 1 addition & 1 deletion charts/loadtester/values.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ replicaCount: 1

image:
repository: ghcr.io/fluxcd/flagger-loadtester
tag: 0.24.0
tag: 0.25.0
pullPolicy: IfNotPresent
pullSecret:

5 changes: 4 additions & 1 deletion cmd/flagger/main.go
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ var (
msteamsProxyURL string
includeLabelPrefix string
slackURL string
slackToken string
slackProxyURL string
slackUser string
slackChannel string
@@ -97,6 +98,7 @@ func init() {
flag.StringVar(&logLevel, "log-level", "debug", "Log level can be: debug, info, warning, error.")
flag.StringVar(&port, "port", "8080", "Port to listen on.")
flag.StringVar(&slackURL, "slack-url", "", "Slack hook URL.")
flag.StringVar(&slackToken, "slack-token", "", "Slack bot token.")
flag.StringVar(&slackProxyURL, "slack-proxy-url", "", "Slack proxy URL.")
flag.StringVar(&slackUser, "slack-user", "flagger", "Slack user name.")
flag.StringVar(&slackChannel, "slack-channel", "", "Slack channel.")
@@ -365,14 +367,15 @@ func startLeaderElection(ctx context.Context, run func(), ns string, kubeClient

func initNotifier(logger *zap.SugaredLogger) (client notifier.Interface) {
provider := "slack"
token := fromEnv("SLACK_TOKEN", slackToken)
notifierURL := fromEnv("SLACK_URL", slackURL)
notifierProxyURL := fromEnv("SLACK_PROXY_URL", slackProxyURL)
if msteamsURL != "" || os.Getenv("MSTEAMS_URL") != "" {
provider = "msteams"
notifierURL = fromEnv("MSTEAMS_URL", msteamsURL)
notifierProxyURL = fromEnv("MSTEAMS_PROXY_URL", msteamsProxyURL)
}
notifierFactory := notifier.NewFactory(notifierURL, notifierProxyURL, slackUser, slackChannel)
notifierFactory := notifier.NewFactory(notifierURL, token, notifierProxyURL, slackUser, slackChannel)

var err error
client, err = notifierFactory.Notifier(provider)
2 changes: 1 addition & 1 deletion cmd/loadtester/main.go
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ import (
"go.uber.org/zap"
)

var VERSION = "0.24.0"
var VERSION = "0.25.0"
var (
logLevel string
port string
2 changes: 1 addition & 1 deletion docs/gitbook/dev/dev-guide.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Flagger is written in Go and uses Go modules for dependency management.

On your dev machine install the following tools:

* go >= 1.18
* go >= 1.19
* git >;= 2.20
* bash >= 5.0
* make >= 3.81
3 changes: 2 additions & 1 deletion docs/gitbook/tutorials/kubernetes-blue-green.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,8 @@ kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main
Deploy the load testing service to generate traffic during the analysis:

```bash
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main
helm upgrade -i flagger-loadtester flagger/loadtester \
--namespace=test
```

Create a canary custom resource:
4 changes: 4 additions & 0 deletions docs/gitbook/usage/alerting.md
Original file line number Diff line number Diff line change
@@ -37,6 +37,8 @@ or if the analysis reached the maximum number of failed checks:

![Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-failed.png)

For using a Slack bot token, you should add `token` to a secret and use **secretRef**.

### Microsoft Teams

Flagger can be configured to send notifications to Microsoft Teams:
@@ -73,6 +75,7 @@ spec:
channel: on-call-alerts
username: flagger
# webhook address (ignored if secretRef is specified)
# or https://slack.com/api/chat.postMessage if you use token in the secret
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# optional http/s proxy
proxy: http://my-http-proxy.com
@@ -87,6 +90,7 @@ metadata:
namespace: flagger
data:
address: <encoded-url>
token: <encoded-token>
```
The alert provider **type** can be: `slack`, `msteams`, `rocket` or `discord`. When set to `discord`,
41 changes: 22 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
module github.com/fluxcd/flagger

go 1.18
go 1.19

require (
cloud.google.com/go/monitoring v1.6.0
github.com/Masterminds/semver/v3 v3.1.1
github.com/aws/aws-sdk-go v1.44.85
github.com/aws/aws-sdk-go v1.44.119
github.com/davecgh/go-spew v1.1.1
github.com/go-logr/zapr v1.2.3
github.com/google/go-cmp v0.5.8
github.com/googleapis/gax-go/v2 v2.5.1
github.com/influxdata/influxdb-client-go/v2 v2.10.0
github.com/google/go-cmp v0.5.9
github.com/googleapis/gax-go/v2 v2.6.0
github.com/influxdata/influxdb-client-go/v2 v2.11.0
github.com/prometheus/client_golang v1.13.0
github.com/stretchr/testify v1.8.0
go.uber.org/zap v1.23.0
google.golang.org/api v0.94.0
google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
google.golang.org/grpc v1.49.0
google.golang.org/api v0.100.0
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55
google.golang.org/grpc v1.50.1
google.golang.org/protobuf v1.28.1
gopkg.in/h2non/gock.v1 v1.1.2
k8s.io/api v0.25.0
k8s.io/apimachinery v0.25.0
k8s.io/client-go v0.25.0
k8s.io/code-generator v0.25.0
k8s.io/klog/v2 v2.70.1
k8s.io/api v0.25.3
k8s.io/apimachinery v0.25.3
k8s.io/client-go v0.25.3
k8s.io/code-generator v0.25.3
k8s.io/klog/v2 v2.80.1
)

// Fix CVE-2022-32149
replace golang.org/x/text => golang.org/x/text v0.4.0

require (
cloud.google.com/go/compute v1.7.0 // indirect
cloud.google.com/go/compute v1.10.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/beorn7/perks v1.0.1 // indirect
@@ -45,7 +48,7 @@ require (
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
@@ -67,11 +70,11 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/appengine v1.6.7 // indirect
Loading