From 80d33c54d451cc4eca02b2d71f1ae10b21f4027e Mon Sep 17 00:00:00 2001 From: sangdammad <86688098+sangdammad@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:20:23 -0600 Subject: [PATCH] Events need to be created (#35) * fix: added rbac to create and update events, automated chart upgrade and image pull secrets * fix:per PR feedback, changing the image pull secrets to global list * fix: fixed the crd description to quote the template delimiter to avoid yaml confusion * fix:update the imagePullSecrets to add nil check Co-authored-by: Sangeetha Madamanchi --- api/v1alpha2/application_types.go | 2 +- api/v1alpha2/reference_types.go | 4 ++-- charts/overwhelm/Chart.yaml | 2 +- .../applications.core.expediagroup.com-crd.yaml | 13 +++++++------ .../overwhelm-controller-manager-deployment.yaml | 2 +- .../bases/core.expediagroup.com_applications.yaml | 12 ++++++------ config/helm-manifest/kustomization.yaml | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/api/v1alpha2/application_types.go b/api/v1alpha2/application_types.go index ae8acaf..c763d5d 100644 --- a/api/v1alpha2/application_types.go +++ b/api/v1alpha2/application_types.go @@ -56,7 +56,7 @@ type ApplicationSpec struct { Data map[string]string `json:"data,omitempty"` // PreRenderer holds custom templating delimiters and a flag. - // By default, standard delimiters {{ and }} will be used to render values within. If specified then the custom delimiters will be used. + // By default, standard delimiters "{{" and "}}" will be used to render values within. If specified then the custom delimiters will be used. // +optional PreRenderer PreRenderer `json:"preRenderer,omitempty"` diff --git a/api/v1alpha2/reference_types.go b/api/v1alpha2/reference_types.go index d825591..9b9017d 100644 --- a/api/v1alpha2/reference_types.go +++ b/api/v1alpha2/reference_types.go @@ -15,7 +15,7 @@ package v1alpha2 type PreRenderer struct { - // Custom non white-spaced and non alpha-numeric open delimiter used for go templating action to pre-render. For e.g., <%. Default is {{ + // Custom non white-spaced and non alpha-numeric open delimiter used for go templating action to pre-render. For e.g., <%. Default is "{{" // +kubebuilder:validation:MinLength=2 // +kubebuilder:validation:MaxLength=2 // +optional @@ -27,7 +27,7 @@ type PreRenderer struct { // +optional RightDelimiter string `json:"closeDelimiter,omitempty"` - // Enable to allow Helm Templating to interpolate values within the delimiters {{ }}. + // Enable to allow Helm Templating to interpolate values within the delimiters "{{" "}}". // Defaults to false allowing the pre-renderer to do interpolation within the default delimiters. If both helm templating // and pre-rendering are desired, then enable EnableHelmTemplating and specify custom delimiters as LeftDelimiter and RightDelimiter // +optional diff --git a/charts/overwhelm/Chart.yaml b/charts/overwhelm/Chart.yaml index ad5bfed..20fc304 100644 --- a/charts/overwhelm/Chart.yaml +++ b/charts/overwhelm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: overwhelm -version: 1.2.2 +version: 1.2.3 maintainers: - name: "Expedia Group" url: "https://github.com/ExpediaGroup/overwhelm" diff --git a/charts/overwhelm/crds/applications.core.expediagroup.com-crd.yaml b/charts/overwhelm/crds/applications.core.expediagroup.com-crd.yaml index 283f784..47ff25e 100755 --- a/charts/overwhelm/crds/applications.core.expediagroup.com-crd.yaml +++ b/charts/overwhelm/crds/applications.core.expediagroup.com-crd.yaml @@ -61,9 +61,9 @@ spec: type: object preRenderer: description: PreRenderer holds custom templating delimiters and a - flag. By default, standard delimiters {{ and }} will be used to - render values within. If specified then the custom delimiters will - be used. + flag. By default, standard delimiters "{{" and "}}" will be used + to render values within. If specified then the custom delimiters + will be used. properties: closeDelimiter: description: Custom non white-spaced and non alpha-numeric close @@ -74,8 +74,8 @@ spec: type: string enableHelmTemplating: description: Enable to allow Helm Templating to interpolate values - within the delimiters {{ }}. Defaults to false allowing the - pre-renderer to do interpolation within the default delimiters. + within the delimiters "{{" "}}". Defaults to false allowing + the pre-renderer to do interpolation within the default delimiters. If both helm templating and pre-rendering are desired, then enable EnableHelmTemplating and specify custom delimiters as LeftDelimiter and RightDelimiter @@ -83,7 +83,8 @@ spec: openDelimiter: description: Custom non white-spaced and non alpha-numeric open delimiter used for go templating action to pre-render. For e.g., - <%. Default is {{ maxLength: 2 + <%. Default is "{{" + maxLength: 2 minLength: 2 type: string type: object diff --git a/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml b/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml index 0134a1a..e357c80 100755 --- a/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml +++ b/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml @@ -17,7 +17,7 @@ spec: labels: {{ toYaml .Values.deployment.labels | indent 8 }} spec: - {{- if .Values.global.imagePullSecrets }} + {{- if and .Values.global .Values.global.imagePullSecrets }} imagePullSecrets: {{- range .Values.global.imagePullSecrets }} - name: {{ . }} diff --git a/config/crd/bases/core.expediagroup.com_applications.yaml b/config/crd/bases/core.expediagroup.com_applications.yaml index 16713ad..1e33c04 100644 --- a/config/crd/bases/core.expediagroup.com_applications.yaml +++ b/config/crd/bases/core.expediagroup.com_applications.yaml @@ -55,9 +55,9 @@ spec: type: object preRenderer: description: PreRenderer holds custom templating delimiters and a - flag. By default, standard delimiters {{ and }} will be used to - render values within. If specified then the custom delimiters will - be used. + flag. By default, standard delimiters "{{" and "}}" will be used + to render values within. If specified then the custom delimiters + will be used. properties: closeDelimiter: description: Custom non white-spaced and non alpha-numeric close @@ -68,8 +68,8 @@ spec: type: string enableHelmTemplating: description: Enable to allow Helm Templating to interpolate values - within the delimiters {{ }}. Defaults to false allowing the - pre-renderer to do interpolation within the default delimiters. + within the delimiters "{{" "}}". Defaults to false allowing + the pre-renderer to do interpolation within the default delimiters. If both helm templating and pre-rendering are desired, then enable EnableHelmTemplating and specify custom delimiters as LeftDelimiter and RightDelimiter @@ -77,7 +77,7 @@ spec: openDelimiter: description: Custom non white-spaced and non alpha-numeric open delimiter used for go templating action to pre-render. For e.g., - <%. Default is {{ + <%. Default is "{{" maxLength: 2 minLength: 2 type: string diff --git a/config/helm-manifest/kustomization.yaml b/config/helm-manifest/kustomization.yaml index b85691a..db259f4 100644 --- a/config/helm-manifest/kustomization.yaml +++ b/config/helm-manifest/kustomization.yaml @@ -29,7 +29,7 @@ patchesJson6902: - op: replace path: /spec/template/spec/ value: | - {{- if .Values.global.imagePullSecrets }} + {{- if and .Values.global .Values.global.imagePullSecrets }} imagePullSecrets: {{- range .Values.global.imagePullSecrets }} - name: {{ . }}