Allow to customize the livenessProbe for `gitlab-shell`
I've mostly followed how a similar change was done in !985 (merged).
Related to #1576.
Tested with
› helm template . --set certmanager-issuer.email=foo@bar.com --set gitlab.gitlab-shell.deployment.livenessProbe.initialDelaySeconds=42 --set gitlab.gitlab-shell.deployment.livenessProbe.periodSeconds=66 --set gitlab.gitlab-shell.deployment.livenessProbe.timeoutSeconds=99 --set gitlab.gitlab-shell.deployment.livenessProbe.successThreshold=12 --set gitlab.gitlab-shell.deployment.livenessProbe.failureThreshold=13 -x charts/gitlab/charts/gitlab-shell/templates/deployment.yaml
---
# Source: gitlab/charts/gitlab/charts/gitlab-shell/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: release-name-gitlab-shell
namespace: review-apps-ee
labels:
app: gitlab-shell
chart: gitlab-shell-2.4.5
release: release-name
heritage: Tiller
spec:
selector:
matchLabels:
app: gitlab-shell
release: release-name
template:
metadata:
labels:
app: gitlab-shell
release: release-name
annotations:
checksum/config: caa9515adf5c7a14e7792c46cb18a221c9aea5e3267222a81bdaf0b31c3f8020
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
spec:
initContainers:
- name: certificates
image: "registry.gitlab.com/gitlab-org/build/cng/alpine-certificates:20171114-r3"
volumeMounts:
- name: etc-ssl-certs
mountPath: /etc/ssl/certs
readOnly: false
resources:
requests:
cpu: 50m
- name: configure
command: ['sh', '/config/configure']
image: busybox:latest
volumeMounts:
- name: shell-config
mountPath: /config
readOnly: true
- name: shell-init-secrets
mountPath: /init-config
readOnly: true
- name: shell-secrets
mountPath: /init-secrets
readOnly: false
resources:
requests:
cpu: 50m
securityContext:
runAsUser: 1000
fsGroup: 1000
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app: gitlab-shell
release: release-name
containers:
- name: gitlab-shell
image: "registry.gitlab.com/gitlab-org/build/cng/gitlab-shell:latest"
ports:
- containerPort: 2222
name: ssh
env:
- name: GITALY_FEATURE_DEFAULT_ON
value: "1"
- name: CONFIG_TEMPLATE_DIRECTORY
value: '/etc/gitlab-shell'
- name: CONFIG_DIRECTORY
value: '/srv/gitlab-shell'
- name: KEYS_DIRECTORY
value: '/etc/gitlab-secrets/ssh'
volumeMounts:
- name: shell-config
mountPath: '/etc/gitlab-shell'
- name: shell-secrets
mountPath: '/etc/gitlab-secrets'
readOnly: true
- name: etc-ssl-certs
mountPath: /etc/ssl/certs/
readOnly: true
livenessProbe:
exec:
command:
- /scripts/healthcheck
initialDelaySeconds: 42
periodSeconds: 66
timeoutSeconds: 99
successThreshold: 12
failureThreshold: 13
# readinessProbe:
# httpGet:
# path: /
# port: 2222
resources:
requests:
cpu: 0
memory: 6M
volumes:
- name: shell-config
configMap:
name: release-name-gitlab-shell
- name: shell-init-secrets
projected:
defaultMode: 0440
sources:
- secret:
name: "release-name-gitlab-shell-host-keys"
- secret:
name: "release-name-gitlab-shell-secret"
items:
- key: "secret"
path: shell/.gitlab_shell_secret
- secret:
name: "release-name-redis-secret"
items:
- key: "secret"
path: redis/password
# Actual config dirs that will be used in the container
- name: shell-secrets
emptyDir:
medium: "Memory"
- name: etc-ssl-certs
emptyDir:
medium: "Memory"
Closes #1669 (closed).
Edited by Rémy Coutable