diff options
Diffstat (limited to 'kubernetes/aai/components/aai-traversal/templates')
-rw-r--r-- | kubernetes/aai/components/aai-traversal/templates/deployment.yaml | 53 | ||||
-rw-r--r-- | kubernetes/aai/components/aai-traversal/templates/job.yaml | 27 |
2 files changed, 15 insertions, 65 deletions
diff --git a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml index d12fc6b702..e2a2c10a39 100644 --- a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml @@ -20,7 +20,7 @@ apiVersion: apps/v1 kind: Deployment -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: {{- include "common.resourceMetadata" (dict "annotations" .Values.annotations "dot" .) | nindent 2 }} spec: {{- if or .Values.config.debug.enabled .Values.config.profiling.enabled }} replicas: 1 @@ -41,55 +41,6 @@ spec: app: {{ include "common.name" . }} template: metadata: {{- include "common.templateMetadata" . | nindent 6 }} - {{- if .Values.global.msbEnabled }} - {{ $values := .Values }} - msb.onap.org/service-info: '[ - {{- range $api_endpoint := $values.aai_enpoints -}} - {{- range $api_version := $values.api_list }} - { - "serviceName": "_{{ $api_endpoint.name }}", - "version": "v{{ $api_version }}", - "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}", - "protocol": "REST", - "port": "8446", - "enable_ssl": true, - "lb_policy":"ip_hash", - "visualRange": "1", - "path": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}" - }, - { - "serviceName": "{{ $api_endpoint.name }}", - "version": "v{{ $api_version }}", - "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}", - "protocol": "REST", - "port": "8446", - "enable_ssl": true, - "lb_policy":"ip_hash", - "visualRange": "1" - }, - {{- end }} - {{- end }} - { - "serviceName": "_aai-named-query", - "url": "/aai/search", - "protocol": "REST", - "port": "8446", - "enable_ssl": true, - "lb_policy":"ip_hash", - "visualRange": "1", - "path": "/aai/search" - }, - { - "serviceName": "aai-named-query", - "url": "/aai/search", - "protocol": "REST", - "port": "8446", - "enable_ssl": true, - "lb_policy":"ip_hash", - "visualRange": "1" - } - ]' - {{- end }} spec: hostname: aai-traversal terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }} @@ -195,7 +146,7 @@ spec: - -c - | while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1) - do sleep 10 + do sleep 3 done # disable liveness probe when # debugging.enable=true or profiling.enabled=true diff --git a/kubernetes/aai/components/aai-traversal/templates/job.yaml b/kubernetes/aai/components/aai-traversal/templates/job.yaml index 3ea973fb99..372ea2da07 100644 --- a/kubernetes/aai/components/aai-traversal/templates/job.yaml +++ b/kubernetes/aai/components/aai-traversal/templates/job.yaml @@ -26,10 +26,9 @@ metadata: namespace: {{ include "common.namespace" . }} labels: {{- include "common.labels" . | nindent 4 }} {{ if .Values.global.jobs.migration.enabled }} - annotations: - "helm.sh/hook": post-upgrade,post-rollback,post-install - "helm.sh/hook-weight": "2" - "helm.sh/hook-delete-policy": before-hook-creation + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} {{ end }} spec: template: @@ -43,6 +42,16 @@ spec: - name: {{ include "common.name" . }}-wait-for-aai-haproxy image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + securityContext: + runAsUser: 100 + runAsGroup: 65533 + readOnlyRootFilesystem: true + privileged: false + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + - CAP_NET_RAW command: - sh - "-c" @@ -60,16 +69,6 @@ spec: requests: cpu: "3m" memory: "20Mi" - securityContext: - runAsUser: 100 - runAsGroup: 65533 - readOnlyRootFilesystem: true - privileged: false - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - - CAP_NET_RAW containers: - name: {{ include "common.name" . }}-job image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |