Merge "[COMMON] Network-name-gen and dgbuilder ServiceMesh compatibility"
authorJack Lucas <jflos@sonoris.net>
Wed, 22 Jun 2022 15:01:55 +0000 (15:01 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 22 Jun 2022 15:01:55 +0000 (15:01 +0000)
13 files changed:
kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml
kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml
kubernetes/common/elasticsearch/templates/coordinating-deploy.yaml
kubernetes/common/etcd-init/templates/job.yaml
kubernetes/common/etcd-init/values.yaml
kubernetes/common/postgres-init/templates/job.yaml
kubernetes/common/postgres-init/values.yaml
kubernetes/contrib/components/ejbca/templates/deployment.yaml
kubernetes/contrib/components/ejbca/values.yaml
kubernetes/dcaemod/components/dcaemod-runtime-api/resources/config/base/values.yaml
kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml
kubernetes/platform/components/cmpv2-cert-provider/templates/deployment.yaml
kubernetes/platform/components/oom-cert-service/templates/deployment.yaml

index ea805c1..a7278ba 100644 (file)
@@ -111,6 +111,12 @@ spec:
               value: "yes"
             - name: ELASTICSEARCH_NODE_TYPE
               value: "data"
+            - name: network.bind_host
+              value: 127.0.0.1
+            - name: network.publish_host
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
           ports: {{- include "common.containerPorts" . |indent 12 }}
           {{- if .Values.livenessProbe.enabled }}
           livenessProbe:
index a35b4bf..85ea2bb 100644 (file)
@@ -115,6 +115,12 @@ spec:
               value: {{ .Values.dedicatednode | quote }}
             - name: ELASTICSEARCH_NODE_TYPE
               value: "master"
+            - name: network.bind_host
+              value: 127.0.0.1
+            - name: network.publish_host
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
           ports: {{- include "common.containerPorts" . |indent 12 }}
           {{- if .Values.livenessProbe.enabled }}
           livenessProbe:
index 22de4db..05e09cb 100644 (file)
@@ -113,6 +113,12 @@ spec:
               value: "coordinating"
             - name: ELASTICSEARCH_PORT_NUMBER
               value: "9000"
+            - name: network.bind_host
+              value: 127.0.0.1
+            - name: network.publish_host
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
           {{/*ports: {{- include "common.containerPorts" . | indent 12 -}} */}}
           {{- if .Values.livenessProbe.enabled }}
           livenessProbe:
index 69bcfaa..9d7dcc2 100644 (file)
@@ -55,6 +55,8 @@ spec:
           - /bin/sh
           - -ec
           - |
+            {{- if include "common.onServiceMesh" . }}
+            echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
             # Create users
             export ETCDCTL_ENDPOINTS=http://${ETCD_HOST}:${ETCD_PORT}
             export ETCDCTL_API=3
@@ -89,6 +91,7 @@ spec:
           name: localtime
           readOnly: true
         resources: {{ include "common.resources" . | nindent 12 }}
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
       {{- if .Values.nodeSelector }}
       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
       {{- end -}}
index c99c9f1..6ccfb3e 100644 (file)
@@ -72,3 +72,7 @@ resources:
       cpu: 20m
       memory: 20Mi
   unlimited: {}
+
+wait_for_job_container:
+  containers:
+    - '{{ include "common.name" . }}'
index 01151bb..d9a7386 100644 (file)
@@ -59,6 +59,8 @@ spec:
           }
           export PG_PASSWORD=`prepare_password $PG_PASSWORD_INPUT`;
           export PG_ROOT_PASSWORD=`prepare_password $PG_ROOT_PASSWORD_INPUT`;
+          {{- if include "common.onServiceMesh" . }}
+          echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
           cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done;
           psql "postgresql://postgres:$PG_ROOT_PASSWORD@$PG_HOST" < /config/setup.sql
         env:
@@ -98,6 +100,7 @@ spec:
           name: pgconf
         resources:
 {{ include "common.resources" . | indent 12 }}
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
index 7bcd8e2..d6d51f0 100644 (file)
@@ -89,3 +89,7 @@ resources:
       cpu: 1
       memory: 2Gi
   unlimited: {}
+
+wait_for_job_container:
+  containers:
+    - '{{ include "common.name" . }}-update-config'
\ No newline at end of file
index 6bd5b25..a36dcac 100644 (file)
@@ -22,6 +22,16 @@ spec:
   selector: {{- include "common.selectors" . | nindent 4 }}
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+      {{- if (include "common.onServiceMesh" . ) }}
+      annotations:
+      {{- if eq ( .Values.global.serviceMesh.engine ) "linkerd" }}
+        linkerd.io/inject: disabled
+      {{- end }}
+      {{- if eq ( .Values.global.serviceMesh.engine ) "istio" }}
+        sidecar.istio.io/rewriteAppHTTPProbers: "false"
+        proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'
+      {{- end }}
+      {{- end }}
     spec:
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
@@ -51,7 +61,11 @@ spec:
         lifecycle:
           postStart:
             exec:
-              command: ["/bin/sh", "-c", "/opt/primekey/scripts/ejbca-config.sh"]
+              command:
+                - sh
+                - -c
+                - |
+                  sleep 60; /opt/primekey/scripts/ejbca-config.sh
         volumeMounts:
           - name: "{{ include "common.fullname" . }}-volume"
             mountPath: /opt/primekey/scripts/
index 52e0e75..b777a7d 100644 (file)
@@ -86,14 +86,14 @@ affinity: {}
 # probe configuration parameters
 liveness:
   path: /ejbca/publicweb/healthcheck/ejbcahealth
-  port: api
-  initialDelaySeconds: 30
+  port: 8443
+  initialDelaySeconds: 180
   periodSeconds: 30
 
 readiness:
   path: /ejbca/publicweb/healthcheck/ejbcahealth
-  port: api
-  initialDelaySeconds: 30
+  port: 8443
+  initialDelaySeconds: 180
   periodSeconds: 30
 
 service:
@@ -106,7 +106,7 @@ service:
       port_protocol: http
 
 # Resource Limit flavor -By Default using small
-flavor: small
+flavor: unlimited
 # Segregation for Different environment (Small and Large)
 resources:
   small:
index 7609ba6..9916021 100644 (file)
@@ -21,13 +21,6 @@ global:
   nodePortPrefix: 302
   nodePortPrefixExt: 304
 
-#################################################################
-# Filebeat configuration defaults.
-#################################################################
-filebeatConfig:
-  logstashServiceName: log-ls
-  logstashPort: 5044
-
 #################################################################
 # initContainer images.
 #################################################################
@@ -66,12 +59,8 @@ mongo:
 
 # log directory where logging sidecar should look for log files
 # if absent, no sidecar will be deployed
-#logDirectory: TBD  #/opt/app/VESCollector/logs #DONE
-
-# Following requires manual override until fix for DCAEGEN2-3087
-# is available to switch logDirectory setting to log.path
-log:
-  path: /opt/app/
+#log:
+#  path: TBD #/opt/app/VESCollector/logs #DONE
 logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
 
 # directory where TLS certs should be stored
index 5c50381..64d196d 100644 (file)
@@ -93,7 +93,7 @@ readiness:
 
 
 # application image
-image: onap/org.onap.dcaegen2.platform.mod.runtime-web:1.3.2
+image: onap/org.onap.dcaegen2.platform.mod.runtime-web:1.3.3
 
 # Resource Limit flavor -By Default using small
 flavor: small
index c497622..ce5e410 100644 (file)
@@ -32,6 +32,16 @@ spec:
     metadata:
       labels:
         control-plane: controller-manager
+      {{- if (include "common.onServiceMesh" . | nindent 6 ) }}
+      annotations:
+      {{- if eq ( .Values.global.serviceMesh.engine ) "linkerd" }}
+        linkerd.io/inject: disabled
+      {{- end }}
+      {{- if eq ( .Values.global.serviceMesh.engine ) "istio" }}
+          traffic.sidecar.istio.io/excludeInboundPorts: "8080,8443"
+          traffic.sidecar.istio.io/includeInboundPorts: '*'
+      {{- end }}
+      {{- end }}
     spec:
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index 8215ed9..5f80a7d 100644 (file)
@@ -22,6 +22,16 @@ spec:
   selector: {{- include "common.selectors" . | nindent 4 }}
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+      {{- if (include "common.onServiceMesh" . ) }}
+      annotations:
+      {{- if eq ( .Values.global.serviceMesh.engine ) "linkerd" }}
+        linkerd.io/inject: disabled
+      {{- end }}
+      {{- if eq ( .Values.global.serviceMesh.engine ) "istio" }}
+          traffic.sidecar.istio.io/excludeInboundPorts: "8080,8443"
+          traffic.sidecar.istio.io/includeInboundPorts: '*'
+      {{- end }}
+      {{- end }}
     spec:
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"