Skip to content

Commit

Permalink
Merge pull request #202 from sebastiangaiser/main
Browse files Browse the repository at this point in the history
feat(flux2): add webhook-receiver ingress
  • Loading branch information
stefanprodan authored Nov 5, 2023
2 parents 5c5375c + c2afa55 commit 5fea58a
Show file tree
Hide file tree
Showing 27 changed files with 109 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
Expand Down
2 changes: 1 addition & 1 deletion _readme_templates.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{{ template "chart.description" . }}

This helm chart is maintain and released by the fluxcd-community on a best effort basis.
This helm chart is maintained and released by the fluxcd-community on a best effort basis.

{{ template "chart.homepageLine" . }}

Expand Down
4 changes: 2 additions & 2 deletions charts/flux2-multi-tenancy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: flux2-multi-tenancy
version: 0.0.5
version: 0.0.6
deprecated: true
description: A Helm chart for flux2-multi-tenancy
sources:
Expand All @@ -13,4 +13,4 @@ dependencies:
condition: kyverno.enabled
annotations:
artifacthub.io/changes: |
- "Mark this chart as DEPRECATED. Since upstream appversion 0.26.0 this can be done wilth Multi-Tenancy Lockdown Use `multitenancy.enabled` in flux2 chart >=0.11.0"
- "docs: fix grammar"
4 changes: 2 additions & 2 deletions charts/flux2-multi-tenancy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

> **:exclamation: This Helm Chart is deprecated!**
![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.0.6](https://img.shields.io/badge/Version-0.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for flux2-multi-tenancy

This helm chart is maintain and released by the fluxcd-community on a best effort basis.
This helm chart is maintained and released by the fluxcd-community on a best effort basis.

## Source Code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/instance: NAMESPACE
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
helm.sh/chart: flux2-multi-tenancy-0.0.5
helm.sh/chart: flux2-multi-tenancy-0.0.6
name: RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down
4 changes: 2 additions & 2 deletions charts/flux2-notification/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v2
name: flux2-notification
type: application
version: 1.12.3
version: 1.12.4
appVersion: 2.1.2
description: A Helm chart for flux2 alerts and the needed providers and secrets
sources:
- https://github.com/fluxcd-community/helm-charts
annotations:
artifacthub.io/changes: |
- "[Chore]: Update App Version to upstream 2.1.2"
- "docs: fix grammar""
4 changes: 2 additions & 2 deletions charts/flux2-notification/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# flux2-notification

![Version: 1.12.3](https://img.shields.io/badge/Version-1.12.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)
![Version: 1.12.4](https://img.shields.io/badge/Version-1.12.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)

A Helm chart for flux2 alerts and the needed providers and secrets

This helm chart is maintain and released by the fluxcd-community on a best effort basis.
This helm chart is maintained and released by the fluxcd-community on a best effort basis.

## Source Code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-notification-1.12.3
helm.sh/chart: flux2-notification-1.12.4
name: all-kustomizations
namespace: NAMESPACE
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-notification-1.12.3
helm.sh/chart: flux2-notification-1.12.4
name: on-call-slack
namespace: NAMESPACE
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-notification-1.12.3
helm.sh/chart: flux2-notification-1.12.4
name: webhook-url
namespace: NAMESPACE
stringData:
Expand Down
4 changes: 2 additions & 2 deletions charts/flux2-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v2
name: flux2-sync
type: application
version: 1.7.2
version: 1.7.3
appVersion: 2.1.2
description: A Helm chart for flux2 GitRepository to sync with
sources:
- https://github.com/fluxcd-community/helm-charts
annotations:
artifacthub.io/changes: |
- "[Chore]: Update App Version to upstream 2.1.2"
- "docs: fix grammar"
4 changes: 2 additions & 2 deletions charts/flux2-sync/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# flux2-sync

![Version: 1.7.2](https://img.shields.io/badge/Version-1.7.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)
![Version: 1.7.3](https://img.shields.io/badge/Version-1.7.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)

A Helm chart for flux2 GitRepository to sync with

This helm chart is maintain and released by the fluxcd-community on a best effort basis.
This helm chart is maintained and released by the fluxcd-community on a best effort basis.

## Source Code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ should match snapshot of default values:
app.kubernetes.io/instance: NAMESPACE
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
helm.sh/chart: flux2-sync-1.7.2
helm.sh/chart: flux2-sync-1.7.3
name: RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -24,7 +24,7 @@ should match snapshot with special values:
app.kubernetes.io/instance: NAMESPACE
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
helm.sh/chart: flux2-sync-1.7.2
helm.sh/chart: flux2-sync-1.7.3
name: RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ should match kubeconfig:
app.kubernetes.io/instance: NAMESPACE
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
helm.sh/chart: flux2-sync-1.7.2
helm.sh/chart: flux2-sync-1.7.3
name: RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/flux2-sync/tests/__snapshot__/secret_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/instance: NAMESPACE
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
helm.sh/chart: flux2-sync-1.7.2
helm.sh/chart: flux2-sync-1.7.3
name: RELEASE-NAME
namespace: NAMESPACE
type: Opaque
4 changes: 2 additions & 2 deletions charts/flux2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
annotations:
artifacthub.io/changes: |
- "feat: upgrade to FluxCD 2.1.2"
- "feat: add ingress resource for notificationController's receiver webhook service"
apiVersion: v2
appVersion: 2.1.2
description: A Helm chart for flux2
name: flux2
sources:
- https://github.com/fluxcd-community/helm-charts
type: application
version: 2.10.6
version: 2.11.0
11 changes: 9 additions & 2 deletions charts/flux2/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# flux2

![Version: 2.10.6](https://img.shields.io/badge/Version-2.10.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)
![Version: 2.11.0](https://img.shields.io/badge/Version-2.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.2](https://img.shields.io/badge/AppVersion-2.1.2-informational?style=flat-square)

A Helm chart for flux2

This helm chart is maintain and released by the fluxcd-community on a best effort basis.
This helm chart is maintained and released by the fluxcd-community on a best effort basis.

## Source Code

Expand Down Expand Up @@ -131,6 +131,13 @@ This helm chart is maintain and released by the fluxcd-community on a best effor
| notificationController.serviceAccount.create | bool | `true` | |
| notificationController.tag | string | `"v1.1.0"` | |
| notificationController.tolerations | list | `[]` | |
| notificationController.webhookReceiver.ingress.annotations | object | `{}` | |
| notificationController.webhookReceiver.ingress.create | bool | `false` | |
| notificationController.webhookReceiver.ingress.hosts[0].host | string | `"flux-webhook.example.com"` | |
| notificationController.webhookReceiver.ingress.hosts[0].paths[0].path | string | `"/"` | |
| notificationController.webhookReceiver.ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| notificationController.webhookReceiver.ingress.labels | object | `{}` | |
| notificationController.webhookReceiver.ingress.tls | list | `[]` | |
| notificationController.webhookReceiver.service.annotations | object | `{}` | |
| notificationController.webhookReceiver.service.labels | object | `{}` | |
| policies.create | bool | `true` | |
Expand Down
49 changes: 49 additions & 0 deletions charts/flux2/templates/notification-controller-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{- if and .Values.notificationController.create .Values.notificationController.webhookReceiver.ingress.create }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/part-of: flux
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
control-plane: controller
{{- with .Values.notificationController.webhookReceiver.ingress.labels }}{{ toYaml . | nindent 4 }}{{ end }}
{{- with .Values.notificationController.webhookReceiver.ingress.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
name: webhook-receiver
spec:
{{- if .Values.notificationController.webhookReceiver.ingress.ingressClassName }}
ingressClassName: {{ .Values.notificationController.webhookReceiver.ingress.ingressClassName }}
{{- end -}}
{{- if .Values.notificationController.webhookReceiver.ingress.tls }}
tls:
{{- range .Values.notificationController.webhookReceiver.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.notificationController.webhookReceiver.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: webhook-receiver
port:
number: 80
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
labeltestkey: labeltestvalue
labeltestkey2: labeltestvalue2
name: helm-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: image-automation-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: image-reflector-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: test1
namespace: NAMESPACE
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: kustomize-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: notification-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: RELEASE-NAME-flux-check
spec:
backoffLimit: 1
Expand All @@ -23,7 +23,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: RELEASE-NAME
spec:
automountServiceAccountToken: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.1.2
control-plane: controller
helm.sh/chart: flux2-2.10.6
helm.sh/chart: flux2-2.11.0
name: source-controller
spec:
replicas: 1
Expand Down
18 changes: 18 additions & 0 deletions charts/flux2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,24 @@ notificationController:
service:
labels: {}
annotations: {}
ingress:
create: false
# ingressClassName: nginx
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
labels: {}
hosts:
- host: flux-webhook.example.com
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: flux-webhook-tls
# hosts:
# - flux-webhook.example.com


nodeSelector: {}
affinity: {}
tolerations: []
Expand Down

0 comments on commit 5fea58a

Please sign in to comment.