From 7bc86fe1fcd539a69f741d75dd4e54b3e8556e48 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 29 Mar 2024 18:05:36 +0300 Subject: [PATCH 1/5] generate crds from tag Signed-off-by: drfaust92 --- .../templates/crds/crd-application.yaml | 13 +--- .../templates/crds/crd-applicationset.yaml | 13 +--- .../argo-cd/templates/crds/crd-project.yaml | 13 +--- .../templates/crds/analysis-run-crd.yaml | 63 +------------------ .../templates/crds/analysis-template-crd.yaml | 63 +------------------ .../crds/cluster-analysis-template-crd.yaml | 63 +------------------ .../templates/crds/experiment-crd.yaml | 12 +--- .../templates/crds/rollout-crd.yaml | 12 +--- 8 files changed, 14 insertions(+), 238 deletions(-) diff --git a/charts/argo-cd/templates/crds/crd-application.yaml b/charts/argo-cd/templates/crds/crd-application.yaml index 9869efbb..0d00e98c 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 323beb27..aced1843 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 38801469..00199c8a 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 }} diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 1dddfa7d..16b4c530 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -1,18 +1,9 @@ -{{- if .Values.installCRDs }} +# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/analysis-run-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 - {{- if .Values.keepCRDs }} - "helm.sh/resource-policy": keep - {{- end }} - {{- if .Values.crdAnnotations }} - {{- toYaml .Values.crdAnnotations | nindent 4 }} - {{- end }} - labels: - app.kubernetes.io/name: argo-rollouts - app.kubernetes.io/part-of: argo-rollouts name: analysisruns.argoproj.io spec: group: argoproj.io @@ -189,22 +180,13 @@ spec: datadog: properties: apiVersion: - default: v1 - enum: - - v1 - - v2 - type: string - formula: type: string interval: - default: 5m type: string - queries: - additionalProperties: - type: string - type: object query: type: string + required: + - query type: object graphite: properties: @@ -2818,19 +2800,6 @@ spec: type: string authentication: properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object sigv4: properties: profile: @@ -2879,31 +2848,6 @@ spec: type: object web: properties: - authentication: - properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object - sigv4: - properties: - profile: - type: string - region: - type: string - roleArn: - type: string - type: object - type: object body: type: string headers: @@ -3066,4 +3010,3 @@ spec: served: true storage: true subresources: {} -{{- end }} diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index d97a6ce9..8d60fb50 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -1,18 +1,9 @@ -{{- if .Values.installCRDs }} +# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/analysis-template-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 - {{- if .Values.keepCRDs }} - "helm.sh/resource-policy": keep - {{- end }} - {{- if .Values.crdAnnotations }} - {{- toYaml .Values.crdAnnotations | nindent 4 }} - {{- end }} - labels: - app.kubernetes.io/name: argo-rollouts - app.kubernetes.io/part-of: argo-rollouts name: analysistemplates.argoproj.io spec: group: argoproj.io @@ -185,22 +176,13 @@ spec: datadog: properties: apiVersion: - default: v1 - enum: - - v1 - - v2 - type: string - formula: type: string interval: - default: 5m type: string - queries: - additionalProperties: - type: string - type: object query: type: string + required: + - query type: object graphite: properties: @@ -2814,19 +2796,6 @@ spec: type: string authentication: properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object sigv4: properties: profile: @@ -2875,31 +2844,6 @@ spec: type: object web: properties: - authentication: - properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object - sigv4: - properties: - profile: - type: string - region: - type: string - roleArn: - type: string - type: object - type: object body: type: string headers: @@ -2948,4 +2892,3 @@ spec: served: true storage: true subresources: {} -{{- end }} diff --git a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml index 335f06a2..506d9c20 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -1,18 +1,9 @@ -{{- if .Values.installCRDs }} +# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/cluster-analysis-template-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 - {{- if .Values.keepCRDs }} - "helm.sh/resource-policy": keep - {{- end }} - {{- if .Values.crdAnnotations }} - {{- toYaml .Values.crdAnnotations | nindent 4 }} - {{- end }} - labels: - app.kubernetes.io/name: argo-rollouts - app.kubernetes.io/part-of: argo-rollouts name: clusteranalysistemplates.argoproj.io spec: group: argoproj.io @@ -185,22 +176,13 @@ spec: datadog: properties: apiVersion: - default: v1 - enum: - - v1 - - v2 - type: string - formula: type: string interval: - default: 5m type: string - queries: - additionalProperties: - type: string - type: object query: type: string + required: + - query type: object graphite: properties: @@ -2814,19 +2796,6 @@ spec: type: string authentication: properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object sigv4: properties: profile: @@ -2875,31 +2844,6 @@ spec: type: object web: properties: - authentication: - properties: - oauth2: - properties: - clientId: - type: string - clientSecret: - type: string - scopes: - items: - type: string - type: array - tokenUrl: - type: string - type: object - sigv4: - properties: - profile: - type: string - region: - type: string - roleArn: - type: string - type: object - type: object body: type: string headers: @@ -2948,4 +2892,3 @@ spec: served: true storage: true subresources: {} -{{- end }} diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index 2f60d415..c15d8479 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -1,18 +1,9 @@ -{{- if .Values.installCRDs }} +# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/experiment-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 - {{- if .Values.keepCRDs }} - "helm.sh/resource-policy": keep - {{- end }} - {{- if .Values.crdAnnotations }} - {{- toYaml .Values.crdAnnotations | nindent 4 }} - {{- end }} - labels: - app.kubernetes.io/name: argo-rollouts - app.kubernetes.io/part-of: argo-rollouts name: experiments.argoproj.io spec: group: argoproj.io @@ -2655,4 +2646,3 @@ spec: served: true storage: true subresources: {} -{{- end }} diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 7faf3790..17624656 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -1,18 +1,9 @@ -{{- if .Values.installCRDs }} +# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/rollout-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 - {{- if .Values.keepCRDs }} - "helm.sh/resource-policy": keep - {{- end }} - {{- if .Values.crdAnnotations }} - {{- toYaml .Values.crdAnnotations | nindent 4 }} - {{- end }} - labels: - app.kubernetes.io/name: argo-rollouts - app.kubernetes.io/part-of: argo-rollouts name: rollouts.argoproj.io spec: group: argoproj.io @@ -3638,4 +3629,3 @@ spec: specReplicasPath: .spec.replicas statusReplicasPath: .status.HPAReplicas status: {} -{{- end }} From a47e4588d03a9c53884f0eb882fadda8bea846c0 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 29 Mar 2024 18:05:41 +0300 Subject: [PATCH 2/5] generate crds from tag Signed-off-by: drfaust92 --- charts/argo-cd/hack/update_crds.sh | 31 ++++++++++++++++++++++ charts/argo-rollouts/hack/update_crds.sh | 33 ++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100755 charts/argo-cd/hack/update_crds.sh create mode 100755 charts/argo-rollouts/hack/update_crds.sh diff --git a/charts/argo-cd/hack/update_crds.sh b/charts/argo-cd/hack/update_crds.sh new file mode 100755 index 00000000..d2243806 --- /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-rollouts/hack/update_crds.sh b/charts/argo-rollouts/hack/update_crds.sh new file mode 100755 index 00000000..4ad63acc --- /dev/null +++ b/charts/argo-rollouts/hack/update_crds.sh @@ -0,0 +1,33 @@ +#!/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=( + "analysis-run-crd.yaml : analysis-run-crd.yaml" + "analysis-template-crd.yaml : analysis-template-crd.yaml" + "cluster-analysis-template-crd.yaml : cluster-analysis-template-crd.yaml" + "experiment-crd.yaml : experiment-crd.yaml" + "rollout-crd.yaml : rollout-crd.yaml" +) + +for line in "${FILES[@]}"; do + DESTINATION=$(echo "${line%%:*}" | xargs) + SOURCE=$(echo "${line##*:}" | xargs) + + URL="https://raw.githubusercontent.com/argoproj/argo-rollouts/$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 From c4f63af0a619bd9c86ac2df09b3c729deda02ce3 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 29 Mar 2024 18:07:05 +0300 Subject: [PATCH 3/5] generate crds from tag Signed-off-by: drfaust92 --- .../templates/crds/analysis-run-crd.yaml | 63 ++++++++++++++++++- .../templates/crds/analysis-template-crd.yaml | 63 ++++++++++++++++++- .../crds/cluster-analysis-template-crd.yaml | 63 ++++++++++++++++++- .../templates/crds/experiment-crd.yaml | 12 +++- .../templates/crds/rollout-crd.yaml | 12 +++- 5 files changed, 202 insertions(+), 11 deletions(-) diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 16b4c530..1dddfa7d 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -1,9 +1,18 @@ -# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/analysis-run-crd.yaml +{{- if .Values.installCRDs }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} + {{- if .Values.crdAnnotations }} + {{- toYaml .Values.crdAnnotations | nindent 4 }} + {{- end }} + labels: + app.kubernetes.io/name: argo-rollouts + app.kubernetes.io/part-of: argo-rollouts name: analysisruns.argoproj.io spec: group: argoproj.io @@ -180,13 +189,22 @@ spec: datadog: properties: apiVersion: + default: v1 + enum: + - v1 + - v2 + type: string + formula: type: string interval: + default: 5m type: string + queries: + additionalProperties: + type: string + type: object query: type: string - required: - - query type: object graphite: properties: @@ -2800,6 +2818,19 @@ spec: type: string authentication: properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object sigv4: properties: profile: @@ -2848,6 +2879,31 @@ spec: type: object web: properties: + authentication: + properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object + sigv4: + properties: + profile: + type: string + region: + type: string + roleArn: + type: string + type: object + type: object body: type: string headers: @@ -3010,3 +3066,4 @@ spec: served: true storage: true subresources: {} +{{- end }} diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index 8d60fb50..d97a6ce9 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -1,9 +1,18 @@ -# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/analysis-template-crd.yaml +{{- if .Values.installCRDs }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} + {{- if .Values.crdAnnotations }} + {{- toYaml .Values.crdAnnotations | nindent 4 }} + {{- end }} + labels: + app.kubernetes.io/name: argo-rollouts + app.kubernetes.io/part-of: argo-rollouts name: analysistemplates.argoproj.io spec: group: argoproj.io @@ -176,13 +185,22 @@ spec: datadog: properties: apiVersion: + default: v1 + enum: + - v1 + - v2 + type: string + formula: type: string interval: + default: 5m type: string + queries: + additionalProperties: + type: string + type: object query: type: string - required: - - query type: object graphite: properties: @@ -2796,6 +2814,19 @@ spec: type: string authentication: properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object sigv4: properties: profile: @@ -2844,6 +2875,31 @@ spec: type: object web: properties: + authentication: + properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object + sigv4: + properties: + profile: + type: string + region: + type: string + roleArn: + type: string + type: object + type: object body: type: string headers: @@ -2892,3 +2948,4 @@ spec: served: true storage: true subresources: {} +{{- end }} diff --git a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml index 506d9c20..335f06a2 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -1,9 +1,18 @@ -# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/cluster-analysis-template-crd.yaml +{{- if .Values.installCRDs }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} + {{- if .Values.crdAnnotations }} + {{- toYaml .Values.crdAnnotations | nindent 4 }} + {{- end }} + labels: + app.kubernetes.io/name: argo-rollouts + app.kubernetes.io/part-of: argo-rollouts name: clusteranalysistemplates.argoproj.io spec: group: argoproj.io @@ -176,13 +185,22 @@ spec: datadog: properties: apiVersion: + default: v1 + enum: + - v1 + - v2 + type: string + formula: type: string interval: + default: 5m type: string + queries: + additionalProperties: + type: string + type: object query: type: string - required: - - query type: object graphite: properties: @@ -2796,6 +2814,19 @@ spec: type: string authentication: properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object sigv4: properties: profile: @@ -2844,6 +2875,31 @@ spec: type: object web: properties: + authentication: + properties: + oauth2: + properties: + clientId: + type: string + clientSecret: + type: string + scopes: + items: + type: string + type: array + tokenUrl: + type: string + type: object + sigv4: + properties: + profile: + type: string + region: + type: string + roleArn: + type: string + type: object + type: object body: type: string headers: @@ -2892,3 +2948,4 @@ spec: served: true storage: true subresources: {} +{{- end }} diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index c15d8479..2f60d415 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -1,9 +1,18 @@ -# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/experiment-crd.yaml +{{- if .Values.installCRDs }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} + {{- if .Values.crdAnnotations }} + {{- toYaml .Values.crdAnnotations | nindent 4 }} + {{- end }} + labels: + app.kubernetes.io/name: argo-rollouts + app.kubernetes.io/part-of: argo-rollouts name: experiments.argoproj.io spec: group: argoproj.io @@ -2646,3 +2655,4 @@ spec: served: true storage: true subresources: {} +{{- end }} diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 17624656..7faf3790 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -1,9 +1,18 @@ -# https://raw.githubusercontent.com/argoproj/argo-rollouts/v1.6.6/manifests/crds/rollout-crd.yaml +{{- if .Values.installCRDs }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.1 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} + {{- if .Values.crdAnnotations }} + {{- toYaml .Values.crdAnnotations | nindent 4 }} + {{- end }} + labels: + app.kubernetes.io/name: argo-rollouts + app.kubernetes.io/part-of: argo-rollouts name: rollouts.argoproj.io spec: group: argoproj.io @@ -3629,3 +3638,4 @@ spec: specReplicasPath: .spec.replicas statusReplicasPath: .status.HPAReplicas status: {} +{{- end }} From 92a22acef579cd071ffcd517f6bf34b7c8435c1b Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 29 Mar 2024 18:10:56 +0300 Subject: [PATCH 4/5] generate crds from tag Signed-off-by: drfaust92 --- charts/argo-rollouts/hack/update_crds.sh | 33 ------------------------ 1 file changed, 33 deletions(-) delete mode 100755 charts/argo-rollouts/hack/update_crds.sh diff --git a/charts/argo-rollouts/hack/update_crds.sh b/charts/argo-rollouts/hack/update_crds.sh deleted file mode 100755 index 4ad63acc..00000000 --- a/charts/argo-rollouts/hack/update_crds.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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=( - "analysis-run-crd.yaml : analysis-run-crd.yaml" - "analysis-template-crd.yaml : analysis-template-crd.yaml" - "cluster-analysis-template-crd.yaml : cluster-analysis-template-crd.yaml" - "experiment-crd.yaml : experiment-crd.yaml" - "rollout-crd.yaml : rollout-crd.yaml" -) - -for line in "${FILES[@]}"; do - DESTINATION=$(echo "${line%%:*}" | xargs) - SOURCE=$(echo "${line##*:}" | xargs) - - URL="https://raw.githubusercontent.com/argoproj/argo-rollouts/$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 From 2f56e908571d5c64ec5e5a88e80993ae0f4f4b98 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 29 Mar 2024 18:12:35 +0300 Subject: [PATCH 5/5] generate crds from tag Signed-off-by: drfaust92 --- charts/argo-cd/Chart.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index fa41352d..36f7c4f4 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