mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-07-04 23:34:12 +02:00
Add resource specs to init container (#423)
Supersedes stalled #362 I opted for defining `requests` while leaving `limits` open. This might help for scheduling without restricting performance during init. Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/423 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io> Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
parent
25500d7ca2
commit
00395e79b0
@ -697,8 +697,11 @@ gitea:
|
|||||||
### Init
|
### Init
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| --------------- | --------------------------------------------------------------------- | ----- |
|
| ------------------------------------------ | ------------------------------------------------------------------------------------ | ------- |
|
||||||
| `initPreScript` | Bash shell script copied verbatim to the start of the init-container. | `""` |
|
| `initPreScript` | Bash shell script copied verbatim to the start of the init-container. | `""` |
|
||||||
|
| `initContainers.resources.limits` | initContainers.limits Kubernetes resource limits for init containers | `{}` |
|
||||||
|
| `initContainers.resources.requests.cpu` | initContainers.requests.cpu Kubernetes cpu resource limits for init containers | `100m` |
|
||||||
|
| `initContainers.resources.requests.memory` | initContainers.requests.memory Kubernetes memory resource limits for init containers | `128Mi` |
|
||||||
|
|
||||||
### Signing
|
### Signing
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ spec:
|
|||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
- name: init-app-ini
|
- name: init-app-ini
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
@ -114,6 +116,8 @@ spec:
|
|||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
{{- if .Values.signing.enabled }}
|
{{- if .Values.signing.enabled }}
|
||||||
- name: configure-gpg
|
- name: configure-gpg
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
@ -143,6 +147,8 @@ spec:
|
|||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: configure-gitea
|
- name: configure-gitea
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
@ -232,6 +238,8 @@ spec:
|
|||||||
subPath: {{ .Values.persistence.subPath }}
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
10
values.yaml
10
values.yaml
@ -255,6 +255,16 @@ initPreScript: ""
|
|||||||
# chown -R git:git /data/git/.postgresql/
|
# chown -R git:git /data/git/.postgresql/
|
||||||
# chmod 400 /data/git/.postgresql/postgresql.key
|
# chmod 400 /data/git/.postgresql/postgresql.key
|
||||||
|
|
||||||
|
## @param initContainers.resources.limits initContainers.limits Kubernetes resource limits for init containers
|
||||||
|
## @param initContainers.resources.requests.cpu initContainers.requests.cpu Kubernetes cpu resource limits for init containers
|
||||||
|
## @param initContainers.resources.requests.memory initContainers.requests.memory Kubernetes memory resource limits for init containers
|
||||||
|
initContainers:
|
||||||
|
resources:
|
||||||
|
limits: {}
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
|
||||||
# Configure commit/action signing prerequisites
|
# Configure commit/action signing prerequisites
|
||||||
## @section Signing
|
## @section Signing
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user