diff --git a/.github/configs/ct-install.yaml b/.github/configs/ct-install.yaml index d1b3cd36e..52b66d146 100644 --- a/.github/configs/ct-install.yaml +++ b/.github/configs/ct-install.yaml @@ -6,7 +6,7 @@ charts: - charts/argo-cd chart-repos: - dandydeveloper=https://dandydeveloper.github.io/charts/ -helm-extra-args: "--timeout 600s" +helm-extra-args: "--timeout 600s" validate-chart-schema: false validate-maintainers: true validate-yaml: true diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 213b24f9a..f0c05b035 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -90,4 +90,4 @@ jobs: - name: Run chart-testing (install) run: ct install --config ./.github/configs/ct-install.yaml --target-branch ${{ github.base_ref }} - if: steps.list-changed.outputs.changed == 'true' \ No newline at end of file + if: steps.list-changed.outputs.changed == 'true' diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index b40905eab..14e8ac120 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 -appVersion: v2.11-2024.7.30-a31bf96bb +appVersion: v2.11-2024.8.19-6be897266 kubeVersion: ">=1.23.0-0" description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 6.11.1-6-cap-2.11-2024.7.30-a31bf96bb +version: 6.11.1-7-cap-2.11-2024.8.19-6be897266 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png sources: @@ -27,4 +27,4 @@ annotations: url: https://argoproj.github.io/argo-helm/pgp_keys.asc artifacthub.io/changes: | - kind: changed - description: Upgrade argo-cd to v2.11-2024.7.30-a31bf96bb with fix - self heal is not working in monorepo + description: Upgrade argo-cd to v2.11-2024.8.19-6be897266 with v1 reporter removal diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 67710907e..886b6741e 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -661,7 +661,6 @@ NAME: my-release | eventReporter.containerSecurityContext | object | See [values.yaml] | Event reporter container-level security context | | eventReporter.dnsConfig | object | `{}` | [DNS configuration] | | eventReporter.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for event reporter pods | -| eventReporter.enabled | bool | `true` | | | eventReporter.env | list | `[]` | Environment variables to pass to event reporter | | eventReporter.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to event reporter | | eventReporter.extraArgs | list | `[]` | Additional command line arguments to pass to event reporter | @@ -723,7 +722,6 @@ NAME: my-release | eventReporter.terminationGracePeriodSeconds | int | `30` | terminationGracePeriodSeconds for container lifecycle hook | | eventReporter.tolerations | list | `[]` (defaults to global.tolerations) | [Tolerations] for use with node taints | | eventReporter.topologySpreadConstraints | list | `[]` (defaults to global.topologySpreadConstraints) | Assign custom [TopologySpreadConstraints] rules to the event reporter | -| eventReporter.version | string | `"v2"` | | | eventReporter.volumeMounts | list | `[]` | Additional volumeMounts to the event reporter main container | | eventReporter.volumes | list | `[]` | Additional volumes to the event reporter pod | | extraObjects | list | `[]` | Array of extra K8s manifests to deploy | diff --git a/charts/argo-cd/ci/default-values.yaml b/charts/argo-cd/ci/default-values.yaml index 607a48254..e7021460d 100644 --- a/charts/argo-cd/ci/default-values.yaml +++ b/charts/argo-cd/ci/default-values.yaml @@ -2,7 +2,19 @@ crds: keep: false -# these tests only support vanilla argo-cd -# do not work for event reporter component -eventReporter: - enabled: false +# needed for correct work of event reporter component +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/ci/dynamic-sharding-values.yaml b/charts/argo-cd/ci/dynamic-sharding-values.yaml index bb653183a..b541857db 100644 --- a/charts/argo-cd/ci/dynamic-sharding-values.yaml +++ b/charts/argo-cd/ci/dynamic-sharding-values.yaml @@ -7,5 +7,18 @@ controller: # these tests only support vanilla argo-cd # do not work for event reporter component -eventReporter: - enabled: false +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/ci/extension-values.yaml b/charts/argo-cd/ci/extension-values.yaml index 0ac439d83..20ab03adb 100644 --- a/charts/argo-cd/ci/extension-values.yaml +++ b/charts/argo-cd/ci/extension-values.yaml @@ -13,7 +13,19 @@ server: - name: EXTENSION_CHECKSUM_URL value: https://github.com/argoproj-labs/argocd-extension-metrics/releases/download/v1.0.0/extension_checksums.txt -# these tests only support vanilla argo-cd -# do not work for event reporter component -eventReporter: - enabled: false +# needed for correct work of event reporter component +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/ci/external-redis-values.yaml b/charts/argo-cd/ci/external-redis-values.yaml index ef45271f0..76acd3632 100644 --- a/charts/argo-cd/ci/external-redis-values.yaml +++ b/charts/argo-cd/ci/external-redis-values.yaml @@ -11,7 +11,19 @@ externalRedis: host: "redis-master.redis.svc.cluster.local" password: "argocd" -# these tests only support vanilla argo-cd -# do not work for event reporter component -eventReporter: - enabled: false +# needed for correct work of event reporter component +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/ci/ha-autoscaling-values.yaml b/charts/argo-cd/ci/ha-autoscaling-values.yaml index 907196911..715fd3c03 100644 --- a/charts/argo-cd/ci/ha-autoscaling-values.yaml +++ b/charts/argo-cd/ci/ha-autoscaling-values.yaml @@ -15,7 +15,19 @@ repoServer: enabled: true minReplicas: 2 -# these tests only support vanilla argo-cd -# do not work for event reporter component -eventReporter: - enabled: false +# needed for correct work of event reporter component +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/ci/ha-static-values.yaml b/charts/argo-cd/ci/ha-static-values.yaml index 5071934cd..f6f70e392 100644 --- a/charts/argo-cd/ci/ha-static-values.yaml +++ b/charts/argo-cd/ci/ha-static-values.yaml @@ -11,7 +11,19 @@ server: repoServer: replicas: 2 -# these tests only support vanilla argo-cd -# do not work for event reporter component -eventReporter: - enabled: false +# needed for correct work of event reporter component +extraObjects: + - apiVersion: v1 + kind: Secret + metadata: + name: argocd-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password + - apiVersion: v1 + kind: Secret + metadata: + name: codefresh-token + type: Opaque + data: + token: c29tZS10ZXN0LXBhc3N3b3Jk # some-test-password diff --git a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml index 2f2c4a12c..6bd19f5ce 100644 --- a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml +++ b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml @@ -14,8 +14,4 @@ metadata: {{- end }} data: {{- include "argo-cd.config.cm" . | trim | nindent 2 }} - - {{- if and .Values.eventReporter.enabled .Values.eventReporter.version }} - codefresh.reporterVersion: {{ .Values.eventReporter.version | quote }} - {{- end }} {{- end }} diff --git a/charts/argo-cd/templates/event-reporter/clusterrole.yaml b/charts/argo-cd/templates/event-reporter/clusterrole.yaml index 7cfa13636..770f75baf 100644 --- a/charts/argo-cd/templates/event-reporter/clusterrole.yaml +++ b/charts/argo-cd/templates/event-reporter/clusterrole.yaml @@ -1,4 +1,3 @@ -{{- if .Values.eventReporter.enabled }} {{- $config := .Values.eventReporter.clusterAdminAccess | default dict -}} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} apiVersion: rbac.authorization.k8s.io/v1 @@ -23,4 +22,3 @@ rules: - '*' {{- end }} {{- end }} -{{- end }} diff --git a/charts/argo-cd/templates/event-reporter/clusterrolebinding.yaml b/charts/argo-cd/templates/event-reporter/clusterrolebinding.yaml index 27a413dec..ef5417cda 100644 --- a/charts/argo-cd/templates/event-reporter/clusterrolebinding.yaml +++ b/charts/argo-cd/templates/event-reporter/clusterrolebinding.yaml @@ -1,4 +1,3 @@ -{{- if .Values.eventReporter.enabled }} {{- $config := .Values.eventReporter.clusterAdminAccess | default dict -}} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} apiVersion: rbac.authorization.k8s.io/v1 @@ -16,4 +15,3 @@ subjects: name: {{ include "argo-cd.eventReporterServiceAccountName" . }} namespace: {{ .Release.Namespace }} {{- end }} -{{- end }} diff --git a/charts/argo-cd/templates/event-reporter/metrics.yaml b/charts/argo-cd/templates/event-reporter/metrics.yaml index b18cd29d9..d5e8f6ac6 100644 --- a/charts/argo-cd/templates/event-reporter/metrics.yaml +++ b/charts/argo-cd/templates/event-reporter/metrics.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.eventReporter.enabled .Values.eventReporter.metrics.enabled }} +{{- if .Values.eventReporter.metrics.enabled }} apiVersion: v1 kind: Service metadata: diff --git a/charts/argo-cd/templates/event-reporter/networkpolicy.yaml b/charts/argo-cd/templates/event-reporter/networkpolicy.yaml index 5ea632900..eac3a5024 100644 --- a/charts/argo-cd/templates/event-reporter/networkpolicy.yaml +++ b/charts/argo-cd/templates/event-reporter/networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.eventReporter.enabled .Values.global.networkPolicy.create }} +{{- if .Values.global.networkPolicy.create }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: diff --git a/charts/argo-cd/templates/event-reporter/pdb.yaml b/charts/argo-cd/templates/event-reporter/pdb.yaml index 9cc50321a..8c4ddb3f2 100644 --- a/charts/argo-cd/templates/event-reporter/pdb.yaml +++ b/charts/argo-cd/templates/event-reporter/pdb.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.eventReporter.enabled .Values.eventReporter.pdb.enabled }} +{{- if .Values.eventReporter.pdb.enabled }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/charts/argo-cd/templates/event-reporter/prometheusrule.yaml b/charts/argo-cd/templates/event-reporter/prometheusrule.yaml index 3b3617bc1..1bf582e37 100644 --- a/charts/argo-cd/templates/event-reporter/prometheusrule.yaml +++ b/charts/argo-cd/templates/event-reporter/prometheusrule.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.eventReporter.enabled .Values.eventReporter.metrics.enabled .Values.eventReporter.metrics.rules.enabled }} +{{- if and .Values.eventReporter.metrics.enabled .Values.eventReporter.metrics.rules.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: diff --git a/charts/argo-cd/templates/event-reporter/role.yaml b/charts/argo-cd/templates/event-reporter/role.yaml index ee8b87a4d..b2267cfc8 100644 --- a/charts/argo-cd/templates/event-reporter/role.yaml +++ b/charts/argo-cd/templates/event-reporter/role.yaml @@ -1,4 +1,3 @@ -{{- if .Values.eventReporter.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -41,4 +40,3 @@ rules: verbs: - create - list -{{- end }} diff --git a/charts/argo-cd/templates/event-reporter/rolebinding.yaml b/charts/argo-cd/templates/event-reporter/rolebinding.yaml index 3e0a5bec6..1f35e1387 100644 --- a/charts/argo-cd/templates/event-reporter/rolebinding.yaml +++ b/charts/argo-cd/templates/event-reporter/rolebinding.yaml @@ -1,4 +1,3 @@ -{{- if .Values.eventReporter.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -14,4 +13,3 @@ subjects: - kind: ServiceAccount name: {{ template "argo-cd.eventReporterServiceAccountName" . }} namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/charts/argo-cd/templates/event-reporter/serviceaccount.yaml b/charts/argo-cd/templates/event-reporter/serviceaccount.yaml index 7f94d89be..4baa77fee 100644 --- a/charts/argo-cd/templates/event-reporter/serviceaccount.yaml +++ b/charts/argo-cd/templates/event-reporter/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.eventReporter.enabled .Values.eventReporter.serviceAccount.create }} +{{- if .Values.eventReporter.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount automountServiceAccountToken: {{ .Values.eventReporter.serviceAccount.automountServiceAccountToken }} diff --git a/charts/argo-cd/templates/event-reporter/servicemonitor.yaml b/charts/argo-cd/templates/event-reporter/servicemonitor.yaml index 2f4de0381..9fc7421b9 100644 --- a/charts/argo-cd/templates/event-reporter/servicemonitor.yaml +++ b/charts/argo-cd/templates/event-reporter/servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.eventReporter.enabled .Values.eventReporter.metrics.enabled .Values.eventReporter.metrics.serviceMonitor.enabled }} +{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.eventReporter.metrics.enabled .Values.eventReporter.metrics.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/argo-cd/templates/event-reporter/statefulset.yaml b/charts/argo-cd/templates/event-reporter/statefulset.yaml index f51cb53b6..2339bad3c 100644 --- a/charts/argo-cd/templates/event-reporter/statefulset.yaml +++ b/charts/argo-cd/templates/event-reporter/statefulset.yaml @@ -1,4 +1,3 @@ -{{- if .Values.eventReporter.enabled }} apiVersion: apps/v1 kind: StatefulSet metadata: @@ -103,11 +102,13 @@ spec: secretKeyRef: key: token name: codefresh-token + {{- if .Values.global.codefresh }} {{- if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef }} {{- $key := .Values.global.codefresh.tls.caCerts.secret.create | ternary (default "ca-bundle.crt" .Values.global.codefresh.tls.caCerts.secret.key) .Values.global.codefresh.tls.caCerts.secretKeyRef.key }} - name: CODEFRESH_SSL_CERT_PATH value: /app/config/codefresh-tls-certs/{{ $key }} {{- end }} + {{- end }} # todo: clean up - name: EVENT_REPORTER_INSECURE valueFrom: @@ -234,11 +235,13 @@ spec: {{- with .Values.eventReporter.volumeMounts }} {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.global.codefresh}} {{- if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef}} - name: codefresh-tls-certs mountPath: /app/config/codefresh-tls-certs readOnly: true {{- end }} + {{- end }} - name: argocd-repo-server-tls mountPath: /app/config/server/tls - mountPath: /tmp @@ -277,6 +280,7 @@ spec: {{- with .Values.eventReporter.volumes }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if .Values.global.codefresh }} {{- if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef }} - name: codefresh-tls-certs secret: @@ -284,6 +288,7 @@ spec: defaultMode: 420 optional: true {{- end }} + {{- end }} - emptyDir: { } name: plugins-home - emptyDir: { } @@ -307,4 +312,3 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} dnsPolicy: {{ .Values.eventReporter.dnsPolicy }} -{{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index ddb48f3a8..caab25cd8 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -3630,12 +3630,6 @@ notifications: # - on-sync-status-unknown eventReporter: - # Enabled we need to skip argo-cd chart tests for this component - enabled: true - # Version we need to dynamically switch between old and new version - # one will be just hanging and the second one working - # possible values: v1, v2 - version: v2 name: event-reporter ## Amount of replicas for event reporting sharding replicas: 3