diff options
author | Andreas Geissler <andreas-geissler@telekom.de> | 2023-02-20 12:00:42 +0100 |
---|---|---|
committer | Andreas Geissler <andreas-geissler@telekom.de> | 2023-02-23 16:25:04 +0100 |
commit | 0fcefb64c2bd0be21f0d20b1d6fa6a4600a51a37 (patch) | |
tree | 806d3d808e45d5e3ce2432ff603265dfeee72247 /kubernetes/oof/templates/deployment.yaml | |
parent | 7a7b5d419bf216a4ce1d69f5ce135d0d90849e67 (diff) |
[OOF] Make OOF ServiceMesh compatible
Update the OSDF image version to 3.0.8 and remove the AAF
related configuration options
Issue-ID: OOM-2990
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Change-Id: Ib2b5085fa51eacb5ddc0e62dc29c2df9838c9c74
Diffstat (limited to 'kubernetes/oof/templates/deployment.yaml')
-rw-r--r-- | kubernetes/oof/templates/deployment.yaml | 70 |
1 files changed, 5 insertions, 65 deletions
diff --git a/kubernetes/oof/templates/deployment.yaml b/kubernetes/oof/templates/deployment.yaml index 31884c06bb..2d07cc1f51 100644 --- a/kubernetes/oof/templates/deployment.yaml +++ b/kubernetes/oof/templates/deployment.yaml @@ -18,61 +18,15 @@ apiVersion: apps/v1 kind: Deployment -metadata: - name: {{ include "common.fullname" . }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ include "common.release" . }} - heritage: {{ .Release.Service }} +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} spec: - selector: - matchLabels: - app: {{ include "common.name" . }} + selector: {{- include "common.selectors" . | nindent 4 }} replicas: {{ .Values.replicaCount }} template: - metadata: - labels: - app: {{ include "common.name" . }} - release: {{ include "common.release" . }} + metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: initContainers: - - command: - - /app/ready.py - args: - - --container-name - - policy-xacml-pdp - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ include "repositoryGenerator.image.readiness" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: {{ include "common.name" . }}-readiness - {{- if (include "common.needTLS" .) }} - - command: - - sh - - -c - - resp="FAILURE"; - until [ $resp = "200" ]; do - resp=$(curl -s -o /dev/null -k --write-out %{http_code} http{{ if (include "common.needTLS" .) }}s{{ end }}://aaf-sms.{{ include "common.namespace" . }}:10443/v1/sms/domain/osdf/secret); - echo $resp; - sleep 2; - done - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ include "repositoryGenerator.image.curl" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: {{ include "common.name" . }}-osdf-sms-readiness - {{- end }} -{{ include "common.certInitializer.initContainer" . | indent 6 }} + {{ include "common.readinessCheck.waitFor" . | nindent 6 }} containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} @@ -82,13 +36,10 @@ spec: args: - "-c" - | - {{- if (include "common.needTLS" .) }} - grep -v '^$' /opt/osdf/osaaf/local/org.onap.oof.crt > /tmp/oof.crt - cat /tmp/oof.crt /opt/app/ssl_cert/intermediate_root_ca.pem /opt/app/ssl_cert/aaf_root_ca.cer >> /opt/osdf/org.onap.oof.crt - {{ end }} python osdfapp.py ports: - containerPort: {{ .Values.service.internalPort }} + name: http # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container {{- if .Values.liveness.enabled }} @@ -105,21 +56,12 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} env: volumeMounts: -{{ include "common.certInitializer.volumeMount" . | indent 10 }} - mountPath: /etc/localtime name: localtime readOnly: true - mountPath: /opt/osdf/config/osdf_config.yaml name: {{ include "common.fullname" . }}-config subPath: osdf_config.yaml - {{- if (include "common.needTLS" .) }} - - mountPath: /opt/app/ssl_cert/aaf_root_ca.cer - name: {{ include "common.fullname" . }}-onap-certs - subPath: aaf_root_ca.cer - - mountPath: /opt/app/ssl_cert/intermediate_root_ca.pem - name: {{ include "common.fullname" . }}-onap-certs - subPath: intermediate_root_ca.pem - {{- end }} - mountPath: /opt/osdf/config/common_config.yaml name: {{ include "common.fullname" . }}-config subPath: common_config.yaml @@ -141,7 +83,6 @@ spec: {{- end }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - {{ include "common.certInitializer.volumes" . | nindent 8 }} - name: localtime hostPath: path: /etc/localtime @@ -157,6 +98,5 @@ spec: path: log.yml - key: slicing_config.yaml path: slicing_config.yaml -{{ include "oof.certificate.volume" . | indent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" |