diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index fa41352d7..36f7c4f42 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v2.10.5 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.7.6 +version: 6.7.7 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png sources: @@ -26,5 +26,5 @@ annotations: fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc artifacthub.io/changes: | - - kind: fixed - description: added missing crd change for 2.10.5 + - kind: changed + description: generate CRDs from upstream tag diff --git a/charts/argo-cd/hack/update_crds.sh b/charts/argo-cd/hack/update_crds.sh new file mode 100755 index 000000000..d22438068 --- /dev/null +++ b/charts/argo-cd/hack/update_crds.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +if [[ $(uname -s) = "Darwin" ]]; then + VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion: //g')" +else + VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion:\s//g')" +fi + +FILES=( + "crd-application.yaml : application-crd.yaml" + "crd-applicationset.yaml : applicationset-crd.yaml" + "crd-project.yaml : appproject-crd.yaml" +) + +for line in "${FILES[@]}"; do + DESTINATION=$(echo "${line%%:*}" | xargs) + SOURCE=$(echo "${line##*:}" | xargs) + + URL="https://raw.githubusercontent.com/argoproj/argo-cd/$VERSION/manifests/crds/$SOURCE" + + echo -e "Downloading Prometheus Operator CRD with Version ${VERSION}:\n${URL}\n" + + echo "# ${URL}" > "${SCRIPT_DIR}/../templates/crds/${DESTINATION}" + + if ! curl --silent --retry-all-errors --fail --location "${URL}" >> "${SCRIPT_DIR}/../templates/crds/${DESTINATION}"; then + echo -e "Failed to download ${URL}!" + exit 1 + fi +done \ No newline at end of file diff --git a/charts/argo-cd/templates/crds/crd-application.yaml b/charts/argo-cd/templates/crds/crd-application.yaml index 9869efbbc..0d00e98c9 100644 --- a/charts/argo-cd/templates/crds/crd-application.yaml +++ b/charts/argo-cd/templates/crds/crd-application.yaml @@ -1,20 +1,10 @@ -{{- if .Values.crds.install }} +# https://raw.githubusercontent.com/argoproj/argo-cd/v2.10.5/manifests/crds/application-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - {{- if .Values.crds.keep }} - "helm.sh/resource-policy": keep - {{- end }} - {{- with .Values.crds.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} labels: app.kubernetes.io/name: applications.argoproj.io app.kubernetes.io/part-of: argocd - {{- with .Values.crds.additionalLabels }} - {{- toYaml . | nindent 4}} - {{- end }} name: applications.argoproj.io spec: group: argoproj.io @@ -4947,4 +4937,3 @@ spec: served: true storage: true subresources: {} -{{- end }} diff --git a/charts/argo-cd/templates/crds/crd-applicationset.yaml b/charts/argo-cd/templates/crds/crd-applicationset.yaml index 323beb27f..aced1843e 100644 --- a/charts/argo-cd/templates/crds/crd-applicationset.yaml +++ b/charts/argo-cd/templates/crds/crd-applicationset.yaml @@ -1,20 +1,10 @@ -{{- if and .Values.crds.install .Values.applicationSet.enabled }} +# https://raw.githubusercontent.com/argoproj/argo-cd/v2.10.5/manifests/crds/applicationset-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - {{- if .Values.crds.keep }} - "helm.sh/resource-policy": keep - {{- end }} - {{- with .Values.crds.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} labels: app.kubernetes.io/name: applicationsets.argoproj.io app.kubernetes.io/part-of: argocd - {{- with .Values.crds.additionalLabels }} - {{- toYaml . | nindent 4}} - {{- end }} name: applicationsets.argoproj.io spec: group: argoproj.io @@ -15247,4 +15237,3 @@ spec: storage: true subresources: status: {} -{{- end }} diff --git a/charts/argo-cd/templates/crds/crd-project.yaml b/charts/argo-cd/templates/crds/crd-project.yaml index 388014693..00199c8a6 100644 --- a/charts/argo-cd/templates/crds/crd-project.yaml +++ b/charts/argo-cd/templates/crds/crd-project.yaml @@ -1,20 +1,10 @@ -{{- if .Values.crds.install }} +# https://raw.githubusercontent.com/argoproj/argo-cd/v2.10.5/manifests/crds/appproject-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - {{- if .Values.crds.keep }} - "helm.sh/resource-policy": keep - {{- end }} - {{- with .Values.crds.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} labels: app.kubernetes.io/name: appprojects.argoproj.io app.kubernetes.io/part-of: argocd - {{- with .Values.crds.additionalLabels }} - {{- toYaml . | nindent 4}} - {{- end }} name: appprojects.argoproj.io spec: group: argoproj.io @@ -333,4 +323,3 @@ spec: type: object served: true storage: true -{{- end }}