From 600280d66669151e682ad9cafb57fe79dcd8a696 Mon Sep 17 00:00:00 2001 From: Mac Browning Date: Mon, 25 Mar 2024 12:17:31 -0700 Subject: [PATCH] Add support for ArgoCD Rollouts. --- charts/vantage-kubernetes-agent/Chart.yaml | 4 ++-- charts/vantage-kubernetes-agent/templates/application.yaml | 4 ++++ charts/vantage-kubernetes-agent/templates/clusterrole.yaml | 6 ++++++ charts/vantage-kubernetes-agent/values.schema.json | 3 +++ charts/vantage-kubernetes-agent/values.yaml | 4 ++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/charts/vantage-kubernetes-agent/Chart.yaml b/charts/vantage-kubernetes-agent/Chart.yaml index d98cec3..adb11ab 100644 --- a/charts/vantage-kubernetes-agent/Chart.yaml +++ b/charts/vantage-kubernetes-agent/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: vantage-kubernetes-agent description: Provisions the Vantage Kubernetes agent. type: application -version: 1.0.30 -appVersion: "1.0.23" +version: 1.0.31 +appVersion: "1.0.24" icon: "https://assets.vantage.sh/www/vantage_avatar-social.jpg" diff --git a/charts/vantage-kubernetes-agent/templates/application.yaml b/charts/vantage-kubernetes-agent/templates/application.yaml index b850021..bbb143b 100644 --- a/charts/vantage-kubernetes-agent/templates/application.yaml +++ b/charts/vantage-kubernetes-agent/templates/application.yaml @@ -82,6 +82,10 @@ spec: - name: VANTAGE_COLLECT_NAMESPACE_LABELS value: "{{ .Values.agent.collectNamespaceLabels }}" {{- end}} + {{- if .Values.agent.argocdRollouts}} + - name: VANTAGE_ARGO_ROLLOUTS + value: "{{ .Values.agent.argocdRollouts }}" + {{- end}} - name: VANTAGE_API_TOKEN valueFrom: secretKeyRef: diff --git a/charts/vantage-kubernetes-agent/templates/clusterrole.yaml b/charts/vantage-kubernetes-agent/templates/clusterrole.yaml index 765c202..35f7eff 100644 --- a/charts/vantage-kubernetes-agent/templates/clusterrole.yaml +++ b/charts/vantage-kubernetes-agent/templates/clusterrole.yaml @@ -33,3 +33,9 @@ rules: - "jobs" - "cronjobs" verbs: ["get", "watch", "list"] +{{- if .Values.agent.argocdRollouts}} +- apiGroups: ["argoproj.io"] + resources: + - "rollouts" + verbs: ["get", "watch", "list"] +{{- end}} diff --git a/charts/vantage-kubernetes-agent/values.schema.json b/charts/vantage-kubernetes-agent/values.schema.json index 03cf4a8..31e8d69 100644 --- a/charts/vantage-kubernetes-agent/values.schema.json +++ b/charts/vantage-kubernetes-agent/values.schema.json @@ -11,6 +11,9 @@ "allowedAnnotations": { "type": "string" }, + "argocdRollouts": { + "type": "boolean" + }, "clusterID": { "type": "string" }, diff --git a/charts/vantage-kubernetes-agent/values.yaml b/charts/vantage-kubernetes-agent/values.yaml index 924d4b8..f0d3bf7 100644 --- a/charts/vantage-kubernetes-agent/values.yaml +++ b/charts/vantage-kubernetes-agent/values.yaml @@ -37,6 +37,10 @@ agent: # Optional. When enabled, includes the labels of that pod's namespace in the pod metadata. collectNamespaceLabels: "false" + + # Optional. When enabled, includes ArgoCD Rollouts within controller metadata similar to Deployments. + argocdRollouts: false + persist: mountPath: "/var/lib/vantage-agent" name: "data"