aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorBharath Thiruveedula <bharath.thiruveedula@verizon.com>2018-08-16 10:08:52 +0530
committerBharath Thiruveedula <bharath.thiruveedula@verizon.com>2018-08-16 21:36:37 +0530
commit63070de94f794ec83ad76e1dca999d2938973e10 (patch)
treef68d77396f7a0793b3c28f8321ce577dca82d4bd /kubernetes
parent76ca0ffeb55c6a8bb155b81c6a69c54fef46a067 (diff)
Add VFC DB helm charts
Issue-ID: VFC-975 Change-Id: I03534929bfa30efb22354d044d19b1459718ac11 Signed-off-by: Bharath Thiruveedula<bharath.thiruveedula@verizon.com>
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml31
-rw-r--r--kubernetes/vfc/charts/vfc-db/.helmignore21
-rw-r--r--kubernetes/vfc/charts/vfc-db/Chart.yaml18
-rw-r--r--kubernetes/vfc/charts/vfc-db/templates/deployment.yaml68
-rw-r--r--kubernetes/vfc/charts/vfc-db/templates/service.yaml49
-rw-r--r--kubernetes/vfc/charts/vfc-db/values.yaml87
-rw-r--r--kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml31
-rw-r--r--kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml31
-rw-r--r--kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml32
-rw-r--r--kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml31
-rw-r--r--kubernetes/vfc/values.yaml2
11 files changed, 326 insertions, 75 deletions
diff --git a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml
index 9fbebb47b1..65339119f9 100644
--- a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml
+++ b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml
@@ -33,21 +33,20 @@ spec:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
initContainers:
-#Example init container for dependency checking
-# - command:
-# - /root/ready.py
-# args:
-# - --container-name
-# - mariadb
-# 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
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - vfc-db
+ 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 }}"
@@ -71,6 +70,8 @@ spec:
env:
- name: MSB_ADDR
value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
volumeMounts:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
diff --git a/kubernetes/vfc/charts/vfc-db/.helmignore b/kubernetes/vfc/charts/vfc-db/.helmignore
new file mode 100644
index 0000000000..f0c1319444
--- /dev/null
+++ b/kubernetes/vfc/charts/vfc-db/.helmignore
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/vfc/charts/vfc-db/Chart.yaml b/kubernetes/vfc/charts/vfc-db/Chart.yaml
new file mode 100644
index 0000000000..327f308017
--- /dev/null
+++ b/kubernetes/vfc/charts/vfc-db/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright (C) 2018 Verizon. All Rights Reserved.
+#
+# 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
+description: ONAP VFC - DB
+name: vfc-db
+version: 2.0.0
diff --git a/kubernetes/vfc/charts/vfc-db/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-db/templates/deployment.yaml
new file mode 100644
index 0000000000..6fc4a6d031
--- /dev/null
+++ b/kubernetes/vfc/charts/vfc-db/templates/deployment.yaml
@@ -0,0 +1,68 @@
+# Copyright (C) 2018 Verizon. All Rights Reserved
+#
+# 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:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.internalPort2 }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{ if .Values.liveness.enabled }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: MSB_ADDR
+ value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ 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"
diff --git a/kubernetes/vfc/charts/vfc-db/templates/service.yaml b/kubernetes/vfc/charts/vfc-db/templates/service.yaml
new file mode 100644
index 0000000000..d41e73d13d
--- /dev/null
+++ b/kubernetes/vfc/charts/vfc-db/templates/service.yaml
@@ -0,0 +1,49 @@
+# Copyright (C) 2018 Verizon. All Rights Reserved
+#
+# 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 }}
+ - port: {{ .Values.service.externalPort2 }}
+ targetPort: {{ .Values.service.internalPort2 }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}2
+
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ - port: {{ .Values.service.externalPort2 }}
+ targetPort: {{ .Values.service.internalPort2 }}
+ name: {{ .Values.service.portName }}2
+
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/vfc/charts/vfc-db/values.yaml b/kubernetes/vfc/charts/vfc-db/values.yaml
new file mode 100644
index 0000000000..c4eac7d6c0
--- /dev/null
+++ b/kubernetes/vfc/charts/vfc-db/values.yaml
@@ -0,0 +1,87 @@
+# Copyright (C) 2018 Verizon. All Rights Reserved
+#
+# 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/vfc/db:latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config: {}
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 120
+ periodSeconds: 10
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 120
+ periodSeconds: 10
+
+service:
+ type: ClusterIP
+ name: vfc-db
+ portName: vfc-db
+ externalPort: 3306
+ internalPort: 3306
+ externalPort2: 6379
+ internalPort2: 6379
+
+ingress:
+ enabled: false
+
+resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ #
+ # Example:
+ # Configure resource requests and limits
+ # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ # Minimum memory for development is 2 CPU cores and 4GB memory
+ # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+# limits:
+# cpu: 2
+# memory: 4Gi
+# requests:
+# cpu: 2
+# memory: 4Gi
diff --git a/kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml
index adc44a4dc7..6c499aa3d6 100644
--- a/kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml
+++ b/kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml
@@ -33,21 +33,20 @@ spec:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
initContainers:
-#Example init container for dependency checking
-# - command:
-# - /root/ready.py
-# args:
-# - --container-name
-# - mariadb
-# 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
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - vfc-db
+ 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 }}"
@@ -71,6 +70,8 @@ spec:
env:
- name: MSB_ADDR
value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
volumeMounts:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
diff --git a/kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml
index 17aaad731a..d2974c618a 100644
--- a/kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml
+++ b/kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml
@@ -33,21 +33,20 @@ spec:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
initContainers:
-#Example init container for dependency checking
-# - command:
-# - /root/ready.py
-# args:
-# - --container-name
-# - mariadb
-# 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
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - vfc-db
+ 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 }}"
@@ -71,6 +70,8 @@ spec:
env:
- name: MSB_ADDR
value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
volumeMounts:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
diff --git a/kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml
index 0bfdf9955e..807bb8b59c 100644
--- a/kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml
+++ b/kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml
@@ -33,21 +33,20 @@ spec:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
initContainers:
-#Example init container for dependency checking
-# - command:
-# - /root/ready.py
-# args:
-# - --container-name
-# - mariadb
-# 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
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - vfc-db
+ 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 }}"
@@ -71,6 +70,9 @@ spec:
env:
- name: MSB_ADDR
value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
+
volumeMounts:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
diff --git a/kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml
index 10a5e7a9ff..767b709db5 100644
--- a/kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml
+++ b/kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml
@@ -33,21 +33,20 @@ spec:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
initContainers:
-#Example init container for dependency checking
-# - command:
-# - /root/ready.py
-# args:
-# - --container-name
-# - mariadb
-# 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
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - vfc-db
+ 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 }}"
@@ -71,6 +70,8 @@ spec:
env:
- name: MSB_ADDR
value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
volumeMounts:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
diff --git a/kubernetes/vfc/values.yaml b/kubernetes/vfc/values.yaml
index 5a8fa38eb9..c19a844009 100644
--- a/kubernetes/vfc/values.yaml
+++ b/kubernetes/vfc/values.yaml
@@ -16,6 +16,8 @@ global:
config:
msbServiceName: msb-iag
msbPort: 80
+ dbServiceName: vfc-db
+ dbPort: 3306
# application configuration
config: