Merge "[STRIMZI] External Kafka Access via Ingress"
authorAndreas Geissler <andreas-geissler@telekom.de>
Fri, 10 Mar 2023 13:35:25 +0000 (13:35 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 10 Mar 2023 13:35:25 +0000 (13:35 +0000)
36 files changed:
kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml
kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/kafkauser.yaml [new file with mode: 0644]
kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/ves-openapi-sdc-dist-kafka-user.yaml [deleted file]
kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml
kubernetes/dcaegen2-services/values.yaml
kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-fcaps/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-fcaps/templates/service.yaml
kubernetes/multicloud/components/multicloud-fcaps/values.yaml
kubernetes/multicloud/components/multicloud-k8s/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-k8s/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-k8s/templates/service.yaml
kubernetes/multicloud/components/multicloud-k8s/values.yaml
kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-pike/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-pike/templates/service.yaml
kubernetes/multicloud/components/multicloud-pike/values.yaml
kubernetes/multicloud/components/multicloud-prometheus/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-prometheus/templates/service.yaml
kubernetes/multicloud/components/multicloud-prometheus/values.yaml
kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-starlingx/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-starlingx/templates/service.yaml
kubernetes/multicloud/components/multicloud-starlingx/values.yaml
kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-vio/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-vio/templates/service.yaml
kubernetes/multicloud/components/multicloud-vio/values.yaml
kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-windriver/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/components/multicloud-windriver/templates/service.yaml
kubernetes/multicloud/components/multicloud-windriver/values.yaml
kubernetes/multicloud/templates/deployment.yaml
kubernetes/multicloud/templates/ingress.yaml [new file with mode: 0644]
kubernetes/multicloud/templates/service.yaml
kubernetes/multicloud/values.yaml

index 2565839..368c9d3 100644 (file)
@@ -2,6 +2,7 @@
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2021 Nokia. All rights reserved.
+# Modifications Copyright © 2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -46,15 +47,14 @@ spec:
           {{ end }}
           env:
           - name: SDC_ADDRESS
-            value: {{ .Values.externalServices.sdc_be_https }}
+            value: sdc-be.{{include "common.namespace" .}}:8080
           - name: SCHEMA_MAP_PATH
             value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }}
-          - name: SECURITY_PROTOCOL
-            value: {{ .Values.config.kafka.securityProtocol }}
-          - name: SASL_MECHANISM
-            value: {{ .Values.config.kafka.saslMechanism }}
           - name: SASL_JAAS_CONFIG
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-openapi-kafka-secret" "key" "sasl.jaas.config") | indent 12 }}
+            valueFrom:
+              secretKeyRef:
+                name: {{ include "common.name" . }}-ku
+                key: sasl.jaas.config
           volumeMounts:
             - name: schema-map
               mountPath: {{ .Values.schemaMap.directory }}
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/kafkauser.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/kafkauser.yaml
new file mode 100644 (file)
index 0000000..6fc37c3
--- /dev/null
@@ -0,0 +1,16 @@
+{{/*
+# Copyright © 2023 Nordix Foundation
+#
+# 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.
+*/}}
+{{ include "common.kafkauser" . }}
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/ves-openapi-sdc-dist-kafka-user.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/ves-openapi-sdc-dist-kafka-user.yaml
deleted file mode 100644 (file)
index 3f9d0ca..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-{{/*
-# Copyright © 2022 Nordix Foundation
-#
-# 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.
-*/}}
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaUser
-metadata:
-  name: {{ include "common.release" . }}-{{ .Values.vesOpenApiKafkaUser }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  authentication:
-    type: {{ .Values.config.kafka.saslMechanism | lower }}
-  authorization:
-    type: {{ .Values.config.kafka.authType }}
-    acls:
-    - resource:
-        type: group
-        name: {{ .Values.config.kafka.sdcTopic.consumerGroup }}
-      operation: Read
-    - resource:
-        type: topic
-        patternType: prefix
-        name: {{ .Values.config.kafka.sdcTopic.pattern }}
-      operation: All
index d2f73e6..2327ac3 100644 (file)
@@ -1,6 +1,7 @@
 #============LICENSE_START========================================================
 #=================================================================================
 # Copyright (c) 2021-2022 Nokia. All rights reserved.
+# Modifications Copyright © 2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # Global values
 global:
   pullPolicy: Always
-image: onap/org.onap.dcaegen2.platform.ves-openapi-manager:1.3.0
+image: onap/org.onap.dcaegen2.platform.ves-openapi-manager:1.3.1
 containerPort: &svc_port 8080
 
-secrets:
-  - uid: ves-openapi-kafka-secret
-    externalSecret: '{{ tpl (default "" .Values.config.jaasConfExternalSecret) . }}'
-    type: genericKV
-    envs:
-      - name: sasl.jaas.config
-        value: '{{ .Values.config.someConfig }}'
-        policy: generate
-
-# application configuration
-config:
-  someConfig: blah
-  kafka:
-    bootstrapServer: strimzi-kafka-bootstrap:9092
-    securityProtocol: SASL_PLAINTEXT
-    saslMechanism: SCRAM-SHA-512
-    authType: simple
-    sdcTopic:
-      pattern: SDC-DIST
-      consumerGroup: dcaegen2
-      clientId: ves-openapi-manager
-
-vesOpenApiKafkaUser: ves-open-api-kafka-user
-
 service:
   ports:
     - name: &port http
       port: *svc_port
 
-externalServices:
-  sdc_be_https: "sdc-be:8080"
-
 schemaMap:
   filename: "schema-map.json"
   directory: "/app/mappings"
@@ -104,12 +78,24 @@ applicationConfig:
       eventSchemaReferencePath: /event/structure/stndDefinedFields/structure/schemaReference/value
     distribution:
       sdcAddress: ${SDC_ADDRESS:sdc-be.onap:8080}
+      isUseHttpsWithSDC: false
       user: dcae
       password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
       pollingInterval: 20
       pollingTimeout: 20
       consumerGroup: dcaegen2
       environmentName: AUTO
-      consumerID: ves-openapi-manager
+      consumerID: dcae-ves-openapi-manager
       activateServerTLSAuth: false
       isFilterInEmptyResources: false
+
+# Strimzi KafkaUser config
+kafkaUser:
+  acls:
+    - name: dcaegen2
+      type: group
+      operations: [Read]
+    - name: SDC-DISTR
+      type: topic
+      patternType: prefix
+      operations: [Read, Write]
\ No newline at end of file
index f286913..ba3607f 100644 (file)
@@ -16,7 +16,6 @@
 
 global:
   centralizedLoggingEnabled: true
-  vesOpenApiKafkaUser: ves-open-api-kafka-user
 
 #################################################################
 # Filebeat Configuration Defaults.
@@ -29,8 +28,6 @@ filebeatConfig:
 # Control deployment of DCAE microservices at ONAP installation time
 dcae-ves-openapi-manager:
   enabled: true
-  config:
-    jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.vesOpenApiKafkaUser }}'
 dcae-datafile-collector:
   enabled: false
   logConfigMapNamePrefix: '{{ include "common.release" . }}-dcaegen2-services'
index 7a19fcf..3445489 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-     containers:
-     - env:
-       - name: MSB_PROTO
-         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
-       - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
-       - name: MSB_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
-       - name: AAI_ADDR
-         value: "aai.{{ include "common.namespace" . }}"
-       - name: AAI_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
-       - name: AAI_SCHEMA_VERSION
-         value: "{{ .Values.config.aai.schemaVersion }}"
-       - name: AAI_USERNAME
-         value: "{{ .Values.config.aai.username }}"
-       - name: AAI_PASSWORD
-         value: "{{ .Values.config.aai.password }}"
-       - name: SSL_ENABLED
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
-       name: {{ include "common.name" . }}
-       volumeMounts:
-       - mountPath: "{{ .Values.log.path }}"
-         name: fcaps-log
-       - mountPath: /opt/fcaps/fcaps/pub/config/log.yml
-         name: fcaps-logconfig
-         subPath: log.yml
-       resources: {{ include "common.resources" . | nindent 9 }}
-       image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       ports:
-       - containerPort: {{ .Values.service.internalPort }}
-       # disable liveness probe when breakpoints set in debugger
-       # so K8s doesn't restart unresponsive container
-       {{ if .Values.liveness.enabled }}
-       livenessProbe:
-         httpGet:
-           path: /api/multicloud-fcaps/v1/healthcheck
-           port: {{ .Values.service.internalPort }}
-           scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
-         initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-         periodSeconds: {{ .Values.liveness.periodSeconds }}
-         timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-         successThreshold: {{ .Values.liveness.successThreshold }}
-         failureThreshold: {{ .Values.liveness.failureThreshold }}
-       {{ end }}
-     # side car containers
-     {{ include "common.log.sidecar" . | nindent 5 }}
-     - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.rabbitmq }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: rabbit-mq
-     - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: memcached
-     serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-     volumes:
-     - name: fcaps-log
-       emptyDir: {}
-     {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }}
-     - name: fcaps-logconfig
-       configMap:
-         name: {{ include "common.fullname" . }}-log-configmap
-     imagePullSecrets:
-     - name: "{{ include "common.namespace" . }}-docker-registry-key"
-     restartPolicy: Always
+      containers:
+      - env:
+        - name: MSB_PROTO
+          value: "http"
+        - name: MSB_ADDR
+          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
+        - name: MSB_PORT
+          value: "{{ .Values.config.msbPort }}"
+        - name: AAI_ADDR
+          value: "aai.{{ include "common.namespace" . }}"
+        - name: AAI_PORT
+          value: "{{ .Values.config.aai.aaiPort }}"
+        - name: AAI_SCHEMA_VERSION
+          value: "{{ .Values.config.aai.schemaVersion }}"
+        - name: AAI_USERNAME
+          value: "{{ .Values.config.aai.username }}"
+        - name: AAI_PASSWORD
+          value: "{{ .Values.config.aai.password }}"
+        - name: SSL_ENABLED
+          value: "false"
+        name: {{ include "common.name" . }}
+        volumeMounts:
+        - mountPath: "{{ .Values.log.path }}"
+          name: fcaps-log
+        - mountPath: /opt/fcaps/fcaps/pub/config/log.yml
+          name: fcaps-logconfig
+          subPath: log.yml
+        resources: {{ include "common.resources" . | nindent 10 }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{ if .Values.liveness.enabled }}
+        livenessProbe:
+          httpGet:
+            path: /api/multicloud-fcaps/v1/healthcheck
+            port: {{ .Values.service.internalPort }}
+            scheme: HTTP
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          successThreshold: {{ .Values.liveness.successThreshold }}
+          failureThreshold: {{ .Values.liveness.failureThreshold }}
+        {{ end }}
+      # side car containers
+      {{ include "common.log.sidecar" . | nindent 6 }}
+      - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.rabbitmq }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: rabbit-mq
+      - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: memcached
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
+      volumes:
+      - name: fcaps-log
+        emptyDir: {}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
+      - name: fcaps-logconfig
+        configMap:
+          name: {{ include "common.fullname" . }}-log-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      restartPolicy: Always
diff --git a/kubernetes/multicloud/components/multicloud-fcaps/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-fcaps/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index e73a942..ce6f147 100644 (file)
@@ -1,62 +1,18 @@
 {{/*
 # Copyright (c) 2019, CMCC Technologies Co., Ltd.
-# #
-# # 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.
+# Modifications Copyright © 2023 Deutsche Telekom
+#
+# 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.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-fcaps",
-      "version": "v0",
-      "url": "/api/multicloud-fcaps/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-fcaps",
-      "version": "v1",
-      "url": "/api/multicloud-fcaps/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    }
-    ]'
-spec:
-  ports:
-  {{if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
index b9e90af..3955a66 100644 (file)
@@ -30,13 +30,10 @@ istioSidecar: true
 
 # application configuration
 config:
-  ssl_enabled: true
   msbgateway: msb-iag
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 8080
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
@@ -58,15 +55,41 @@ liveness:
   enabled: true
 
 service:
-  type: ClusterIP
-  name: multicloud-fcaps
-  portName: http
-  externalPort: 9011
+  type: NodePort
   internalPort: 9011
-  nodePort: 87
+  ports:
+    - name: http
+      port: 9011
+      nodePort: '87'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-fcaps",
+          "version": "v0",
+          "url": "/api/multicloud-fcaps/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-fcaps",
+          "version": "v1",
+          "url": "/api/multicloud-fcaps/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: 'multicloud-fcaps-api'
+      name: 'multicloud-fcaps'
+      port: 9011
 
 # Resource Limit flavor -By Default using small
 flavor: small
index ed6b64c..325dbb0 100644 (file)
 
 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:
       containers:
       - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -41,8 +29,7 @@ spec:
         name: {{ include "common.name" . }}
         command: ["/opt/multicloud/k8splugin/k8plugin"]
         workingDir: /opt/multicloud/k8splugin
-        ports:
-        - containerPort: {{ .Values.service.internalPort }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           tcpSocket:
diff --git a/kubernetes/multicloud/components/multicloud-k8s/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-k8s/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index b2b39db..dc96952 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright 2019 Intel Corporation, Inc
+# Modifications Copyright © 2023 Deutsche Telekom
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-k8s",
-      "version": "v1",
-      "url": "/",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    }
-    ]'
-spec:
-  type: {{ .Values.service.type }}
-  ports:
-  - name: {{ .Values.service.PortName }}
-    {{if eq .Values.service.type "NodePort" -}}
-    port: {{ .Values.service.internalPort }}
-    nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.service.nodePort }}
-    {{- else -}}
-    port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    {{- end}}
-    protocol: TCP
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+{{ include "common.service" . }}
index aea6915..a87bd52 100644 (file)
@@ -63,12 +63,32 @@ readiness:
   periodSeconds: 30
 
 service:
-  type: ClusterIP
-  name: multicloud-k8s
-  portName: http
+  type: NodePort
   internalPort: 9015
-  externalPort: 9015
-  nodePort: 98
+  ports:
+    - name: http
+      port: 9015
+      nodePort: '98'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-k8s",
+          "version": "v1",
+          "url": "/",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
+
+ingress:
+  enabled: false
+  service:
+    - baseaddr: 'multicloud-k8s-api'
+      name: 'multicloud-k8s'
+      port: 9015
 
 #Mongo chart overrides for k8splugin
 mongo:
@@ -120,9 +140,6 @@ persistence:
   mountPath: /dockerdata-nfs
   mountSubPath: multicloud-k8s/data
 
-ingress:
-  enabled: false
-
 artifactbroker:
   internalPort: 9014
 
index a8d876a..0a16cc5 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-     containers:
-     - env:
-       - name: MSB_PROTO
-         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
-       - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
-       - name: MSB_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
-       - name: AAI_ADDR
-         value: "aai.{{ include "common.namespace" . }}"
-       - name: AAI_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
-       - name: AAI_SCHEMA_VERSION
-         value: "{{ .Values.config.aai.schemaVersion }}"
-       - name: AAI_USERNAME
-         value: "{{ .Values.config.aai.username }}"
-       - name: AAI_PASSWORD
-         value: "{{ .Values.config.aai.password }}"
-       - name: SSL_ENABLED
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
-       name: {{ include "common.name" . }}
-       volumeMounts:
-       - mountPath: "{{ .Values.log.path }}"
-         name: pike-log
-       - mountPath: /opt/pike/pike/pub/config/log.yml
-         name: pike-logconfig
-         subPath: log.yml
-       resources: {{ include "common.resources" . | nindent 9 }}
-       image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       command: ["/bin/sh"]
-       args: ["-c", "/bin/sh /opt/pike/run.sh"]
-       ports:
-       - containerPort: {{ .Values.service.internalPort }}
-       # disable liveness probe when breakpoints set in debugger
-       # so K8s doesn't restart unresponsive container
-       {{ if .Values.liveness.enabled }}
-       livenessProbe:
-         httpGet:
-           path: /api/multicloud-pike/v0/swagger.json
-           port: {{ .Values.service.internalPort }}
-           scheme: HTTP
-         initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-         periodSeconds: {{ .Values.liveness.periodSeconds }}
-         timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-         successThreshold: {{ .Values.liveness.successThreshold }}
-         failureThreshold: {{ .Values.liveness.failureThreshold }}
-       {{ end }}
-     # side car containers
-     {{ include "common.log.sidecar" . | nindent 5 }}
-     - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: memcached
-     serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-     volumes:
-     - name: pike-log
-       emptyDir: {}
-     {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix"  (tpl .Values.logConfigMapNamePrefix .)) | nindent 5 }}
-     - name: pike-logconfig
-       configMap:
-         name: {{ include "common.fullname" . }}-log-configmap
-     imagePullSecrets:
-     - name: "{{ include "common.namespace" . }}-docker-registry-key"
-     restartPolicy: Always
+      containers:
+      - env:
+        - name: MSB_PROTO
+          value: "http"
+        - name: MSB_ADDR
+          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
+        - name: MSB_PORT
+          value: "{{ .Values.config.msbPort }}"
+        - name: AAI_ADDR
+          value: "aai.{{ include "common.namespace" . }}"
+        - name: AAI_PORT
+          value: "{{ .Values.config.aai.aaiPort }}"
+        - name: AAI_SCHEMA_VERSION
+          value: "{{ .Values.config.aai.schemaVersion }}"
+        - name: AAI_USERNAME
+          value: "{{ .Values.config.aai.username }}"
+        - name: AAI_PASSWORD
+          value: "{{ .Values.config.aai.password }}"
+        - name: SSL_ENABLED
+          value: "false"
+        name: {{ include "common.name" . }}
+        volumeMounts:
+        - mountPath: "{{ .Values.log.path }}"
+          name: pike-log
+        - mountPath: /opt/pike/pike/pub/config/log.yml
+          name: pike-logconfig
+          subPath: log.yml
+        resources: {{ include "common.resources" . | nindent 10 }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command: ["/bin/sh"]
+        args: ["-c", "/bin/sh /opt/pike/run.sh"]
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{ if .Values.liveness.enabled }}
+        livenessProbe:
+          httpGet:
+            path: /api/multicloud-pike/v0/swagger.json
+            port: {{ .Values.service.internalPort }}
+            scheme: HTTP
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          successThreshold: {{ .Values.liveness.successThreshold }}
+          failureThreshold: {{ .Values.liveness.failureThreshold }}
+        {{ end }}
+      # side car containers
+      {{ include "common.log.sidecar" . | nindent 6 }}
+      - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: memcached
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
+      volumes:
+      - name: pike-log
+        emptyDir: {}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix"  (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
+      - name: pike-logconfig
+        configMap:
+          name: {{ include "common.fullname" . }}-log-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      restartPolicy: Always
diff --git a/kubernetes/multicloud/components/multicloud-pike/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-pike/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index 503fae3..adbb87c 100644 (file)
@@ -1,61 +1,18 @@
 {{/*
 # Copyright (c) 2018 Intel Corporation.
-# #
-# # 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.
+# Modifications Copyright © 2023 Deutsche Telekom
+#
+# 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.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-pike",
-      "version": "v0",
-      "url": "/api/multicloud-pike/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-pike",
-      "version": "v1",
-      "url": "/api/multicloud-pike/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    }
-    ]'
-
-spec:
-  ports:
-  {{if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
\ No newline at end of file
index 4ed7a64..2b84873 100644 (file)
@@ -25,18 +25,12 @@ global:
 image: onap/multicloud/openstack-pike:1.5.7
 pullPolicy: Always
 
-#Istio sidecar injection policy
-istioSidecar: true
-
 # application configuration
 config:
-  ssl_enabled: false
   msbgateway: msb-iag
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 8080
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
@@ -58,15 +52,41 @@ liveness:
   enabled: true
 
 service:
-  type: ClusterIP
-  name: multicloud-pike
-  portName: http
-  externalPort: 9007
+  type: NodePort
   internalPort: 9007
-  nodePort: 96
+  ports:
+    - name: http
+      port: 9007
+      nodePort: '96'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-pike",
+          "version": "v0",
+          "url": "/api/multicloud-pike/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-pike",
+          "version": "v1",
+          "url": "/api/multicloud-pike/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: 'multicloud-pike-api'
+      name: 'multicloud-pike'
+      port: 9007
 
 # Resource Limit flavor -By Default using small
 flavor: small
index 7494129..1de9a8b 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       initContainers:
       - image: {{ include "repositoryGenerator.image.busybox" . }}
@@ -70,8 +57,7 @@ spec:
         {{- end }}
         resources:
 {{ toYaml .Values.resources | indent 10 }}
-        ports:
-        - containerPort: {{ .Values.service.internalPort }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
         # disable liveness probe when breakpoints set in debugger
         # so K8s doesn't restart unresponsive container
         {{- if .Values.liveness.enabled }}
index b8dbb68..ec4e1a7 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright 2018 Intel Corporation, Inc
+# Modifications Copyright © 2023 Deutsche Telekom
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ .Values.service.name }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-spec:
-  type: {{ .Values.service.type }}
-  ports:
-  - name: {{ .Values.service.portName }}
-    {{if eq .Values.service.type "NodePort" -}}
-    port: {{ .Values.service.internalPort }}
-    nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
-    {{- else -}}
-    port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    {{- end}}
-    protocol: TCP
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
\ No newline at end of file
+{{ include "common.service" . }}
\ No newline at end of file
index 78373c8..2726049 100644 (file)
@@ -52,10 +52,10 @@ persistence:
 #Service configuration for this chart
 service:
   type: ClusterIP
-  name: multicloud-prometheus
-  portName: http
   internalPort: 9090
-  externalPort: 9090
+  ports:
+    - name: http
+      port: 9090
 
 # probe configuration parameters
 liveness:
index 7f17806..240ef11 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       containers:
       - env:
         - name: MSB_PROTO
-          value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
+          value: "http"
         - name: MSB_ADDR
           value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
         - name: MSB_PORT
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
+          value: "{{ .Values.config.msbPort }}"
         - name: AAI_ADDR
           value: "aai.{{ include "common.namespace" . }}"
         - name: AAI_PORT
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
+          value: "{{ .Values.config.aai.aaiPort }}"
         - name: AAI_SCHEMA_VERSION
           value: "{{ .Values.config.aai.schemaVersion }}"
         - name: AAI_USERNAME
@@ -57,7 +42,7 @@ spec:
         - name: AAI_PASSWORD
           value: "{{ .Values.config.aai.password }}"
         - name: SSL_ENABLED
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
+          value: "false"
         name: {{ include "common.name" . }}
         volumeMounts:
         - mountPath: "{{ .Values.log.path }}"
@@ -67,11 +52,10 @@ spec:
           subPath: log.yml
         - mountPath: /opt/artifacts/
           name: artifact-data
-        resources: {{ include "common.resources" . | nindent 12 }}
+        resources: {{ include "common.resources" . | nindent 10 }}
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        ports:
-        - containerPort: {{ .Values.service.internalPort }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
         # disable liveness probe when breakpoints set in debugger
         # so K8s doesn't restart unresponsive container
         {{ if .Values.liveness.enabled }}
@@ -79,7 +63,7 @@ spec:
           httpGet:
             path: /api/multicloud-starlingx/v0/swagger.json
             port: {{ .Values.service.internalPort }}
-            scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
+            scheme: HTTP
           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
           periodSeconds: {{ .Values.liveness.periodSeconds }}
           timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
@@ -87,7 +71,7 @@ spec:
           failureThreshold: {{ .Values.liveness.failureThreshold }}
         {{ end }}
       # side car containers
-      {{ include "common.log.sidecar" . | nindent 7 }}
+      {{ include "common.log.sidecar" . | nindent 6 }}
       - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: memcached
@@ -108,7 +92,7 @@ spec:
       volumes:
       - name: starlingx-log
         emptyDir: {}
-      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 7 }}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
       - name: starlingx-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
diff --git a/kubernetes/multicloud/components/multicloud-starlingx/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-starlingx/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index 5c30c26..6eb90e5 100644 (file)
@@ -1,62 +1,18 @@
 {{/*
 # Copyright (c) 2019 Intel Corporation.
-# #
-# # 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.
+# Modifications Copyright © 2023 Deutsche Telekom
+#
+# 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.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-starlingx",
-      "version": "v0",
-      "url": "/api/multicloud-starlingx/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-starlingx",
-      "version": "v1",
-      "url": "/api/multicloud-starlingx/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    }
-    ]'
-spec:
-  ports:
-  {{if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
\ No newline at end of file
index 1fe7775..645c537 100644 (file)
@@ -27,18 +27,12 @@ repository: nexus3.onap.org:10001
 image: onap/multicloud/openstack-starlingx:1.5.7
 pullPolicy: Always
 
-#Istio sidecar injection policy
-istioSidecar: false
-
 # application configuration
 config:
-  ssl_enabled: true
   msbgateway: msb-iag
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 8080
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
@@ -60,15 +54,41 @@ liveness:
   enabled: true
 
 service:
-  type: ClusterIP
-  name: multicloud-starlingx
-  portName: multicloud-starlingx
-  externalPort: 9009
+  type: NodePort
   internalPort: 9009
-  nodePort: 85
+  ports:
+    - name: http
+      port: 9009
+      nodePort: '85'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-starlingx",
+          "version": "v0",
+          "url": "/api/multicloud-starlingx/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-starlingx",
+          "version": "v1",
+          "url": "/api/multicloud-starlingx/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: 'multicloud-starlingx-api'
+      name: 'multicloud-starlingx'
+      port: 9009
 
 # Resource Limit flavor -By Default using small
 flavor: small
index d00d78b..e80476c 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-     containers:
-     - env:
-       - name: MSB_PROTO
-         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
-       - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
-       - name: MSB_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
-       - name: AAI_ADDR
-         value: "aai.{{ include "common.namespace" . }}"
-       - name: AAI_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
-       - name: AAI_SCHEMA_VERSION
-         value: "{{ .Values.config.aai.schemaVersion }}"
-       - name: AAI_USERNAME
-         value: "{{ .Values.config.aai.username }}"
-       - name: AAI_PASSWORD
-         value: "{{ .Values.config.aai.password }}"
-       name: {{ include "common.name" . }}
-       volumeMounts:
-       - mountPath: "{{ .Values.log.path }}"
-         name: vio-log
-       - mountPath: /opt/vio/vio/pub/config/log.yml
-         name: vio-logconfig
-         subPath: log.yml
-       resources: {{ include "common.resources" . | nindent 9 }}
-       image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       ports:
-       - containerPort: {{ .Values.service.internalPort }}
-       # disable liveness probe when breakpoints set in debugger
-       # so K8s doesn't restart unresponsive container
-       {{- if eq .Values.liveness.enabled true }}
-       livenessProbe:
-         httpGet:
-           path: /api/multicloud-vio/v0/swagger.json
-           port: {{ .Values.service.internalPort }}
-           scheme: HTTP
-         initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-         periodSeconds: {{ .Values.liveness.periodSeconds }}
-         timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-         successThreshold: {{ .Values.liveness.successThreshold }}
-         failureThreshold: {{ .Values.liveness.failureThreshold }}
-       {{ end -}}
-       # side car containers
-     {{ include "common.log.sidecar" . | nindent 5 }}
-     serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-     volumes:
-     - name: vio-log
-       emptyDir: {}
-     {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }}
-     - name: vio-logconfig
-       configMap:
-         name: {{ include "common.fullname" . }}-log-configmap
-     imagePullSecrets:
-     - name: "{{ include "common.namespace" . }}-docker-registry-key"
-     restartPolicy: Always
+      containers:
+      - env:
+        - name: MSB_PROTO
+          value: "http"
+        - name: MSB_ADDR
+          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
+        - name: MSB_PORT
+          value: "{{ .Values.config.msbPort }}"
+        - name: AAI_ADDR
+          value: "aai.{{ include "common.namespace" . }}"
+        - name: AAI_PORT
+          value: "{{ .Values.config.aai.aaiPort }}"
+        - name: AAI_SCHEMA_VERSION
+          value: "{{ .Values.config.aai.schemaVersion }}"
+        - name: AAI_USERNAME
+          value: "{{ .Values.config.aai.username }}"
+        - name: AAI_PASSWORD
+          value: "{{ .Values.config.aai.password }}"
+        name: {{ include "common.name" . }}
+        volumeMounts:
+        - mountPath: "{{ .Values.log.path }}"
+          name: vio-log
+        - mountPath: /opt/vio/vio/pub/config/log.yml
+          name: vio-logconfig
+          subPath: log.yml
+        resources: {{ include "common.resources" . | nindent 10 }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          httpGet:
+            path: /api/multicloud-vio/v0/swagger.json
+            port: {{ .Values.service.internalPort }}
+            scheme: HTTP
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          successThreshold: {{ .Values.liveness.successThreshold }}
+          failureThreshold: {{ .Values.liveness.failureThreshold }}
+        {{ end -}}
+      # side car containers
+      {{ include "common.log.sidecar" . | nindent 6 }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
+      volumes:
+      - name: vio-log
+        emptyDir: {}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
+      - name: vio-logconfig
+        configMap:
+          name: {{ include "common.fullname" . }}-log-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      restartPolicy: Always
diff --git a/kubernetes/multicloud/components/multicloud-vio/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-vio/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index 4a926df..0cff91a 100644 (file)
@@ -1,61 +1,19 @@
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T
-# #
-# # 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.
+# Modifications Copyright © 2023 Deutsche Telekom
+#
+# 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.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-vio",
-      "version": "v0",
-      "url": "/api/multicloud-vio/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-vio",
-      "version": "v1",
-      "url": "/api/multicloud-vio/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    }
-    ]'
-spec:
-  ports:
-  {{if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
\ No newline at end of file
index 3b852df..537bc8e 100644 (file)
@@ -26,17 +26,12 @@ global:
 image: onap/multicloud/vio:1.4.2
 pullPolicy: Always
 
-#Istio sidecar injection policy
-istioSidecar: true
-
 # application configuration
 config:
   msbgateway: msb-iag
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 8080
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
@@ -58,15 +53,41 @@ liveness:
   enabled: true
 
 service:
-  type: ClusterIP
-  name: multicloud-vio
-  portName: http
-  externalPort: 9004
+  type: NodePort
   internalPort: 9004
-  nodePort: 92
+  ports:
+    - name: http
+      port: 9004
+      nodePort: '92'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-vio",
+          "version": "v0",
+          "url": "/api/multicloud-vio/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-vio",
+          "version": "v1",
+          "url": "/api/multicloud-vio/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: 'multicloud-vio-api'
+      name: 'multicloud-vio'
+      port: 9004
 
 # Resource Limit flavor -By Default using small
 flavor: small
index dc9ef23..7225154 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       initContainers:
       - command: ["sh", "-c", "chown -R 100:101 /data"]
@@ -50,15 +35,15 @@ spec:
       containers:
       - env:
         - name: MSB_PROTO
-          value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
+          value: "http"
         - name: MSB_ADDR
           value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
         - name: MSB_PORT
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
+          value: "{{ .Values.config.msbPort }}"
         - name: AAI_ADDR
           value: "aai.{{ include "common.namespace" . }}"
         - name: AAI_PORT
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
+          value: "{{ .Values.config.aai.aaiPort }}"
         - name: AAI_SCHEMA_VERSION
           value: "{{ .Values.config.aai.schemaVersion }}"
         - name: AAI_USERNAME
@@ -66,7 +51,7 @@ spec:
         - name: AAI_PASSWORD
           value: "{{ .Values.config.aai.password }}"
         - name: SSL_ENABLED
-          value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
+          value: "false"
         name: {{ include "common.name" . }}
         volumeMounts:
         - mountPath: "{{ .Values.log.path }}"
@@ -79,8 +64,7 @@ spec:
         resources: {{ include "common.resources" . | nindent 10 }}
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        ports:
-        - containerPort: {{ .Values.service.internalPort }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
         # disable liveness probe when breakpoints set in debugger
         # so K8s doesn't restart unresponsive container
         {{ if .Values.liveness.enabled }}
@@ -88,7 +72,7 @@ spec:
           httpGet:
             path: /api/multicloud-titaniumcloud/v1/swagger.json
             port: {{ .Values.service.internalPort }}
-            scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
+            scheme: HTTP
           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
           periodSeconds: {{ .Values.liveness.periodSeconds }}
           timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
@@ -96,7 +80,7 @@ spec:
           failureThreshold: {{ .Values.liveness.failureThreshold }}
         {{ end }}
       # side car containers
-      {{ include "common.log.sidecar" . | nindent 7 }}
+      {{ include "common.log.sidecar" . | nindent 6 }}
       - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: memcached
@@ -117,7 +101,7 @@ spec:
       volumes:
       - name: windriver-log
         emptyDir: {}
-      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 7 }}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
       - name: windriver-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
diff --git a/kubernetes/multicloud/components/multicloud-windriver/templates/ingress.yaml b/kubernetes/multicloud/components/multicloud-windriver/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index f713067..578036b 100644 (file)
@@ -1,73 +1,19 @@
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T
-# #
-# # 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.
+# Modifications Copyright © 2023 Deutsche Telekom
+#
+# 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.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-titanium_cloud",
-      "version": "v0",
-      "url": "/api/multicloud-titanium_cloud/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-titaniumcloud",
-      "version": "v0",
-      "url": "/api/multicloud-titaniumcloud/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-titaniumcloud",
-      "version": "v1",
-      "url": "/api/multicloud-titaniumcloud/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    }
-    ]'
-
-spec:
-  ports:
-  {{ if eq .Values.service.type "NodePort" }}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{ else }}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{ end }}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
index a328dae..9ede0c3 100644 (file)
@@ -28,29 +28,62 @@ global:
 image: onap/multicloud/openstack-windriver:1.5.7
 pullPolicy: Always
 
-#Istio sidecar injection policy
-istioSidecar: true
-
 # application configuration
 config:
   ssl_enabled: true
   msbgateway: msb-iag
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 8080
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
 
 service:
-  type: ClusterIP
-  name: multicloud-titaniumcloud
-  portName: multicloud-titaniumcloud
-  externalPort: 9005
+  type: NodePort
   internalPort: 9005
-  nodePort: 94
+  ports:
+    - name: http
+      port: 9005
+      nodePort: '94'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud-titanium_cloud",
+          "version": "v0",
+          "url": "/api/multicloud-titanium_cloud/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-titaniumcloud",
+          "version": "v0",
+          "url": "/api/multicloud-titaniumcloud/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud-titaniumcloud",
+          "version": "v1",
+          "url": "/api/multicloud-titaniumcloud/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
+
+ingress:
+  enabled: false
+  service:
+    - baseaddr: 'multicloud-titaniumcloud-api'
+      name: 'multicloud-titaniumcloud'
+      port: 9005
 
 # default number of instances
 replicaCount: 1
@@ -68,9 +101,6 @@ liveness:
   failureThreshold: 5
   enabled: true
 
-ingress:
-  enabled: false
-
 persistence:
   enabled: true
   mountPath: /dockerdata-nfs
index 2cfba3f..3b4e0b3 100644 (file)
 
 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 }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
-      name: {{ include "common.name" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-     containers:
-     - env:
-       - name: MSB_PROTO
-         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
-       - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
-       - name: MSB_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
-       - name: AAI_ADDR
-         value: "aai.{{ include "common.namespace" . }}"
-       - name: AAI_PORT
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
-       - name: AAI_SCHEMA_VERSION
-         value: "{{ .Values.config.aai.schemaVersion }}"
-       - name: AAI_USERNAME
-         value: "{{ .Values.config.aai.username }}"
-       - name: AAI_PASSWORD
-         value: "{{ .Values.config.aai.password }}"
-       - name: AAI_PROTOCOL
-         value: "{{- if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
-       - name: SSL_ENABLED
-         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
-       resources: {{ include "common.resources" . | nindent 9 }}
-       image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: {{ include "common.name" . }}
-       volumeMounts:
-       - mountPath: "{{ .Values.log.path }}"
-         name: framework-log
-       - mountPath: /opt/multivimbroker/multivimbroker/pub/config/log.yml
-         name: framework-logconfig
-         subPath: log.yml
-       - mountPath: /opt/multivimbroker/multivimbroker/pub/config/provider-plugin.json
-         name: provider-plugin
-         subPath: provider-plugin.json
-       ports:
-       - containerPort: {{ .Values.service.internalPort }}
-       # disable liveness probe when breakpoints set in debugger
-       # so K8s doesn't restart unresponsive container
-       {{- if eq .Values.liveness.enabled true }}
-       livenessProbe:
-         httpGet:
-           path: /api/multicloud/v0/swagger.json
-           port: {{ .Values.service.internalPort }}
-           scheme: "{{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}"
-         initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-         periodSeconds: {{ .Values.liveness.periodSeconds }}
-         timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-         successThreshold: {{ .Values.liveness.successThreshold }}
-         failureThreshold: {{ .Values.liveness.failureThreshold }}
-       {{ end -}}
+      containers:
+      - env:
+        - name: MSB_PROTO
+          value: "http"
+        - name: MSB_ADDR
+          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
+        - name: MSB_PORT
+          value: "{{ .Values.config.msbPort }}"
+        - name: AAI_ADDR
+          value: "aai.{{ include "common.namespace" . }}"
+        - name: AAI_PORT
+          value: "{{ .Values.config.aai.aaiPlainPort }}"
+        - name: AAI_SCHEMA_VERSION
+          value: "{{ .Values.config.aai.schemaVersion }}"
+        - name: AAI_USERNAME
+          value: "{{ .Values.config.aai.username }}"
+        - name: AAI_PASSWORD
+          value: "{{ .Values.config.aai.password }}"
+        - name: AAI_PROTOCOL
+          value: "http"
+        - name: SSL_ENABLED
+          value: "false"
+        resources: {{ include "common.resources" . | nindent 10 }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}
+        volumeMounts:
+        - mountPath: "{{ .Values.log.path }}"
+          name: framework-log
+        - mountPath: /opt/multivimbroker/multivimbroker/pub/config/log.yml
+          name: framework-logconfig
+          subPath: log.yml
+        - mountPath: /opt/multivimbroker/multivimbroker/pub/config/provider-plugin.json
+          name: provider-plugin
+          subPath: provider-plugin.json
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          httpGet:
+            path: /api/multicloud/v0/swagger.json
+            port: {{ .Values.service.internalPort }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          successThreshold: {{ .Values.liveness.successThreshold }}
+          failureThreshold: {{ .Values.liveness.failureThreshold }}
+        {{ end -}}
 
       # side car containers
-     {{ include "common.log.sidecar" . | nindent 5 }}
-     serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-     volumes:
-     - name: framework-log
-       emptyDir: {}
-     - name: provider-plugin
-       configMap:
-         name: {{ include "common.fullname" . }}-provider-plugin-configmap
-     {{ include "common.log.volumes" . | nindent 5 }}
-     - name: framework-logconfig
-       configMap:
-         name: {{ include "common.fullname" . }}-log-configmap
-     imagePullSecrets:
-     - name: "{{ include "common.namespace" . }}-docker-registry-key"
-     restartPolicy: Always
+      {{ include "common.log.sidecar" . | nindent 6 }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
+      volumes:
+      - name: framework-log
+        emptyDir: {}
+      - name: provider-plugin
+        configMap:
+          name: {{ include "common.fullname" . }}-provider-plugin-configmap
+      {{ include "common.log.volumes" . | nindent 6 }}
+      - name: framework-logconfig
+        configMap:
+          name: {{ include "common.fullname" . }}-log-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      restartPolicy: Always
diff --git a/kubernetes/multicloud/templates/ingress.yaml b/kubernetes/multicloud/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bcc60a0
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom
+#
+# 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.
+*/}}
+
+{{ include "common.ingress" . }}
index 1c483b0..578036b 100644 (file)
@@ -1,6 +1,7 @@
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2023 Deutsche Telekom
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ .Values.service.name }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud",
-      "version": "v0",
-      "url": "/api/multicloud/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      {{if (include "common.needTLS" .) -}}
-      "enable_ssl": {{ .Values.config.ssl_enabled }},
-      {{- else -}}
-      "enable_ssl": false,
-      {{- end}}
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud",
-      "version": "v1",
-      "url": "/api/multicloud/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
-      "visualRange": "1"
-    }
-    ]'
-spec:
-  ports:
-  {{if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
-  type: {{ .Values.service.type }}
+{{ include "common.service" . }}
index ee9efc9..0f5ede8 100644 (file)
@@ -56,15 +56,12 @@ multicloud-windriver:
 
 # application configuration
 config:
-  ssl_enabled: true
   msbgateway: msb-iag
   logstashServiceName: log-ls
   logstashPort: 5044
-  msbPort: 443
-  msbPlainPort: 80
+  msbPort: 80
   aai:
-    aaiPort: 8443
-    aaiPlainPort: 80
+    aaiPort: 80
     schemaVersion: v13
     username: AAI
     password: AAI
@@ -86,15 +83,41 @@ liveness:
   enabled: true
 
 service:
-  type: ClusterIP
-  name: multicloud
-  portName: http
-  externalPort: 9001
+  type: NodePort
   internalPort: 9001
-  nodePort: 91
+  ports:
+    - name: http
+      port: 9001
+      nodePort: '91'
+  annotations:
+    msb.onap.org/service-info: |
+      {{ if .Values.global.msbEnabled -}}[
+        {
+          "serviceName": "multicloud",
+          "version": "v0",
+          "url": "/api/multicloud/v0",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        },
+        {
+          "serviceName": "multicloud",
+          "version": "v1",
+          "url": "/api/multicloud/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": false,
+          "visualRange": "1"
+        }
+      ]{{ end }}
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: 'multicloud-api'
+      name: 'multicloud'
+      port: 9001
 
 # Resource Limit flavor -By Default using small
 flavor: small