aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/uui/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/uui/templates')
-rw-r--r--kubernetes/uui/templates/NOTES.txt19
-rw-r--r--kubernetes/uui/templates/deployment.yaml71
-rw-r--r--kubernetes/uui/templates/service.yaml (renamed from kubernetes/uui/templates/all-services.yaml)57
-rw-r--r--kubernetes/uui/templates/uui-deployment.yaml54
-rw-r--r--kubernetes/uui/templates/uui-server-deployment.yaml52
5 files changed, 108 insertions, 145 deletions
diff --git a/kubernetes/uui/templates/NOTES.txt b/kubernetes/uui/templates/NOTES.txt
new file mode 100644
index 0000000000..6e0b9fc06d
--- /dev/null
+++ b/kubernetes/uui/templates/NOTES.txt
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+ http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ .Chart.Name }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ echo "Visit http://127.0.0.1:8080 to use your application"
+ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/uui/templates/deployment.yaml b/kubernetes/uui/templates/deployment.yaml
new file mode 100644
index 0000000000..4b3ed7c66e
--- /dev/null
+++ b/kubernetes/uui/templates/deployment.yaml
@@ -0,0 +1,71 @@
+# 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 }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /bin/bash
+ - -c
+ - /home/uui/tomcat/bin/catalina.sh run
+ 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:
+ 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: {{ tpl .Values.msbaddr . }}
+ 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/uui/templates/all-services.yaml b/kubernetes/uui/templates/service.yaml
index 7f450cd9ae..4570c99473 100644
--- a/kubernetes/uui/templates/all-services.yaml
+++ b/kubernetes/uui/templates/service.yaml
@@ -12,14 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#{{ if not .Values.disableUuiUui }}
apiVersion: v1
kind: Service
metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
labels:
- app: uui
- name: uui
- namespace: "{{ .Values.nsPrefix }}"
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
annotations:
msb.onap.org/service-info: '[
{
@@ -33,40 +35,17 @@ metadata:
}
]'
spec:
+ type: {{ .Values.service.type }}
ports:
- - name: uui
- nodePort: {{ .Values.uuiPortPrefix }}98
- port: 8080
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.uuiPortPrefix | default .Values.uuiPortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.name }}
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.name }}
+ {{- end}}
selector:
- app: uui
- type: NodePort
-#{{ end }}
-#{{ if not .Values.disableUuiServer }}
----
-apiVersion: v1
-kind: Service
-metadata:
- labels:
- app: uui-server
- name: uui-server
- namespace: "{{ .Values.nsPrefix }}"
- annotations:
- msb.onap.org/service-info: '[
- {
- "serviceName": "usecaseui-server",
- "version": "v1",
- "url": "/api/usecaseui/server/v1",
- "protocol": "UI"
- "port": "8080",
- "visualRange":"1|0"
- }
- ]'
-spec:
- ports:
- - name: uui-server
- nodePort: {{ .Values.uuiPortPrefix }}99
- port: 8082
- selector:
- app: uui-server
- type: NodePort
-#{{ end }} \ No newline at end of file
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/uui/templates/uui-deployment.yaml b/kubernetes/uui/templates/uui-deployment.yaml
deleted file mode 100644
index ad757cbc22..0000000000
--- a/kubernetes/uui/templates/uui-deployment.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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.
-
-#{{ if not .Values.disableUuiUui }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- labels:
- app: uui
- name: uui
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.uuiReplicas }}
- selector:
- matchLabels:
- app: uui
- template:
- metadata:
- labels:
- app: uui
- name: uui
- spec:
- containers:
- - image: {{ .Values.image.uuiImage }}:{{ .Values.image.uuiVersion }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- command:
- - /bin/bash
- - -c
- - /home/uui/tomcat/bin/catalina.sh run
- name: uui
- env:
- - name: MSB_ADDR
- value: {{ tpl .Values.msbaddr . }}
- ports:
- - containerPort: 8080
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 5
- periodSeconds: 10
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/uui/templates/uui-server-deployment.yaml b/kubernetes/uui/templates/uui-server-deployment.yaml
deleted file mode 100644
index 2b9c3e9010..0000000000
--- a/kubernetes/uui/templates/uui-server-deployment.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-
-#{{ if not .Values.disableUuiUui }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- labels:
- app: uui-server
- name: uui-server
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.uuiServerReplicas }}
- selector:
- matchLabels:
- app: uui-server
- template:
- metadata:
- labels:
- app: uui-server
- name: uui-server
- spec:
- containers:
- - image: {{ .Values.uuiserver.image }}:{{ .Values.uuiserver.version }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: uui-server
- env:
- - name: MSB_ADDR
- value: {{tpl .Values.msbaddr .}}
- - name: MR_ADDR
- value: {{tpl .Values.mraddr .}}
- ports:
- - containerPort: 8082
- readinessProbe:
- tcpSocket:
- port: 8082
- initialDelaySeconds: 5
- periodSeconds: 10
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}