From 433f6d132bdd7bef89623428d23676d5effa3abc Mon Sep 17 00:00:00 2001 From: Bernd Schorgers Date: Tue, 11 Feb 2025 13:23:27 +0100 Subject: [PATCH] feat(common): Release common library 3.7.1 (#383) Co-authored-by: Aisling McGinn --- .ci/repo-config.yaml | 8 +- .github/actions/charts-package/action.yaml | 2 +- .../actions/charts-release-oci/action.yaml | 2 +- .../actions/override-chart-deps/action.yaml | 35 ------ .github/workflows/charts-lint.yaml | 65 +++------- .github/workflows/charts-release.yaml | 21 ++-- .github/workflows/charts-test.yaml | 111 ++++++++++-------- .github/workflows/pr-validate.yaml | 88 +++++++++++--- .github/workflows/pre-commit-check.yaml | 23 ---- .taskfiles/charts.yaml | 30 ++++- Taskfile.yaml | 1 - charts/library/common-test/values.schema.json | 3 - charts/library/common/.helmignore | 7 +- charts/library/common/Chart.yaml | 24 +--- charts/library/common/README.md | 4 +- .../common/templates/classes/_configmap.tpl | 1 + .../common/templates/classes/_cronjob.tpl | 1 + .../common/templates/classes/_daemonset.tpl | 1 + .../common/templates/classes/_deployment.tpl | 1 + .../common/templates/classes/_ingress.tpl | 1 + .../library/common/templates/classes/_job.tpl | 1 + .../templates/classes/_networkpolicy.tpl | 1 + .../library/common/templates/classes/_pvc.tpl | 1 + .../common/templates/classes/_route.tpl | 1 + .../common/templates/classes/_secret.tpl | 1 + .../common/templates/classes/_service.tpl | 1 + .../templates/classes/_serviceAccount.tpl | 1 + .../templates/classes/_serviceMonitor.tpl | 1 + .../common/templates/classes/_statefulset.tpl | 1 + .../test-chart}/.helmignore | 9 +- .../test-chart}/Chart.yaml | 2 +- .../test-chart}/ci/.gitignore | 0 .../test-chart}/ci/advanced-values.yaml | 0 .../test-chart}/ci/basic-values.yaml | 0 .../ci/configMapsFolder/test_1/test_1.sh | 0 .../ci/configMapsFolder/test_1/test_1.yaml | 0 .../ci/configMapsFolder/test_2/helm.jpg | Bin .../ci/configMapsFolder/test_2/test_2.yaml | 0 .../test-chart}/ci/cronjob-values.yaml | 0 .../test-chart}/ci/no-service.yaml | 0 .../test-chart}/ci/vaultwarden-example.yaml | 0 .../test-chart}/templates/common.yaml | 0 .../controllers_main_default_container.yaml | 0 .../_values/ingress_main_default_hosts.yaml | 0 .../unittests}/_values/rbac_values.yaml | 0 .../_values/service_main_default.yaml | 0 .../unittests}/chart/validations_test.yaml | 0 .../unittests}/configmap/metadata_test.yaml | 0 .../unittests}/configmap/names_test.yaml | 0 .../configmap/pod_metadata_test.yaml | 0 .../unittests}/container/field_args_test.yaml | 0 .../container/field_command_test.yaml | 0 .../unittests}/container/field_env_test.yaml | 0 .../container/field_envfrom_test.yaml | 0 .../container/field_image_test.yaml | 0 .../container/field_resources_test.yaml | 0 .../container/field_restartpolicy_test.yaml | 0 .../container/field_securityContext_test.yaml | 0 .../container/field_stdin_test.yaml | 0 .../unittests}/container/field_tty_test.yaml | 0 .../unittests}/container/name_test.yaml | 0 .../unittests}/container/ports_test.yaml | 0 .../unittests}/container/probes_test.yaml | 0 .../container/validations_test.yaml | 0 .../container/volumemounts_test.yaml | 0 .../unittests}/container/workingdir_test.yaml | 0 .../unittests}/controller/cronjob_test.yaml | 0 .../default_container_options_test.yaml | 0 .../field_revisionhistorylimit_test.yaml | 0 .../unittests}/controller/job_test.yaml | 0 .../controller/metadata_cronjob_test.yaml | 0 .../controller/metadata_daemonset_test.yaml | 0 .../controller/metadata_deployment_test.yaml | 0 .../controller/metadata_job_test.yaml | 0 .../controller/metadata_statefulset_test.yaml | 0 .../unittests}/controller/type_test.yaml | 0 .../unittests}/ingress/metadata_test.yaml | 0 .../unittests}/ingress/presence_test.yaml | 0 .../ingress/service_reference_test.yaml | 0 .../unittests}/ingress/tls_test.yaml | 0 .../unittests}/ingress/values_test.yaml | 0 .../unittests}/misc/nameoverride_test.yaml | 0 .../networkpolicy/metadata_test.yaml | 0 .../unittests}/networkpolicy/names_test.yaml | 0 .../networkpolicy/validations_test.yaml | 0 .../unittests}/networkpolicy/values_test.yaml | 0 .../persistence/claimnames_test.yaml | 0 .../persistence/configmap_test.yaml | 0 .../unittests}/persistence/custom.yaml | 0 .../unittests}/persistence/emptydir_test.yaml | 0 .../unittests}/persistence/hostpath_test.yaml | 0 .../unittests}/persistence/nfs_test.yaml | 0 .../unittests}/persistence/secret_test.yaml | 0 .../volumeclaimtemplates_test.yaml | 0 .../unittests}/persistence/volumes_test.yaml | 0 .../pod/additional_containers_test.yaml | 0 .../unittests}/pod/container_order_test.yaml | 0 .../unittests}/pod/field_affinity_test.yaml | 0 .../unittests}/pod/field_dnsConfig_test.yaml | 0 .../unittests}/pod/field_dnsPolicy_test.yaml | 0 .../pod/field_enableServiceLinks_test.yaml | 0 .../pod/field_hostAliases_test.yaml | 0 .../unittests}/pod/field_hostIPC_test.yaml | 0 .../pod/field_hostNetwork_test.yaml | 0 .../unittests}/pod/field_hostPID_test.yaml | 0 .../unittests}/pod/field_hostUsers_test.yaml | 0 .../pod/field_imagePullSecrets_test.yaml | 0 .../pod/field_nodeSelector_test.yaml | 0 .../unittests}/pod/field_replicas_test.yaml | 0 .../pod/field_securityContext_test.yaml | 0 .../pod/field_serviceAccount_test.yaml | 0 .../pod/field_shareProcessNamespace_test.yaml | 0 .../pod/field_tolerations_test.yaml | 0 .../field_topologySpreadConstraints_test.yaml | 0 .../unittests}/pod/initcontainers_test.yaml | 0 .../pod/metadata_annotations_test.yaml | 0 .../unittests}/pod/metadata_labels_test.yaml | 0 .../unittests}/pvc/datasource_test.yaml | 0 .../unittests}/pvc/metadata_test.yaml | 0 .../test-chart/unittests}/pvc/names_test.yaml | 0 .../unittests}/pvc/storageclass_test.yaml | 0 .../unittests}/pvc/values_test.yaml | 0 .../unittests}/rawResource/metadata_test.yaml | 0 .../unittests}/rawResource/values_test.yaml | 0 .../unittests}/rbac/metadata_test.yaml | 0 .../unittests}/rbac/names_test.yaml | 0 .../unittests}/rbac/validations_test.yaml | 0 .../unittests}/rbac/values_test.yaml | 0 .../unittests}/route/metadata_test.yaml | 0 .../unittests}/route/presence_test.yaml | 0 .../route/service_reference_test.yaml | 0 .../unittests}/route/values_test.yaml | 0 .../unittests}/secret/metadata_test.yaml | 0 .../unittests}/secret/names_test.yaml | 0 .../unittests}/secret/pod_metadata_test.yaml | 0 .../unittests}/service/metadata_test.yaml | 0 .../unittests}/service/names_test.yaml | 0 .../service/port_protocols_test.yaml | 0 .../unittests}/service/ports_test.yaml | 0 .../unittests}/service/validations_test.yaml | 0 .../unittests}/service/values_test.yaml | 0 .../serviceAccount/serviceaccount_test.yaml | 0 .../serviceMonitor/servicemonitor_test.yaml | 0 .../common/test-chart/values.schema.json | 3 + .../test-chart}/values.yaml | 0 charts/library/common/values.schema.json | 2 +- 146 files changed, 232 insertions(+), 222 deletions(-) delete mode 100644 .github/actions/override-chart-deps/action.yaml delete mode 100644 .github/workflows/pre-commit-check.yaml delete mode 100644 charts/library/common-test/values.schema.json rename charts/library/{common-test => common/test-chart}/.helmignore (87%) rename charts/library/{common-test => common/test-chart}/Chart.yaml (88%) rename charts/library/{common-test => common/test-chart}/ci/.gitignore (100%) rename charts/library/{common-test => common/test-chart}/ci/advanced-values.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/basic-values.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/configMapsFolder/test_1/test_1.sh (100%) rename charts/library/{common-test => common/test-chart}/ci/configMapsFolder/test_1/test_1.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/configMapsFolder/test_2/helm.jpg (100%) rename charts/library/{common-test => common/test-chart}/ci/configMapsFolder/test_2/test_2.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/cronjob-values.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/no-service.yaml (100%) rename charts/library/{common-test => common/test-chart}/ci/vaultwarden-example.yaml (100%) rename charts/library/{common-test => common/test-chart}/templates/common.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/_values/controllers_main_default_container.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/_values/ingress_main_default_hosts.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/_values/rbac_values.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/_values/service_main_default.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/chart/validations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/configmap/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/configmap/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/configmap/pod_metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_args_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_command_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_env_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_envfrom_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_image_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_resources_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_restartpolicy_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_securityContext_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_stdin_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/field_tty_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/name_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/ports_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/probes_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/validations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/volumemounts_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/container/workingdir_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/cronjob_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/default_container_options_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/field_revisionhistorylimit_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/job_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/metadata_cronjob_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/metadata_daemonset_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/metadata_deployment_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/metadata_job_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/metadata_statefulset_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/controller/type_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/ingress/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/ingress/presence_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/ingress/service_reference_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/ingress/tls_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/ingress/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/misc/nameoverride_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/networkpolicy/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/networkpolicy/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/networkpolicy/validations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/networkpolicy/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/claimnames_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/configmap_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/custom.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/emptydir_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/hostpath_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/nfs_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/secret_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/volumeclaimtemplates_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/persistence/volumes_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/additional_containers_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/container_order_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_affinity_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_dnsConfig_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_dnsPolicy_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_enableServiceLinks_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_hostAliases_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_hostIPC_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_hostNetwork_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_hostPID_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_hostUsers_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_imagePullSecrets_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_nodeSelector_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_replicas_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_securityContext_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_serviceAccount_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_shareProcessNamespace_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_tolerations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/field_topologySpreadConstraints_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/initcontainers_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/metadata_annotations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pod/metadata_labels_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pvc/datasource_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pvc/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pvc/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pvc/storageclass_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/pvc/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rawResource/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rawResource/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rbac/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rbac/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rbac/validations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/rbac/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/route/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/route/presence_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/route/service_reference_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/route/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/secret/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/secret/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/secret/pod_metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/metadata_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/names_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/port_protocols_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/ports_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/validations_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/service/values_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/serviceAccount/serviceaccount_test.yaml (100%) rename charts/library/{common-test/tests => common/test-chart/unittests}/serviceMonitor/servicemonitor_test.yaml (100%) create mode 100644 charts/library/common/test-chart/values.schema.json rename charts/library/{common-test => common/test-chart}/values.yaml (100%) diff --git a/.ci/repo-config.yaml b/.ci/repo-config.yaml index efe37b0c..03c2de97 100644 --- a/.ci/repo-config.yaml +++ b/.ci/repo-config.yaml @@ -1,11 +1,7 @@ --- -excluded-charts-lint: - - library/common-test +excluded-charts-lint: [] excluded-charts-install: - - apps/k8s-ycl - - library/common - other/app-template -excluded-charts-release: - - library/common-test +excluded-charts-release: [] diff --git a/.github/actions/charts-package/action.yaml b/.github/actions/charts-package/action.yaml index 3765edd2..9ed87206 100644 --- a/.github/actions/charts-package/action.yaml +++ b/.github/actions/charts-package/action.yaml @@ -29,7 +29,7 @@ runs: using: "composite" steps: - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@v0.11.1 + uses: yokawasa/action-setup-kube-tools@v0.11.2 with: setup-tools: | helmv3 diff --git a/.github/actions/charts-release-oci/action.yaml b/.github/actions/charts-release-oci/action.yaml index 6551ae2c..9ce68218 100644 --- a/.github/actions/charts-release-oci/action.yaml +++ b/.github/actions/charts-release-oci/action.yaml @@ -29,7 +29,7 @@ runs: uses: sigstore/cosign-installer@v3.6.0 - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@v0.11.1 + uses: yokawasa/action-setup-kube-tools@v0.11.2 with: setup-tools: | helmv3 diff --git a/.github/actions/override-chart-deps/action.yaml b/.github/actions/override-chart-deps/action.yaml deleted file mode 100644 index f0363e54..00000000 --- a/.github/actions/override-chart-deps/action.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: "Override chart dependencies" -description: "Overrides the dependencies for a Helm chart" -inputs: - chart: - required: true - description: "Which chart to override the dependencies for" - overrides: - required: true - description: "A JSON encoded list of dependency overrides" - -runs: - using: "composite" - steps: - - name: Override dependencies - shell: bash - run: | - overrides=( $(yq --null-input e -o=j -I=0 '${{ inputs.overrides }}[]' ) ) - chartFile="charts/${{ matrix.chart }}/Chart.yaml" - - if [[ ! -f ${chartFile} ]]; then - echo "Could not find ${chartFile}"! - exit 1 - fi - - for override in "${overrides[@]}"; do - name=$(echo "$override" | yq e '.name' -) - repository=$(echo "$override" | yq e '.repository' -) - version=$(echo "$override" | yq e '.version' -) - - yq -i "(.dependencies[] | select(.name == \"$name\").repository) |= \"$repository\"" "${chartFile}" - yq -i "(.dependencies[] | select(.name == \"$name\").version) |= \"$version\"" "${chartFile}" - done - - echo "Resulting chart:" - cat ${chartFile} diff --git a/.github/workflows/charts-lint.yaml b/.github/workflows/charts-lint.yaml index 29934f04..3071a484 100644 --- a/.github/workflows/charts-lint.yaml +++ b/.github/workflows/charts-lint.yaml @@ -3,75 +3,44 @@ name: "Charts: Lint" on: workflow_call: inputs: - checkoutCommit: - required: true - type: string - isRenovatePR: - required: true - default: "false" - type: string - chartsToLint: + charts: description: > - A JSON encoded array of charts to lint - required: true - type: string - overrideDeps: - description: > - A JSON encoded array of dependencies to override before linting - type: string - required: false + Json encoded list of Helm charts to release. + Defaults to releasing everything. default: "[]" - -env: - HELM_VERSION: 3.11.2 + required: true + type: string + helmVersion: + description: > + Helm version to use. + default: "3.11.2" + required: false + type: string jobs: lint-chart: - if: ${{ inputs.chartsToLint != '[]' }} + if: ${{ inputs.charts != '[]' && inputs.charts != '' }} name: Lint chart strategy: matrix: - chart: ${{ fromJSON(inputs.chartsToLint) }} + chart: ${{ fromJSON(inputs.charts) }} fail-fast: false runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: Verify chart version - uses: bjw-s/helm-charts-actions/verify-chart-version@main - id: verify-chart-version - with: - chart: "charts/${{ matrix.chart }}" - - - name: Verify chart changelog - uses: bjw-s/helm-charts-actions/verify-chart-changelog@main - if: inputs.isRenovatePR != 'true' - id: verify-chart-changelog - with: - chart: "charts/${{ matrix.chart }}" - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@v0.11.1 + uses: yokawasa/action-setup-kube-tools@v0.11.2 with: setup-tools: | helmv3 - helm: "${{ env.HELM_VERSION }}" + helm: "${{ inputs.helmVersion }}" - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.1 + uses: helm/chart-testing-action@v2.7.0 - - name: Override chart dependencies - uses: ./.github/actions/override-chart-deps - if: ${{ inputs.overrideDeps != '[]' }} - with: - chart: ${{ matrix.chart }} - overrides: ${{ inputs.overrideDeps }} - - - name: Dereference JSON schema before packaging + - name: Dereference JSON schema uses: bjw-s/helm-charts-actions/dereference-json-schema@main with: schemaFile: "charts/${{ matrix.chart }}/values.schema.json" diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index a07eb353..5e3ec505 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -8,12 +8,13 @@ on: push: branches: - main + - rework-publishing-ci # TODO: Remove this paths: - "charts/**" jobs: - prepare-release: - name: Prepare data required for release + prepare: + name: Prepare data required for workflow runs-on: ubuntu-22.04 outputs: repoConfiguration: ${{ steps.repo-config.outputs.config }} @@ -56,8 +57,8 @@ jobs: release-library-charts: name: Release library charts needs: - - prepare-release - if: ${{ needs.prepare-release.outputs.libraryChartsToRelease != '[]' }} + - prepare + if: ${{ needs.prepare.outputs.libraryChartsToRelease != '[]' }} uses: ./.github/workflows/charts-release-steps.yaml permissions: pages: write @@ -65,17 +66,17 @@ jobs: contents: write packages: write with: - charts: ${{ needs.prepare-release.outputs.libraryChartsToRelease }} - excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare-release.outputs.repoConfiguration).excluded-charts-release) }} + charts: ${{ needs.prepare.outputs.libraryChartsToRelease }} + excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare.outputs.repoConfiguration).excluded-charts-release) }} ghPagesBranch: gh-pages publishToOciRegistry: false release-other-charts: name: Release other charts needs: - - prepare-release + - prepare - release-library-charts - if: ${{ needs.prepare-release.outputs.applicationChartsToRelease != '[]' }} + if: ${{ needs.prepare.outputs.applicationChartsToRelease != '[]' }} uses: ./.github/workflows/charts-release-steps.yaml permissions: pages: write @@ -83,6 +84,6 @@ jobs: contents: write packages: write with: - charts: ${{ needs.prepare-release.outputs.applicationChartsToRelease }} - excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare-release.outputs.repoConfiguration).excluded-charts-release) }} + charts: ${{ needs.prepare.outputs.applicationChartsToRelease }} + excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare.outputs.repoConfiguration).excluded-charts-release) }} ghPagesBranch: gh-pages diff --git a/.github/workflows/charts-test.yaml b/.github/workflows/charts-test.yaml index 70821e46..a67bf6cf 100644 --- a/.github/workflows/charts-test.yaml +++ b/.github/workflows/charts-test.yaml @@ -3,55 +3,56 @@ name: "Charts: Test" on: workflow_call: inputs: - checkoutCommit: - required: true - type: string - chartsToTest: + charts: description: > - A JSON encoded array of charts to lint - type: string - required: true - overrideDeps: - description: > - A JSON encoded array of dependencies to override before testing - type: string - required: false + Json encoded list of Helm charts to release. + Defaults to releasing everything. default: "[]" - -env: - HELM_VERSION: 3.11.2 + required: true + type: string + helmVersion: + description: > + Helm version to use. + default: "3.11.2" + required: false + type: string jobs: install-chart: name: Install chart runs-on: ubuntu-22.04 - if: ${{ inputs.chartsToTest != '[]' && inputs.chartsToTest != '' }} + if: ${{ inputs.charts != '[]' && inputs.charts != '' }} strategy: matrix: - chart: ${{ fromJSON(inputs.chartsToTest) }} + chart: ${{ fromJSON(inputs.charts) }} k8s_version: [ - "v1.26.15", - "v1.27.13", - "v1.28.9", - "v1.29.4", - "v1.30.0", + "v1.29.13", + "v1.30.9", + "v1.31.5", + "v1.32.1", ] fail-fast: false steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} + + - name: Validate prerequisite folders + working-directory: "charts/${{ matrix.chart }}" + run: | + CHART_TYPE=$(yq '.type // "application"' Chart.yaml) + if [[ ("${CHART_TYPE}" == "library") && (! -d "test-chart") ]]; then + echo "Library charts require a \"test-chart\" directory to run tests" + exit 1 + fi - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@v0.11.1 + uses: yokawasa/action-setup-kube-tools@v0.11.2 with: setup-tools: | helmv3 kubectl - helm: "${{ env.HELM_VERSION }}" + helm: "${{ inputs.helmVersion }}" kubectl: "${{ matrix.k8s_version }}" - uses: actions/setup-python@v5 @@ -70,17 +71,20 @@ jobs: run: | kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true - - name: Override chart dependencies - uses: ./.github/actions/override-chart-deps - if: ${{ inputs.overrideDeps != '[]' }} + - name: Dereference JSON schema + uses: bjw-s/helm-charts-actions/dereference-json-schema@main with: - chart: ${{ matrix.chart }} - overrides: ${{ inputs.overrideDeps }} + schemaFile: "charts/${{ matrix.chart }}/values.schema.json" + outputFile: "charts/${{ matrix.chart }}/values.schema.json" + allowFileNotFound: true - name: Run chart-testing (install) working-directory: "charts/${{ matrix.chart }}" - # TODO: Awaiting https://github.com/actions/checkout/issues/1607 run: | + if [ -d "test-chart" ]; then + cd "test-chart" + fi + ct install --config "$GITHUB_WORKSPACE/.ci/ct/ct.yaml" --charts . install_success: @@ -106,38 +110,53 @@ jobs: unittest-chart: name: Unit-test chart runs-on: ubuntu-22.04 - if: ${{ inputs.chartsToTest != '[]' && inputs.chartsToTest != '' }} + if: ${{ inputs.charts != '[]' && inputs.charts != '' }} strategy: matrix: - chart: ${{ fromJSON(inputs.chartsToTest) }} + chart: ${{ fromJSON(inputs.charts) }} fail-fast: false steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} + + - name: Validate prerequisite folders + working-directory: "charts/${{ matrix.chart }}" + run: | + CHART_TYPE=$(yq '.type // "application"' Chart.yaml) + if [[ ("${CHART_TYPE}" == "library") && (! -d "test-chart") ]]; then + echo "Library charts require a \"test-chart\" directory to run tests" + exit 1 + fi - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@v0.11.1 + uses: yokawasa/action-setup-kube-tools@v0.11.2 with: setup-tools: | helmv3 - helm: "${{ env.HELM_VERSION }}" + helm: "${{ inputs.helmVersion }}" - - name: Override chart dependencies - uses: ./.github/actions/override-chart-deps - if: ${{ inputs.overrideDeps != '[]' }} + - name: Dereference JSON schema + uses: bjw-s/helm-charts-actions/dereference-json-schema@main with: - chart: ${{ matrix.chart }} - overrides: ${{ inputs.overrideDeps }} + schemaFile: "charts/${{ matrix.chart }}/values.schema.json" + outputFile: "charts/${{ matrix.chart }}/values.schema.json" + allowFileNotFound: true - name: Run tests working-directory: "charts/${{ matrix.chart }}" run: | + if [[ -d "test-chart" ]]; then + cd "test-chart" + fi + + if [[ ! -d "unittests" ]]; then + echo "No unit tests found for chart ${{ matrix.chart }}" + exit 0 + fi + helm plugin install https://github.com/helm-unittest/helm-unittest.git helm dep update - helm unittest -f "tests/**/*_test.yaml" . + helm unittest -f "unittests/**/*_test.yaml" . unittest_success: needs: diff --git a/.github/workflows/pr-validate.yaml b/.github/workflows/pr-validate.yaml index 217f2009..8e42e5ef 100644 --- a/.github/workflows/pr-validate.yaml +++ b/.github/workflows/pr-validate.yaml @@ -13,35 +13,85 @@ concurrency: cancel-in-progress: true jobs: - pr-metadata: - uses: ./.github/workflows/pr-metadata.yaml + prepare: + name: Prepare data required for workflow + runs-on: ubuntu-22.04 + outputs: + repoConfiguration: ${{ steps.repo-config.outputs.config }} + addedOrModifiedFiles: ${{ steps.added-modified-files.outputs.all_changed_files }} + chartsToLint: ${{ steps.charts-to-lint.outputs.filteredCharts }} + chartsToInstall: ${{ steps.charts-to-install.outputs.filteredCharts }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Grab repository configuration + id: repo-config + shell: bash + run: | + echo "config=$(yq '.' '.ci/repo-config.yaml' -o json -I=0)" >> "$GITHUB_OUTPUT" + + - name: Get all added or modified files + id: added-modified-files + uses: tj-actions/changed-files@v45 + + - name: Get changed charts + id: changed-charts + uses: tj-actions/changed-files@v45 + with: + matrix: true + path: charts + dir_names: true + dir_names_max_depth: 2 + + - name: Determine charts to lint + id: charts-to-lint + uses: actions/github-script@v7 + with: + script: | + var changedCharts = ${{ steps.changed-charts.outputs.all_changed_files }}; + var chartsToFilter = ${{ toJSON(fromJSON(steps.repo-config.outputs.config).excluded-charts-lint) }}; + let filteredCharts = changedCharts.filter(item => chartsToFilter.indexOf(item) < 0); + core.setOutput("filteredCharts", filteredCharts); + + - name: Determine charts to install + id: charts-to-install + uses: actions/github-script@v7 + with: + script: | + var changedCharts = ${{ steps.changed-charts.outputs.all_changed_files }}; + var chartsToFilter = ${{ toJSON(fromJSON(steps.repo-config.outputs.config).excluded-charts-install) }}; + let filteredCharts = changedCharts.filter(item => chartsToFilter.indexOf(item) < 0); + core.setOutput("filteredCharts", filteredCharts); pre-commit-check: - uses: ./.github/workflows/pre-commit-check.yaml + name: Perform Pre-Commit check + runs-on: ubuntu-22.04 needs: - - pr-metadata - with: - modifiedFiles: ${{ needs.pr-metadata.outputs.addedOrModifiedFiles }} + - prepare + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Run against changes + uses: pre-commit/action@v3.0.1 + with: + extra_args: --files ${{ needs.prepare.outputs.addedOrModifiedFiles }} --config .ci/pre-commit/config.yaml charts-lint: + name: Lint charts uses: ./.github/workflows/charts-lint.yaml needs: - - pr-metadata + - prepare with: - checkoutCommit: ${{ github.sha }} - chartsToLint: ${{ needs.pr-metadata.outputs.chartsToLint }} - isRenovatePR: ${{ needs.pr-metadata.outputs.isRenovatePR }} + charts: ${{ needs.prepare.outputs.chartsToLint }} charts-test: + name: Test charts uses: ./.github/workflows/charts-test.yaml needs: - - pr-metadata + - prepare with: - checkoutCommit: ${{ github.sha }} - chartsToTest: |- - ${{ - ( - (needs.pr-metadata.outputs.commonLibraryUpdated=='true') && - '["library/common-test"]' - ) || needs.pr-metadata.outputs.chartsToInstall - }} + charts: ${{ needs.prepare.outputs.chartsToInstall }} diff --git a/.github/workflows/pre-commit-check.yaml b/.github/workflows/pre-commit-check.yaml deleted file mode 100644 index 5bd99f46..00000000 --- a/.github/workflows/pre-commit-check.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Pre-commit consistency check" - -on: - workflow_call: - inputs: - modifiedFiles: - description: > - A JSON encoded array of files to check - required: true - type: string - -jobs: - pre-commit-check: - name: Run pre-commit checks - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run against changes - uses: pre-commit/action@v3.0.1 - with: - extra_args: --files ${{ join(fromJson(inputs.modifiedFiles), ' ') }} --config .ci/pre-commit/config.yaml diff --git a/.taskfiles/charts.yaml b/.taskfiles/charts.yaml index fb5f58f4..e4ffac23 100644 --- a/.taskfiles/charts.yaml +++ b/.taskfiles/charts.yaml @@ -23,10 +23,36 @@ tasks: - docker run --rm -it --workdir=/data --volume $(pwd):/data {{.CT_IMAGE}} ct lint --config {{.CT_CONFIG_FILE}} --all --excluded-charts "{{.CHARTS_EXCLUDED_FROM_LINT}}" silent: true + test: + desc: Test chart [CHART=required] + preconditions: + # Requires https://github.com/kstasik/schema-tools + - which helm schematools yq + - test -d "{{.CHART_DIR}}" + - test -d "{{.CHART_TEST_DIR}}" + requires: + vars: + - CHART + vars: + GLOB: "{{.GLOB | default \"**/*_test.yaml\"}}" + CHART_DIR: "{{.PROJECT_DIR}}/charts/{{.CHART}}" + CHART_TYPE: + sh: yq eval '.type // "application"' {{.PROJECT_DIR}}/charts/{{.CHART}}/Chart.yaml + CHART_TEST_DIR: |- + {{.CHART_DIR}}{{- if eq .CHART_TYPE "library" -}}/test-chart{{- end -}} + dir: "{{.CHART_TEST_DIR}}" + cmds: + - cp "{{.CHART_DIR}}/values.schema.json" "{{.CHART_DIR}}/values.schema.bak" + - schematools process dereference "{{.CHART_DIR}}/values.schema.json" --to-file "{{.CHART_DIR}}/values.schema.json" + - defer: mv "{{.CHART_DIR}}/values.schema.bak" "{{.CHART_DIR}}/values.schema.json" + - helm dep update + - helm unittest --color -f "unittests/{{.GLOB}}" . + silent: true + dependency-cleanup: desc: clean up chart dependencies dir: "{{.PROJECT_DIR}}/charts" cmds: - - find {{.PROJECT_DIR}}/charts/ -type f -name 'Chart.lock' -mindepth 1 -print0 | xargs -r -0 rm - - find {{.PROJECT_DIR}}/charts/ -type d -name 'charts' -mindepth 1 -print0 | xargs -r -0 rm -rf + - find {{.PROJECT_DIR}}/charts/ -mindepth 1 -type f -name 'Chart.lock' -print0 | xargs -r -0 rm + - find {{.PROJECT_DIR}}/charts/ -mindepth 1 -type d -name 'charts' -print0 | xargs -r -0 rm -rf silent: true diff --git a/Taskfile.yaml b/Taskfile.yaml index 70ba6c4f..fb79f7a5 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -7,7 +7,6 @@ vars: includes: charts: .taskfiles/charts.yaml - docs: .taskfiles/docs.yaml precommit: .taskfiles/precommit.yaml tasks: diff --git a/charts/library/common-test/values.schema.json b/charts/library/common-test/values.schema.json deleted file mode 100644 index da6da83e..00000000 --- a/charts/library/common-test/values.schema.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "$ref": "file://../common/values.schema.json" -} diff --git a/charts/library/common/.helmignore b/charts/library/common/.helmignore index c62cbf85..8875311d 100644 --- a/charts/library/common/.helmignore +++ b/charts/library/common/.helmignore @@ -24,5 +24,10 @@ OWNERS # helm-docs templates *.gotmpl + +# Schema files +schemas/ + # Test files -tests/ +test/ +unittests/ diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index f05e9b5e..56636016 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: common description: Function library for Helm charts type: library -version: 3.7.0 +version: 3.7.1 kubeVersion: ">=1.22.0-0" keywords: - common @@ -16,22 +16,8 @@ annotations: artifacthub.io/changes: |- - kind: fixed description: |- - Raw resources with `forceRename` fields are no longer flagged as invalid - - kind: added + Values schema is now dereferenced before packaging so it no longer relies on + internet connectivity to validate the schema. + - kind: fixed description: |- - Allow setting pullPolicy to Never - - kind: added - description: |- - Revamped configMap.fromFiles into configMap.fromFolder - - kind: added - description: |- - Add support for setting shareProcessNamespace on Pods - - kind: added - description: |- - Add support for templating ServiceMonitor endpoints - - kind: added - description: |- - Add support for templating Pod affinity - - kind: added - description: |- - Add support for configuring gRPC probes + Add explicit namespace declaration to templates using Release.Namespace diff --git a/charts/library/common/README.md b/charts/library/common/README.md index 2c97d79d..0b24dc3b 100644 --- a/charts/library/common/README.md +++ b/charts/library/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 3.7.0](https://img.shields.io/badge/Version-3.7.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 3.7.1](https://img.shields.io/badge/Version-3.7.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) Function library for Helm charts @@ -27,7 +27,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g. # Chart.yaml dependencies: - name: common - version: 3.7.0 + version: 3.7.1 repository: https://bjw-s.github.io/helm-charts/ ``` diff --git a/charts/library/common/templates/classes/_configmap.tpl b/charts/library/common/templates/classes/_configmap.tpl index 0e634fae..5726a380 100644 --- a/charts/library/common/templates/classes/_configmap.tpl +++ b/charts/library/common/templates/classes/_configmap.tpl @@ -31,6 +31,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} {{- with $configMapObject.data }} data: {{- tpl (toYaml .) $rootContext | nindent 2 }} diff --git a/charts/library/common/templates/classes/_cronjob.tpl b/charts/library/common/templates/classes/_cronjob.tpl index ad2b9c8a..030fa737 100644 --- a/charts/library/common/templates/classes/_cronjob.tpl +++ b/charts/library/common/templates/classes/_cronjob.tpl @@ -39,6 +39,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: suspend: {{ default false $cronJobSettings.suspend }} concurrencyPolicy: {{ default "Forbid" $cronJobSettings.concurrencyPolicy }} diff --git a/charts/library/common/templates/classes/_daemonset.tpl b/charts/library/common/templates/classes/_daemonset.tpl index ad97acdb..59c77839 100644 --- a/charts/library/common/templates/classes/_daemonset.tpl +++ b/charts/library/common/templates/classes/_daemonset.tpl @@ -32,6 +32,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: revisionHistoryLimit: {{ include "bjw-s.common.lib.defaultKeepNonNullValue" (dict "value" $daemonsetObject.revisionHistoryLimit "default" 3) }} selector: diff --git a/charts/library/common/templates/classes/_deployment.tpl b/charts/library/common/templates/classes/_deployment.tpl index 95816a04..b26f19eb 100644 --- a/charts/library/common/templates/classes/_deployment.tpl +++ b/charts/library/common/templates/classes/_deployment.tpl @@ -32,6 +32,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: revisionHistoryLimit: {{ include "bjw-s.common.lib.defaultKeepNonNullValue" (dict "value" $deploymentObject.revisionHistoryLimit "default" 3) }} {{- if hasKey $deploymentObject "replicas" }} diff --git a/charts/library/common/templates/classes/_ingress.tpl b/charts/library/common/templates/classes/_ingress.tpl index 3ed5c06d..1c43459c 100644 --- a/charts/library/common/templates/classes/_ingress.tpl +++ b/charts/library/common/templates/classes/_ingress.tpl @@ -32,6 +32,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: {{- if $ingressObject.className }} ingressClassName: {{ $ingressObject.className }} diff --git a/charts/library/common/templates/classes/_job.tpl b/charts/library/common/templates/classes/_job.tpl index 309b01e6..a4b4a30a 100644 --- a/charts/library/common/templates/classes/_job.tpl +++ b/charts/library/common/templates/classes/_job.tpl @@ -34,6 +34,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: suspend: {{ default false $jobSettings.suspend }} {{- with $jobSettings.activeDeadlineSeconds }} diff --git a/charts/library/common/templates/classes/_networkpolicy.tpl b/charts/library/common/templates/classes/_networkpolicy.tpl index efd5da46..2c113092 100644 --- a/charts/library/common/templates/classes/_networkpolicy.tpl +++ b/charts/library/common/templates/classes/_networkpolicy.tpl @@ -41,6 +41,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: podSelector: {{- toYaml $podSelector | nindent 4 }} {{- with $networkPolicyObject.policyTypes }} diff --git a/charts/library/common/templates/classes/_pvc.tpl b/charts/library/common/templates/classes/_pvc.tpl index cca40a82..1e38e0b4 100644 --- a/charts/library/common/templates/classes/_pvc.tpl +++ b/charts/library/common/templates/classes/_pvc.tpl @@ -38,6 +38,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: accessModes: - {{ required (printf "accessMode is required for PVC %v" $pvcObject.name) $pvcObject.accessMode | quote }} diff --git a/charts/library/common/templates/classes/_route.tpl b/charts/library/common/templates/classes/_route.tpl index a524bd2a..7c369570 100644 --- a/charts/library/common/templates/classes/_route.tpl +++ b/charts/library/common/templates/classes/_route.tpl @@ -39,6 +39,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: parentRefs: {{- range $routeObject.parentRefs }} diff --git a/charts/library/common/templates/classes/_secret.tpl b/charts/library/common/templates/classes/_secret.tpl index 4b67b024..0b1869e5 100644 --- a/charts/library/common/templates/classes/_secret.tpl +++ b/charts/library/common/templates/classes/_secret.tpl @@ -39,6 +39,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} {{- with $stringData }} stringData: {{- tpl $stringData $rootContext | nindent 2 }} {{- end }} diff --git a/charts/library/common/templates/classes/_service.tpl b/charts/library/common/templates/classes/_service.tpl index c70db2d1..7d37072e 100644 --- a/charts/library/common/templates/classes/_service.tpl +++ b/charts/library/common/templates/classes/_service.tpl @@ -34,6 +34,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: {{- if (eq $svcType "ClusterIP") }} type: ClusterIP diff --git a/charts/library/common/templates/classes/_serviceAccount.tpl b/charts/library/common/templates/classes/_serviceAccount.tpl index 6bfac3a7..3eff9f9e 100644 --- a/charts/library/common/templates/classes/_serviceAccount.tpl +++ b/charts/library/common/templates/classes/_serviceAccount.tpl @@ -31,6 +31,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} secrets: - name: {{ get (include "bjw-s.common.lib.secret.getByIdentifier" (dict "rootContext" $rootContext "id" (printf "%s-sa-token" $serviceAccountObject.identifier) ) | fromYaml) "name"}} {{- end -}} diff --git a/charts/library/common/templates/classes/_serviceMonitor.tpl b/charts/library/common/templates/classes/_serviceMonitor.tpl index ef9b6292..85a18b1b 100644 --- a/charts/library/common/templates/classes/_serviceMonitor.tpl +++ b/charts/library/common/templates/classes/_serviceMonitor.tpl @@ -26,6 +26,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: jobLabel: "{{ $serviceMonitorObject.name }}" namespaceSelector: diff --git a/charts/library/common/templates/classes/_statefulset.tpl b/charts/library/common/templates/classes/_statefulset.tpl index ef9bddc4..6d3ea795 100644 --- a/charts/library/common/templates/classes/_statefulset.tpl +++ b/charts/library/common/templates/classes/_statefulset.tpl @@ -32,6 +32,7 @@ metadata: {{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }} {{- end }} {{- end }} + namespace: {{ $rootContext.Release.Namespace }} spec: revisionHistoryLimit: {{ include "bjw-s.common.lib.defaultKeepNonNullValue" (dict "value" $statefulsetObject.revisionHistoryLimit "default" 3) }} replicas: {{ $statefulsetObject.replicas }} diff --git a/charts/library/common-test/.helmignore b/charts/library/common/test-chart/.helmignore similarity index 87% rename from charts/library/common-test/.helmignore rename to charts/library/common/test-chart/.helmignore index ab04375e..914d5456 100644 --- a/charts/library/common-test/.helmignore +++ b/charts/library/common/test-chart/.helmignore @@ -22,9 +22,12 @@ .vscode/ # OWNERS file for Kubernetes OWNERS - # helm-docs templates *.gotmpl -# helm unit tests -tests/ +# Schema files +schemas/ + +# Test files +test-chart/ +unittests/ diff --git a/charts/library/common-test/Chart.yaml b/charts/library/common/test-chart/Chart.yaml similarity index 88% rename from charts/library/common-test/Chart.yaml rename to charts/library/common/test-chart/Chart.yaml index acd7bd3d..21ebdb55 100644 --- a/charts/library/common-test/Chart.yaml +++ b/charts/library/common/test-chart/Chart.yaml @@ -9,5 +9,5 @@ maintainers: email: me@bjw-s.dev dependencies: - name: common - repository: file://../common + repository: file://../ version: ">0.0.0-0" diff --git a/charts/library/common-test/ci/.gitignore b/charts/library/common/test-chart/ci/.gitignore similarity index 100% rename from charts/library/common-test/ci/.gitignore rename to charts/library/common/test-chart/ci/.gitignore diff --git a/charts/library/common-test/ci/advanced-values.yaml b/charts/library/common/test-chart/ci/advanced-values.yaml similarity index 100% rename from charts/library/common-test/ci/advanced-values.yaml rename to charts/library/common/test-chart/ci/advanced-values.yaml diff --git a/charts/library/common-test/ci/basic-values.yaml b/charts/library/common/test-chart/ci/basic-values.yaml similarity index 100% rename from charts/library/common-test/ci/basic-values.yaml rename to charts/library/common/test-chart/ci/basic-values.yaml diff --git a/charts/library/common-test/ci/configMapsFolder/test_1/test_1.sh b/charts/library/common/test-chart/ci/configMapsFolder/test_1/test_1.sh similarity index 100% rename from charts/library/common-test/ci/configMapsFolder/test_1/test_1.sh rename to charts/library/common/test-chart/ci/configMapsFolder/test_1/test_1.sh diff --git a/charts/library/common-test/ci/configMapsFolder/test_1/test_1.yaml b/charts/library/common/test-chart/ci/configMapsFolder/test_1/test_1.yaml similarity index 100% rename from charts/library/common-test/ci/configMapsFolder/test_1/test_1.yaml rename to charts/library/common/test-chart/ci/configMapsFolder/test_1/test_1.yaml diff --git a/charts/library/common-test/ci/configMapsFolder/test_2/helm.jpg b/charts/library/common/test-chart/ci/configMapsFolder/test_2/helm.jpg similarity index 100% rename from charts/library/common-test/ci/configMapsFolder/test_2/helm.jpg rename to charts/library/common/test-chart/ci/configMapsFolder/test_2/helm.jpg diff --git a/charts/library/common-test/ci/configMapsFolder/test_2/test_2.yaml b/charts/library/common/test-chart/ci/configMapsFolder/test_2/test_2.yaml similarity index 100% rename from charts/library/common-test/ci/configMapsFolder/test_2/test_2.yaml rename to charts/library/common/test-chart/ci/configMapsFolder/test_2/test_2.yaml diff --git a/charts/library/common-test/ci/cronjob-values.yaml b/charts/library/common/test-chart/ci/cronjob-values.yaml similarity index 100% rename from charts/library/common-test/ci/cronjob-values.yaml rename to charts/library/common/test-chart/ci/cronjob-values.yaml diff --git a/charts/library/common-test/ci/no-service.yaml b/charts/library/common/test-chart/ci/no-service.yaml similarity index 100% rename from charts/library/common-test/ci/no-service.yaml rename to charts/library/common/test-chart/ci/no-service.yaml diff --git a/charts/library/common-test/ci/vaultwarden-example.yaml b/charts/library/common/test-chart/ci/vaultwarden-example.yaml similarity index 100% rename from charts/library/common-test/ci/vaultwarden-example.yaml rename to charts/library/common/test-chart/ci/vaultwarden-example.yaml diff --git a/charts/library/common-test/templates/common.yaml b/charts/library/common/test-chart/templates/common.yaml similarity index 100% rename from charts/library/common-test/templates/common.yaml rename to charts/library/common/test-chart/templates/common.yaml diff --git a/charts/library/common-test/tests/_values/controllers_main_default_container.yaml b/charts/library/common/test-chart/unittests/_values/controllers_main_default_container.yaml similarity index 100% rename from charts/library/common-test/tests/_values/controllers_main_default_container.yaml rename to charts/library/common/test-chart/unittests/_values/controllers_main_default_container.yaml diff --git a/charts/library/common-test/tests/_values/ingress_main_default_hosts.yaml b/charts/library/common/test-chart/unittests/_values/ingress_main_default_hosts.yaml similarity index 100% rename from charts/library/common-test/tests/_values/ingress_main_default_hosts.yaml rename to charts/library/common/test-chart/unittests/_values/ingress_main_default_hosts.yaml diff --git a/charts/library/common-test/tests/_values/rbac_values.yaml b/charts/library/common/test-chart/unittests/_values/rbac_values.yaml similarity index 100% rename from charts/library/common-test/tests/_values/rbac_values.yaml rename to charts/library/common/test-chart/unittests/_values/rbac_values.yaml diff --git a/charts/library/common-test/tests/_values/service_main_default.yaml b/charts/library/common/test-chart/unittests/_values/service_main_default.yaml similarity index 100% rename from charts/library/common-test/tests/_values/service_main_default.yaml rename to charts/library/common/test-chart/unittests/_values/service_main_default.yaml diff --git a/charts/library/common-test/tests/chart/validations_test.yaml b/charts/library/common/test-chart/unittests/chart/validations_test.yaml similarity index 100% rename from charts/library/common-test/tests/chart/validations_test.yaml rename to charts/library/common/test-chart/unittests/chart/validations_test.yaml diff --git a/charts/library/common-test/tests/configmap/metadata_test.yaml b/charts/library/common/test-chart/unittests/configmap/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/configmap/metadata_test.yaml rename to charts/library/common/test-chart/unittests/configmap/metadata_test.yaml diff --git a/charts/library/common-test/tests/configmap/names_test.yaml b/charts/library/common/test-chart/unittests/configmap/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/configmap/names_test.yaml rename to charts/library/common/test-chart/unittests/configmap/names_test.yaml diff --git a/charts/library/common-test/tests/configmap/pod_metadata_test.yaml b/charts/library/common/test-chart/unittests/configmap/pod_metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/configmap/pod_metadata_test.yaml rename to charts/library/common/test-chart/unittests/configmap/pod_metadata_test.yaml diff --git a/charts/library/common-test/tests/container/field_args_test.yaml b/charts/library/common/test-chart/unittests/container/field_args_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_args_test.yaml rename to charts/library/common/test-chart/unittests/container/field_args_test.yaml diff --git a/charts/library/common-test/tests/container/field_command_test.yaml b/charts/library/common/test-chart/unittests/container/field_command_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_command_test.yaml rename to charts/library/common/test-chart/unittests/container/field_command_test.yaml diff --git a/charts/library/common-test/tests/container/field_env_test.yaml b/charts/library/common/test-chart/unittests/container/field_env_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_env_test.yaml rename to charts/library/common/test-chart/unittests/container/field_env_test.yaml diff --git a/charts/library/common-test/tests/container/field_envfrom_test.yaml b/charts/library/common/test-chart/unittests/container/field_envfrom_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_envfrom_test.yaml rename to charts/library/common/test-chart/unittests/container/field_envfrom_test.yaml diff --git a/charts/library/common-test/tests/container/field_image_test.yaml b/charts/library/common/test-chart/unittests/container/field_image_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_image_test.yaml rename to charts/library/common/test-chart/unittests/container/field_image_test.yaml diff --git a/charts/library/common-test/tests/container/field_resources_test.yaml b/charts/library/common/test-chart/unittests/container/field_resources_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_resources_test.yaml rename to charts/library/common/test-chart/unittests/container/field_resources_test.yaml diff --git a/charts/library/common-test/tests/container/field_restartpolicy_test.yaml b/charts/library/common/test-chart/unittests/container/field_restartpolicy_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_restartpolicy_test.yaml rename to charts/library/common/test-chart/unittests/container/field_restartpolicy_test.yaml diff --git a/charts/library/common-test/tests/container/field_securityContext_test.yaml b/charts/library/common/test-chart/unittests/container/field_securityContext_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_securityContext_test.yaml rename to charts/library/common/test-chart/unittests/container/field_securityContext_test.yaml diff --git a/charts/library/common-test/tests/container/field_stdin_test.yaml b/charts/library/common/test-chart/unittests/container/field_stdin_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_stdin_test.yaml rename to charts/library/common/test-chart/unittests/container/field_stdin_test.yaml diff --git a/charts/library/common-test/tests/container/field_tty_test.yaml b/charts/library/common/test-chart/unittests/container/field_tty_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/field_tty_test.yaml rename to charts/library/common/test-chart/unittests/container/field_tty_test.yaml diff --git a/charts/library/common-test/tests/container/name_test.yaml b/charts/library/common/test-chart/unittests/container/name_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/name_test.yaml rename to charts/library/common/test-chart/unittests/container/name_test.yaml diff --git a/charts/library/common-test/tests/container/ports_test.yaml b/charts/library/common/test-chart/unittests/container/ports_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/ports_test.yaml rename to charts/library/common/test-chart/unittests/container/ports_test.yaml diff --git a/charts/library/common-test/tests/container/probes_test.yaml b/charts/library/common/test-chart/unittests/container/probes_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/probes_test.yaml rename to charts/library/common/test-chart/unittests/container/probes_test.yaml diff --git a/charts/library/common-test/tests/container/validations_test.yaml b/charts/library/common/test-chart/unittests/container/validations_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/validations_test.yaml rename to charts/library/common/test-chart/unittests/container/validations_test.yaml diff --git a/charts/library/common-test/tests/container/volumemounts_test.yaml b/charts/library/common/test-chart/unittests/container/volumemounts_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/volumemounts_test.yaml rename to charts/library/common/test-chart/unittests/container/volumemounts_test.yaml diff --git a/charts/library/common-test/tests/container/workingdir_test.yaml b/charts/library/common/test-chart/unittests/container/workingdir_test.yaml similarity index 100% rename from charts/library/common-test/tests/container/workingdir_test.yaml rename to charts/library/common/test-chart/unittests/container/workingdir_test.yaml diff --git a/charts/library/common-test/tests/controller/cronjob_test.yaml b/charts/library/common/test-chart/unittests/controller/cronjob_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/cronjob_test.yaml rename to charts/library/common/test-chart/unittests/controller/cronjob_test.yaml diff --git a/charts/library/common-test/tests/controller/default_container_options_test.yaml b/charts/library/common/test-chart/unittests/controller/default_container_options_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/default_container_options_test.yaml rename to charts/library/common/test-chart/unittests/controller/default_container_options_test.yaml diff --git a/charts/library/common-test/tests/controller/field_revisionhistorylimit_test.yaml b/charts/library/common/test-chart/unittests/controller/field_revisionhistorylimit_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/field_revisionhistorylimit_test.yaml rename to charts/library/common/test-chart/unittests/controller/field_revisionhistorylimit_test.yaml diff --git a/charts/library/common-test/tests/controller/job_test.yaml b/charts/library/common/test-chart/unittests/controller/job_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/job_test.yaml rename to charts/library/common/test-chart/unittests/controller/job_test.yaml diff --git a/charts/library/common-test/tests/controller/metadata_cronjob_test.yaml b/charts/library/common/test-chart/unittests/controller/metadata_cronjob_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/metadata_cronjob_test.yaml rename to charts/library/common/test-chart/unittests/controller/metadata_cronjob_test.yaml diff --git a/charts/library/common-test/tests/controller/metadata_daemonset_test.yaml b/charts/library/common/test-chart/unittests/controller/metadata_daemonset_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/metadata_daemonset_test.yaml rename to charts/library/common/test-chart/unittests/controller/metadata_daemonset_test.yaml diff --git a/charts/library/common-test/tests/controller/metadata_deployment_test.yaml b/charts/library/common/test-chart/unittests/controller/metadata_deployment_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/metadata_deployment_test.yaml rename to charts/library/common/test-chart/unittests/controller/metadata_deployment_test.yaml diff --git a/charts/library/common-test/tests/controller/metadata_job_test.yaml b/charts/library/common/test-chart/unittests/controller/metadata_job_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/metadata_job_test.yaml rename to charts/library/common/test-chart/unittests/controller/metadata_job_test.yaml diff --git a/charts/library/common-test/tests/controller/metadata_statefulset_test.yaml b/charts/library/common/test-chart/unittests/controller/metadata_statefulset_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/metadata_statefulset_test.yaml rename to charts/library/common/test-chart/unittests/controller/metadata_statefulset_test.yaml diff --git a/charts/library/common-test/tests/controller/type_test.yaml b/charts/library/common/test-chart/unittests/controller/type_test.yaml similarity index 100% rename from charts/library/common-test/tests/controller/type_test.yaml rename to charts/library/common/test-chart/unittests/controller/type_test.yaml diff --git a/charts/library/common-test/tests/ingress/metadata_test.yaml b/charts/library/common/test-chart/unittests/ingress/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/ingress/metadata_test.yaml rename to charts/library/common/test-chart/unittests/ingress/metadata_test.yaml diff --git a/charts/library/common-test/tests/ingress/presence_test.yaml b/charts/library/common/test-chart/unittests/ingress/presence_test.yaml similarity index 100% rename from charts/library/common-test/tests/ingress/presence_test.yaml rename to charts/library/common/test-chart/unittests/ingress/presence_test.yaml diff --git a/charts/library/common-test/tests/ingress/service_reference_test.yaml b/charts/library/common/test-chart/unittests/ingress/service_reference_test.yaml similarity index 100% rename from charts/library/common-test/tests/ingress/service_reference_test.yaml rename to charts/library/common/test-chart/unittests/ingress/service_reference_test.yaml diff --git a/charts/library/common-test/tests/ingress/tls_test.yaml b/charts/library/common/test-chart/unittests/ingress/tls_test.yaml similarity index 100% rename from charts/library/common-test/tests/ingress/tls_test.yaml rename to charts/library/common/test-chart/unittests/ingress/tls_test.yaml diff --git a/charts/library/common-test/tests/ingress/values_test.yaml b/charts/library/common/test-chart/unittests/ingress/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/ingress/values_test.yaml rename to charts/library/common/test-chart/unittests/ingress/values_test.yaml diff --git a/charts/library/common-test/tests/misc/nameoverride_test.yaml b/charts/library/common/test-chart/unittests/misc/nameoverride_test.yaml similarity index 100% rename from charts/library/common-test/tests/misc/nameoverride_test.yaml rename to charts/library/common/test-chart/unittests/misc/nameoverride_test.yaml diff --git a/charts/library/common-test/tests/networkpolicy/metadata_test.yaml b/charts/library/common/test-chart/unittests/networkpolicy/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/networkpolicy/metadata_test.yaml rename to charts/library/common/test-chart/unittests/networkpolicy/metadata_test.yaml diff --git a/charts/library/common-test/tests/networkpolicy/names_test.yaml b/charts/library/common/test-chart/unittests/networkpolicy/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/networkpolicy/names_test.yaml rename to charts/library/common/test-chart/unittests/networkpolicy/names_test.yaml diff --git a/charts/library/common-test/tests/networkpolicy/validations_test.yaml b/charts/library/common/test-chart/unittests/networkpolicy/validations_test.yaml similarity index 100% rename from charts/library/common-test/tests/networkpolicy/validations_test.yaml rename to charts/library/common/test-chart/unittests/networkpolicy/validations_test.yaml diff --git a/charts/library/common-test/tests/networkpolicy/values_test.yaml b/charts/library/common/test-chart/unittests/networkpolicy/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/networkpolicy/values_test.yaml rename to charts/library/common/test-chart/unittests/networkpolicy/values_test.yaml diff --git a/charts/library/common-test/tests/persistence/claimnames_test.yaml b/charts/library/common/test-chart/unittests/persistence/claimnames_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/claimnames_test.yaml rename to charts/library/common/test-chart/unittests/persistence/claimnames_test.yaml diff --git a/charts/library/common-test/tests/persistence/configmap_test.yaml b/charts/library/common/test-chart/unittests/persistence/configmap_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/configmap_test.yaml rename to charts/library/common/test-chart/unittests/persistence/configmap_test.yaml diff --git a/charts/library/common-test/tests/persistence/custom.yaml b/charts/library/common/test-chart/unittests/persistence/custom.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/custom.yaml rename to charts/library/common/test-chart/unittests/persistence/custom.yaml diff --git a/charts/library/common-test/tests/persistence/emptydir_test.yaml b/charts/library/common/test-chart/unittests/persistence/emptydir_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/emptydir_test.yaml rename to charts/library/common/test-chart/unittests/persistence/emptydir_test.yaml diff --git a/charts/library/common-test/tests/persistence/hostpath_test.yaml b/charts/library/common/test-chart/unittests/persistence/hostpath_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/hostpath_test.yaml rename to charts/library/common/test-chart/unittests/persistence/hostpath_test.yaml diff --git a/charts/library/common-test/tests/persistence/nfs_test.yaml b/charts/library/common/test-chart/unittests/persistence/nfs_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/nfs_test.yaml rename to charts/library/common/test-chart/unittests/persistence/nfs_test.yaml diff --git a/charts/library/common-test/tests/persistence/secret_test.yaml b/charts/library/common/test-chart/unittests/persistence/secret_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/secret_test.yaml rename to charts/library/common/test-chart/unittests/persistence/secret_test.yaml diff --git a/charts/library/common-test/tests/persistence/volumeclaimtemplates_test.yaml b/charts/library/common/test-chart/unittests/persistence/volumeclaimtemplates_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/volumeclaimtemplates_test.yaml rename to charts/library/common/test-chart/unittests/persistence/volumeclaimtemplates_test.yaml diff --git a/charts/library/common-test/tests/persistence/volumes_test.yaml b/charts/library/common/test-chart/unittests/persistence/volumes_test.yaml similarity index 100% rename from charts/library/common-test/tests/persistence/volumes_test.yaml rename to charts/library/common/test-chart/unittests/persistence/volumes_test.yaml diff --git a/charts/library/common-test/tests/pod/additional_containers_test.yaml b/charts/library/common/test-chart/unittests/pod/additional_containers_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/additional_containers_test.yaml rename to charts/library/common/test-chart/unittests/pod/additional_containers_test.yaml diff --git a/charts/library/common-test/tests/pod/container_order_test.yaml b/charts/library/common/test-chart/unittests/pod/container_order_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/container_order_test.yaml rename to charts/library/common/test-chart/unittests/pod/container_order_test.yaml diff --git a/charts/library/common-test/tests/pod/field_affinity_test.yaml b/charts/library/common/test-chart/unittests/pod/field_affinity_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_affinity_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_affinity_test.yaml diff --git a/charts/library/common-test/tests/pod/field_dnsConfig_test.yaml b/charts/library/common/test-chart/unittests/pod/field_dnsConfig_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_dnsConfig_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_dnsConfig_test.yaml diff --git a/charts/library/common-test/tests/pod/field_dnsPolicy_test.yaml b/charts/library/common/test-chart/unittests/pod/field_dnsPolicy_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_dnsPolicy_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_dnsPolicy_test.yaml diff --git a/charts/library/common-test/tests/pod/field_enableServiceLinks_test.yaml b/charts/library/common/test-chart/unittests/pod/field_enableServiceLinks_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_enableServiceLinks_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_enableServiceLinks_test.yaml diff --git a/charts/library/common-test/tests/pod/field_hostAliases_test.yaml b/charts/library/common/test-chart/unittests/pod/field_hostAliases_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_hostAliases_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_hostAliases_test.yaml diff --git a/charts/library/common-test/tests/pod/field_hostIPC_test.yaml b/charts/library/common/test-chart/unittests/pod/field_hostIPC_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_hostIPC_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_hostIPC_test.yaml diff --git a/charts/library/common-test/tests/pod/field_hostNetwork_test.yaml b/charts/library/common/test-chart/unittests/pod/field_hostNetwork_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_hostNetwork_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_hostNetwork_test.yaml diff --git a/charts/library/common-test/tests/pod/field_hostPID_test.yaml b/charts/library/common/test-chart/unittests/pod/field_hostPID_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_hostPID_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_hostPID_test.yaml diff --git a/charts/library/common-test/tests/pod/field_hostUsers_test.yaml b/charts/library/common/test-chart/unittests/pod/field_hostUsers_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_hostUsers_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_hostUsers_test.yaml diff --git a/charts/library/common-test/tests/pod/field_imagePullSecrets_test.yaml b/charts/library/common/test-chart/unittests/pod/field_imagePullSecrets_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_imagePullSecrets_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_imagePullSecrets_test.yaml diff --git a/charts/library/common-test/tests/pod/field_nodeSelector_test.yaml b/charts/library/common/test-chart/unittests/pod/field_nodeSelector_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_nodeSelector_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_nodeSelector_test.yaml diff --git a/charts/library/common-test/tests/pod/field_replicas_test.yaml b/charts/library/common/test-chart/unittests/pod/field_replicas_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_replicas_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_replicas_test.yaml diff --git a/charts/library/common-test/tests/pod/field_securityContext_test.yaml b/charts/library/common/test-chart/unittests/pod/field_securityContext_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_securityContext_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_securityContext_test.yaml diff --git a/charts/library/common-test/tests/pod/field_serviceAccount_test.yaml b/charts/library/common/test-chart/unittests/pod/field_serviceAccount_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_serviceAccount_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_serviceAccount_test.yaml diff --git a/charts/library/common-test/tests/pod/field_shareProcessNamespace_test.yaml b/charts/library/common/test-chart/unittests/pod/field_shareProcessNamespace_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_shareProcessNamespace_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_shareProcessNamespace_test.yaml diff --git a/charts/library/common-test/tests/pod/field_tolerations_test.yaml b/charts/library/common/test-chart/unittests/pod/field_tolerations_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_tolerations_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_tolerations_test.yaml diff --git a/charts/library/common-test/tests/pod/field_topologySpreadConstraints_test.yaml b/charts/library/common/test-chart/unittests/pod/field_topologySpreadConstraints_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/field_topologySpreadConstraints_test.yaml rename to charts/library/common/test-chart/unittests/pod/field_topologySpreadConstraints_test.yaml diff --git a/charts/library/common-test/tests/pod/initcontainers_test.yaml b/charts/library/common/test-chart/unittests/pod/initcontainers_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/initcontainers_test.yaml rename to charts/library/common/test-chart/unittests/pod/initcontainers_test.yaml diff --git a/charts/library/common-test/tests/pod/metadata_annotations_test.yaml b/charts/library/common/test-chart/unittests/pod/metadata_annotations_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/metadata_annotations_test.yaml rename to charts/library/common/test-chart/unittests/pod/metadata_annotations_test.yaml diff --git a/charts/library/common-test/tests/pod/metadata_labels_test.yaml b/charts/library/common/test-chart/unittests/pod/metadata_labels_test.yaml similarity index 100% rename from charts/library/common-test/tests/pod/metadata_labels_test.yaml rename to charts/library/common/test-chart/unittests/pod/metadata_labels_test.yaml diff --git a/charts/library/common-test/tests/pvc/datasource_test.yaml b/charts/library/common/test-chart/unittests/pvc/datasource_test.yaml similarity index 100% rename from charts/library/common-test/tests/pvc/datasource_test.yaml rename to charts/library/common/test-chart/unittests/pvc/datasource_test.yaml diff --git a/charts/library/common-test/tests/pvc/metadata_test.yaml b/charts/library/common/test-chart/unittests/pvc/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/pvc/metadata_test.yaml rename to charts/library/common/test-chart/unittests/pvc/metadata_test.yaml diff --git a/charts/library/common-test/tests/pvc/names_test.yaml b/charts/library/common/test-chart/unittests/pvc/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/pvc/names_test.yaml rename to charts/library/common/test-chart/unittests/pvc/names_test.yaml diff --git a/charts/library/common-test/tests/pvc/storageclass_test.yaml b/charts/library/common/test-chart/unittests/pvc/storageclass_test.yaml similarity index 100% rename from charts/library/common-test/tests/pvc/storageclass_test.yaml rename to charts/library/common/test-chart/unittests/pvc/storageclass_test.yaml diff --git a/charts/library/common-test/tests/pvc/values_test.yaml b/charts/library/common/test-chart/unittests/pvc/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/pvc/values_test.yaml rename to charts/library/common/test-chart/unittests/pvc/values_test.yaml diff --git a/charts/library/common-test/tests/rawResource/metadata_test.yaml b/charts/library/common/test-chart/unittests/rawResource/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/rawResource/metadata_test.yaml rename to charts/library/common/test-chart/unittests/rawResource/metadata_test.yaml diff --git a/charts/library/common-test/tests/rawResource/values_test.yaml b/charts/library/common/test-chart/unittests/rawResource/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/rawResource/values_test.yaml rename to charts/library/common/test-chart/unittests/rawResource/values_test.yaml diff --git a/charts/library/common-test/tests/rbac/metadata_test.yaml b/charts/library/common/test-chart/unittests/rbac/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/rbac/metadata_test.yaml rename to charts/library/common/test-chart/unittests/rbac/metadata_test.yaml diff --git a/charts/library/common-test/tests/rbac/names_test.yaml b/charts/library/common/test-chart/unittests/rbac/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/rbac/names_test.yaml rename to charts/library/common/test-chart/unittests/rbac/names_test.yaml diff --git a/charts/library/common-test/tests/rbac/validations_test.yaml b/charts/library/common/test-chart/unittests/rbac/validations_test.yaml similarity index 100% rename from charts/library/common-test/tests/rbac/validations_test.yaml rename to charts/library/common/test-chart/unittests/rbac/validations_test.yaml diff --git a/charts/library/common-test/tests/rbac/values_test.yaml b/charts/library/common/test-chart/unittests/rbac/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/rbac/values_test.yaml rename to charts/library/common/test-chart/unittests/rbac/values_test.yaml diff --git a/charts/library/common-test/tests/route/metadata_test.yaml b/charts/library/common/test-chart/unittests/route/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/route/metadata_test.yaml rename to charts/library/common/test-chart/unittests/route/metadata_test.yaml diff --git a/charts/library/common-test/tests/route/presence_test.yaml b/charts/library/common/test-chart/unittests/route/presence_test.yaml similarity index 100% rename from charts/library/common-test/tests/route/presence_test.yaml rename to charts/library/common/test-chart/unittests/route/presence_test.yaml diff --git a/charts/library/common-test/tests/route/service_reference_test.yaml b/charts/library/common/test-chart/unittests/route/service_reference_test.yaml similarity index 100% rename from charts/library/common-test/tests/route/service_reference_test.yaml rename to charts/library/common/test-chart/unittests/route/service_reference_test.yaml diff --git a/charts/library/common-test/tests/route/values_test.yaml b/charts/library/common/test-chart/unittests/route/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/route/values_test.yaml rename to charts/library/common/test-chart/unittests/route/values_test.yaml diff --git a/charts/library/common-test/tests/secret/metadata_test.yaml b/charts/library/common/test-chart/unittests/secret/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/secret/metadata_test.yaml rename to charts/library/common/test-chart/unittests/secret/metadata_test.yaml diff --git a/charts/library/common-test/tests/secret/names_test.yaml b/charts/library/common/test-chart/unittests/secret/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/secret/names_test.yaml rename to charts/library/common/test-chart/unittests/secret/names_test.yaml diff --git a/charts/library/common-test/tests/secret/pod_metadata_test.yaml b/charts/library/common/test-chart/unittests/secret/pod_metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/secret/pod_metadata_test.yaml rename to charts/library/common/test-chart/unittests/secret/pod_metadata_test.yaml diff --git a/charts/library/common-test/tests/service/metadata_test.yaml b/charts/library/common/test-chart/unittests/service/metadata_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/metadata_test.yaml rename to charts/library/common/test-chart/unittests/service/metadata_test.yaml diff --git a/charts/library/common-test/tests/service/names_test.yaml b/charts/library/common/test-chart/unittests/service/names_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/names_test.yaml rename to charts/library/common/test-chart/unittests/service/names_test.yaml diff --git a/charts/library/common-test/tests/service/port_protocols_test.yaml b/charts/library/common/test-chart/unittests/service/port_protocols_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/port_protocols_test.yaml rename to charts/library/common/test-chart/unittests/service/port_protocols_test.yaml diff --git a/charts/library/common-test/tests/service/ports_test.yaml b/charts/library/common/test-chart/unittests/service/ports_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/ports_test.yaml rename to charts/library/common/test-chart/unittests/service/ports_test.yaml diff --git a/charts/library/common-test/tests/service/validations_test.yaml b/charts/library/common/test-chart/unittests/service/validations_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/validations_test.yaml rename to charts/library/common/test-chart/unittests/service/validations_test.yaml diff --git a/charts/library/common-test/tests/service/values_test.yaml b/charts/library/common/test-chart/unittests/service/values_test.yaml similarity index 100% rename from charts/library/common-test/tests/service/values_test.yaml rename to charts/library/common/test-chart/unittests/service/values_test.yaml diff --git a/charts/library/common-test/tests/serviceAccount/serviceaccount_test.yaml b/charts/library/common/test-chart/unittests/serviceAccount/serviceaccount_test.yaml similarity index 100% rename from charts/library/common-test/tests/serviceAccount/serviceaccount_test.yaml rename to charts/library/common/test-chart/unittests/serviceAccount/serviceaccount_test.yaml diff --git a/charts/library/common-test/tests/serviceMonitor/servicemonitor_test.yaml b/charts/library/common/test-chart/unittests/serviceMonitor/servicemonitor_test.yaml similarity index 100% rename from charts/library/common-test/tests/serviceMonitor/servicemonitor_test.yaml rename to charts/library/common/test-chart/unittests/serviceMonitor/servicemonitor_test.yaml diff --git a/charts/library/common/test-chart/values.schema.json b/charts/library/common/test-chart/values.schema.json new file mode 100644 index 00000000..b46f2ebd --- /dev/null +++ b/charts/library/common/test-chart/values.schema.json @@ -0,0 +1,3 @@ +{ + "$ref": "file://../values.schema.json" +} diff --git a/charts/library/common-test/values.yaml b/charts/library/common/test-chart/values.yaml similarity index 100% rename from charts/library/common-test/values.yaml rename to charts/library/common/test-chart/values.yaml diff --git a/charts/library/common/values.schema.json b/charts/library/common/values.schema.json index d98da1cd..3dcb5813 100644 --- a/charts/library/common/values.schema.json +++ b/charts/library/common/values.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.7.0/charts/library/common/values.schema.json", + "$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.7.1/charts/library/common/values.schema.json", "type": "object", "properties": { "global": {