diff --git a/templates/gitea/deployment.yaml b/templates/gitea/deployment.yaml index 14e82ac..1d8106c 100644 --- a/templates/gitea/deployment.yaml +++ b/templates/gitea/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 "/gitea/secret_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/pvc.yaml b/templates/gitea/persistentVolumeClaim.yaml similarity index 100% rename from templates/gitea/pvc.yaml rename to templates/gitea/persistentVolumeClaim.yaml diff --git a/templates/gitea/poddisruptionbudget.yaml b/templates/gitea/podDisruptionBudget.yaml similarity index 100% rename from templates/gitea/poddisruptionbudget.yaml rename to templates/gitea/podDisruptionBudget.yaml diff --git a/templates/gitea/config.yaml b/templates/gitea/secret_config.yaml similarity index 87% rename from templates/gitea/config.yaml rename to templates/gitea/secret_config.yaml index b5d0dd6..50dd4ea 100644 --- a/templates/gitea/config.yaml +++ b/templates/gitea/secret_config.yaml @@ -1,13 +1,3 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "gitea.fullname" . }}-inline-config - namespace: {{ .Values.namespace | default .Release.Namespace }} - labels: - {{- include "gitea.labels" . | nindent 4 }} -type: Opaque -stringData: - {{- include "gitea.inline_configuration" . | nindent 2 }} --- apiVersion: v1 kind: Secret @@ -25,7 +15,7 @@ stringData: {{- if and (.Values.postgresql.enabled) (index .Values "postgresql-ha" "enabled") -}} {{- fail "Only one of postgresql or postgresql-ha can be enabled at the same time." -}} {{- end }} - + {{- /* multiple replicas assertions */ -}} {{- if gt (.Values.replicaCount | int) 1 -}} {{- if .Values.gitea.config.cron -}} @@ -35,7 +25,7 @@ stringData: {{- end }} {{- end }} {{- end }} - + {{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}} {{- fail "When using multiple replicas, a RWX file system is required and persistence.accessModes[0] must be set to ReadWriteMany." -}} {{- end }} @@ -53,5 +43,5 @@ stringData: {{- end }} {{- end }} {{- end }} - + {{- end }} diff --git a/templates/gitea/gpg-secret.yaml b/templates/gitea/secret_gpg.yaml similarity index 100% rename from templates/gitea/gpg-secret.yaml rename to templates/gitea/secret_gpg.yaml diff --git a/templates/gitea/init.yaml b/templates/gitea/secret_init.yaml similarity index 100% rename from templates/gitea/init.yaml rename to templates/gitea/secret_init.yaml diff --git a/templates/gitea/secret_inlineConfig.yaml b/templates/gitea/secret_inlineConfig.yaml new file mode 100644 index 0000000..fad7b7c --- /dev/null +++ b/templates/gitea/secret_inlineConfig.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "gitea.fullname" . }}-inline-config + namespace: {{ .Values.namespace | default .Release.Namespace }} + labels: + {{- include "gitea.labels" . | nindent 4 }} +type: Opaque +stringData: + {{- include "gitea.inline_configuration" . | nindent 2 }} \ No newline at end of file diff --git a/templates/gitea/metrics-secret.yaml b/templates/gitea/secret_metrics.yaml similarity index 100% rename from templates/gitea/metrics-secret.yaml rename to templates/gitea/secret_metrics.yaml diff --git a/templates/gitea/serviceaccount.yaml b/templates/gitea/serviceAccount.yaml similarity index 100% rename from templates/gitea/serviceaccount.yaml rename to templates/gitea/serviceAccount.yaml diff --git a/templates/gitea/servicemonitor.yaml b/templates/gitea/serviceMonitor.yaml similarity index 100% rename from templates/gitea/servicemonitor.yaml rename to templates/gitea/serviceMonitor.yaml diff --git a/templates/gitea/httpService.yaml b/templates/gitea/service_http.yaml similarity index 100% rename from templates/gitea/httpService.yaml rename to templates/gitea/service_http.yaml diff --git a/templates/gitea/sshService.yaml b/templates/gitea/service_ssh.yaml similarity index 100% rename from templates/gitea/sshService.yaml rename to templates/gitea/service_ssh.yaml diff --git a/unittests/helm/config/actions-config.yaml b/unittests/helm/config/actions-config.yaml index 0b55280..6101ef4 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/gitea/secret_inlineConfig.yaml tests: - it: "actions are enabled by default (based on vanilla Gitea behavior)" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml asserts: - documentIndex: 0 notExists: path: stringData.actions - it: "actions can be disabled via inline config" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.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 2bb0bae..79a8d85 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" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: true @@ -17,7 +17,7 @@ tests: HOST=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "cache is configured correctly for 'memory' when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: false @@ -30,7 +30,7 @@ tests: HOST= - it: "cache can be customized when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: false diff --git a/unittests/helm/config/config-environment-script.yaml b/unittests/helm/config/config-environment-script.yaml index dbceb85..49446b3 100644 --- a/unittests/helm/config/config-environment-script.yaml +++ b/unittests/helm/config/config-environment-script.yaml @@ -3,12 +3,12 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: uses `gitea config edit-ini` to write app.ini from environment variables - template: templates/gitea/config.yaml + template: templates/gitea/secret_config.yaml asserts: - - documentIndex: 1 + - documentIndex: 0 matchRegex: path: stringData["config_environment.sh"] pattern: 'gitea config edit-ini --apply-env --config .+GITEA_APP_INI.+ --out .+GITEA_APP_INI' diff --git a/unittests/helm/config/metrics-section_metrics-token.yaml b/unittests/helm/config/metrics-section_metrics-token.yaml index b8115a1..f530fb5 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/gitea/secret_inlineConfig.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/gitea/secret_inlineConfig.yaml set: gitea: metrics: @@ -31,7 +31,7 @@ tests: value: |- ENABLED=true - it: metrics token is nil - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.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/gitea/secret_inlineConfig.yaml set: gitea: metrics: diff --git a/unittests/helm/config/queue-config.yaml b/unittests/helm/config/queue-config.yaml index 698716a..8175955 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" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: true @@ -17,7 +17,7 @@ tests: TYPE=redis - it: "queue is configured correctly for 'levelDB' when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: false @@ -30,7 +30,7 @@ tests: TYPE=level - it: "queue can be customized when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: false diff --git a/unittests/helm/config/server-section_domain.yaml b/unittests/helm/config/server-section_domain.yaml index cbd95db..f177deb 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/gitea/secret_inlineConfig.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/gitea/secret_inlineConfig.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/gitea/secret_inlineConfig.yaml set: gitea.config.server.DOMAIN: provided.example.com ingress: @@ -69,7 +69,7 @@ tests: ################################################ - it: "[route enabled] uses route host for DOMAIN|SSH_DOMAIN|ROOT_URL" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: route: enabled: true @@ -91,7 +91,7 @@ tests: ################################################ - it: "[route tls termination] uses https for ROOT_URL" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: route: enabled: true @@ -107,7 +107,7 @@ tests: ################################################ - it: "[HTTPRoute enabled] uses first hostname for DOMAIN|SSH_DOMAIN|ROOT_URL" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: ingress: hosts: [] @@ -137,7 +137,7 @@ tests: ################################################ - it: "[HTTPRoute tls] switches ROOT_URL to https" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: ingress: hosts: [] diff --git a/unittests/helm/config/session-config.yaml b/unittests/helm/config/session-config.yaml index 9028483..a08ed86 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" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: true @@ -17,7 +17,7 @@ tests: PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& - it: "session is configured correctly for 'memory' when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: enabled: false @@ -30,7 +30,7 @@ tests: PROVIDER_CONFIG= - it: "session can be customized when valkey is disabled" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml set: valkey: 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 405a9dc..21f93bf 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml @@ -106,7 +106,7 @@ tests: name: gitea-unittests-postgresql-ha-pgpool namespace: testing - it: "[gitea] connects to pgpool service" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml asserts: - documentIndex: 0 matchRegex: @@ -115,14 +115,14 @@ tests: - it: "[gitea] connects to pgpool service with custom cluster domain" set: clusterDomain: my-special-cluster.local - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml asserts: - documentIndex: 0 matchRegex: path: stringData.database pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234 - it: "[gitea] connects to configured database" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.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 ba26bad..4ffdab7 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml @@ -65,7 +65,7 @@ tests: name: gitea-unittests-postgresql namespace: testing - it: "[gitea] connects to postgresql service" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml asserts: - documentIndex: 0 matchRegex: @@ -74,14 +74,14 @@ tests: - it: "[gitea] connects to postgresql service with custom cluster domain" set: clusterDomain: my-special-cluster.local - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.yaml asserts: - documentIndex: 0 matchRegex: path: stringData.database pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234 - it: "[gitea] connects to configured database" - template: templates/gitea/config.yaml + template: templates/gitea/secret_inlineConfig.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 2e32e55..ff2c1a7 100644 --- a/unittests/helm/dependency-checks/customization-integrity-valkey.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-valkey.yaml @@ -35,7 +35,7 @@ tests: targetPort: tcp protocol: TCP - it: "[gitea] waits for valkey to be up and running" - template: templates/gitea/init.yaml + template: templates/gitea/secret_init.yaml asserts: - documentIndex: 0 matchRegex: @@ -44,7 +44,7 @@ tests: - it: "[gitea] waits for valkey to be up and running with custom cluster domain" set: clusterDomain: my-special-cluster.local - template: templates/gitea/init.yaml + template: templates/gitea/secret_init.yaml asserts: - documentIndex: 0 matchRegex: diff --git a/unittests/helm/deployment/HA.yaml b/unittests/helm/deployment/HA.yaml index 3828809..3c8be6a 100644 --- a/unittests/helm/deployment/HA.yaml +++ b/unittests/helm/deployment/HA.yaml @@ -4,10 +4,10 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: fails with multiple replicas and "GIT_GC_REPOS" enabled - template: templates/gitea/deployment.yaml + template: templates/gitea/secret_config.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/gitea/secret_config.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/gitea/secret_config.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/gitea/secret_config.yaml set: replicaCount: 2 persistence: diff --git a/unittests/helm/deployment/basic.yaml b/unittests/helm/deployment/basic.yaml index 003cf2e..3bf9197 100644 --- a/unittests/helm/deployment/basic.yaml +++ b/unittests/helm/deployment/basic.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: renders a deployment template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/deployment-additional-config.yaml b/unittests/helm/deployment/deployment-additional-config.yaml index fdcf056..36d4adb 100644 --- a/unittests/helm/deployment/deployment-additional-config.yaml +++ b/unittests/helm/deployment/deployment-additional-config.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: Renders a deployment template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/extraEnvSourceFile.yaml b/unittests/helm/deployment/extraEnvSourceFile.yaml index 57969e7..b7b17ee 100644 --- a/unittests/helm/deployment/extraEnvSourceFile.yaml +++ b/unittests/helm/deployment/extraEnvSourceFile.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: uses direct execution when extraEnvSourceFile is not set template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/extraInitContainers.yaml b/unittests/helm/deployment/extraInitContainers.yaml index a78b7db..ca31cf4 100644 --- a/unittests/helm/deployment/extraInitContainers.yaml +++ b/unittests/helm/deployment/extraInitContainers.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: Render the deployment (default) asserts: diff --git a/unittests/helm/deployment/image-configuration.yaml b/unittests/helm/deployment/image-configuration.yaml index 4a09a26..4987dc2 100644 --- a/unittests/helm/deployment/image-configuration.yaml +++ b/unittests/helm/deployment/image-configuration.yaml @@ -7,7 +7,7 @@ chart: appVersion: 1.19.3 templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: default values template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/inline-config.yaml b/unittests/helm/deployment/inline-config.yaml index 545bb36..59795e2 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/gitea/secret_inlineConfig.yaml tests: - it: inline config stringData.server using TPL set: diff --git a/unittests/helm/deployment/openshift.yaml b/unittests/helm/deployment/openshift.yaml index 655a859..555d580 100644 --- a/unittests/helm/deployment/openshift.yaml +++ b/unittests/helm/deployment/openshift.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: renders openshift-compatible defaults for chart-managed containers template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/probes.yaml b/unittests/helm/deployment/probes.yaml index 259f3bf..2b1b11e 100644 --- a/unittests/helm/deployment/probes.yaml +++ b/unittests/helm/deployment/probes.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: renders default liveness probe template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/sidecar-container.yaml b/unittests/helm/deployment/sidecar-container.yaml index e41e193..4ab81b2 100644 --- a/unittests/helm/deployment/sidecar-container.yaml +++ b/unittests/helm/deployment/sidecar-container.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: supports adding a sidecar container template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/signing-disabled.yaml b/unittests/helm/deployment/signing-disabled.yaml index 9e4519a..47af91f 100644 --- a/unittests/helm/deployment/signing-disabled.yaml +++ b/unittests/helm/deployment/signing-disabled.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: skips gpg init container template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/signing-enabled.yaml b/unittests/helm/deployment/signing-enabled.yaml index 47a05e7..4adf0be 100644 --- a/unittests/helm/deployment/signing-enabled.yaml +++ b/unittests/helm/deployment/signing-enabled.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: adds gpg init container template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/ssh-configuration.yaml b/unittests/helm/deployment/ssh-configuration.yaml index a2fa073..9d2e958 100644 --- a/unittests/helm/deployment/ssh-configuration.yaml +++ b/unittests/helm/deployment/ssh-configuration.yaml @@ -4,7 +4,7 @@ release: namespace: testing templates: - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: supports defining SSH log level for root based image template: templates/gitea/deployment.yaml diff --git a/unittests/helm/deployment/storage-class-configuration.yaml b/unittests/helm/deployment/storage-class-configuration.yaml index abad587..42a64a0 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/gitea/persistentVolumeClaim.yaml tests: - it: should set storageClassName when persistence.storageClass is defined - template: templates/gitea/pvc.yaml + template: templates/gitea/persistentVolumeClaim.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/gitea/persistentVolumeClaim.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/gitea/persistentVolumeClaim.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 05d8767..b76be08 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/sshService.yaml - - templates/gitea/httpService.yaml + - templates/gitea/service_ssh.yaml + - templates/gitea/service_http.yaml tests: - it: supports adding custom labels to sshService - template: templates/gitea/sshService.yaml + template: templates/gitea/service_ssh.yaml set: service: ssh: @@ -19,7 +19,7 @@ tests: value: "testvalue" - it: keeps existing labels (ssh) - template: templates/gitea/sshService.yaml + template: templates/gitea/service_ssh.yaml set: service: ssh: @@ -29,7 +29,7 @@ tests: path: metadata.labels["app"] - it: supports adding custom labels to httpService - template: templates/gitea/httpService.yaml + template: templates/gitea/service_http.yaml set: service: http: @@ -41,7 +41,7 @@ tests: value: "testvalue" - it: keeps existing labels (http) - template: templates/gitea/httpService.yaml + template: templates/gitea/service_http.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/sshService.yaml + template: templates/gitea/service_ssh.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/httpService.yaml + template: templates/gitea/service_http.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/httpService.yaml + template: templates/gitea/service_http.yaml set: service: http: @@ -107,8 +107,8 @@ tests: - it: both ssh and http services exist templates: - - templates/gitea/sshService.yaml - - templates/gitea/httpService.yaml + - templates/gitea/service_ssh.yaml + - templates/gitea/service_http.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..ce783c0 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/gitea/secret_gpg.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..1ba137a 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/gitea/secret_gpg.yaml tests: - it: fails rendering when nothing is configured set: diff --git a/unittests/helm/init/basic.yaml b/unittests/helm/init/basic.yaml index 25027f5..2493b76 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/gitea/secret_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..7e04fc1 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/gitea/secret_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/gitea/secret_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..3001cbe 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/gitea/secret_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..6495867 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/gitea/secret_metrics.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..2320d86 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/gitea/secret_metrics.yaml tests: - it: renders nothing if monitoring enabled and gitea.metrics.token empty set: diff --git a/unittests/helm/pvc/pvc-configuration.yaml b/unittests/helm/pvc/pvc-configuration.yaml index 3431000..63b36f2 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/gitea/persistentVolumeClaim.yaml tests: - it: Storage Class using TPL set: diff --git a/unittests/helm/serviceaccount/basic.yaml b/unittests/helm/serviceaccount/basic.yaml index 73d8e1e..dff345b 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/gitea/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..66bd67d 100644 --- a/unittests/helm/serviceaccount/reference.yaml +++ b/unittests/helm/serviceaccount/reference.yaml @@ -3,9 +3,9 @@ release: name: gitea-unittests namespace: testing templates: - - templates/gitea/serviceaccount.yaml + - templates/gitea/serviceAccount.yaml - templates/gitea/deployment.yaml - - templates/gitea/config.yaml + - templates/gitea/secret_config.yaml tests: - it: does not modify the deployment by default template: templates/gitea/deployment.yaml diff --git a/unittests/helm/servicemonitor/basic.yaml b/unittests/helm/servicemonitor/basic.yaml index f5d0091..8851b75 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/gitea/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..be40959 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/gitea/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..1ae5759 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/gitea/serviceMonitor.yaml tests: - it: renders unsecure ServiceMonitor if gitea.metrics.token nil set: