Update netbox deployment
[oom.git] / kubernetes / contrib / charts / netbox / charts / netbox-app / templates / deployment.yaml
index f321456..399e038 100755 (executable)
@@ -34,10 +34,24 @@ spec:
     spec:
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        image: {{ .Values.repository }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+        {{ if .Values.liveness.enabled }}
+        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: DB_PASSWORD
             valueFrom:
@@ -112,7 +126,7 @@ spec:
         - name: {{ include "common.fullname" . }}
           mountPath: /opt/netbox/netbox/static
         resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -136,4 +150,6 @@ spec:
             name: {{ include "common.fullname" . }}-initializers-configmap
         - name: {{ include "common.fullname" . }}-configuration-config
           configMap:
-            name: {{ include "common.fullname" . }}-configuration-configmap
\ No newline at end of file
+            name: {{ include "common.fullname" . }}-configuration-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"