Merge "Updated sdc cert."
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 2 Apr 2020 12:32:09 +0000 (12:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 2 Apr 2020 12:32:09 +0000 (12:32 +0000)
1  2 
kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
kubernetes/sdc/charts/sdc-be/values.yaml

  # See the License for the specific language governing permissions and
  # limitations under the License.
  
 -apiVersion: extensions/v1beta1
 +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: {{- 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:
        - name: {{ include "common.name" . }}-readiness
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
+       - name: {{ include "common.name" . }}-update-config
+         image: "{{ .Values.global.envsubstImage }}"
+         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+         command:
+         - sh
+         args:
+         - -c
+         - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config-output/${PFILE}; chmod 0755 /config-output/${PFILE}; done"
+         env:
+         - name: KEYSTORE_PASS
+           valueFrom:
+             secretKeyRef:
+               name: {{ include "common.release" . }}-sdc-cs-secrets
+               key: keystore_password
+         - name: TRUSTSTORE_PASS
+           valueFrom:
+             secretKeyRef:
+               name: {{ include "common.release" . }}-sdc-cs-secrets
+               key: truststore_password
+         volumeMounts:
+         - name: {{ include "common.fullname" . }}-environments
+           mountPath: /config-input/
+         - name: sdc-environments-output
+           mountPath: /config-output/
        containers:
          - name: {{ include "common.name" . }}
            image: "{{ include "common.repository" . }}/{{ .Values.image }}"
            imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 -          ports:
 -          - containerPort: {{ .Values.service.internalPort }}
 -          - containerPort: {{ .Values.service.internalPort2 }}
 +          ports: {{ include "common.containerPorts" . | nindent 10  }}
            {{ if eq .Values.liveness.enabled true }}
            livenessProbe:
              httpGet:
                path: /sdc2/rest/healthCheck
 -              port: {{ .Values.service.internalPort }}
 -              scheme: HTTPS
 +              port: {{ .Values.liveness.port }}
 +              scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
              initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
              periodSeconds: {{ .Values.liveness.periodSeconds }}
              timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
              initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
              periodSeconds: {{ .Values.readiness.periodSeconds }}
              timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
 -          resources:
 -{{ include "common.resources" . | indent 12 }}
 +          resources: {{ include "common.resources" . | nindent 12 }}
            env:
            - name: ENVNAME
              value: {{ .Values.global.env.name }}
                fieldRef:
                  fieldPath: status.podIP
            volumeMounts:
-           - name: {{ include "common.fullname" . }}-environments
+           - name: sdc-environments-output
              mountPath: /var/lib/jetty/chef-solo/environments/
+           - name: sdc-cert
+             mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
+             subPath: org.onap.sdc.p12
+           - name: sdc-cert
+             mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
+             subPath: org.onap.sdc.trust.jks
            - name: {{ include "common.fullname" . }}-localtime
              mountPath: /etc/localtime
              readOnly: true
        - name: {{ include "common.fullname" . }}-localtime
          hostPath:
            path: /etc/localtime
+       - name: sdc-cert
+         secret:
+           secretName: sdc-cert
        - name: {{ include "common.fullname" . }}-filebeat-conf
          configMap:
            name: {{ include "common.release" . }}-sdc-filebeat-configmap
          configMap:
            name: {{ include "common.release" . }}-sdc-environments-configmap
            defaultMode: 0755
-       - name:  {{ include "common.fullname" . }}-logs
+       - name: sdc-environments-output
+         emptyDir: { medium: "Memory" }
+       - name: {{ include "common.fullname" . }}-logs
          emptyDir: {}
        imagePullSecrets:
        - name: "{{ include "common.namespace" . }}-docker-registry-key"
@@@ -28,8 -28,8 +28,8 @@@ global
  #################################################################
  # application image
  repository: nexus3.onap.org:10001
- image: onap/sdc-backend:1.6.3
- backendInitImage: onap/sdc-backend-init:1.6.3
+ image: onap/sdc-backend:1.6.4
+ backendInitImage: onap/sdc-backend-init:1.6.4
  pullPolicy: Always
  
  # flag to enable debugging - application support required
@@@ -53,7 -53,6 +53,7 @@@ liveness
    timeoutSeconds: 5
    # necessary to disable liveness probe when setting breakpoints
    # in debugger so K8s doesn't restart unresponsive container
 +  port: api
    enabled: true
  
  readiness:
  service:
    type: NodePort
    name: sdc-be
 -  portName: sdc-be
 -  nodePort: "04"
 -  internalPort: 8443
 -  externalPort: 8443
 -  nodePort2: "05"
 -  internalPort2: 8080
 -  externalPort2: 8080
 +  both_tls_and_plain: true
 +  msb:
 +    - port: 8080
 +      url: "/sdc/v1"
 +      version: "v1"
 +      protocol: "REST"
 +      visualRange: "1"
 +      serviceName: sdc
 +    - port: 8080
 +      url: "/sdc/v1"
 +      version: "v1"
 +      protocol: "REST"
 +      visualRange: "1"
 +      serviceName: sdc-deprecated
 +  ports:
 +    - name: api
 +      port: 8443
 +      plain_port: 8080
 +      port_protocol: http
 +      nodePort: '04'
  
  ingress:
    enabled: false
    service:
      - baseaddr: "sdcbe"
        name: "sdc-be"
 -      port: 8080
 +      port: 8443
    config:
 -    ssl: "none"
 +    ssl: "redirect"
  
  
  # Resource Limit flavor -By Default using small