From 6a2a93c78085118aa5f63cc3eb1c9e1df30de5c4 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 30 Sep 2025 21:17:52 +0200 Subject: [PATCH] refac(structure): remove leading gitea directory The following pull request removes the `gitea` directory. With regard to maintaining act_runners in a separate git repository or helm chart, this additional directory becomes redundant. --- README.md | 4 ++-- .../check-actions-not-present.yaml | 0 templates/{gitea => }/config.yaml | 0 templates/{gitea => }/deployment.yaml | 2 +- templates/{gitea => }/deprecation.yaml | 0 templates/{gitea => }/extra-list.yaml | 0 templates/{gitea => }/gpg-secret.yaml | 0 templates/{gitea => }/http-svc.yaml | 0 templates/{gitea => }/ingress.yaml | 0 templates/{gitea => }/init.yaml | 0 templates/{gitea => }/metrics-secret.yaml | 0 templates/{gitea => }/networkPolicy.yaml | 0 .../{gitea => }/poddisruptionbudget.yaml | 0 templates/{gitea => }/pvc.yaml | 0 templates/{gitea => }/serviceaccount.yaml | 0 templates/{gitea => }/servicemonitor.yaml | 0 templates/{gitea => }/ssh-svc.yaml | 0 templates/tests/test-http-connection.yaml | 18 -------------- unittests/helm/config/actions-config.yaml | 6 ++--- unittests/helm/config/cache-config.yaml | 8 +++---- .../config/metrics-section_metrics-token.yaml | 8 +++---- unittests/helm/config/queue-config.yaml | 8 +++---- .../helm/config/server-section_domain.yaml | 6 ++--- unittests/helm/config/session-config.yaml | 8 +++---- ...customization-integrity-postgresql-ha.yaml | 4 ++-- .../customization-integrity-postgresql.yaml | 4 ++-- ...ustomization-integrity-valkey-cluster.yaml | 2 +- .../customization-integrity-valkey.yaml | 2 +- unittests/helm/deployment/HA.yaml | 12 +++++----- unittests/helm/deployment/basic.yaml | 18 +++++++------- .../deployment-additional-config.yaml | 14 +++++------ .../helm/deployment/extraInitContainers.yaml | 20 ++++++++-------- .../helm/deployment/image-configuration.yaml | 24 +++++++++---------- .../deployment/ingress-configuration.yaml | 2 +- unittests/helm/deployment/inline-config.yaml | 2 +- unittests/helm/deployment/probes.yaml | 24 +++++++++---------- .../helm/deployment/sidecar-container.yaml | 6 ++--- .../helm/deployment/signing-disabled.yaml | 12 +++++----- .../helm/deployment/signing-enabled.yaml | 14 +++++------ .../helm/deployment/ssh-configuration.yaml | 14 +++++------ .../storage-class-configuration.yaml | 8 +++---- .../helm/deployment/svc-configuration.yaml | 22 ++++++++--------- .../helm/gpg-secret/signing-disabled.yaml | 2 +- .../helm/gpg-secret/signing-enabled.yaml | 2 +- unittests/helm/ingress/basic.yaml | 2 +- unittests/helm/ingress/implicit-defaults.yaml | 2 +- unittests/helm/ingress/ingress.tpl.yaml | 2 +- unittests/helm/ingress/structured-paths.yaml | 2 +- unittests/helm/init/basic.yaml | 2 +- .../init_directory_structure.sh-rootless.yaml | 4 ++-- .../init/init_directory_structure.sh.yaml | 2 +- ...etrics-secret-servicemonitor-disabled.yaml | 2 +- ...metrics-secret-servicemonitor-enabled.yaml | 2 +- .../helm/networkPolicy/networkPolicy.yaml | 2 +- unittests/helm/pvc/pvc-configuration.yaml | 2 +- unittests/helm/serviceaccount/basic.yaml | 2 +- unittests/helm/serviceaccount/reference.yaml | 12 +++++----- unittests/helm/servicemonitor/basic.yaml | 2 +- .../servicemonitor-disabled.yaml | 2 +- .../servicemonitor-enabled.yaml | 2 +- 60 files changed, 151 insertions(+), 169 deletions(-) rename templates/{gitea => }/check-actions-not-present.yaml (100%) rename templates/{gitea => }/config.yaml (100%) rename templates/{gitea => }/deployment.yaml (99%) rename templates/{gitea => }/deprecation.yaml (100%) rename templates/{gitea => }/extra-list.yaml (100%) rename templates/{gitea => }/gpg-secret.yaml (100%) rename templates/{gitea => }/http-svc.yaml (100%) rename templates/{gitea => }/ingress.yaml (100%) rename templates/{gitea => }/init.yaml (100%) rename templates/{gitea => }/metrics-secret.yaml (100%) rename templates/{gitea => }/networkPolicy.yaml (100%) rename templates/{gitea => }/poddisruptionbudget.yaml (100%) rename templates/{gitea => }/pvc.yaml (100%) rename templates/{gitea => }/serviceaccount.yaml (100%) rename templates/{gitea => }/servicemonitor.yaml (100%) rename templates/{gitea => }/ssh-svc.yaml (100%) delete mode 100644 templates/tests/test-http-connection.yaml diff --git a/README.md b/README.md index b21a7bf..9d4517f 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ If `.Values.image.rootless: true`, then the following will occur. In case you us - `$HOME` becomes `/data/gitea/git` - [see deployment.yaml](./templates/gitea/deployment.yaml) template inside (init-)container "env" declarations + [see deployment.yaml](./templates/deployment.yaml) template inside (init-)container "env" declarations - `START_SSH_SERVER: true` (Unless explicity overwritten by `gitea.config.server.START_SSH_SERVER`) @@ -278,7 +278,7 @@ If `.Values.image.rootless: true`, then the following will occur. In case you us - `SSH_LOG_LEVEL` environment variable is not injected into the container - [see deployment.yaml](./templates/gitea/deployment.yaml) template inside container "env" declarations + [see deployment.yaml](./templates/deployment.yaml) template inside container "env" declarations #### Session, Cache and Queue diff --git a/templates/gitea/check-actions-not-present.yaml b/templates/check-actions-not-present.yaml similarity index 100% rename from templates/gitea/check-actions-not-present.yaml rename to templates/check-actions-not-present.yaml diff --git a/templates/gitea/config.yaml b/templates/config.yaml similarity index 100% rename from templates/gitea/config.yaml rename to templates/config.yaml diff --git a/templates/gitea/deployment.yaml b/templates/deployment.yaml similarity index 99% rename from templates/gitea/deployment.yaml rename to templates/deployment.yaml index f8f2d65..f8e4e6f 100644 --- a/templates/gitea/deployment.yaml +++ b/templates/deployment.yaml @@ -27,7 +27,7 @@ spec: template: metadata: annotations: - checksum/config: {{ include (print $.Template.BasePath "/gitea/config.yaml") . | sha256sum }} + checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} {{- range $idx, $value := .Values.gitea.ldap }} checksum/ldap_{{ $idx }}: {{ include "gitea.ldap_settings" (list $idx $value) | sha256sum }} {{- end }} diff --git a/templates/gitea/deprecation.yaml b/templates/deprecation.yaml similarity index 100% rename from templates/gitea/deprecation.yaml rename to templates/deprecation.yaml diff --git a/templates/gitea/extra-list.yaml b/templates/extra-list.yaml similarity index 100% rename from templates/gitea/extra-list.yaml rename to templates/extra-list.yaml diff --git a/templates/gitea/gpg-secret.yaml b/templates/gpg-secret.yaml similarity index 100% rename from templates/gitea/gpg-secret.yaml rename to templates/gpg-secret.yaml diff --git a/templates/gitea/http-svc.yaml b/templates/http-svc.yaml similarity index 100% rename from templates/gitea/http-svc.yaml rename to templates/http-svc.yaml diff --git a/templates/gitea/ingress.yaml b/templates/ingress.yaml similarity index 100% rename from templates/gitea/ingress.yaml rename to templates/ingress.yaml diff --git a/templates/gitea/init.yaml b/templates/init.yaml similarity index 100% rename from templates/gitea/init.yaml rename to templates/init.yaml diff --git a/templates/gitea/metrics-secret.yaml b/templates/metrics-secret.yaml similarity index 100% rename from templates/gitea/metrics-secret.yaml rename to templates/metrics-secret.yaml diff --git a/templates/gitea/networkPolicy.yaml b/templates/networkPolicy.yaml similarity index 100% rename from templates/gitea/networkPolicy.yaml rename to templates/networkPolicy.yaml diff --git a/templates/gitea/poddisruptionbudget.yaml b/templates/poddisruptionbudget.yaml similarity index 100% rename from templates/gitea/poddisruptionbudget.yaml rename to templates/poddisruptionbudget.yaml diff --git a/templates/gitea/pvc.yaml b/templates/pvc.yaml similarity index 100% rename from templates/gitea/pvc.yaml rename to templates/pvc.yaml diff --git a/templates/gitea/serviceaccount.yaml b/templates/serviceaccount.yaml similarity index 100% rename from templates/gitea/serviceaccount.yaml rename to templates/serviceaccount.yaml diff --git a/templates/gitea/servicemonitor.yaml b/templates/servicemonitor.yaml similarity index 100% rename from templates/gitea/servicemonitor.yaml rename to templates/servicemonitor.yaml diff --git a/templates/gitea/ssh-svc.yaml b/templates/ssh-svc.yaml similarity index 100% rename from templates/gitea/ssh-svc.yaml rename to templates/ssh-svc.yaml diff --git a/templates/tests/test-http-connection.yaml b/templates/tests/test-http-connection.yaml deleted file mode 100644 index da28ea6..0000000 --- a/templates/tests/test-http-connection.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.test.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "gitea.fullname" . }}-test-connection" - namespace: {{ .Values.namespace | default .Release.Namespace }} - labels: -{{ include "gitea.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: "{{ .Values.test.image.name }}:{{ .Values.test.image.tag }}" - command: ['wget'] - args: ['{{ include "gitea.fullname" . }}-http:{{ .Values.service.http.port }}'] - restartPolicy: Never -{{- end }} diff --git a/unittests/helm/config/actions-config.yaml b/unittests/helm/config/actions-config.yaml index 0b55280..6b0d028 100644 --- a/unittests/helm/config/actions-config.yaml +++ b/unittests/helm/config/actions-config.yaml @@ -3,17 +3,17 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/config.yaml + - templates/config.yaml tests: - it: "actions are enabled by default (based on vanilla Gitea behavior)" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 notExists: path: stringData.actions - it: "actions can be disabled via inline config" - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea.config.actions.ENABLED: false asserts: diff --git a/unittests/helm/config/cache-config.yaml b/unittests/helm/config/cache-config.yaml index 45b2a5b..a79a2f5 100644 --- a/unittests/helm/config/cache-config.yaml +++ b/unittests/helm/config/cache-config.yaml @@ -4,7 +4,7 @@ release: namespace: testing tests: - it: "cache is configured correctly for valkey-cluster" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: true @@ -19,7 +19,7 @@ tests: HOST=redis+cluster://:@gitea-unittests-valkey-cluster-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "cache is configured correctly for valkey" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -34,7 +34,7 @@ tests: HOST=redis://:changeme@gitea-unittests-valkey-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "cache is configured correctly for 'memory' when valkey (or valkey-cluster) is disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -49,7 +49,7 @@ tests: HOST= - it: "cache can be customized when valkey (or valkey-cluster) is disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false diff --git a/unittests/helm/config/metrics-section_metrics-token.yaml b/unittests/helm/config/metrics-section_metrics-token.yaml index b8115a1..2796f35 100644 --- a/unittests/helm/config/metrics-section_metrics-token.yaml +++ b/unittests/helm/config/metrics-section_metrics-token.yaml @@ -4,7 +4,7 @@ release: namespace: testing tests: - it: metrics token is set - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea: metrics: @@ -18,7 +18,7 @@ tests: ENABLED=true TOKEN=somepassword - it: metrics token is empty - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea: metrics: @@ -31,7 +31,7 @@ tests: value: |- ENABLED=true - it: metrics token is nil - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea: metrics: @@ -44,7 +44,7 @@ tests: value: |- ENABLED=true - it: does not configures a token if metrics are disabled - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea: metrics: diff --git a/unittests/helm/config/queue-config.yaml b/unittests/helm/config/queue-config.yaml index 86793f9..b17aa7a 100644 --- a/unittests/helm/config/queue-config.yaml +++ b/unittests/helm/config/queue-config.yaml @@ -4,7 +4,7 @@ release: namespace: testing tests: - it: "queue is configured correctly for valkey-cluster" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: true @@ -19,7 +19,7 @@ tests: TYPE=redis - it: "queue is configured correctly for valkey" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -34,7 +34,7 @@ tests: TYPE=redis - it: "queue is configured correctly for 'levelDB' when valkey (and valkey-cluster) is disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -49,7 +49,7 @@ tests: TYPE=level - it: "queue can be customized when valkey (and valkey-cluster) are disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false diff --git a/unittests/helm/config/server-section_domain.yaml b/unittests/helm/config/server-section_domain.yaml index cf5a3b8..43e436a 100644 --- a/unittests/helm/config/server-section_domain.yaml +++ b/unittests/helm/config/server-section_domain.yaml @@ -4,7 +4,7 @@ release: namespace: testing tests: - it: "[default values] uses ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 matchRegex: @@ -22,7 +22,7 @@ tests: ################################################ - it: "[no ingress hosts] uses gitea http service for DOMAIN|SSH_DOMAIN|ROOT_URL" - template: templates/gitea/config.yaml + template: templates/config.yaml set: ingress: hosts: [] @@ -43,7 +43,7 @@ tests: ################################################ - it: "[provided via values] uses that for DOMAIN|SSH_DOMAIN|ROOT_URL" - template: templates/gitea/config.yaml + template: templates/config.yaml set: gitea.config.server.DOMAIN: provided.example.com ingress: diff --git a/unittests/helm/config/session-config.yaml b/unittests/helm/config/session-config.yaml index 9c50c61..b83e85b 100644 --- a/unittests/helm/config/session-config.yaml +++ b/unittests/helm/config/session-config.yaml @@ -4,7 +4,7 @@ release: namespace: testing tests: - it: "session is configured correctly for valkey-cluster" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: true @@ -19,7 +19,7 @@ tests: PROVIDER_CONFIG=redis+cluster://:@gitea-unittests-valkey-cluster-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "session is configured correctly for valkey" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -34,7 +34,7 @@ tests: PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "session is configured correctly for 'memory' when valkey (and valkey-cluster) is disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false @@ -49,7 +49,7 @@ tests: PROVIDER_CONFIG= - it: "session can be customized when valkey (and valkey-cluster) is disabled" - template: templates/gitea/config.yaml + template: templates/config.yaml set: valkey-cluster: enabled: false diff --git a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml index 9f3358b..e86ceb7 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml @@ -106,14 +106,14 @@ tests: name: gitea-unittests-postgresql-ha-pgpool namespace: testing - it: "[gitea] connects to pgpool service" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 matchRegex: path: stringData.database pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.cluster.local:1234 - it: "[gitea] connects to configured database" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 matchRegex: diff --git a/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml b/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml index a84ddc3..acfddbe 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml @@ -65,14 +65,14 @@ tests: name: gitea-unittests-postgresql namespace: testing - it: "[gitea] connects to postgresql service" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 matchRegex: path: stringData.database pattern: HOST=gitea-unittests-postgresql.testing.svc.cluster.local:1234 - it: "[gitea] connects to configured database" - template: templates/gitea/config.yaml + template: templates/config.yaml asserts: - documentIndex: 0 matchRegex: diff --git a/unittests/helm/dependency-checks/customization-integrity-valkey-cluster.yaml b/unittests/helm/dependency-checks/customization-integrity-valkey-cluster.yaml index 6243a41..ae4cbfe 100644 --- a/unittests/helm/dependency-checks/customization-integrity-valkey-cluster.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-valkey-cluster.yaml @@ -82,7 +82,7 @@ tests: port: 6379 targetPort: tcp-redis - it: "[gitea] waits for valkey-cluster to be up and running" - template: templates/gitea/init.yaml + template: templates/init.yaml asserts: - documentIndex: 0 matchRegex: diff --git a/unittests/helm/dependency-checks/customization-integrity-valkey.yaml b/unittests/helm/dependency-checks/customization-integrity-valkey.yaml index 40c0fc0..70969ef 100644 --- a/unittests/helm/dependency-checks/customization-integrity-valkey.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-valkey.yaml @@ -44,7 +44,7 @@ tests: port: 6379 targetPort: redis - it: "[gitea] waits for valkey to be up and running" - template: templates/gitea/init.yaml + template: templates/init.yaml asserts: - documentIndex: 0 matchRegex: diff --git a/unittests/helm/deployment/HA.yaml b/unittests/helm/deployment/HA.yaml index 3828809..a798f42 100644 --- a/unittests/helm/deployment/HA.yaml +++ b/unittests/helm/deployment/HA.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: fails with multiple replicas and "GIT_GC_REPOS" enabled - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: replicaCount: 2 persistence: @@ -22,14 +22,14 @@ tests: - failedTemplate: errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'gitea.config.cron.GIT_GC_REPOS.enabled = false'." - it: fails with multiple replicas and RWX file system not set - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: replicaCount: 2 asserts: - failedTemplate: errorMessage: "When using multiple replicas, a RWX file system is required and persistence.accessModes[0] must be set to ReadWriteMany." - it: fails with multiple replicas and bleve issue indexer - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: replicaCount: 2 persistence: @@ -43,7 +43,7 @@ tests: - failedTemplate: errorMessage: "When using multiple replicas, the issue indexer (gitea.config.indexer.ISSUE_INDEXER_TYPE) must be set to a HA-ready provider such as 'meilisearch', 'elasticsearch' or 'db' (if the DB is HA-ready)." - it: fails with multiple replicas and bleve repo indexer - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: replicaCount: 2 persistence: diff --git a/unittests/helm/deployment/basic.yaml b/unittests/helm/deployment/basic.yaml index bc77ed7..9a60007 100644 --- a/unittests/helm/deployment/basic.yaml +++ b/unittests/helm/deployment/basic.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: renders a deployment - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - hasDocuments: count: 1 @@ -16,7 +16,7 @@ tests: apiVersion: apps/v1 name: gitea-unittests - it: deployment labels are set - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: deployment.labels: hello: world @@ -30,7 +30,7 @@ tests: content: hello: world - it: "injects TMP_EXISTING_ENVS_FILE as environment variable to 'init-app-ini' init container" - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.initContainers[1].env @@ -38,7 +38,7 @@ tests: name: TMP_EXISTING_ENVS_FILE value: /tmp/existing-envs - it: "injects ENV_TO_INI_MOUNT_POINT as environment variable to 'init-app-ini' init container" - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.initContainers[1].env @@ -46,7 +46,7 @@ tests: name: ENV_TO_INI_MOUNT_POINT value: /env-to-ini-mounts - it: CPU resources are defined as well as GOMAXPROCS - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: resources: limits: @@ -74,7 +74,7 @@ tests: cpu: 100ms memory: 100Mi - it: Init containers have correct volumeMount path - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: initContainersScriptsVolumeMountPath: "/custom/init/path" asserts: @@ -85,7 +85,7 @@ tests: path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath value: "/custom/init/path" - it: Init containers have correct volumeMount path if there is no override - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="init")].mountPath diff --git a/unittests/helm/deployment/deployment-additional-config.yaml b/unittests/helm/deployment/deployment-additional-config.yaml index fdcf056..cc5a852 100644 --- a/unittests/helm/deployment/deployment-additional-config.yaml +++ b/unittests/helm/deployment/deployment-additional-config.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: Renders a deployment - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - hasDocuments: count: 1 @@ -16,7 +16,7 @@ tests: apiVersion: apps/v1 name: gitea-unittests - it: Deployment with empty additionalConfigFromEnvs - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea.additionalConfigFromEnvs: [] asserts: @@ -44,7 +44,7 @@ tests: - name: ENV_TO_INI_MOUNT_POINT value: /env-to-ini-mounts - it: Deployment with standard additionalConfigFromEnvs - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea.additionalConfigFromEnvs: [{name: GITEA_database_HOST, value: my-db:123}, {name: GITEA_database_USER, value: my-user}] asserts: @@ -76,7 +76,7 @@ tests: - name: GITEA_database_USER value: my-user - it: Deployment with templated additionalConfigFromEnvs - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea.misc.host: my-db-host:321 gitea.misc.user: my-db-user @@ -110,7 +110,7 @@ tests: - name: GITEA_database_USER value: my-db-user - it: Deployment with additionalConfigFromEnvs templated secret name - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea.misc.existingSecret: my-db-secret gitea.additionalConfigFromEnvs[0]: diff --git a/unittests/helm/deployment/extraInitContainers.yaml b/unittests/helm/deployment/extraInitContainers.yaml index a78b7db..2654871 100644 --- a/unittests/helm/deployment/extraInitContainers.yaml +++ b/unittests/helm/deployment/extraInitContainers.yaml @@ -3,18 +3,18 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: Render the deployment (default) asserts: - hasDocuments: count: 1 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - lengthEqual: path: spec.template.spec.initContainers count: 3 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - it: Render the deployment (signing) set: @@ -22,11 +22,11 @@ tests: asserts: - hasDocuments: count: 1 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - lengthEqual: path: spec.template.spec.initContainers count: 4 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - it: Render the deployment (extraInitContainers) set: @@ -40,20 +40,20 @@ tests: asserts: - hasDocuments: count: 1 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - lengthEqual: path: spec.template.spec.initContainers count: 6 - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.initContainers content: name: foo image: docker.io/library/busybox:latest - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.initContainers content: name: bar image: docker.io/library/busybox:latest - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml diff --git a/unittests/helm/deployment/image-configuration.yaml b/unittests/helm/deployment/image-configuration.yaml index 4a09a26..536fc3f 100644 --- a/unittests/helm/deployment/image-configuration.yaml +++ b/unittests/helm/deployment/image-configuration.yaml @@ -6,17 +6,17 @@ chart: # Override appVersion to be consistent with used digest :) appVersion: 1.19.3 templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: default values - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.3-rootless" - it: tag override - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.tag: "1.19.4" asserts: @@ -24,7 +24,7 @@ tests: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.4-rootless" - it: root-based image - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.rootless: false asserts: @@ -32,7 +32,7 @@ tests: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.3" - it: scoped registry - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.registry: "example.com" asserts: @@ -40,7 +40,7 @@ tests: path: spec.template.spec.containers[0].image value: "example.com/gitea:1.19.3-rootless" - it: global registry - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: global.imageRegistry: "global.example.com" asserts: @@ -48,7 +48,7 @@ tests: path: spec.template.spec.containers[0].image value: "global.example.com/gitea:1.19.3-rootless" - it: digest for rootless image - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image: rootless: true @@ -58,7 +58,7 @@ tests: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: image fullOverride (does not append rootless) - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image: fullOverride: docker.gitea.com/gitea:1.19.3 @@ -73,7 +73,7 @@ tests: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.3" - it: digest for root-based image - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image: rootless: false @@ -83,7 +83,7 @@ tests: path: spec.template.spec.containers[0].image value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: digest and global registry - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: global.imageRegistry: "global.example.com" image.digest: "sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" @@ -92,7 +92,7 @@ tests: path: spec.template.spec.containers[0].image value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" - it: correctly renders floating tag references - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.tag: 1.21 # use non-quoted value on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631 asserts: diff --git a/unittests/helm/deployment/ingress-configuration.yaml b/unittests/helm/deployment/ingress-configuration.yaml index 5136c1c..0d790ee 100644 --- a/unittests/helm/deployment/ingress-configuration.yaml +++ b/unittests/helm/deployment/ingress-configuration.yaml @@ -1,6 +1,6 @@ suite: Test ingress tpl use templates: - - templates/gitea/ingress.yaml + - templates/ingress.yaml tests: - it: Ingress Class using TPL set: diff --git a/unittests/helm/deployment/inline-config.yaml b/unittests/helm/deployment/inline-config.yaml index 545bb36..722a888 100644 --- a/unittests/helm/deployment/inline-config.yaml +++ b/unittests/helm/deployment/inline-config.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/config.yaml + - templates/config.yaml tests: - it: inline config stringData.server using TPL set: diff --git a/unittests/helm/deployment/probes.yaml b/unittests/helm/deployment/probes.yaml index 259f3bf..ab7846b 100644 --- a/unittests/helm/deployment/probes.yaml +++ b/unittests/helm/deployment/probes.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: renders default liveness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].livenessProbe.enabled @@ -22,7 +22,7 @@ tests: port: http timeoutSeconds: 1 - it: renders default readiness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].readinessProbe.enabled @@ -37,12 +37,12 @@ tests: port: http timeoutSeconds: 1 - it: does not render a default startup probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].startupProbe - it: allows enabling a startup probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea.startupProbe.enabled: true asserts: @@ -60,7 +60,7 @@ tests: timeoutSeconds: 1 - it: allows overwriting the default port of the liveness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: livenessProbe: @@ -74,7 +74,7 @@ tests: port: my-port - it: allows overwriting the default port of the readiness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: readinessProbe: @@ -88,7 +88,7 @@ tests: port: my-port - it: allows overwriting the default port of the startup probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: startupProbe: @@ -103,7 +103,7 @@ tests: port: my-port - it: allows using a non-default method as liveness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: livenessProbe: @@ -131,7 +131,7 @@ tests: timeoutSeconds: 13372 - it: allows using a non-default method as readiness probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: readinessProbe: @@ -159,7 +159,7 @@ tests: timeoutSeconds: 13372 - it: allows using a non-default method as startup probe - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: gitea: startupProbe: diff --git a/unittests/helm/deployment/sidecar-container.yaml b/unittests/helm/deployment/sidecar-container.yaml index e41e193..754126d 100644 --- a/unittests/helm/deployment/sidecar-container.yaml +++ b/unittests/helm/deployment/sidecar-container.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: supports adding a sidecar container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: extraContainers: - name: sidecar-bob diff --git a/unittests/helm/deployment/signing-disabled.yaml b/unittests/helm/deployment/signing-disabled.yaml index 9e4519a..93f6345 100644 --- a/unittests/helm/deployment/signing-disabled.yaml +++ b/unittests/helm/deployment/signing-disabled.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: skips gpg init container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notContains: path: spec.template.spec.initContainers @@ -15,7 +15,7 @@ tests: content: name: configure-gpg - it: skips gpg env in `init-directories` init container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing.enabled: false asserts: @@ -25,14 +25,14 @@ tests: name: GNUPGHOME value: /data/git/.gnupg - it: skips gpg env in runtime container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notContains: path: spec.template.spec.containers[0].env content: name: GNUPGHOME - it: skips gpg volume spec - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notContains: path: spec.template.spec.volumes diff --git a/unittests/helm/deployment/signing-enabled.yaml b/unittests/helm/deployment/signing-enabled.yaml index 47a05e7..a70b19c 100644 --- a/unittests/helm/deployment/signing-enabled.yaml +++ b/unittests/helm/deployment/signing-enabled.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: adds gpg init container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing: enabled: true @@ -41,7 +41,7 @@ tests: mountPath: /raw readOnly: true - it: adds gpg env in `init-directories` init container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing.enabled: true signing.existingSecret: "custom-gpg-secret" @@ -52,7 +52,7 @@ tests: name: GNUPGHOME value: /data/git/.gnupg - it: adds gpg env in runtime container - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing.enabled: true signing.existingSecret: "custom-gpg-secret" @@ -63,7 +63,7 @@ tests: name: GNUPGHOME value: /data/git/.gnupg - it: adds gpg volume spec - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing: enabled: true @@ -80,7 +80,7 @@ tests: path: private.asc defaultMode: 0100 - it: supports gpg volume spec with external reference - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: signing: enabled: true diff --git a/unittests/helm/deployment/ssh-configuration.yaml b/unittests/helm/deployment/ssh-configuration.yaml index a2fa073..d1413d3 100644 --- a/unittests/helm/deployment/ssh-configuration.yaml +++ b/unittests/helm/deployment/ssh-configuration.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: supports defining SSH log level for root based image - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.rootless: false asserts: @@ -17,7 +17,7 @@ tests: name: SSH_LOG_LEVEL value: "INFO" - it: supports overriding SSH log level - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.rootless: false gitea.ssh.logLevel: "DEBUG" @@ -28,7 +28,7 @@ tests: name: SSH_LOG_LEVEL value: "DEBUG" - it: supports overriding SSH log level (even when image.fullOverride set) - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.fullOverride: docker.gitea.com/gitea:1.19.3 image.rootless: false @@ -40,7 +40,7 @@ tests: name: SSH_LOG_LEVEL value: "DEBUG" - it: skips SSH_LOG_LEVEL for rootless image - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.rootless: true gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here @@ -51,7 +51,7 @@ tests: content: name: SSH_LOG_LEVEL - it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set) - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: image.fullOverride: docker.gitea.com/gitea:1.19.3 image.rootless: true diff --git a/unittests/helm/deployment/storage-class-configuration.yaml b/unittests/helm/deployment/storage-class-configuration.yaml index abad587..c0afdbc 100644 --- a/unittests/helm/deployment/storage-class-configuration.yaml +++ b/unittests/helm/deployment/storage-class-configuration.yaml @@ -7,11 +7,11 @@ release: namespace: testing templates: - - templates/gitea/pvc.yaml + - templates/pvc.yaml tests: - it: should set storageClassName when persistence.storageClass is defined - template: templates/gitea/pvc.yaml + template: templates/pvc.yaml set: persistence.storageClass: "my-storage-class" asserts: @@ -20,7 +20,7 @@ tests: value: "my-storage-class" - it: should set global.storageClass when persistence.storageClass is not defined - template: templates/gitea/pvc.yaml + template: templates/pvc.yaml set: global.storageClass: "default-storage-class" asserts: @@ -29,7 +29,7 @@ tests: value: "default-storage-class" - it: should set storageClassName when persistence.storageClass is defined and global.storageClass is defined - template: templates/gitea/pvc.yaml + template: templates/pvc.yaml set: global.storageClass: "default-storage-class" persistence.storageClass: "my-storage-class" diff --git a/unittests/helm/deployment/svc-configuration.yaml b/unittests/helm/deployment/svc-configuration.yaml index 24059ea..5d2cc6a 100644 --- a/unittests/helm/deployment/svc-configuration.yaml +++ b/unittests/helm/deployment/svc-configuration.yaml @@ -3,11 +3,11 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/ssh-svc.yaml - - templates/gitea/http-svc.yaml + - templates/ssh-svc.yaml + - templates/http-svc.yaml tests: - it: supports adding custom labels to ssh-svc - template: templates/gitea/ssh-svc.yaml + template: templates/ssh-svc.yaml set: service: ssh: @@ -19,7 +19,7 @@ tests: value: "testvalue" - it: keeps existing labels (ssh) - template: templates/gitea/ssh-svc.yaml + template: templates/ssh-svc.yaml set: service: ssh: @@ -29,7 +29,7 @@ tests: path: metadata.labels["app"] - it: supports adding custom labels to http-svc - template: templates/gitea/http-svc.yaml + template: templates/http-svc.yaml set: service: http: @@ -41,7 +41,7 @@ tests: value: "testvalue" - it: keeps existing labels (http) - template: templates/gitea/http-svc.yaml + template: templates/http-svc.yaml set: service: http: @@ -51,7 +51,7 @@ tests: path: metadata.labels["app"] - it: render service.ssh.loadBalancerClass if set and type is LoadBalancer - template: templates/gitea/ssh-svc.yaml + template: templates/ssh-svc.yaml set: service: ssh: @@ -73,7 +73,7 @@ tests: value: ["1.2.3.4/32", "5.6.7.8/32"] - it: does not render when loadbalancer properties are set but type is not loadBalancerClass - template: templates/gitea/http-svc.yaml + template: templates/http-svc.yaml set: service: http: @@ -92,7 +92,7 @@ tests: path: spec.loadBalancerSourceRanges - it: does not render loadBalancerClass by default even when type is LoadBalancer - template: templates/gitea/http-svc.yaml + template: templates/http-svc.yaml set: service: http: @@ -107,8 +107,8 @@ tests: - it: both ssh and http services exist templates: - - templates/gitea/ssh-svc.yaml - - templates/gitea/http-svc.yaml + - templates/ssh-svc.yaml + - templates/http-svc.yaml asserts: - matchRegex: path: metadata.name diff --git a/unittests/helm/gpg-secret/signing-disabled.yaml b/unittests/helm/gpg-secret/signing-disabled.yaml index 3b1aba4..117c9f9 100644 --- a/unittests/helm/gpg-secret/signing-disabled.yaml +++ b/unittests/helm/gpg-secret/signing-disabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/gpg-secret.yaml + - templates/gpg-secret.yaml tests: - it: renders nothing set: diff --git a/unittests/helm/gpg-secret/signing-enabled.yaml b/unittests/helm/gpg-secret/signing-enabled.yaml index 8fcab68..2819d08 100644 --- a/unittests/helm/gpg-secret/signing-enabled.yaml +++ b/unittests/helm/gpg-secret/signing-enabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/gpg-secret.yaml + - templates/gpg-secret.yaml tests: - it: fails rendering when nothing is configured set: diff --git a/unittests/helm/ingress/basic.yaml b/unittests/helm/ingress/basic.yaml index 733e557..635c809 100644 --- a/unittests/helm/ingress/basic.yaml +++ b/unittests/helm/ingress/basic.yaml @@ -1,6 +1,6 @@ suite: Test ingress.yaml templates: - - templates/gitea/ingress.yaml + - templates/ingress.yaml tests: - it: should enable ingress when ingress.enabled is true set: diff --git a/unittests/helm/ingress/implicit-defaults.yaml b/unittests/helm/ingress/implicit-defaults.yaml index 2337286..492ad10 100644 --- a/unittests/helm/ingress/implicit-defaults.yaml +++ b/unittests/helm/ingress/implicit-defaults.yaml @@ -1,6 +1,6 @@ suite: Test ingress with implicit path defaults templates: - - templates/gitea/ingress.yaml + - templates/ingress.yaml tests: - it: should use default path and pathType when no paths are specified set: diff --git a/unittests/helm/ingress/ingress.tpl.yaml b/unittests/helm/ingress/ingress.tpl.yaml index 5136c1c..0d790ee 100644 --- a/unittests/helm/ingress/ingress.tpl.yaml +++ b/unittests/helm/ingress/ingress.tpl.yaml @@ -1,6 +1,6 @@ suite: Test ingress tpl use templates: - - templates/gitea/ingress.yaml + - templates/ingress.yaml tests: - it: Ingress Class using TPL set: diff --git a/unittests/helm/ingress/structured-paths.yaml b/unittests/helm/ingress/structured-paths.yaml index 3183ac7..26c6a77 100644 --- a/unittests/helm/ingress/structured-paths.yaml +++ b/unittests/helm/ingress/structured-paths.yaml @@ -1,6 +1,6 @@ suite: Test ingress with structured paths templates: - - templates/gitea/ingress.yaml + - templates/ingress.yaml tests: - it: should work with structured path definitions set: diff --git a/unittests/helm/init/basic.yaml b/unittests/helm/init/basic.yaml index 25027f5..8b18314 100644 --- a/unittests/helm/init/basic.yaml +++ b/unittests/helm/init/basic.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/init.yaml + - templates/init.yaml tests: - it: renders a secret asserts: diff --git a/unittests/helm/init/init_directory_structure.sh-rootless.yaml b/unittests/helm/init/init_directory_structure.sh-rootless.yaml index a215bd6..49a7128 100644 --- a/unittests/helm/init/init_directory_structure.sh-rootless.yaml +++ b/unittests/helm/init/init_directory_structure.sh-rootless.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/init.yaml + - templates/init.yaml tests: - it: runs gpg in batch mode set: @@ -63,7 +63,7 @@ tests: chown -v 1000:1000 "${GNUPGHOME}" fi - it: it does not chown /data even when image.fullOverride is set - template: templates/gitea/init.yaml + template: templates/init.yaml set: image.fullOverride: docker.gitea.com/gitea:1.20.5 asserts: diff --git a/unittests/helm/init/init_directory_structure.sh.yaml b/unittests/helm/init/init_directory_structure.sh.yaml index bdd6b8a..c88b51e 100644 --- a/unittests/helm/init/init_directory_structure.sh.yaml +++ b/unittests/helm/init/init_directory_structure.sh.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/init.yaml + - templates/init.yaml tests: - it: runs gpg in batch mode set: diff --git a/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml b/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml index e3776ca..4ee7dc0 100644 --- a/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml +++ b/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/metrics-secret.yaml + - templates/metrics-secret.yaml tests: - it: renders nothing if monitoring disabled and gitea.metrics.token empty set: diff --git a/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml b/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml index 78e714a..1f16676 100644 --- a/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml +++ b/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/metrics-secret.yaml + - templates/metrics-secret.yaml tests: - it: renders nothing if monitoring enabled and gitea.metrics.token empty set: diff --git a/unittests/helm/networkPolicy/networkPolicy.yaml b/unittests/helm/networkPolicy/networkPolicy.yaml index e1624bf..9558034 100644 --- a/unittests/helm/networkPolicy/networkPolicy.yaml +++ b/unittests/helm/networkPolicy/networkPolicy.yaml @@ -6,7 +6,7 @@ release: name: gitea-unittest namespace: testing templates: - - templates/gitea/networkPolicy.yaml + - templates/networkPolicy.yaml tests: - it: Skip rendering networkPolicy set: diff --git a/unittests/helm/pvc/pvc-configuration.yaml b/unittests/helm/pvc/pvc-configuration.yaml index 3431000..9dd7aec 100644 --- a/unittests/helm/pvc/pvc-configuration.yaml +++ b/unittests/helm/pvc/pvc-configuration.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/pvc.yaml + - templates/pvc.yaml tests: - it: Storage Class using TPL set: diff --git a/unittests/helm/serviceaccount/basic.yaml b/unittests/helm/serviceaccount/basic.yaml index 73d8e1e..143bedf 100644 --- a/unittests/helm/serviceaccount/basic.yaml +++ b/unittests/helm/serviceaccount/basic.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/serviceaccount.yaml + - templates/serviceaccount.yaml tests: - it: skips rendering by default asserts: diff --git a/unittests/helm/serviceaccount/reference.yaml b/unittests/helm/serviceaccount/reference.yaml index 25faa03..87cd7b2 100644 --- a/unittests/helm/serviceaccount/reference.yaml +++ b/unittests/helm/serviceaccount/reference.yaml @@ -3,17 +3,17 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/serviceaccount.yaml - - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/serviceaccount.yaml + - templates/deployment.yaml + - templates/config.yaml tests: - it: does not modify the deployment by default - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml asserts: - notExists: path: spec.serviceAccountName - it: adds the reference to the deployment with serviceAccount.create=true - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: serviceAccount.create: true asserts: @@ -21,7 +21,7 @@ tests: path: spec.template.spec.serviceAccountName value: gitea-unittests - it: allows referencing an externally created ServiceAccount to the deployment - template: templates/gitea/deployment.yaml + template: templates/deployment.yaml set: serviceAccount: create: false # explicitly set to define rendering behavior diff --git a/unittests/helm/servicemonitor/basic.yaml b/unittests/helm/servicemonitor/basic.yaml index f5d0091..b224a36 100644 --- a/unittests/helm/servicemonitor/basic.yaml +++ b/unittests/helm/servicemonitor/basic.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/servicemonitor.yaml + - templates/servicemonitor.yaml tests: - it: skips rendering by default asserts: diff --git a/unittests/helm/servicemonitor/servicemonitor-disabled.yaml b/unittests/helm/servicemonitor/servicemonitor-disabled.yaml index 5b2de44..808b01d 100644 --- a/unittests/helm/servicemonitor/servicemonitor-disabled.yaml +++ b/unittests/helm/servicemonitor/servicemonitor-disabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/servicemonitor.yaml + - templates/servicemonitor.yaml tests: - it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token empty set: diff --git a/unittests/helm/servicemonitor/servicemonitor-enabled.yaml b/unittests/helm/servicemonitor/servicemonitor-enabled.yaml index 29d83ca..bfd8e66 100644 --- a/unittests/helm/servicemonitor/servicemonitor-enabled.yaml +++ b/unittests/helm/servicemonitor/servicemonitor-enabled.yaml @@ -3,7 +3,7 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/servicemonitor.yaml + - templates/servicemonitor.yaml tests: - it: renders unsecure ServiceMonitor if gitea.metrics.token nil set: