Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add probes #11

Draft
wants to merge 8 commits into
base: release/v0.2.0
Choose a base branch
from
Draft
20 changes: 19 additions & 1 deletion charts/icinga-stack/charts/icinga2/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ spec:
mountPath: /etc/icinga2
resources:
{{- toYaml .Values.resources | nindent 12 }}
livenessProbe:
failureThreshold: 5
httpGet:
scheme: HTTPS
path: /v1
port: {{ .Values.service.port }}
httpHeaders:
- name: Authorization
value: Basic {{ printf "%s:%s" "icingaweb" .Values.global.api.users.icingaweb.password | b64enc }}
readinessProbe:
failureThreshold: 3
httpGet:
scheme: HTTPS
path: /v1
port: {{ .Values.service.port }}
httpHeaders:
- name: Authorization
value: Basic {{ printf "%s:%s" "icingaweb" .Values.global.api.users.icingaweb.password | b64enc }}
initContainers:
- name: {{ .Chart.Name }}-bootstrapper
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -122,4 +140,4 @@ spec:
matchExpressions:
{{- toYaml .Values.persistence.matchExpressions | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
value: {{ .Values.auth.resource | default .Values.global.databases.icingaweb2.database | quote }}
- name: "icingaweb.passwords.icingaweb2.{{ .Values.auth.admin_user}}"
value: {{ $auth_admin_password | quote }}
- name: icingaweb.config.global.config_backend
value: {{ .Values.auth.resource | default .Values.global.databases.icingaweb2.database | quote }}
- name: icingaweb.config.global.config_resource
value: {{ .Values.auth.type | quote }}
value: {{ .Values.auth.resource | default .Values.global.databases.icingaweb2.database | quote }}
- name: icingaweb.groups.icingaweb2.backend
value: {{ .Values.auth.type | quote }}
- name: icingaweb.groups.icingaweb2.resource
Expand Down
14 changes: 13 additions & 1 deletion charts/icinga-stack/charts/icingaweb2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ spec:
mountPath: /data
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.modules.director.enabled }}
livenessProbe:
failureThreshold: 5
httpGet:
scheme: HTTP
path: /img/favicon.png
port: {{ .Values.service.port }}
readinessProbe:
failureThreshold: 3
httpGet:
scheme: HTTP
path: /img/favicon.png
port: {{ .Values.service.port }}
{{- if .Values.modules.director.enabled }}
- name: {{ .Chart.Name }}-director
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down
5 changes: 3 additions & 2 deletions charts/icinga-stack/charts/icingaweb2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ingress:

auth:
type: db
#resource: # Add the name of the db resource used by Icinga Web 2 here
admin_user: icingaweb
admin_password: # Add a password here

Expand Down Expand Up @@ -74,7 +75,7 @@ modules:

icingadb:
enabled: true

incubator:
enabled: true

Expand All @@ -100,7 +101,7 @@ nodeSelector: {}
tolerations: []

affinity: {}

serviceAccount:
# Specifies whether a service account should be created
create: false
Expand Down
12 changes: 12 additions & 0 deletions charts/icinga-stack/templates/internal-databases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ spec:
subPath: {{ $settings.persistence.subPath }}
{{- end }}
{{- end }}
livenessProbe:
failureThreshold: 5
exec:
command:
- /usr/local/bin/healthcheck.sh
- --connect
readinessProbe:
failureThreshold: 3
exec:
command:
- /usr/local/bin/healthcheck.sh
- --connect
{{- if $settings.persistence.enabled }}
volumeClaimTemplates:
- metadata:
Expand Down
15 changes: 8 additions & 7 deletions charts/icinga-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ icinga2:
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []
Expand Down Expand Up @@ -305,7 +305,7 @@ icingadb:
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []
Expand Down Expand Up @@ -368,9 +368,10 @@ icingaweb2:

auth:
type: db
#resource: # Add the name of the db resource used by Icinga Web 2 here
admin_user: icingaweb
admin_password: # Add a password here

modules:
audit:
enabled: false
Expand Down Expand Up @@ -430,13 +431,13 @@ icingaweb2:
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

serviceAccount:
# Specifies whether a service account should be created
create: false
Expand All @@ -458,7 +459,7 @@ icingaweb2:
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

global:
api:
# host: # only needed if Icinga2 runs out of cluster
Expand Down Expand Up @@ -491,7 +492,7 @@ global:
# subPath: ""
matchLabels: {}
matchExpressions: []

icingadb:
database: icingadb
username: icingadb
Expand Down