summaryrefslogtreecommitdiffstats
path: root/kubernetes/so/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/so/templates')
-rwxr-xr-xkubernetes/so/templates/configmap.yaml8
-rwxr-xr-xkubernetes/so/templates/deployment.yaml44
-rw-r--r--kubernetes/so/templates/ingress.yaml16
-rwxr-xr-xkubernetes/so/templates/service.yaml390
4 files changed, 30 insertions, 428 deletions
diff --git a/kubernetes/so/templates/configmap.yaml b/kubernetes/so/templates/configmap.yaml
index c55bf573f1..052a985387 100755
--- a/kubernetes/so/templates/configmap.yaml
+++ b/kubernetes/so/templates/configmap.yaml
@@ -14,10 +14,6 @@
# limitations under the License.
*/}}
apiVersion: v1
-data:
- LOG_PATH: {{ index .Values.logPath }}
- APP: {{ index .Values.app }}
- ACTIVE_PROFILE: {{ include "so.helpers.profileProperty" (dict "condition" .Values.global.security.aaf.enabled "value1" "aaf" "value2" "basic")}}
kind: ConfigMap
metadata:
name: {{ include "common.fullname" . }}-configmap
@@ -27,6 +23,10 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
+data:
+ LOG_PATH: {{ index .Values.logPath }}
+ APP: {{ index .Values.app }}
+ ACTIVE_PROFILE: "basic"
---
apiVersion: v1
kind: ConfigMap
diff --git a/kubernetes/so/templates/deployment.yaml b/kubernetes/so/templates/deployment.yaml
index 56faa934ae..3110802fa0 100755
--- a/kubernetes/so/templates/deployment.yaml
+++ b/kubernetes/so/templates/deployment.yaml
@@ -15,18 +15,10 @@
*/}}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- selector:
- matchLabels:
- app: {{ include "common.name" . }}
- replicas: {{ index .Values.replicaCount }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
+ replicas: {{ .Values.replicaCount }}
minReadySeconds: {{ index .Values.minReadySeconds }}
strategy:
type: {{ index .Values.updateStrategy.type }}
@@ -34,30 +26,14 @@ spec:
maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
maxSurge: {{ index .Values.updateStrategy.maxSurge }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
initContainers:
- {{ include "so.certificate.container_importer" . | indent 6 | trim }}
{{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
resources: {{ include "common.resources" . | nindent 10 }}
- {{- if .Values.global.aafEnabled }}
- command:
- - sh
- args:
- - -c
- - |
- export $(cat {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
- {{- if .Values.global.security.aaf.enabled }}
- export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
- {{- end }}
- /app/start-app.sh
- {{- end }}
env:
- name: DB_HOST
value: {{ include "common.mariadbService" . }}
@@ -71,12 +47,11 @@ spec:
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
- name: DB_ADMIN_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
- {{ include "so.certificates.env" . | indent 8 | trim }}
envFrom:
- configMapRef:
name: {{ include "common.fullname" . }}-configmap
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
+ volumeMounts:
- name: logs
mountPath: /app/logs
- name: config
@@ -85,19 +60,16 @@ spec:
- name: {{ include "common.fullname" . }}-logs
mountPath: {{ .Values.log.path }}
{{ include "so.helpers.livenessProbe" .| indent 8 }}
- ports:
- - containerPort: {{ index .Values.containerPort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- protocol: TCP
+ ports: {{ include "common.containerPorts" . | nindent 10 }}
# Filebeat sidecar container
{{ include "common.log.sidecar" . | nindent 6 }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
- volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
+ volumes:
- name: logs
emptyDir: {}
- name: config
configMap:
- name: {{ include "common.fullname" . }}-app-configmap
+ name: {{ include "common.fullname" . }}-app-configmap
- name: {{ include "common.fullname" . }}-log-conf
configMap:
name: {{ include "common.fullname" . }}-log
diff --git a/kubernetes/so/templates/ingress.yaml b/kubernetes/so/templates/ingress.yaml
index 8f87c68f1e..9bef773eda 100644
--- a/kubernetes/so/templates/ingress.yaml
+++ b/kubernetes/so/templates/ingress.yaml
@@ -1 +1,17 @@
+{{/*
+# Copyright © 2018 AT&T USA
+#
+# 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" . }}
diff --git a/kubernetes/so/templates/service.yaml b/kubernetes/so/templates/service.yaml
index 5a83d566ac..21a6a77e27 100755
--- a/kubernetes/so/templates/service.yaml
+++ b/kubernetes/so/templates/service.yaml
@@ -13,391 +13,5 @@
# 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": "so",
- "version": "v1",
- "url": "/onap/so/infra/cloudResources/{version:[vV][1]}/operationalEnvironments",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/cloudResources/{version:[vV][1]}/operationalEnvironments/{operationalEnvironmentId}/activate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/cloudResources/{version:[vV][1]}/operationalEnvironments/{operationalEnvironmentId}/deactivate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/cloudResourcesRequests/{version:[vV][1]}/{requestId}/unlock",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/cloudResourcesRequests/{version:[vV][1]}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/orchestrationRequests/{version:[vV][4-7]}/{requestId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/orchestrationRequests/{version:[vV][4-7]}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/orchestrationRequests/{version:[vV][4-7]}/{requestId}/unlock",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/activate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/deactivate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][7]}/serviceInstances/assign",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/unassign",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/enablePort",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/disablePort",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/activate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/deactivate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][6-7]}/serviceInstances/{serviceInstanceId}/addRelationships",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][6-7]}/serviceInstances/{serviceInstanceId}/removeRelationships",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/replace",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][6-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/applyUpdatedConfig",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/replace",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][6-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/inPlaceSoftwareUpdate",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/deactivateAndCloudDelete",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/scaleOut",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiation/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/networks",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- },
- {
- "serviceName": "so",
- "version": "v1",
- "url": "/onap/so/infra/serviceInstantiationRequests/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}",
- "protocol": "REST",
- "port": "{{ .Values.service.internalPort }}",
- "visualRange":"0",
- "lb_policy":"ip_hash"
- }
- ]'
-spec:
- type: {{ .Values.service.type }}
- ports:
- {{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.internalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- {{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- {{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+
+{{ include "common.service" . }}