diff options
author | 2022-07-18 16:54:51 +0100 | |
---|---|---|
committer | 2022-08-23 09:26:07 +0000 | |
commit | e541eb45ef6e91ff6ef3ff01ea364bb6b69874b4 (patch) | |
tree | 0725e471aed08e71f7bd86bd62312a56b9a9ad53 | |
parent | 3d0089135c21eb199514d047781235656237eeab (diff) |
[POLICY] Add overridable helm paramaters for k8s ppnt
Make permitted repository list overridable from values.yaml
CofigMap populates the application properties file with required values.
Issue-ID: POLICY-4237
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: Ib48716f12bc5f4d22fbda8e22fd2077e0e982ec3
(cherry picked from commit 3c81b1d77c53b18e94e282d8bf0250a5563875d0)
3 files changed, 25 insertions, 7 deletions
diff --git a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml index 0b7e2ab22d..823faf036d 100644 --- a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml +++ b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml @@ -82,10 +82,6 @@ chart: api: enabled: false -# Sample Permitted list of helm repositories. Before deployment update the repositories where the helm charts are located. -# The Kubernetes participant accept only HTTPS Address -helm: - repos: - - - repoName: bitnami - address: https://charts.bitnami.com/bitnami +# Permitted list of helm repositories. Values are updated from values.yaml + + diff --git a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/templates/configmap.yaml b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/templates/configmap.yaml index 09cc8cd48f..54c595cc8f 100644 --- a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/templates/configmap.yaml +++ b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/templates/configmap.yaml @@ -30,3 +30,8 @@ metadata: heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }} +{{- if .Values.repoList }} +{{ tpl (.Files.Glob "resources/config/KubernetesParticipantParameters.yaml").AsConfig . | indent 2 }} +{{ toYaml .Values.repoList | indent 4 }} +{{ tpl (.Files.Glob "resources/config/*.{json,xml,sh}").AsConfig . | indent 2 }} +{{- end }}
\ No newline at end of file diff --git a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml index 5920bdaaf2..bb1df4710d 100644 --- a/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml +++ b/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml @@ -138,3 +138,20 @@ serviceAccount: nameOverride: policy-clamp-ac-k8s-ppnt roles: - create +# Update the config here for permitting repositories and protocols. +repoList: + helm: + repos: + # Required helm repositories can be added here by providing a repo name and its address. Please refer the example + # repositories added below. + # The repoList data can also be passed via an override yaml file during installation of k8s-ppnt helm chart. + #- + # repoName: kong + # address: https://charts.konghq.com + #- + # repoName: bitnami + # address: https://charts.bitnami.com/bitnami + + protocols: + - http + - https |