aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorjasmineWen <jasmine.wen@amdocs.com>2018-05-28 14:59:28 +0000
committerjasmineWen <jasmine.wen@amdocs.com>2018-05-29 15:39:40 +0000
commit613f4eb0c7a28a856bdd63c2776c355a3ad6be9b (patch)
treea51abe6767a626b3ce94979bce451708854c876e /kubernetes
parent81aad2ef68e4563fefcc376d22e8cc6483e06d68 (diff)
VNFSDK - revert back to embedded postgres
Change-Id: Iae0e6953175769730d5afc52409a354f5f0b3bf1 Issue-ID: OOM-751 Signed-off-by: jasmineWen <jasmine.wen@amdocs.com>
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/vnfsdk/charts/vnfsdk-postgres/Chart.yaml18
-rw-r--r--kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/deployment.yaml44
-rw-r--r--kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/service.yaml38
-rw-r--r--kubernetes/vnfsdk/charts/vnfsdk-postgres/values.yaml63
-rw-r--r--kubernetes/vnfsdk/requirements.yaml3
-rw-r--r--kubernetes/vnfsdk/templates/deployment.yaml5
-rw-r--r--kubernetes/vnfsdk/values.yaml19
7 files changed, 170 insertions, 20 deletions
diff --git a/kubernetes/vnfsdk/charts/vnfsdk-postgres/Chart.yaml b/kubernetes/vnfsdk/charts/vnfsdk-postgres/Chart.yaml
new file mode 100644
index 0000000000..db7201d7c6
--- /dev/null
+++ b/kubernetes/vnfsdk/charts/vnfsdk-postgres/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright © 2017 Amdocs, 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
+description: ONAP VNFSDK Postgres Database
+name: vnfsdk-postgres
+version: 2.0.0
diff --git a/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/deployment.yaml b/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/deployment.yaml
new file mode 100644
index 0000000000..88d6238f35
--- /dev/null
+++ b/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/deployment.yaml
@@ -0,0 +1,44 @@
+# Copyright © 2017 Amdocs, 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: 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 }}
+ selector:
+ matchLabels:
+ app: {{ include "common.name" . }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ name: {{ include "common.name" . }}
+ spec:
+ hostname: {{ include "common.name" . }}
+ containers:
+ - args:
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
+ name: {{ include "common.name" . }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/service.yaml b/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/service.yaml
new file mode 100644
index 0000000000..f6208cf965
--- /dev/null
+++ b/kubernetes/vnfsdk/charts/vnfsdk-postgres/templates/service.yaml
@@ -0,0 +1,38 @@
+# Copyright © 2017 Amdocs, 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: 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.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ {{- end}}
+ name: {{ .Values.service.portName | default "http" }}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/vnfsdk/charts/vnfsdk-postgres/values.yaml b/kubernetes/vnfsdk/charts/vnfsdk-postgres/values.yaml
new file mode 100644
index 0000000000..431c2134f7
--- /dev/null
+++ b/kubernetes/vnfsdk/charts/vnfsdk-postgres/values.yaml
@@ -0,0 +1,63 @@
+# Copyright © 2017 Amdocs, 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ repository: nexus3.onap.org:10001
+ 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/vnfsdk/refrepo/postgres:latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+
+service:
+ type: ClusterIP
+ name: vnfsdk-postgres
+ portName: vnfsdk-postgres
+ internalPort: 5432
+ externalPort: 5432
+
+ingress:
+ enabled: false
diff --git a/kubernetes/vnfsdk/requirements.yaml b/kubernetes/vnfsdk/requirements.yaml
index 3b2a02a480..ce82a2f838 100644
--- a/kubernetes/vnfsdk/requirements.yaml
+++ b/kubernetes/vnfsdk/requirements.yaml
@@ -16,6 +16,3 @@ dependencies:
- name: common
version: ~2.0.0
repository: '@local'
- - name: postgres
- version: ~2.0.0
- repository: '@local'
diff --git a/kubernetes/vnfsdk/templates/deployment.yaml b/kubernetes/vnfsdk/templates/deployment.yaml
index d8a3d360df..8220553cf6 100644
--- a/kubernetes/vnfsdk/templates/deployment.yaml
+++ b/kubernetes/vnfsdk/templates/deployment.yaml
@@ -38,7 +38,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - "{{ .Values.postgres.nameOverride }}"
+ - "{{ .Values.vnfsdkpostgres.nameOverride }}"
env:
- name: NAMESPACE
valueFrom:
@@ -52,6 +52,9 @@ spec:
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
name: {{ include "common.name" . }}
+ env:
+ - name: POSTGRES_SERVICE_HOST
+ value: "$(VNFSDK_POSTGRES_SERVICE_HOST)"
readinessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
diff --git a/kubernetes/vnfsdk/values.yaml b/kubernetes/vnfsdk/values.yaml
index 200821c434..cc27544a70 100644
--- a/kubernetes/vnfsdk/values.yaml
+++ b/kubernetes/vnfsdk/values.yaml
@@ -28,25 +28,12 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/vnfsdk/refrepo:1.1.1
+image: onap/vnfsdk/refrepo:1.1-STAGING-latest
pullPolicy: Always
-postgres:
+#subchart name
+vnfsdkpostgres:
nameOverride: vnfsdk-postgres
- service:
- name: vnfsdk-dbset
- name2: vnfsdk-dbpri
- name3: vnfsdk-dbrep
- nfsprovisionerPrefix: vnfsdk
- persistence:
- mountSubPath: vnfsdk/data
- mountInitPath: vnfsdk
- enabled: true
- disableNfsProvisioner: true
- container:
- name:
- primary: vnfsdk-dbpri
- replica: vnfsdk-dbrep
# flag to enable debugging - application support required
debugEnabled: false