Merge "Fix contrib-netbox-app deployment failing"
[oom.git] / kubernetes / contrib / charts / netbox / charts / netbox-app / templates / deployment.yaml
index f321456..92888ea 100755 (executable)
@@ -38,6 +38,22 @@ spec:
         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:
+            httpGet:
+                path: /api/dcim/regions/
+                port: {{ .Values.service.internalPort }}
+                scheme: HTTP
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
         env:
           - name: DB_PASSWORD
             valueFrom:
@@ -112,7 +128,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 +152,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"