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>
73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
suite: Init template
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/secret_init.yaml
|
|
tests:
|
|
- it: runs gpg in batch mode
|
|
set:
|
|
deployment.gitea.image.rootless: false
|
|
secrets.gpg.enabled: true
|
|
secrets.gpg.new.privateKey: |-
|
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
|
{placeholder}
|
|
-----END PGP PRIVATE KEY BLOCK-----
|
|
asserts:
|
|
- equal:
|
|
path: stringData["configure_gpg_environment.sh"]
|
|
value: |
|
|
#!/usr/bin/env bash
|
|
set -eu
|
|
|
|
gpg --batch --import "$TMP_RAW_GPG_KEY"
|
|
- it: skips gpg script block for disabled signing
|
|
set:
|
|
deployment.gitea.image.rootless: false
|
|
asserts:
|
|
- equal:
|
|
path: stringData["init_directory_structure.sh"]
|
|
value: |-
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
chown -v 1000:1000 /data
|
|
mkdir -pv /data/git/.ssh
|
|
chmod -Rv 700 /data/git/.ssh
|
|
[ ! -d /data/gitea/conf ] && mkdir -pv /data/gitea/conf
|
|
|
|
# prepare temp directory structure
|
|
mkdir -pv "${GITEA_TEMP}"
|
|
chown -v 1000:1000 "${GITEA_TEMP}"
|
|
chmod -v ug+rwx "${GITEA_TEMP}"
|
|
- it: adds gpg script block for enabled signing
|
|
set:
|
|
deployment.gitea.image.rootless: false
|
|
secrets.gpg.enabled: true
|
|
secrets.gpg.new.privateKey: |-
|
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
|
{placeholder}
|
|
-----END PGP PRIVATE KEY BLOCK-----
|
|
asserts:
|
|
- equal:
|
|
path: stringData["init_directory_structure.sh"]
|
|
value: |-
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
chown -v 1000:1000 /data
|
|
mkdir -pv /data/git/.ssh
|
|
chmod -Rv 700 /data/git/.ssh
|
|
[ ! -d /data/gitea/conf ] && mkdir -pv /data/gitea/conf
|
|
|
|
# prepare temp directory structure
|
|
mkdir -pv "${GITEA_TEMP}"
|
|
chown -v 1000:1000 "${GITEA_TEMP}"
|
|
chmod -v ug+rwx "${GITEA_TEMP}"
|
|
|
|
if [ ! -d "${GNUPGHOME}" ]; then
|
|
mkdir -pv "${GNUPGHOME}"
|
|
chmod -v 700 "${GNUPGHOME}"
|
|
chown -v 1000:1000 "${GNUPGHOME}"
|
|
fi
|