X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=smo-install%2Foran_oom%2Fenrichmentservice%2Ftemplates%2Fstatefulset.yaml;fp=smo-install%2Foran_oom%2Fenrichmentservice%2Ftemplates%2Fstatefulset.yaml;h=678e8b15f44fe537189e440f88696b5ae9975788;hb=a2c2df5014145ee3126146987d9039e397b12407;hp=0000000000000000000000000000000000000000;hpb=2482dc9de60c39de16d4e85d3fa11d02ec645957;p=it%2Fdep.git diff --git a/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml b/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml new file mode 100644 index 00000000..678e8b15 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml @@ -0,0 +1,82 @@ +################################################################################ +# Copyright (c) 2020 Nordix Foundation. # +# # +# 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. # +################################################################################ + +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.enrichmentservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + serviceName: {{ include "common.name.enrichmentservice" . }} + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.enrichmentservice" . }} + containers: + - name: {{ include "common.container.enrichmentservice" . }} + image: {{ .Values.enrichmentservice.image.registry }}/{{ .Values.enrichmentservice.image.name }}:{{ .Values.enrichmentservice.image.tag }} + imagePullPolicy: {{ .Values.enrichmentservice.imagePullPolicy }} + ports: + - containerPort: {{ .Values.enrichmentservice.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.enrichmentservice.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.enrichmentservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }} + livenessProbe: + httpGet: + path: /status + port: {{ .Values.enrichmentservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }} + volumeMounts: + - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config + mountPath: /opt/app/enrichment-coordinator-service/config + - name: {{ include "common.name.enrichmentservice" . }}-vardata + mountPath: /var/enrichment-coordinator-service + volumes: + - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config + configMap: + name: {{ include "common.name.enrichmentservice" . }}-configmap + + volumeClaimTemplates: + - metadata: + name: {{ include "common.name.enrichmentservice" . }}-vardata + spec: + accessModes: [ ReadWriteOnce ] + storageClassName: "{{ .Values.enrichmentservice.persistence.storageClassName }}" + resources: + requests: + storage: "{{ .Values.enrichmentservice.persistence.size }}"