summaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/Makefile2
-rw-r--r--kubernetes/common/common/templates/_certificate.tpl18
-rw-r--r--kubernetes/common/readinessCheck/requirements.yaml3
-rw-r--r--kubernetes/common/readinessCheck/templates/_readinessCheck.tpl2
-rw-r--r--kubernetes/common/readinessCheck/values.yaml1
5 files changed, 14 insertions, 12 deletions
diff --git a/kubernetes/common/Makefile b/kubernetes/common/Makefile
index 43d62f1a82..c7aba635c1 100644
--- a/kubernetes/common/Makefile
+++ b/kubernetes/common/Makefile
@@ -21,7 +21,7 @@ COMMON_CHARTS_DIR := common
EXCLUDES :=
PROCESSED_LAST := cert-wrapper repository-wrapper
-PROCESSED_FIRST := repositoryGenerator certInitializer
+PROCESSED_FIRST := repositoryGenerator readinessCheck certInitializer
TO_FILTER := $(PROCESSED_FIRST) $(EXCLUDES) $(PROCESSED_LAST)
HELM_BIN := helm
diff --git a/kubernetes/common/common/templates/_certificate.tpl b/kubernetes/common/common/templates/_certificate.tpl
index 74f81af901..d3313b2bc1 100644
--- a/kubernetes/common/common/templates/_certificate.tpl
+++ b/kubernetes/common/common/templates/_certificate.tpl
@@ -33,11 +33,10 @@
# To be added in the file values.yaml
# 1. Minimal version (certificates only in PEM format)
# certificates:
-# - name: onap-component-certificate
-# secretName: onap-component-certificate
-# commonName: component.onap.org
-# 2. Extended version (with defined own issuer and additional certificate format):
-# certificates:
+# - commonName: component.onap.org
+#
+# 2. Extended version (with defined own issuer and additional certificate format):
+# certificates:
# - name: onap-component-certificate
# secretName: onap-component-certificate
# commonName: component.onap.org
@@ -71,10 +70,11 @@
{{- $dot := default . .dot -}}
{{- $certificates := $dot.Values.certificates -}}
-{{ range $certificate := $certificates }}
+{{ range $i, $certificate := $certificates }}
{{/*# General certifiacate attributes #*/}}
-{{- $name := $certificate.name -}}
-{{- $secretName := $certificate.secretName -}}
+{{- $name := include "common.fullname" $dot -}}
+{{- $certName := default (printf "%s-cert-%d" $name $i) $certificate.name -}}
+{{- $secretName := default (printf "%s-secret-%d" $name $i) $certificate.secretName -}}
{{- $commonName := default $dot.Values.global.certificate.default.commonName $certificate.commonName -}}
{{- $renewBefore := default $dot.Values.global.certificate.default.renewBefore $certificate.renewBefore -}}
{{- $duration := $certificate.duration -}}
@@ -122,7 +122,7 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
- name: {{ $name }}
+ name: {{ $certName }}
namespace: {{ $namespace }}
spec:
secretName: {{ $secretName }}
diff --git a/kubernetes/common/readinessCheck/requirements.yaml b/kubernetes/common/readinessCheck/requirements.yaml
index 51e8789caf..9ef1615aae 100644
--- a/kubernetes/common/readinessCheck/requirements.yaml
+++ b/kubernetes/common/readinessCheck/requirements.yaml
@@ -16,3 +16,6 @@ dependencies:
- name: common
version: ~7.x-0
repository: 'file://../common'
+ - name: repositoryGenerator
+ version: ~7.x-0
+ repository: 'file://../repositoryGenerator'
diff --git a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
index aa03938d28..95de6ec29f 100644
--- a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
+++ b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
@@ -65,7 +65,7 @@
{{- $namePart := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "name" -}}
{{- $jobs := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "jobs" -}}
- name: {{ include "common.name" $dot }}{{ ternary "" (printf "-%s" $namePart) (empty $namePart) }}-readiness
- image: "{{ include "common.repository" $subchartDot }}/{{ $subchartDot.Values.global.readinessImage }}"
+ image: {{ include "repositoryGenerator.image.readiness" $subchartDot }}
imagePullPolicy: {{ $subchartDot.Values.global.pullPolicy | default $subchartDot.Values.pullPolicy }}
command:
- /app/ready.py
diff --git a/kubernetes/common/readinessCheck/values.yaml b/kubernetes/common/readinessCheck/values.yaml
index 7bd0c3d679..b15b1c2af3 100644
--- a/kubernetes/common/readinessCheck/values.yaml
+++ b/kubernetes/common/readinessCheck/values.yaml
@@ -13,7 +13,6 @@
# limitations under the License.
global:
- readinessImage: onap/oom/readiness:3.0.1
pullPolicy: Always
limits: