diff --git a/.github/workflows/common_library_tests.yaml b/.github/workflows/common_library_tests.yaml index e182a736d6..a8c9c7fc50 100644 --- a/.github/workflows/common_library_tests.yaml +++ b/.github/workflows/common_library_tests.yaml @@ -50,7 +50,7 @@ jobs: name: Unit Tests runs-on: ubuntu-22.04 env: - helmUnitVersion: 0.2.11 + helmUnitVersion: 0.3.0 strategy: fail-fast: false matrix: @@ -74,15 +74,15 @@ jobs: shell: bash run: | # Retry helm plugin install - helm plugin install https://github.com/quintush/helm-unittest --version v${helmUnitVersion} || \ - helm plugin install https://github.com/quintush/helm-unittest --version v${helmUnitVersion} || \ - helm plugin install https://github.com/quintush/helm-unittest --version v${helmUnitVersion} || \ - helm plugin install https://github.com/quintush/helm-unittest --version v${helmUnitVersion} + helm plugin install https://github.com/helm-unittest/helm-unittest --version v${helmUnitVersion} || \ + helm plugin install https://github.com/helm-unittest/helm-unittest --version v${helmUnitVersion} || \ + helm plugin install https://github.com/helm-unittest/helm-unittest --version v${helmUnitVersion} || \ + helm plugin install https://github.com/helm-unittest/helm-unittest --version v${helmUnitVersion} # Run tests cd library/common-test/ helm dependency update - helm unittest --helm3 -f "tests/*/*.yaml" . + helm unittest -f "tests/*/*.yaml" . install: needs: diff --git a/charts/ix-chart/2212.0.1/Chart.lock b/charts/ix-chart/2212.0.1/Chart.lock deleted file mode 100644 index 755de5eb06..0000000000 --- a/charts/ix-chart/2212.0.1/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: file://../../../library/common/2207.0.0 - version: 2207.0.0 -digest: sha256:f17f3d458ca0210a52e39da0dce35034e900b36f2040d4b19bed46a7aae91506 -generated: "2022-07-25T00:20:48.266895679+05:00" diff --git a/charts/ix-chart/2212.0.1/Chart.yaml b/charts/ix-chart/2212.0.1/Chart.yaml deleted file mode 100644 index 8cd49e0837..0000000000 --- a/charts/ix-chart/2212.0.1/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v2 -name: ix-chart -description: A Helm chart for deploying simple workloads Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2212.0.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: v1 -dependencies: - - name: common - repository: file://../../../library/common/2207.0.0 - version: 2207.0.0 diff --git a/charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz b/charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz deleted file mode 100644 index 2adf94b438..0000000000 Binary files a/charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz and /dev/null differ diff --git a/charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml b/charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml deleted file mode 100644 index 465a2bd1fd..0000000000 --- a/charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ .Release.Name }}-deployment-test" - annotations: - "helm.sh/hook": test -spec: - containers: - - name: {{ .Release.Name }}-deployment-test - image: "busybox" - command: - - nc - args: - - "-vz" - - "{{ include "ix-chart.fullname" . }}" - - "80" - restartPolicy: Never diff --git a/charts/ix-chart/2212.0.1/.helmignore b/library/ix-dev/charts/ix-chart/.helmignore similarity index 100% rename from charts/ix-chart/2212.0.1/.helmignore rename to library/ix-dev/charts/ix-chart/.helmignore diff --git a/library/ix-dev/charts/ix-chart/Chart.lock b/library/ix-dev/charts/ix-chart/Chart.lock new file mode 100644 index 0000000000..ec58a2a0f5 --- /dev/null +++ b/library/ix-dev/charts/ix-chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +digest: sha256:a301ba0f99ec1e08a60a7f0a0320aa02d225993572f2f056f09520f06df88b37 +generated: "2023-03-23T16:05:17.17021698+02:00" diff --git a/library/ix-dev/charts/ix-chart/Chart.yaml b/library/ix-dev/charts/ix-chart/Chart.yaml new file mode 100644 index 0000000000..1394d9169b --- /dev/null +++ b/library/ix-dev/charts/ix-chart/Chart.yaml @@ -0,0 +1,20 @@ +name: ix-chart +description: A Helm chart for deploying simple workloads Kubernetes +annotations: + title: ix-chart +type: application +version: 2304.0.0 +apiVersion: v2 +appVersion: v1 +kubeVersion: ">=1.16.0-0" +maintainers: + - name: truenas + url: https://www.truenas.com/ +dependencies: + - name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +home: https://www.truenas.com/ +icon: https://www.ixsystems.com/wp-content/uploads/2021/06/ix_logo_200x47.png +keywords: [] +sources: [] diff --git a/charts/ix-chart/2212.0.1/README.md b/library/ix-dev/charts/ix-chart/README.md similarity index 100% rename from charts/ix-chart/2212.0.1/README.md rename to library/ix-dev/charts/ix-chart/README.md diff --git a/charts/ix-chart/2212.0.1/app-readme.md b/library/ix-dev/charts/ix-chart/app-readme.md similarity index 100% rename from charts/ix-chart/2212.0.1/app-readme.md rename to library/ix-dev/charts/ix-chart/app-readme.md diff --git a/library/ix-dev/charts/ix-chart/charts/common-2207.0.0.tgz b/library/ix-dev/charts/ix-chart/charts/common-2207.0.0.tgz new file mode 100644 index 0000000000..e02da8d7cb Binary files /dev/null and b/library/ix-dev/charts/ix-chart/charts/common-2207.0.0.tgz differ diff --git a/charts/ix-chart/2212.0.1/test_values.yaml b/library/ix-dev/charts/ix-chart/ci/test-values.yaml similarity index 97% rename from charts/ix-chart/2212.0.1/test_values.yaml rename to library/ix-dev/charts/ix-chart/ci/test-values.yaml index 89bb16bc8c..c3e8b24c3d 100644 --- a/charts/ix-chart/2212.0.1/test_values.yaml +++ b/library/ix-dev/charts/ix-chart/ci/test-values.yaml @@ -1,5 +1,4 @@ # Default values for ix-chart. - image: repository: nginx pullPolicy: IfNotPresent @@ -43,3 +42,5 @@ securityContext: capabilities: [] tty: true stdin: true +# CI Enabled +ci: true diff --git a/charts/ix-chart/item.yaml b/library/ix-dev/charts/ix-chart/item.yaml similarity index 100% rename from charts/ix-chart/item.yaml rename to library/ix-dev/charts/ix-chart/item.yaml diff --git a/charts/ix-chart/2212.0.1/questions.yaml b/library/ix-dev/charts/ix-chart/questions.yaml similarity index 100% rename from charts/ix-chart/2212.0.1/questions.yaml rename to library/ix-dev/charts/ix-chart/questions.yaml diff --git a/charts/ix-chart/2212.0.1/templates/NOTES.txt b/library/ix-dev/charts/ix-chart/templates/NOTES.txt similarity index 100% rename from charts/ix-chart/2212.0.1/templates/NOTES.txt rename to library/ix-dev/charts/ix-chart/templates/NOTES.txt diff --git a/charts/ix-chart/2212.0.1/templates/_containers.tpl b/library/ix-dev/charts/ix-chart/templates/_containers.tpl similarity index 100% rename from charts/ix-chart/2212.0.1/templates/_containers.tpl rename to library/ix-dev/charts/ix-chart/templates/_containers.tpl diff --git a/charts/ix-chart/2212.0.1/templates/_helpers.tpl b/library/ix-dev/charts/ix-chart/templates/_helpers.tpl similarity index 100% rename from charts/ix-chart/2212.0.1/templates/_helpers.tpl rename to library/ix-dev/charts/ix-chart/templates/_helpers.tpl diff --git a/charts/ix-chart/2212.0.1/templates/_networking.tpl b/library/ix-dev/charts/ix-chart/templates/_networking.tpl similarity index 100% rename from charts/ix-chart/2212.0.1/templates/_networking.tpl rename to library/ix-dev/charts/ix-chart/templates/_networking.tpl diff --git a/charts/ix-chart/2212.0.1/templates/_volumes.tpl b/library/ix-dev/charts/ix-chart/templates/_volumes.tpl similarity index 100% rename from charts/ix-chart/2212.0.1/templates/_volumes.tpl rename to library/ix-dev/charts/ix-chart/templates/_volumes.tpl diff --git a/charts/ix-chart/2212.0.1/templates/_workload.tpl b/library/ix-dev/charts/ix-chart/templates/_workload.tpl similarity index 86% rename from charts/ix-chart/2212.0.1/templates/_workload.tpl rename to library/ix-dev/charts/ix-chart/templates/_workload.tpl index a561b81159..6b7903c99d 100644 --- a/charts/ix-chart/2212.0.1/templates/_workload.tpl +++ b/library/ix-dev/charts/ix-chart/templates/_workload.tpl @@ -68,6 +68,35 @@ containers: capabilities: add: {{ toYaml .Values.securityContext.capabilities | nindent 8 }} {{ end }} + {{ if .Values.ci }} + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 2 + startupProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 60 + successThreshold: 1 + {{ end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.image.pullPolicy }} {{- include "containerCommand" . | indent 2 }} diff --git a/charts/ix-chart/2212.0.1/templates/external-interfaces.yaml b/library/ix-dev/charts/ix-chart/templates/external-interfaces.yaml similarity index 100% rename from charts/ix-chart/2212.0.1/templates/external-interfaces.yaml rename to library/ix-dev/charts/ix-chart/templates/external-interfaces.yaml diff --git a/charts/ix-chart/2212.0.1/templates/service.yaml b/library/ix-dev/charts/ix-chart/templates/service.yaml similarity index 100% rename from charts/ix-chart/2212.0.1/templates/service.yaml rename to library/ix-dev/charts/ix-chart/templates/service.yaml diff --git a/charts/ix-chart/2212.0.1/templates/workload.yaml b/library/ix-dev/charts/ix-chart/templates/workload.yaml similarity index 100% rename from charts/ix-chart/2212.0.1/templates/workload.yaml rename to library/ix-dev/charts/ix-chart/templates/workload.yaml diff --git a/library/ix-dev/charts/ix-chart/values.yaml b/library/ix-dev/charts/ix-chart/values.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/run_common_tests.sh b/run_common_tests.sh index cf907dc196..df69799cc2 100755 --- a/run_common_tests.sh +++ b/run_common_tests.sh @@ -1,8 +1,8 @@ #!/bin/bash -# https://github.com/quintush/helm-unittest +# https://github.com/helm-unittest/helm-unittest # -- You need to install this helm plugin -# helm plugin install https://github.com/quintush/helm-unittest +# helm plugin install https://github.com/helm-unittest/helm-unittest common_test_path="library/common-test" @@ -22,6 +22,6 @@ echo "🔨 Building common..." helm dependency update "$common_test_path" echo "🧪 Running tests..." -helm unittest --update-snapshot --helm3 -f "tests/*/*.yaml" "./$common_test_path" +helm unittest --update-snapshot -f "tests/*/*.yaml" "./$common_test_path" cleanup