diff --git a/README.md b/README.md index 34a4513..333004b 100644 --- a/README.md +++ b/README.md @@ -931,16 +931,16 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo ### Image -| Name | Description | Value | -| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -| `image.registry` | image registry, e.g. gcr.io,docker.io | `""` | -| `image.repository` | Image to start for this pod | `gitea/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 | `[]` | +| Name | Description | Value | +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `image.registry` | image registry, e.g. gcr.io,docker.io | `docker.gitea.com` | +| `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 diff --git a/unittests/helm/act_runner/job.yaml b/unittests/helm/act_runner/job.yaml index c1d32e2..a16d40d 100644 --- a/unittests/helm/act_runner/job.yaml +++ b/unittests/helm/act_runner/job.yaml @@ -27,7 +27,7 @@ tests: name: gitea-unittests-actions-token-job - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3-rootless" + value: "docker.gitea.com/gitea:1.19.3-rootless" - it: tag override template: templates/gitea/act_runner/job.yaml set: @@ -44,7 +44,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.4-rootless" + value: "docker.gitea.com/gitea:1.19.4-rootless" - equal: path: spec.template.spec.containers[1].image value: "bitnami/kubectl:1.29.0" diff --git a/unittests/helm/deployment/image-configuration.yaml b/unittests/helm/deployment/image-configuration.yaml index 7b1e146..8b419aa 100644 --- a/unittests/helm/deployment/image-configuration.yaml +++ b/unittests/helm/deployment/image-configuration.yaml @@ -14,7 +14,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3-rootless" + value: "docker.gitea.com/gitea:1.19.3-rootless" - it: tag override template: templates/gitea/deployment.yaml set: @@ -22,7 +22,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.4-rootless" + value: "docker.gitea.com/gitea:1.19.4-rootless" - it: root-based image template: templates/gitea/deployment.yaml set: @@ -30,7 +30,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3" + value: "docker.gitea.com/gitea:1.19.3" - it: scoped registry template: templates/gitea/deployment.yaml set: @@ -38,7 +38,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "example.com/gitea/gitea:1.19.3-rootless" + value: "example.com/gitea:1.19.3-rootless" - it: global registry template: templates/gitea/deployment.yaml set: @@ -46,7 +46,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "global.example.com/gitea/gitea:1.19.3-rootless" + value: "global.example.com/gitea:1.19.3-rootless" - it: digest for rootless image template: templates/gitea/deployment.yaml set: @@ -56,12 +56,12 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" + value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: image fullOverride (does not append rootless) template: templates/gitea/deployment.yaml set: image: - fullOverride: gitea/gitea:1.19.3 + fullOverride: docker.gitea.com/gitea:1.19.3 # setting rootless, registry, repository, tag, and digest to prove that override works rootless: true registry: example.com @@ -71,7 +71,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3" + value: "docker.gitea.com/gitea:1.19.3" - it: digest for root-based image template: templates/gitea/deployment.yaml set: @@ -81,7 +81,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" + value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: digest and global registry template: templates/gitea/deployment.yaml set: @@ -90,7 +90,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "global.example.com/gitea/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" + value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: correctly renders floating tag references template: templates/gitea/deployment.yaml set: @@ -98,13 +98,13 @@ tests: asserts: - equal: path: spec.template.spec.initContainers[0].image - value: "gitea/gitea:1.21-rootless" + value: "docker.gitea.com/gitea:1.21-rootless" - equal: path: spec.template.spec.initContainers[1].image - value: "gitea/gitea:1.21-rootless" + value: "docker.gitea.com/gitea:1.21-rootless" - equal: path: spec.template.spec.initContainers[2].image - value: "gitea/gitea:1.21-rootless" + value: "docker.gitea.com/gitea:1.21-rootless" - equal: path: spec.template.spec.containers[0].image - value: "gitea/gitea:1.21-rootless" + value: "docker.gitea.com/gitea:1.21-rootless" diff --git a/unittests/helm/deployment/ssh-configuration.yaml b/unittests/helm/deployment/ssh-configuration.yaml index 543fd5f..a2fa073 100644 --- a/unittests/helm/deployment/ssh-configuration.yaml +++ b/unittests/helm/deployment/ssh-configuration.yaml @@ -30,7 +30,7 @@ tests: - it: supports overriding SSH log level (even when image.fullOverride set) template: templates/gitea/deployment.yaml set: - image.fullOverride: gitea/gitea:1.19.3 + image.fullOverride: docker.gitea.com/gitea:1.19.3 image.rootless: false gitea.ssh.logLevel: "DEBUG" asserts: @@ -53,7 +53,7 @@ tests: - it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set) template: templates/gitea/deployment.yaml set: - image.fullOverride: gitea/gitea:1.19.3 + image.fullOverride: docker.gitea.com/gitea:1.19.3 image.rootless: true gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here asserts: diff --git a/unittests/helm/init/init_directory_structure.sh-rootless.yaml b/unittests/helm/init/init_directory_structure.sh-rootless.yaml index 0314bc1..a215bd6 100644 --- a/unittests/helm/init/init_directory_structure.sh-rootless.yaml +++ b/unittests/helm/init/init_directory_structure.sh-rootless.yaml @@ -65,7 +65,7 @@ tests: - it: it does not chown /data even when image.fullOverride is set template: templates/gitea/init.yaml set: - image.fullOverride: gitea/gitea:1.20.5 + image.fullOverride: docker.gitea.com/gitea:1.20.5 asserts: - equal: path: stringData["init_directory_structure.sh"] diff --git a/values.yaml b/values.yaml index 07e4af4..a30c8bb 100644 --- a/values.yaml +++ b/values.yaml @@ -48,8 +48,8 @@ clusterDomain: cluster.local ## @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: "" - repository: gitea/gitea + registry: "docker.gitea.com" + repository: gitea # Overrides the image tag whose default is the chart appVersion. tag: "" digest: ""