summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/charts/sdc-wfd-fe/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdc/charts/sdc-wfd-fe/templates')
-rw-r--r--kubernetes/sdc/charts/sdc-wfd-fe/templates/_helper.tpl1
-rw-r--r--kubernetes/sdc/charts/sdc-wfd-fe/templates/deployment.yaml38
-rw-r--r--kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml60
-rw-r--r--kubernetes/sdc/charts/sdc-wfd-fe/templates/service.yaml18
4 files changed, 15 insertions, 102 deletions
diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/templates/_helper.tpl b/kubernetes/sdc/charts/sdc-wfd-fe/templates/_helper.tpl
new file mode 100644
index 0000000000..546bab7ddf
--- /dev/null
+++ b/kubernetes/sdc/charts/sdc-wfd-fe/templates/_helper.tpl
@@ -0,0 +1 @@
+{{- define "wfd-fe.internalPort" }}{{ if .Values.config.isHttpsEnabled }}{{ .Values.service.internalPort2 }}{{ else }}{{ .Values.service.internalPort }}{{ end }}{{- end }}
diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-wfd-fe/templates/deployment.yaml
index 0be06f3985..08ecaa6daa 100644
--- a/kubernetes/sdc/charts/sdc-wfd-fe/templates/deployment.yaml
+++ b/kubernetes/sdc/charts/sdc-wfd-fe/templates/deployment.yaml
@@ -50,18 +50,17 @@ spec:
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ports:
- - containerPort: {{ .Values.service.internalPort }}
- - containerPort: {{ .Values.service.internalPort2 }}
+ - containerPort: {{ template "wfd-fe.internalPort" . }}
{{ if .Values.liveness.enabled }}
livenessProbe:
tcpSocket:
- port: {{ .Values.service.internalPort }}
+ port: {{ template "wfd-fe.internalPort" . }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end }}
readinessProbe:
tcpSocket:
- port: {{ .Values.service.internalPort }}
+ port: {{ template "wfd-fe.internalPort" . }}
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
env:
@@ -75,41 +74,19 @@ spec:
value: "{{ .Values.config.isHttpsEnabled}}"
{{ if and .Values.config.isHttpsEnabled (eq .Values.security.isDefaultStore false) }}
- name: KEYSTORE_PASS
- {{- if .Values.global.security.keysFromCa }}
valueFrom:
- secretKeyRef:
- name: mft-sdc
- key: keystore-password.txt
- {{ else }}
- value: {{ .Values.global.security.keyStorePass}}
- {{- end }}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: keystore_password}
- name: TRUSTSTORE_PASS
- {{- if .Values.global.security.keysFromCa }}
valueFrom:
- secretKeyRef:
- name: mft-catruststore
- key: keystore-password.txt
- {{ else }}
- value: {{ .Values.global.security.trustStorePass}}
- {{- end }}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: truststore_password}
- name: TRUSTSTORE_PATH
value: "{{ .Values.security.storePath }}/{{ .Values.security.truststoreFilename }}"
- name: KEYSTORE_PATH
value: "{{ .Values.security.storePath }}/{{ .Values.security.keystoreFilename }}"
- - name: TRUSTSTORE_TYPE
- value: {{ .Values.security.truststore.type }}
- - name: KEYSTORE_TYPE
- value: {{ .Values.security.keystore.type }}
+ - name: TRUST_ALL
+ value: "{{ .Values.config.isTrustAll}}"
{{ end }}
volumeMounts:
- {{ if and .Values.config.isHttpsEnabled (eq .Values.security.isDefaultStore false) }}
- - name: {{ include "common.fullname" . }}-jetty-https-truststore
- mountPath: /var/lib/jetty/{{ .Values.security.storePath }}/{{ .Values.security.truststoreFilename }}
- subPath: {{ .Values.security.truststoreFilename }}
- - name: {{ include "common.fullname" . }}-jetty-https-keystore
- mountPath: /var/lib/jetty/etc/{{ .Values.security.storePath }}/{{ .Values.security.keystoreFilename }}
- subPath: {{ .Values.security.keystoreFilename }}
- {{ end }}
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
readOnly: true
@@ -123,7 +100,6 @@ spec:
affinity:
{{ toYaml .Values.affinity | indent 10 }}
{{- end }}
-
# side car containers
- name: {{ include "common.name" . }}-filebeat-onap
image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml b/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml
index e10de6df20..8f87c68f1e 100644
--- a/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml
+++ b/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml
@@ -1,59 +1 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{- define "rules.wf" -}}
-- http:
- paths:
- - path: /workflows/
- backend:
- serviceName: {{.Values.service.name}}
- servicePort: {{.Values.service.internalPort}}
-{{- end -}}
-
-{{- if .Values.ingress.enabled }}
-
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
- name: {{ include "common.fullname" . }}-ingress
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-{{- with .Values.ingress.annotations }}
- annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
-spec:
- rules:
-{{- if .Values.ingress.hosts}}
-{{- range .Values.ingress.hosts}}
-{{- include "rules.wf" $ | nindent 2}}
-{{- if .}}
- host: {{. | quote}}
-{{- end}}
-{{- end}}
- tls:
- - hosts:
-{{- range .Values.ingress.hosts}}
-{{- if .}}
- - {{ . | quote }}
-{{- end}}
-{{- end }}
-{{- else}}
-{{- include "rules.wf" . | nindent 2}}
-{{- end}}
-{{ end }}
+{{ include "common.ingress" . }}
diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/templates/service.yaml b/kubernetes/sdc/charts/sdc-wfd-fe/templates/service.yaml
index 87ca3607d7..d8a105513a 100644
--- a/kubernetes/sdc/charts/sdc-wfd-fe/templates/service.yaml
+++ b/kubernetes/sdc/charts/sdc-wfd-fe/templates/service.yaml
@@ -29,7 +29,7 @@ metadata:
"version": "v1",
"url": "/",
"protocol": "UI",
- "port": "{{ .Values.service.internalPort }}",
+ "port": "{{ .Values.service.internalPort2 }}",
"visualRange":"0|1"
}
]'
@@ -37,19 +37,13 @@ spec:
type: {{ .Values.service.type }}
ports:
{{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.internalPort }}
+ - port: {{ template "wfd-fe.internalPort" . }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName | default "http" }}
- - port: {{ .Values.service.internalPort2 }}
- nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName2 | default "https" }}
+ name: {{ .Values.service.portName }}
{{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName | default "http" }}
- - port: {{ .Values.service.externalPort2 }}
- targetPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.portName2 | default "https" }}
+ - port: {{ if .Values.config.isHttpsEnabled }}{{ .Values.service.externalPort2 }}{{ else }}{{ .Values.service.externalPort }}{{ end }}
+ targetPort: {{ template "wfd-fe.internalPort" . }}
+ name: {{ .Values.service.portName }}
{{- end}}
selector:
app: {{ include "common.name" . }}