X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-xapps%2F90-xApps%2Fhelm%2Fxapp-std%2Ftemplates%2Fdeployment.yaml;h=b539b9b4216035aee74dbcab91eaea8329848503;hb=5ae874ed52889b075d3544b6814bcc29a4e07c2c;hp=1e82e942fd3992d6164067af50bdf70fa0b506c1;hpb=a397399c6ae05e03a4fe112ed1b29ecd311c264f;p=it%2Fdep.git diff --git a/ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml b/ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml index 1e82e942..b539b9b4 100644 --- a/ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml +++ b/ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml @@ -1,82 +1,73 @@ -# -# ================================================================================== -# Copyright (c) 2019 Nokia -# ================================================================================== -# - +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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: apps/v1 kind: Deployment metadata: - name: {{ include "ricapp.fullname" . }} + name: {{ include "ricxapp.fullname" . }} labels: - app.kubernetes.io/name: {{ include "ricapp.name" . }} - helm.sh/chart: {{ include "ricapp.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} + app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} spec: - replicas: {{ .Values.ricapp.replicaCount }} + replicas: {{ .Values.ricxapp.replicaCount }} selector: matchLabels: - app.kubernetes.io/name: {{ include "ricapp.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} + app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }} + release: {{ .Release.Name }} template: metadata: labels: - app.kubernetes.io/name: {{ include "ricapp.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} + app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }} + release: {{ .Release.Name }} spec: - hostname: {{ .Values.ricapp.hostname }} + hostname: {{ include "ricxapp.name" . }} + imagePullSecrets: + - name: {{ include "ricxapp.imagepullsecret" . }} containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.global.repository }}/{{ .Values.ricapp.image.name }}:{{ .Values.ricapp.image.tag }}" - imagePullPolicy: {{ .Values.global.image.pullPolicy }} + - name: {{ include "ricxapp.containername" . }} + image: "{{ .Values.ricxapp.image.repository }}/{{ .Values.ricxapp.image.name }}:{{ .Values.ricxapp.image.tag }}" + imagePullPolicy: {{ .Values.ricxapp.image.pullPolicy }} ports: - name: http - containerPort: {{ .Values.ricapp.service.port }} + containerPort: {{ .Values.ricxapp.service.http.containerPort }} protocol: TCP - - name: rmr - containerPort: {{ .Values.ricapp.service.rmrPort }} + - name: rmrroute + containerPort: {{ .Values.ricxapp.service.rmr.route.port }} + protocol: TCP + - name: rmrdata + containerPort: {{ .Values.ricxapp.service.rmr.data.port }} protocol: TCP volumeMounts: - name: config-volume - mountPath: {{ .Values.ricapp.appconfig.path }} - - name: cert-volume - mountPath: {{ .Values.ricapp.cert.path }} + mountPath: {{ .Values.ricxapp.appconfig.path }} + envFrom: + - configMapRef: + name: {{ include "ricxapp.configmapname" . }}-appenv + {{- if .Values.ricxapp.livenessProbe }} livenessProbe: - httpGet: - path: {{ .Values.ricapp.probes.healthAliveCheckEndpoint }} - port: 8080 - initialDelaySeconds: 5 - periodSeconds: 15 + {{- .Values.ricxapp.livenessProbe | nindent 12 -}} + {{ end }} + {{- if .Values.ricxapp.readinessProbe }} readinessProbe: - httpGet: - path: {{ .Values.ricapp.probes.healthReadyCheckEndpoint }} - port: 8080 - initialDelaySeconds: 5 - periodSeconds: 15 + {{- .Values.ricxapp.readinessProbe | nindent 12 -}} + {{ end }} restartPolicy: Always - resources: - {{- toYaml .Values.ricapp.resources | nindent 12 }} - securityContext: - # ubuntu - #runAsUser: 1000 - #allowPrivilegeEscalation: false - {{- with .Values.ricapp.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ricapp.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ricapp.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - name: config-volume configMap: - name: {{ if .Values.ricapp.appconfig.override }}{{ .Values.ricapp.appconfig.override }}{{ else }}{{ .Release.Name }}-appconfig{{ end }} - - name: cert-volume - emptyDir: {} + name: {{ include "ricxapp.configmapname" . }}-appconfig