--- /dev/null
+# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+apiVersion: v1\r
+description: Name Generation Micro Service\r
+name: network-name-gen\r
+version: 3.0.0\r
--- /dev/null
+# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+dependencies:\r
+ - name: common\r
+ version: ~2.0.0\r
+ repository: '@local'\r
+ - name: mariadb-galera\r
+ version: ~2.0.0\r
+ repository: file://../mariadb-galera/\r
--- /dev/null
+# Copyright (C) 2018 AT&T Intellectual Property.
+#
+# 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: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - {{ index .Values "mariadb-galera" "nameOverride" }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}-readiness
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ env:
+ - name: SPRING_PROFILE
+ value: "{{ .Values.config.springProfile }}"
+ - name: NENG_DB_USER
+ value: {{ index .Values "mariadb-galera" "config" "userName" }}
+ - name: NENG_DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}
+ key: db-root-password
+ - name: NENG_DB_URL
+ value: {{ .Values.config.dbUrl }}
+ - name: POL_CLIENT_AUTH
+ value: "{{ .Values.config.polClientAuth }}"
+ - name: POL_BASIC_AUTH
+ value: "{{ .Values.config.polBasicAuth }}"
+ - name: POL_URL
+ value: "{{ .Values.config.polUrl }}"
+ - name: POL_ENV
+ value: "{{ .Values.config.polEnv }}"
+ - name: POL_REQ_ID
+ value: "{{ .Values.config.polReqId }}"
+ - name: AAI_CERT_PASS
+ value: "{{ .Values.config.aaiCertPass }}"
+ - name: AAI_CERT_PATH
+ value: "{{ .Values.config.aaiCertPath }}"
+ - name: AAI_URI
+ value: "{{ .Values.config.aaiUri }}"
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
--- /dev/null
+# Copyright (c) 2018 Bell Canada
+#
+# 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: Secret
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+type: Opaque
+data:
+ db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
--- /dev/null
+# Copyright (C) 2018 AT&T Intellectual Property.
+#
+# 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: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ 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: {{ .Release.Name }}
--- /dev/null
+# Copyright (C) 2018 AT&T Intellectual Property.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+#\r
+# Global configuration default values that can be inherited by\r
+# all subcharts.\r
+#################################################################\r
+global:\r
+\r
+ # Change to an unused port prefix range to prevent port conflicts\r
+ # with other instances running within the same k8s cluster\r
+ nodePortPrefix: 302\r
+\r
+ # image repositories\r
+ repository: nexus3.onap.org:10001\r
+\r
+\r
+ # readiness check\r
+ readinessRepository: oomk8s\r
+ readinessImage: readiness-check:2.0.0\r
+\r
+ # image pull policy\r
+ pullPolicy: IfNotPresent\r
+\r
+# sub-chart config\r
+mariadb-galera:\r
+ config:\r
+ userName: nenguser\r
+ userPassword: nenguser123\r
+ mariadbRootPassword: nenguser123\r
+ mysqlDatabase: nengdb\r
+ nameOverride: nengdb\r
+ service:\r
+ name: nengdb\r
+ portName: nengdbport\r
+ replicaCount: 1\r
+ persistence:\r
+ enabled: true\r
+ mountSubPath: network-name-gen/data\r
+\r
+\r
+#################################################################\r
+# Application configuration defaults.\r
+#################################################################\r
+# application image\r
+repository: nexus3.onap.org:10001\r
+image: onap/ccsdk-apps-ms-neng:latest\r
+pullPolicy: IfNotPresent\r
+\r
+# application configuration\r
+config:\r
+ dbUrl: jdbc:mysql://nengdb:3306/nengdb\r
+ springProfile: live\r
+ polClientAuth: TBD\r
+ polBasicAuth: TBD\r
+ polUrl: TBD\r
+ polEnv: TEST\r
+ polReqId: xx\r
+ aaiCertPass: TBD\r
+ aaiCertPath: TBD\r
+ aaiUri: TBD\r
+\r
+# default number of instances\r
+replicaCount: 1\r
+\r
+nodeSelector: {}\r
+\r
+affinity: {}\r
+\r
+# probe configuration parameters\r
+liveness:\r
+ initialDelaySeconds: 10\r
+ periodSeconds: 10\r
+ # necessary to disable liveness probe when setting breakpoints\r
+ # in debugger so K8s doesn't restart unresponsive container\r
+ enabled: false\r
+\r
+readiness:\r
+ initialDelaySeconds: 10\r
+ periodSeconds: 10\r
+\r
+service:\r
+ type: ClusterIP\r
+ name: neng-serv\r
+ portName: neng-serv-port\r
+ internalPort: 8080\r
+ externalPort: 8080\r
+\r
+ingress:\r
+ enabled: false\r
+\r
+resources: {}\r