Skip to content

Commit

Permalink
Merge pull request #93 from codefresh-io/CR-23060-argo-cd-v2-reporter…
Browse files Browse the repository at this point in the history
…-always-enabled

chore: removed eventReporter.enabled condition to use new reporter always
  • Loading branch information
oleksandr-codefresh authored Aug 28, 2024
2 parents 8e6ffa5 + d996fc0 commit b1f1f58
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/configs/ct-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
if: steps.list-changed.outputs.changed == 'true'
6 changes: 3 additions & 3 deletions charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 0 additions & 2 deletions charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down
20 changes: 16 additions & 4 deletions charts/argo-cd/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 15 additions & 2 deletions charts/argo-cd/ci/dynamic-sharding-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 16 additions & 4 deletions charts/argo-cd/ci/extension-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 16 additions & 4 deletions charts/argo-cd/ci/external-redis-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 16 additions & 4 deletions charts/argo-cd/ci/ha-autoscaling-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 16 additions & 4 deletions charts/argo-cd/ci/ha-static-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions charts/argo-cd/templates/argocd-configs/argocd-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 0 additions & 2 deletions charts/argo-cd/templates/event-reporter/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,4 +22,3 @@ rules:
- '*'
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,4 +15,3 @@ subjects:
name: {{ include "argo-cd.eventReporterServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/event-reporter/metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.eventReporter.enabled .Values.eventReporter.metrics.enabled }}
{{- if .Values.eventReporter.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/event-reporter/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/event-reporter/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.eventReporter.enabled .Values.eventReporter.pdb.enabled }}
{{- if .Values.eventReporter.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 0 additions & 2 deletions charts/argo-cd/templates/event-reporter/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.eventReporter.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand Down Expand Up @@ -41,4 +40,3 @@ rules:
verbs:
- create
- list
{{- end }}
2 changes: 0 additions & 2 deletions charts/argo-cd/templates/event-reporter/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.eventReporter.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -14,4 +13,3 @@ subjects:
- kind: ServiceAccount
name: {{ template "argo-cd.eventReporterServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 6 additions & 2 deletions charts/argo-cd/templates/event-reporter/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.eventReporter.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -277,13 +280,15 @@ 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:
secretName: {{ .Values.global.codefresh.tls.caCerts.secret.create | ternary "codefresh-tls-certs" .Values.global.codefresh.tls.caCerts.secretKeyRef.name }}
defaultMode: 420
optional: true
{{- end }}
{{- end }}
- emptyDir: { }
name: plugins-home
- emptyDir: { }
Expand All @@ -307,4 +312,3 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
dnsPolicy: {{ .Values.eventReporter.dnsPolicy }}
{{- end }}
6 changes: 0 additions & 6 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1f1f58

Please sign in to comment.