feat(deployment)!: move image to deployment.gitea.image
The `image` values only ever configured the Gitea container itself — registry, repository, tag, digest, pull policy and the rootless variant are all consumed by the `gitea` container and its init containers. Keeping them at the top level suggested a chart-wide scope that never existed and separated them from the other container-scoped settings that already live under `deployment.gitea` (`env`, `resources`). Moving the block makes the container configuration self-contained and continues the consolidation of all pod- and Deployment-scoped values under the `deployment` dict. `imagePullSecrets` intentionally stays top-level, because it is a pod-level setting that also applies to `extraContainers` and is paired with `global.imagePullSecrets`. BREAKING CHANGE: `image` no longer exists. Use `deployment.gitea.image` instead. Values still set under `image` are silently ignored, which would drop a pinned `tag` or `digest` and roll out the chart default (`appVersion`) instead — review your values before upgrading. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -80,7 +80,7 @@ There might be times when the chart is behind the latest Gitea release.
|
|||||||
This might be caused by different reasons, most often due to time constraints of the maintainers (remember, all work here is done voluntarily in the spare time of people).
|
This might be caused by different reasons, most often due to time constraints of the maintainers (remember, all work here is done voluntarily in the spare time of people).
|
||||||
If you're eager to use the latest Gitea version earlier than this chart catches up, then change the tag in `values.yaml` to the latest Gitea version.
|
If you're eager to use the latest Gitea version earlier than this chart catches up, then change the tag in `values.yaml` to the latest Gitea version.
|
||||||
Note that besides the exact Gitea version one can also use the `:1` tag to automatically follow the latest Gitea version.
|
Note that besides the exact Gitea version one can also use the `:1` tag to automatically follow the latest Gitea version.
|
||||||
This should be combined with `image.pullPolicy: "Always"`.
|
This should be combined with `deployment.gitea.image.pullPolicy: "Always"`.
|
||||||
Important: Using the `:1` will also automatically jump to new minor release (e.g. from 1.13 to 1.14) which may eventually cause incompatibilities if major/breaking changes happened between these versions.
|
Important: Using the `:1` will also automatically jump to new minor release (e.g. from 1.13 to 1.14) which may eventually cause incompatibilities if major/breaking changes happened between these versions.
|
||||||
This is due to Gitea not strictly following [semantic versioning](https://semver.org/#summary) as breaking changes do not increase the major version.
|
This is due to Gitea not strictly following [semantic versioning](https://semver.org/#summary) as breaking changes do not increase the major version.
|
||||||
I.e., "minor" version bumps are considered "major".
|
I.e., "minor" version bumps are considered "major".
|
||||||
@@ -261,7 +261,7 @@ ENABLED = false
|
|||||||
|
|
||||||
#### Rootless Defaults
|
#### Rootless Defaults
|
||||||
|
|
||||||
If `.Values.image.rootless: true`, then the following will occur. In case you use `.Values.image.fullOverride`, check that this works in your image:
|
If `.Values.deployment.gitea.image.rootless: true`, then the following will occur. In case you use `.Values.deployment.gitea.image.fullOverride`, check that this works in your image:
|
||||||
|
|
||||||
- `$HOME` becomes `/data/gitea/git`
|
- `$HOME` becomes `/data/gitea/git`
|
||||||
|
|
||||||
@@ -961,10 +961,12 @@ To be able to use a digest value which is automatically updated by `Renovate` a
|
|||||||
Here's an examplary `values.yml` definition which makes use of a digest:
|
Here's an examplary `values.yml` definition which makes use of a digest:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
image:
|
deployment:
|
||||||
repository: gitea/gitea
|
gitea:
|
||||||
tag: 1.20.2
|
image:
|
||||||
digest: sha256:6e3b85a36653894d6741d0aefb41dfaac39044e028a42e0a520cc05ebd7bfc3f
|
repository: gitea/gitea
|
||||||
|
tag: 1.20.2
|
||||||
|
digest: sha256:6e3b85a36653894d6741d0aefb41dfaac39044e028a42e0a520cc05ebd7bfc3f
|
||||||
```
|
```
|
||||||
|
|
||||||
By default Renovate adds digest after the `tag`.
|
By default Renovate adds digest after the `tag`.
|
||||||
@@ -996,26 +998,33 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
|
|
||||||
### deployment
|
### deployment
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------- |
|
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||||
| `deployment.enabled` | Enable the deployment of Gitea. | `true` |
|
| `deployment.enabled` | Enable the deployment of Gitea. | `true` |
|
||||||
| `deployment.annotations` | Annotations for the Gitea deployment to be created | `{}` |
|
| `deployment.annotations` | Annotations for the Gitea deployment to be created | `{}` |
|
||||||
| `deployment.labels` | Labels for the deployment | `{}` |
|
| `deployment.labels` | Labels for the deployment | `{}` |
|
||||||
| `deployment.affinity` | Affinity for the deployment. | `{}` |
|
| `deployment.affinity` | Affinity for the deployment. | `{}` |
|
||||||
| `deployment.dnsConfig` | dnsConfig of the Gitea deployment. | `{}` |
|
| `deployment.dnsConfig` | dnsConfig of the Gitea deployment. | `{}` |
|
||||||
| `deployment.gitea.env` | Additional environment variables to pass to the Gitea container. | `[]` |
|
| `deployment.gitea.env` | Additional environment variables to pass to the Gitea container. | `[]` |
|
||||||
| `deployment.gitea.resources` | Compute Resources required by Gitea container. Cannot be updated. | `nil` |
|
| `deployment.gitea.image.registry` | image registry, e.g. gcr.io,docker.io | `docker.gitea.com` |
|
||||||
| `deployment.nodeSelector` | NodeSelector for the deployment | `{}` |
|
| `deployment.gitea.image.repository` | Image to start for this pod | `gitea` |
|
||||||
| `deployment.priorityClassName` | priorityClassName for the deployment | `""` |
|
| `deployment.gitea.image.tag` | Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml. | `""` |
|
||||||
| `deployment.replicas` | Number of replicas for the Gitea deployment. | `1` |
|
| `deployment.gitea.image.digest` | Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest` | `""` |
|
||||||
| `deployment.resources` | Resources is the total amount of CPU and Memory resources required by all containers in the pod. | `{}` |
|
| `deployment.gitea.image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||||
| `deployment.schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
|
| `deployment.gitea.image.rootless` | Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher | `true` |
|
||||||
| `deployment.strategy.type` | Deployment strategy used to replace old pods, either `RollingUpdate` or `Recreate`. | `RollingUpdate` |
|
| `deployment.gitea.image.fullOverride` | Completely overrides the image registry, path/image, tag and digest. **Adjust `deployment.gitea.image.rootless` accordingly and review [Rootless defaults](#rootless-defaults).** | `""` |
|
||||||
| `deployment.strategy.rollingUpdate.maxSurge` | Number or percentage of pods that may be created above the desired replica count. Only used with `RollingUpdate`. | `100%` |
|
| `deployment.gitea.resources` | Compute Resources required by Gitea container. Cannot be updated. | `nil` |
|
||||||
| `deployment.strategy.rollingUpdate.maxUnavailable` | Number or percentage of pods that may be unavailable during the update. Only used with `RollingUpdate`. | `0` |
|
| `deployment.nodeSelector` | NodeSelector for the deployment | `{}` |
|
||||||
| `deployment.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
|
| `deployment.priorityClassName` | priorityClassName for the deployment | `""` |
|
||||||
| `deployment.tolerations` | Tolerations of the Gitea deployment. | `[]` |
|
| `deployment.replicas` | Number of replicas for the Gitea deployment. | `1` |
|
||||||
| `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` |
|
| `deployment.resources` | Resources is the total amount of CPU and Memory resources required by all containers in the pod. | `{}` |
|
||||||
|
| `deployment.schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
|
||||||
|
| `deployment.strategy.type` | Deployment strategy used to replace old pods, either `RollingUpdate` or `Recreate`. | `RollingUpdate` |
|
||||||
|
| `deployment.strategy.rollingUpdate.maxSurge` | Number or percentage of pods that may be created above the desired replica count. Only used with `RollingUpdate`. | `100%` |
|
||||||
|
| `deployment.strategy.rollingUpdate.maxUnavailable` | Number or percentage of pods that may be unavailable during the update. Only used with `RollingUpdate`. | `0` |
|
||||||
|
| `deployment.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
|
||||||
|
| `deployment.tolerations` | Tolerations of the Gitea deployment. | `[]` |
|
||||||
|
| `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` |
|
||||||
|
|
||||||
### Gateway API
|
### Gateway API
|
||||||
|
|
||||||
@@ -1068,16 +1077,9 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
|
|
||||||
### Image
|
### Image
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
| ------------------ | ----------------------------------- | ----- |
|
||||||
| `image.registry` | image registry, e.g. gcr.io,docker.io | `docker.gitea.com` |
|
| `imagePullSecrets` | Secret to use for pulling the image | `[]` |
|
||||||
| `image.repository` | Image to start for this pod | `gitea` |
|
|
||||||
| `image.tag` | Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml. | `""` |
|
|
||||||
| `image.digest` | Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest` | `""` |
|
|
||||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
|
||||||
| `image.rootless` | Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher | `true` |
|
|
||||||
| `image.fullOverride` | Completely overrides the image registry, path/image, tag and digest. **Adjust `image.rootless` accordingly and review [Rootless defaults](#rootless-defaults).** | `""` |
|
|
||||||
| `imagePullSecrets` | Secret to use for pulling the image | `[]` |
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
@@ -1570,7 +1572,7 @@ gitea:
|
|||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
If you are facing errors like `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED` due to this automatic transition:
|
If you are facing errors like `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED` due to this automatic transition:
|
||||||
Have a look at [this discussion](https://gitea.com/gitea/helm-gitea/issues/487#issue-220660) and either set `image.rootless: false` or manually update your `~/.ssh/known_hosts` file(s).
|
Have a look at [this discussion](https://gitea.com/gitea/helm-gitea/issues/487#issue-220660) and either set `deployment.gitea.image.rootless: false` or manually update your `~/.ssh/known_hosts` file(s).
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
<!-- markdownlint-disable-next-line -->
|
<!-- markdownlint-disable-next-line -->
|
||||||
|
|||||||
+1
-1
@@ -175,4 +175,4 @@ gitea:
|
|||||||
- Currently Cron jobs are run on all replicas as no leader election is implemented.
|
- Currently Cron jobs are run on all replicas as no leader election is implemented.
|
||||||
See [https://github.com/go-gitea/gitea/issues/13791](https://github.com/go-gitea/gitea/issues/13791) for a discussion and possible solution.
|
See [https://github.com/go-gitea/gitea/issues/13791](https://github.com/go-gitea/gitea/issues/13791) for a discussion and possible solution.
|
||||||
|
|
||||||
- Running with multiple replicas slows down Gitea a bit, i.e. page loading time increases.
|
- Running with multiple replicas slows down Gitea a bit, i.e. page loading time increases.
|
||||||
|
|||||||
+13
-14
@@ -43,15 +43,15 @@ Create chart name and version as used by the chart label.
|
|||||||
Create image name and tag used by the deployment.
|
Create image name and tag used by the deployment.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "gitea.image" -}}
|
{{- define "gitea.image" -}}
|
||||||
{{- $fullOverride := .Values.image.fullOverride | default "" -}}
|
{{- $fullOverride := .Values.deployment.gitea.image.fullOverride | default "" -}}
|
||||||
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
|
{{- $registry := .Values.global.imageRegistry | default .Values.deployment.gitea.image.registry -}}
|
||||||
{{- $repository := .Values.image.repository -}}
|
{{- $repository := .Values.deployment.gitea.image.repository -}}
|
||||||
{{- $separator := ":" -}}
|
{{- $separator := ":" -}}
|
||||||
{{- $tag := .Values.image.tag | default .Chart.AppVersion | toString -}}
|
{{- $tag := .Values.deployment.gitea.image.tag | default .Chart.AppVersion | toString -}}
|
||||||
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
{{- $rootless := ternary "-rootless" "" (.Values.deployment.gitea.image.rootless) -}}
|
||||||
{{- $digest := "" -}}
|
{{- $digest := "" -}}
|
||||||
{{- if .Values.image.digest }}
|
{{- if .Values.deployment.gitea.image.digest }}
|
||||||
{{- $digest = (printf "@%s" (.Values.image.digest | toString)) -}}
|
{{- $digest = (printf "@%s" (.Values.deployment.gitea.image.digest | toString)) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $fullOverride }}
|
{{- if $fullOverride }}
|
||||||
{{- printf "%s" $fullOverride -}}
|
{{- printf "%s" $fullOverride -}}
|
||||||
@@ -175,8 +175,8 @@ Common labels
|
|||||||
helm.sh/chart: {{ include "gitea.chart" . }}
|
helm.sh/chart: {{ include "gitea.chart" . }}
|
||||||
app: {{ include "gitea.name" . }}
|
app: {{ include "gitea.name" . }}
|
||||||
{{ include "gitea.selectorLabels" . }}
|
{{ include "gitea.selectorLabels" . }}
|
||||||
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Values.deployment.gitea.image.tag | default .Chart.AppVersion | quote }}
|
||||||
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
version: {{ .Values.deployment.gitea.image.tag | default .Chart.AppVersion | quote }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -184,8 +184,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|||||||
helm.sh/chart: {{ include "gitea.chart" . }}
|
helm.sh/chart: {{ include "gitea.chart" . }}
|
||||||
app: {{ include "gitea.name" . }}-act-runner
|
app: {{ include "gitea.name" . }}-act-runner
|
||||||
{{ include "gitea.selectorLabels.actRunner" . }}
|
{{ include "gitea.selectorLabels.actRunner" . }}
|
||||||
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Values.deployment.gitea.image.tag | default .Chart.AppVersion | quote }}
|
||||||
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
version: {{ .Values.deployment.gitea.image.tag | default .Chart.AppVersion | quote }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ https
|
|||||||
{{- $generals := list -}}
|
{{- $generals := list -}}
|
||||||
{{- $inlines := dict -}}
|
{{- $inlines := dict -}}
|
||||||
|
|
||||||
{{- range $key, $value := .Values.gitea.config }}
|
{{- range $key, $value := .Values.gitea.config }}
|
||||||
{{- if kindIs "map" $value }}
|
{{- if kindIs "map" $value }}
|
||||||
{{- if gt (len $value) 0 }}
|
{{- if gt (len $value) 0 }}
|
||||||
{{- $section := default list (get $inlines $key) -}}
|
{{- $section := default list (get $inlines $key) -}}
|
||||||
@@ -447,7 +447,7 @@ https
|
|||||||
{{- $_ := set .Values.gitea.config.server "SSH_PORT" .Values.service.ssh.port -}}
|
{{- $_ := set .Values.gitea.config.server "SSH_PORT" .Values.service.ssh.port -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if not (hasKey .Values.gitea.config.server "START_SSH_SERVER") -}}
|
{{- if not (hasKey .Values.gitea.config.server "START_SSH_SERVER") -}}
|
||||||
{{- if .Values.image.rootless -}}
|
{{- if .Values.deployment.gitea.image.rootless -}}
|
||||||
{{- $_ := set .Values.gitea.config.server "START_SSH_SERVER" "true" -}}
|
{{- $_ := set .Values.gitea.config.server "START_SSH_SERVER" "true" -}}
|
||||||
{{- if not (hasKey .Values.gitea.config.server "SSH_LISTEN_PORT") -}}
|
{{- if not (hasKey .Values.gitea.config.server "SSH_LISTEN_PORT") -}}
|
||||||
{{- if not .Values.gitea.config.server.SSH_LISTEN_PORT -}}
|
{{- if not .Values.gitea.config.server.SSH_LISTEN_PORT -}}
|
||||||
@@ -540,4 +540,3 @@ https
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- toYaml $probe -}}
|
{{- toYaml $probe -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
- name: init-directories
|
- name: init-directories
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.deployment.gitea.image.pullPolicy }}
|
||||||
command:
|
command:
|
||||||
- "{{ .Values.initContainersScriptsVolumeMountPath }}/init_directory_structure.sh"
|
- "{{ .Values.initContainersScriptsVolumeMountPath }}/init_directory_structure.sh"
|
||||||
env:
|
env:
|
||||||
@@ -130,7 +130,7 @@ spec:
|
|||||||
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
{{- 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.deployment.gitea.image.pullPolicy }}
|
||||||
{{- if .Values.gitea.extraEnvSourceFile }}
|
{{- if .Values.gitea.extraEnvSourceFile }}
|
||||||
command:
|
command:
|
||||||
- "/bin/bash"
|
- "/bin/bash"
|
||||||
@@ -196,7 +196,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- "{{ .Values.initContainersScriptsVolumeMountPath }}/configure_gpg_environment.sh"
|
- "{{ .Values.initContainersScriptsVolumeMountPath }}/configure_gpg_environment.sh"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.deployment.gitea.image.pullPolicy }}
|
||||||
{{- if $commandInitContainerSecurityContext }}
|
{{- if $commandInitContainerSecurityContext }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- $commandInitContainerSecurityContext | nindent 12 }}
|
{{- $commandInitContainerSecurityContext | nindent 12 }}
|
||||||
@@ -238,7 +238,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- "{{ .Values.initContainersScriptsVolumeMountPath }}/configure_gitea.sh"
|
- "{{ .Values.initContainersScriptsVolumeMountPath }}/configure_gitea.sh"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.deployment.gitea.image.pullPolicy }}
|
||||||
{{- if $commandInitContainerSecurityContext }}
|
{{- if $commandInitContainerSecurityContext }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- $commandInitContainerSecurityContext | nindent 12 }}
|
{{- $commandInitContainerSecurityContext | nindent 12 }}
|
||||||
@@ -252,7 +252,7 @@ spec:
|
|||||||
value: /data
|
value: /data
|
||||||
- name: GITEA_TEMP
|
- name: GITEA_TEMP
|
||||||
value: /tmp/gitea
|
value: /tmp/gitea
|
||||||
{{- if .Values.image.rootless }}
|
{{- if .Values.deployment.gitea.image.rootless }}
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: /data/gitea/git
|
value: /data/gitea/git
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -335,14 +335,14 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.deployment.gitea.image.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
# SSH Port values have to be set here as well for openssh configuration
|
# SSH Port values have to be set here as well for openssh configuration
|
||||||
- name: SSH_LISTEN_PORT
|
- name: SSH_LISTEN_PORT
|
||||||
value: {{ .Values.gitea.config.server.SSH_LISTEN_PORT | quote }}
|
value: {{ .Values.gitea.config.server.SSH_LISTEN_PORT | quote }}
|
||||||
- name: SSH_PORT
|
- name: SSH_PORT
|
||||||
value: {{ .Values.gitea.config.server.SSH_PORT | quote }}
|
value: {{ .Values.gitea.config.server.SSH_PORT | quote }}
|
||||||
{{- if not .Values.image.rootless }}
|
{{- if not .Values.deployment.gitea.image.rootless }}
|
||||||
- name: SSH_LOG_LEVEL
|
- name: SSH_LOG_LEVEL
|
||||||
value: {{ .Values.gitea.ssh.logLevel | quote }}
|
value: {{ .Values.gitea.ssh.logLevel | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -365,7 +365,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
- name: TMPDIR
|
- name: TMPDIR
|
||||||
value: /tmp/gitea
|
value: /tmp/gitea
|
||||||
{{- if .Values.image.rootless }}
|
{{- if .Values.deployment.gitea.image.rootless }}
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: /data/gitea/git
|
value: /data/gitea/git
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ stringData:
|
|||||||
# END: initPreScript
|
# END: initPreScript
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if not .Values.image.rootless }}
|
{{- if not .Values.deployment.gitea.image.rootless }}
|
||||||
chown -v 1000:1000 /data
|
chown -v 1000:1000 /data
|
||||||
{{- end }}
|
{{- end }}
|
||||||
mkdir -pv /data/git/.ssh
|
mkdir -pv /data/git/.ssh
|
||||||
@@ -35,7 +35,7 @@ stringData:
|
|||||||
|
|
||||||
# prepare temp directory structure
|
# prepare temp directory structure
|
||||||
mkdir -pv "${GITEA_TEMP}"
|
mkdir -pv "${GITEA_TEMP}"
|
||||||
{{- if not .Values.image.rootless }}
|
{{- if not .Values.deployment.gitea.image.rootless }}
|
||||||
chown -v 1000:1000 "${GITEA_TEMP}"
|
chown -v 1000:1000 "${GITEA_TEMP}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
chmod -v ug+rwx "${GITEA_TEMP}"
|
chmod -v ug+rwx "${GITEA_TEMP}"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ tests:
|
|||||||
- it: tag override
|
- it: tag override
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.tag: "1.19.4"
|
deployment.gitea.image.tag: "1.19.4"
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -31,7 +31,7 @@ tests:
|
|||||||
- it: root-based image
|
- it: root-based image
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -39,7 +39,7 @@ tests:
|
|||||||
- it: scoped registry
|
- it: scoped registry
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.registry: "example.com"
|
deployment.gitea.image.registry: "example.com"
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -55,9 +55,11 @@ tests:
|
|||||||
- it: digest for rootless image
|
- it: digest for rootless image
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image:
|
deployment:
|
||||||
rootless: true
|
gitea:
|
||||||
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
image:
|
||||||
|
rootless: true
|
||||||
|
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -65,14 +67,16 @@ tests:
|
|||||||
- it: image fullOverride (does not append rootless)
|
- it: image fullOverride (does not append rootless)
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image:
|
deployment:
|
||||||
fullOverride: docker.gitea.com/gitea:1.19.3
|
gitea:
|
||||||
# setting rootless, registry, repository, tag, and digest to prove that override works
|
image:
|
||||||
rootless: true
|
fullOverride: docker.gitea.com/gitea:1.19.3
|
||||||
registry: example.com
|
# setting rootless, registry, repository, tag, and digest to prove that override works
|
||||||
repository: example/image
|
rootless: true
|
||||||
tag: "1.0.0"
|
registry: example.com
|
||||||
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
repository: example/image
|
||||||
|
tag: "1.0.0"
|
||||||
|
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -80,9 +84,11 @@ tests:
|
|||||||
- it: digest for root-based image
|
- it: digest for root-based image
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image:
|
deployment:
|
||||||
rootless: false
|
gitea:
|
||||||
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
image:
|
||||||
|
rootless: false
|
||||||
|
digest: sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -91,7 +97,7 @@ tests:
|
|||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
global.imageRegistry: "global.example.com"
|
global.imageRegistry: "global.example.com"
|
||||||
image.digest: "sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
deployment.gitea.image.digest: "sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
@@ -99,7 +105,7 @@ tests:
|
|||||||
- it: correctly renders floating tag references
|
- it: correctly renders floating tag references
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.tag: 1.21 # use non-quoted value on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
|
deployment.gitea.image.tag: 1.21 # use non-quoted value on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.initContainers[0].image
|
path: spec.template.spec.initContainers[0].image
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ tests:
|
|||||||
- it: supports defining SSH log level for root based image
|
- it: supports defining SSH log level for root based image
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.containers[0].env
|
path: spec.template.spec.containers[0].env
|
||||||
@@ -24,7 +24,7 @@ tests:
|
|||||||
- it: supports overriding SSH log level
|
- it: supports overriding SSH log level
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
gitea.ssh.logLevel: "DEBUG"
|
gitea.ssh.logLevel: "DEBUG"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
@@ -35,8 +35,8 @@ tests:
|
|||||||
- it: supports overriding SSH log level (even when image.fullOverride set)
|
- it: supports overriding SSH log level (even when image.fullOverride set)
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.fullOverride: docker.gitea.com/gitea:1.19.3
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
gitea.ssh.logLevel: "DEBUG"
|
gitea.ssh.logLevel: "DEBUG"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
@@ -47,7 +47,7 @@ tests:
|
|||||||
- it: skips SSH_LOG_LEVEL for rootless image
|
- it: skips SSH_LOG_LEVEL for rootless image
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.rootless: true
|
deployment.gitea.image.rootless: true
|
||||||
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
||||||
asserts:
|
asserts:
|
||||||
- notContains:
|
- notContains:
|
||||||
@@ -58,8 +58,8 @@ tests:
|
|||||||
- it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set)
|
- it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set)
|
||||||
template: templates/gitea/deployment.yaml
|
template: templates/gitea/deployment.yaml
|
||||||
set:
|
set:
|
||||||
image.fullOverride: docker.gitea.com/gitea:1.19.3
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
||||||
image.rootless: true
|
deployment.gitea.image.rootless: true
|
||||||
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
||||||
asserts:
|
asserts:
|
||||||
- notContains:
|
- notContains:
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ tests:
|
|||||||
- it: it does not chown /data even when image.fullOverride is set
|
- it: it does not chown /data even when image.fullOverride is set
|
||||||
template: templates/gitea/secret_init.yaml
|
template: templates/gitea/secret_init.yaml
|
||||||
set:
|
set:
|
||||||
image.fullOverride: docker.gitea.com/gitea:1.20.5
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["init_directory_structure.sh"]
|
path: stringData["init_directory_structure.sh"]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ templates:
|
|||||||
tests:
|
tests:
|
||||||
- it: runs gpg in batch mode
|
- it: runs gpg in batch mode
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.new.privateKey: |-
|
secrets.gpg.new.privateKey: |-
|
||||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
@@ -23,7 +23,7 @@ tests:
|
|||||||
gpg --batch --import "$TMP_RAW_GPG_KEY"
|
gpg --batch --import "$TMP_RAW_GPG_KEY"
|
||||||
- it: skips gpg script block for disabled signing
|
- it: skips gpg script block for disabled signing
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["init_directory_structure.sh"]
|
path: stringData["init_directory_structure.sh"]
|
||||||
@@ -42,7 +42,7 @@ tests:
|
|||||||
chmod -v ug+rwx "${GITEA_TEMP}"
|
chmod -v ug+rwx "${GITEA_TEMP}"
|
||||||
- it: adds gpg script block for enabled signing
|
- it: adds gpg script block for enabled signing
|
||||||
set:
|
set:
|
||||||
image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.new.privateKey: |-
|
secrets.gpg.new.privateKey: |-
|
||||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
|||||||
+17
-17
@@ -67,6 +67,23 @@ deployment:
|
|||||||
# - name: VARIABLE
|
# - name: VARIABLE
|
||||||
# value: my-value
|
# value: my-value
|
||||||
|
|
||||||
|
## @param deployment.gitea.image.registry image registry, e.g. gcr.io,docker.io
|
||||||
|
## @param deployment.gitea.image.repository Image to start for this pod
|
||||||
|
## @param deployment.gitea.image.tag Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml.
|
||||||
|
## @param deployment.gitea.image.digest Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest`
|
||||||
|
## @param deployment.gitea.image.pullPolicy Image pull policy
|
||||||
|
## @param deployment.gitea.image.rootless Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher
|
||||||
|
## @param deployment.gitea.image.fullOverride Completely overrides the image registry, path/image, tag and digest. **Adjust `deployment.gitea.image.rootless` accordingly and review [Rootless defaults](#rootless-defaults).**
|
||||||
|
image:
|
||||||
|
registry: "docker.gitea.com"
|
||||||
|
repository: gitea
|
||||||
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: ""
|
||||||
|
digest: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
rootless: true
|
||||||
|
fullOverride: ""
|
||||||
|
|
||||||
## @param deployment.gitea.resources Compute Resources required by Gitea container. Cannot be updated.
|
## @param deployment.gitea.resources Compute Resources required by Gitea container. Cannot be updated.
|
||||||
## @skip deployment.gitea.resources.claims Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
|
## @skip deployment.gitea.resources.claims Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
|
||||||
## @skip deployment.gitea.resources.limits Limits describes the maximum amount of compute resources allowed for this container.
|
## @skip deployment.gitea.resources.limits Limits describes the maximum amount of compute resources allowed for this container.
|
||||||
@@ -253,23 +270,6 @@ namespace: ""
|
|||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
|
||||||
## @section Image
|
## @section Image
|
||||||
## @param image.registry image registry, e.g. gcr.io,docker.io
|
|
||||||
## @param image.repository Image to start for this pod
|
|
||||||
## @param image.tag Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml.
|
|
||||||
## @param image.digest Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest`
|
|
||||||
## @param image.pullPolicy Image pull policy
|
|
||||||
## @param image.rootless Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher
|
|
||||||
## @param image.fullOverride Completely overrides the image registry, path/image, tag and digest. **Adjust `image.rootless` accordingly and review [Rootless defaults](#rootless-defaults).**
|
|
||||||
image:
|
|
||||||
registry: "docker.gitea.com"
|
|
||||||
repository: gitea
|
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
|
||||||
tag: ""
|
|
||||||
digest: ""
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
rootless: true
|
|
||||||
fullOverride: ""
|
|
||||||
|
|
||||||
## @param imagePullSecrets Secret to use for pulling the image
|
## @param imagePullSecrets Secret to use for pulling the image
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user