[COMMON] Harmonize resource settings
[oom.git] / kubernetes / sdnc / components / sdnc-web / templates / deployment.yaml
index 03432d3..4e16fcf 100644 (file)
@@ -23,7 +23,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-      initContainers: {{ include "common.certInitializer.initContainer" . | indent 6 }}
+      initContainers:
       - name: {{ include "common.name" . }}-readiness
         image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -38,6 +38,13 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
+        resources:
+          limits:
+            cpu: "100m"
+            memory: "0.5Gi"
+          requests:
+            cpu: "3m"
+            memory: "0.02Gi"
 
       containers:
         - name: {{ include "common.name" . }}
@@ -49,34 +56,26 @@ spec:
           {{ if .Values.liveness.enabled }}
           livenessProbe:
             tcpSocket:
-              port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{ end }}
           readinessProbe:
             tcpSocket:
-              port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           - name: WEBPROTOCOL
-            value: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.webProtocol .Values.config.webPlainProtocol }}
+            value: {{ .Values.config.webProtocol }}
           - name: WEBPORT
-            value : {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.webPort .Values.config.webPlainPort | quote }}
+            value : {{ .Values.config.webPort | quote }}
           - name: SDNRPROTOCOL
-            value : {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.sdnrProtocol .Values.config.sdnrPlainProtocol }}
+            value : {{ .Values.config.sdnrProtocol }}
           - name: SDNRHOST
-            value : {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.sdnrHost .Values.config.sdnrPlainHost }}.{{ include "common.namespace" . }}
+            value : {{ .Values.config.sdnrHost }}.{{ include "common.namespace" . }}
           - name: SDNRPORT
-            value : {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.sdnrPort .Values.config.sdnrPlainPort | quote }}
-          {{ if (include "common.needTLS" .) }}
-          - name: SSL_CERT_DIR
-            value: {{ .Values.config.sslCertDir }}
-          - name: SSL_CERTIFICATE
-            value: {{ .Values.config.sslCertiticate }}
-          - name: SSL_CERTIFICATE_KEY
-            value: {{ .Values.config.sslCertKey }}
-          {{ end }}
+            value : {{ .Values.config.sdnrPort | quote }}
           {{ if .Values.config.transportpce.enabled }}
           - name: TRPCEURL
             value: {{ .Values.config.transportpce.transportpceUrl }}
@@ -91,7 +90,9 @@ spec:
             value: "{{ .Values.config.oauth.enabled | default "false" }}"
           - name: ENABLE_ODLUX_RBAC
             value: "{{ .Values.config.oauth.odluxRbac.enabled | default "false" }}"
-          volumeMounts:  {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
+          - name: SDNRWEBSOCKETPORT
+            value: "{{ .Values.sdnrWebsocketPort | default "8182" }}"
+          volumeMounts:
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
@@ -104,7 +105,7 @@ spec:
       affinity: {{ toYaml .Values.affinity | nindent 8 }}
       {{- end }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-      volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
+      volumes:
       - name: localtime
         hostPath:
           path: /etc/localtime