From c7e26c5f9082e27111a8bc34b8f4c0366be45fb4 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 24 Oct 2023 06:26:22 -0700 Subject: [PATCH] Fix unittest snapshot file indentation Signed-off-by: Tamal Saha --- .github/workflows/lint-test.yaml | 19 +-- charts/flux2-multi-tenancy/Chart.yaml | 2 +- charts/flux2-multi-tenancy/README.md | 2 +- .../kyverno-policy_test.yaml.snap | 116 +++++++++--------- charts/flux2-notification/Chart.yaml | 2 +- charts/flux2-notification/README.md | 2 +- .../tests/__snapshot__/alert_test.yaml.snap | 8 +- .../__snapshot__/provider_test.yaml.snap | 2 +- .../tests/__snapshot__/secret_test.yaml.snap | 2 +- charts/flux2/Chart.yaml | 2 +- charts/flux2/README.md | 2 +- .../pre-install-job-serviceaccount.yaml | 2 +- .../helm-controller_test.yaml.snap | 96 +++++++-------- ...image-automation-controller_test.yaml.snap | 96 +++++++-------- .../image-reflector-controller_test.yaml.snap | 104 ++++++++-------- ...kustomize-controller-secret_test.yaml.snap | 2 +- .../kustomize-controller_test.yaml.snap | 96 +++++++-------- .../notification-controller_test.yaml.snap | 108 ++++++++-------- .../pre-install-job_test.yaml.snap | 38 +++--- .../source-controller_test.yaml.snap | 116 +++++++++--------- charts/flux2/tests/pre-install-job_test.yaml | 2 +- 21 files changed, 410 insertions(+), 409 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 2598386..21869bc 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -7,42 +7,43 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Helm - uses: azure/setup-helm@v1 + uses: azure/setup-helm@v3 with: - version: 3.10.1 + version: 3.12.1 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.9' + check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.1.0 + uses: helm/chart-testing-action@v2.4.0 - name: Run chart-testing (list-changed) id: list-changed run: | changed=$(ct list-changed --config ct.yaml) if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> $GITHUB_OUTPUT fi - name: install helm unittest plugin if: steps.list-changed.outputs.changed == 'true' run: | helm env - helm plugin install https://github.com/quintush/helm-unittest.git --version 0.3.5 + helm plugin install https://github.com/helm-unittest/helm-unittest.git --version 0.3.5 - name: Run chart-testing (lint) run: ct lint --config ct.yaml if: steps.list-changed.outputs.changed == 'true' - name: Create kind cluster - uses: helm/kind-action@v1.4.0 + uses: helm/kind-action@v1.7.0 if: steps.list-changed.outputs.changed == 'true' with: node_image: kindest/node:v1.25.11 diff --git a/charts/flux2-multi-tenancy/Chart.yaml b/charts/flux2-multi-tenancy/Chart.yaml index c4ca3d8..b7a5b64 100644 --- a/charts/flux2-multi-tenancy/Chart.yaml +++ b/charts/flux2-multi-tenancy/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: flux2-multi-tenancy -version: 0.0.4 +version: 0.0.5 deprecated: true description: A Helm chart for flux2-multi-tenancy sources: diff --git a/charts/flux2-multi-tenancy/README.md b/charts/flux2-multi-tenancy/README.md index 8f19bec..844fdae 100644 --- a/charts/flux2-multi-tenancy/README.md +++ b/charts/flux2-multi-tenancy/README.md @@ -2,7 +2,7 @@ > **:exclamation: This Helm Chart is deprecated!** -![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![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) A Helm chart for flux2-multi-tenancy diff --git a/charts/flux2-multi-tenancy/tests/__snapshot__/kyverno-policy_test.yaml.snap b/charts/flux2-multi-tenancy/tests/__snapshot__/kyverno-policy_test.yaml.snap index bec720b..845090e 100644 --- a/charts/flux2-multi-tenancy/tests/__snapshot__/kyverno-policy_test.yaml.snap +++ b/charts/flux2-multi-tenancy/tests/__snapshot__/kyverno-policy_test.yaml.snap @@ -9,66 +9,66 @@ 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.4 + helm.sh/chart: flux2-multi-tenancy-0.0.5 name: RELEASE-NAME namespace: NAMESPACE spec: rules: - - exclude: - resources: - namespaces: - - flux-system - match: - resources: - kinds: - - Kustomization - - HelmRelease - name: serviceAccountName - validate: - message: .spec.serviceAccountName is required - pattern: - spec: - serviceAccountName: ?* - - exclude: - resources: - namespaces: - - flux-system - match: - resources: - kinds: - - Kustomization - name: kustomizationSourceRefNamespace - preconditions: - any: - - key: '{{request.object.spec.sourceRef.namespace}}' - operator: NotEquals - value: "" - validate: - deny: - conditions: - - key: '{{request.object.spec.sourceRef.namespace}}' - operator: NotEquals - value: '{{request.object.metadata.namespace}}' - message: .spec.sourceRef.namespace must be the same as metadata.namespace - - exclude: - resources: - namespaces: - - flux-system - match: - resources: - kinds: - - HelmRelease - name: helmReleaseSourceRefNamespace - preconditions: - any: - - key: '{{request.object.spec.chart.spec.sourceRef.namespace}}' - operator: NotEquals - value: "" - validate: - deny: - conditions: - - key: '{{request.object.spec.chart.spec.sourceRef.namespace}}' - operator: NotEquals - value: '{{request.object.metadata.namespace}}' - message: .spec.chart.spec.sourceRef.namespace must be the same as metadata.namespace + - exclude: + resources: + namespaces: + - flux-system + match: + resources: + kinds: + - Kustomization + - HelmRelease + name: serviceAccountName + validate: + message: .spec.serviceAccountName is required + pattern: + spec: + serviceAccountName: ?* + - exclude: + resources: + namespaces: + - flux-system + match: + resources: + kinds: + - Kustomization + name: kustomizationSourceRefNamespace + preconditions: + any: + - key: '{{request.object.spec.sourceRef.namespace}}' + operator: NotEquals + value: "" + validate: + deny: + conditions: + - key: '{{request.object.spec.sourceRef.namespace}}' + operator: NotEquals + value: '{{request.object.metadata.namespace}}' + message: .spec.sourceRef.namespace must be the same as metadata.namespace + - exclude: + resources: + namespaces: + - flux-system + match: + resources: + kinds: + - HelmRelease + name: helmReleaseSourceRefNamespace + preconditions: + any: + - key: '{{request.object.spec.chart.spec.sourceRef.namespace}}' + operator: NotEquals + value: "" + validate: + deny: + conditions: + - key: '{{request.object.spec.chart.spec.sourceRef.namespace}}' + operator: NotEquals + value: '{{request.object.metadata.namespace}}' + message: .spec.chart.spec.sourceRef.namespace must be the same as metadata.namespace validationFailureAction: enforce diff --git a/charts/flux2-notification/Chart.yaml b/charts/flux2-notification/Chart.yaml index 7e5bfc5..ca501cd 100644 --- a/charts/flux2-notification/Chart.yaml +++ b/charts/flux2-notification/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: flux2-notification type: application -version: 1.12.1 +version: 1.12.2 appVersion: 2.1.1 description: A Helm chart for flux2 alerts and the needed providers and secrets sources: diff --git a/charts/flux2-notification/README.md b/charts/flux2-notification/README.md index 9c3b5d1..0caf94b 100644 --- a/charts/flux2-notification/README.md +++ b/charts/flux2-notification/README.md @@ -1,6 +1,6 @@ # flux2-notification -![Version: 1.12.1](https://img.shields.io/badge/Version-1.12.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) +![Version: 1.12.2](https://img.shields.io/badge/Version-1.12.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) A Helm chart for flux2 alerts and the needed providers and secrets diff --git a/charts/flux2-notification/tests/__snapshot__/alert_test.yaml.snap b/charts/flux2-notification/tests/__snapshot__/alert_test.yaml.snap index c30c9f3..c6b8470 100644 --- a/charts/flux2-notification/tests/__snapshot__/alert_test.yaml.snap +++ b/charts/flux2-notification/tests/__snapshot__/alert_test.yaml.snap @@ -8,15 +8,15 @@ should match snapshot: app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 - helm.sh/chart: flux2-notification-1.12.1 + helm.sh/chart: flux2-notification-1.12.2 name: all-kustomizations namespace: NAMESPACE spec: eventSeverity: error eventSources: - - kind: Kustomization - name: '*' - namespace: default + - kind: Kustomization + name: '*' + namespace: default providerRef: name: dev-msteams suspend: true diff --git a/charts/flux2-notification/tests/__snapshot__/provider_test.yaml.snap b/charts/flux2-notification/tests/__snapshot__/provider_test.yaml.snap index edebe4d..037eeb0 100644 --- a/charts/flux2-notification/tests/__snapshot__/provider_test.yaml.snap +++ b/charts/flux2-notification/tests/__snapshot__/provider_test.yaml.snap @@ -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.1 - helm.sh/chart: flux2-notification-1.12.1 + helm.sh/chart: flux2-notification-1.12.2 name: on-call-slack namespace: NAMESPACE spec: diff --git a/charts/flux2-notification/tests/__snapshot__/secret_test.yaml.snap b/charts/flux2-notification/tests/__snapshot__/secret_test.yaml.snap index 6aa992b..76a24af 100644 --- a/charts/flux2-notification/tests/__snapshot__/secret_test.yaml.snap +++ b/charts/flux2-notification/tests/__snapshot__/secret_test.yaml.snap @@ -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.1 - helm.sh/chart: flux2-notification-1.12.1 + helm.sh/chart: flux2-notification-1.12.2 name: webhook-url namespace: NAMESPACE stringData: diff --git a/charts/flux2/Chart.yaml b/charts/flux2/Chart.yaml index b22c42f..359fa4e 100644 --- a/charts/flux2/Chart.yaml +++ b/charts/flux2/Chart.yaml @@ -8,4 +8,4 @@ name: flux2 sources: - https://github.com/fluxcd-community/helm-charts type: application -version: 2.10.3 +version: 2.10.4 diff --git a/charts/flux2/README.md b/charts/flux2/README.md index 6e65e99..2848fb6 100644 --- a/charts/flux2/README.md +++ b/charts/flux2/README.md @@ -1,6 +1,6 @@ # flux2 -![Version: 2.10.3](https://img.shields.io/badge/Version-2.10.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) +![Version: 2.10.4](https://img.shields.io/badge/Version-2.10.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) A Helm chart for flux2 diff --git a/charts/flux2/templates/pre-install-job-serviceaccount.yaml b/charts/flux2/templates/pre-install-job-serviceaccount.yaml index d43894c..f634869 100644 --- a/charts/flux2/templates/pre-install-job-serviceaccount.yaml +++ b/charts/flux2/templates/pre-install-job-serviceaccount.yaml @@ -8,7 +8,7 @@ metadata: app.kubernetes.io/part-of: flux helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} name: "{{ .Release.Name }}-flux-check" - annotations: + annotations: "helm.sh/hook": pre-install "helm.sh/hook-weight": "-10" "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap index 2989ebf..e5b9f83 100644 --- a/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 labeltestkey: labeltestvalue labeltestkey2: labeltestvalue2 name: helm-controller @@ -30,53 +30,53 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/helm-controller:v0.36.1 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 8080 - name: http-prom - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp - name: temp + - args: + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/helm-controller:v0.36.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 8080 + name: http-prom + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: temp serviceAccountName: helm-controller terminationGracePeriodSeconds: 600 volumes: - - emptyDir: {} - name: temp + - emptyDir: {} + name: temp diff --git a/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap index 2423b93..cda61b9 100644 --- a/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: image-automation-controller spec: replicas: 1 @@ -26,55 +26,55 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/image-automation-controller:v0.36.1 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 8080 - name: http-prom - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp - name: temp + - args: + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/image-automation-controller:v0.36.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 8080 + name: http-prom + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: temp securityContext: fsGroup: 1337 serviceAccountName: image-automation-controller terminationGracePeriodSeconds: 10 volumes: - - emptyDir: {} - name: temp + - emptyDir: {} + name: temp diff --git a/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap index 3023772..da123a6 100644 --- a/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: image-reflector-controller spec: replicas: 1 @@ -26,59 +26,59 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/image-reflector-controller:v0.30.0 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 8080 - name: http-prom - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp - name: temp - - mountPath: /data - name: data + - args: + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/image-reflector-controller:v0.30.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 8080 + name: http-prom + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: temp + - mountPath: /data + name: data securityContext: fsGroup: 1337 serviceAccountName: image-reflector-controller terminationGracePeriodSeconds: 10 volumes: - - emptyDir: {} - name: temp - - emptyDir: {} - name: data + - emptyDir: {} + name: temp + - emptyDir: {} + name: data diff --git a/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap b/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap index 10b23d4..2b55c42 100644 --- a/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap @@ -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.1 - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: test1 namespace: NAMESPACE type: Opaque diff --git a/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap index cad9603..2cd14af 100644 --- a/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: kustomize-controller spec: replicas: 1 @@ -26,55 +26,55 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/kustomize-controller:v1.1.0 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 8080 - name: http-prom - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp - name: temp + - args: + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/kustomize-controller:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 8080 + name: http-prom + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: temp securityContext: fsGroup: 1337 serviceAccountName: kustomize-controller terminationGracePeriodSeconds: 60 volumes: - - emptyDir: {} - name: temp + - emptyDir: {} + name: temp diff --git a/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap index f14f950..d7ab094 100644 --- a/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: notification-controller spec: replicas: 1 @@ -26,59 +26,59 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/notification-controller:v1.1.0 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 9090 - name: http - protocol: TCP - - containerPort: 9292 - name: http-webhook - protocol: TCP - - containerPort: 8080 - name: http-prom - protocol: TCP - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp - name: temp + - args: + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/notification-controller:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 9090 + name: http + protocol: TCP + - containerPort: 9292 + name: http-webhook + protocol: TCP + - containerPort: 8080 + name: http-prom + protocol: TCP + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: temp serviceAccountName: notification-controller terminationGracePeriodSeconds: 10 volumes: - - emptyDir: {} - name: temp + - emptyDir: {} + name: temp diff --git a/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap b/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap index 48032a8..2bece5b 100644 --- a/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap @@ -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.1 - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: RELEASE-NAME-flux-check spec: backoffLimit: 1 @@ -23,27 +23,27 @@ should match snapshot of default values: app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: RELEASE-NAME spec: automountServiceAccountToken: true containers: - - command: - - /usr/local/bin/flux - - check - - --pre - - --namespace - - NAMESPACE - image: ghcr.io/fluxcd/flux-cli:v2.1.1 - name: flux-cli - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault + - command: + - /usr/local/bin/flux + - check + - --pre + - --namespace + - NAMESPACE + image: ghcr.io/fluxcd/flux-cli:v2.1.1 + name: flux-cli + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault restartPolicy: Never serviceAccountName: RELEASE-NAME-flux-check diff --git a/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap index 6646abc..cd6f36a 100644 --- a/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap @@ -9,7 +9,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.1.1 control-plane: controller - helm.sh/chart: flux2-2.10.3 + helm.sh/chart: flux2-2.10.4 name: source-controller spec: replicas: 1 @@ -28,65 +28,65 @@ should match snapshot of default values: spec: automountServiceAccountToken: true containers: - - args: - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - - --watch-all-namespaces=true - - --log-level=info - - --log-encoding=json - - --enable-leader-election - - --storage-path=/data - - --storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. - env: - - name: RUNTIME_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: ghcr.io/fluxcd/source-controller:v1.1.1 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: healthz - name: manager - ports: - - containerPort: 9090 - name: http - protocol: TCP - - containerPort: 8080 - name: http-prom - protocol: TCP - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: / - port: http - resources: - limits: {} - requests: - cpu: 100m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /data - name: data - - mountPath: /tmp - name: tmp + - args: + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + - --watch-all-namespaces=true + - --log-level=info + - --log-encoding=json + - --enable-leader-election + - --storage-path=/data + - --storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc.cluster.local. + env: + - name: RUNTIME_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: ghcr.io/fluxcd/source-controller:v1.1.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 9090 + name: http + protocol: TCP + - containerPort: 8080 + name: http-prom + protocol: TCP + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: / + port: http + resources: + limits: {} + requests: + cpu: 100m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /data + name: data + - mountPath: /tmp + name: tmp securityContext: fsGroup: 1337 serviceAccountName: source-controller terminationGracePeriodSeconds: 10 volumes: - - emptyDir: {} - name: data - - emptyDir: {} - name: tmp + - emptyDir: {} + name: data + - emptyDir: {} + name: tmp diff --git a/charts/flux2/tests/pre-install-job_test.yaml b/charts/flux2/tests/pre-install-job_test.yaml index 89349cf..0f16f3a 100644 --- a/charts/flux2/tests/pre-install-job_test.yaml +++ b/charts/flux2/tests/pre-install-job_test.yaml @@ -4,7 +4,7 @@ templates: tests: - it: should have no annotations added by default asserts: - - isEmpty: + - isNull: path: spec.template.metadata.annotations - it: should have added annotation set: