Skip to content

Commit ff0f997

Browse files
committed
refactor gitlab chart
1 parent 82340a5 commit ff0f997

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

charts/gitlab-omnibus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: gitlab-omnibus
33
description: |-
44
Helm chart to deploy [Omnibus Gitlab](https://docs.gitlab.com/omnibus/).
55
type: application
6-
version: 0.1.0
6+
version: 0.1.1
77
# https://hub.docker.com/r/gitlab/gitlab-ee/tags
88
appVersion: "15.2.1-ee.0"
99
home: https://github.com/slamdev/helm-charts/tree/master/charts/gitlab-omnibus

charts/gitlab-omnibus/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gitlab-omnibus
22

3-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 15.2.1-ee.0](https://img.shields.io/badge/AppVersion-15.2.1--ee.0-informational?style=flat-square)
3+
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 15.2.1-ee.0](https://img.shields.io/badge/AppVersion-15.2.1--ee.0-informational?style=flat-square)
44

55
Helm chart to deploy [Omnibus Gitlab](https://docs.gitlab.com/omnibus/).
66

@@ -24,6 +24,7 @@ Helm chart to deploy [Omnibus Gitlab](https://docs.gitlab.com/omnibus/).
2424
| backupCronJob.resources | object | `{"requests":{"cpu":"10m","memory":"32Mi"}}` | custom resource configuration |
2525
| backupCronJob.schedule | string | `"@daily"` | how often to run backaup job |
2626
| containerPorts | list | `[{"containerPort":8005,"name":"http"},{"containerPort":22,"name":"ssh"}]` | ports exposed by the container |
27+
| disableProbes | bool | `false` | flag to disable livenessProbe/readinessProbe/startupProbe probes; turn on before restoring from backup |
2728
| env | list | `[]` | environment variables for the container |
2829
| envFrom | list | `[]` | environment variable sources for the container |
2930
| fullnameOverride | string | `""` | full name of the chart. |
@@ -36,6 +37,7 @@ Helm chart to deploy [Omnibus Gitlab](https://docs.gitlab.com/omnibus/).
3637
| nameOverride | string | `""` | override name of the chart |
3738
| nodeSelector | object | `{}` | node for scheduler pod assignment |
3839
| podSecurityContext | object | `{}` | specifies security settings for a pod |
40+
| postReconfigureCode | string | `""` | ruby code block for GITLAB_POST_RECONFIGURE_CODE |
3941
| resources | object | `{}` | custom resource configuration |
4042
| securityContext | object | `{}` | specifies security settings for a container |
4143
| service.annotations | object | `{}` | service annotations |

charts/gitlab-omnibus/templates/statefulset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
ports:
3636
{{- toYaml . | nindent 12 }}
3737
{{- end }}
38+
{{- if not .Values.disableProbes }}
3839
livenessProbe:
3940
httpGet:
4041
path: /-/liveness?token={{.Values.healthCheckToken}}
@@ -50,6 +51,7 @@ spec:
5051
httpGet:
5152
path: /-/readiness?token={{.Values.healthCheckToken}}
5253
port: http
54+
{{- end }}
5355
resources:
5456
{{- toYaml .Values.resources | nindent 12 }}
5557
env:
@@ -59,6 +61,7 @@ spec:
5961
value: |
6062
include Gitlab::CurrentSettings
6163
Gitlab::CurrentSettings.current_application_settings.update_attribute(:health_check_access_token, '{{.Values.healthCheckToken}}')
64+
{{- .Values.postReconfigureCode | nindent 16 }}
6265
- name: GITLAB_POST_RECONFIGURE_SCRIPT
6366
value: |
6467
/opt/gitlab/bin/gitlab-rails runner -e production "$GITLAB_POST_RECONFIGURE_CODE"

charts/gitlab-omnibus/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,15 @@ volumeClaimTemplates: []
124124
# requests:
125125
# storage: 1Gi
126126

127+
# disableProbes -- flag to disable livenessProbe/readinessProbe/startupProbe probes; turn on before restoring from backup
128+
disableProbes: false
129+
127130
# healthCheckToken -- predefined health check token for status probes; should be changed to a random value
128131
healthCheckToken: CHANGE_ME
129132

133+
# postReconfigureCode -- ruby code block for GITLAB_POST_RECONFIGURE_CODE
134+
postReconfigureCode: ""
135+
130136
# env -- environment variables for the container
131137
env: []
132138
# - name: PG_USER

0 commit comments

Comments
 (0)