Преглед на файлове

move ix-chart to ix-dev (#1054)

* switch to the newly released official repo

* remove --helm3 flag as it does not exist anymore

* move ix-chart

* create values.yaml and remove old test hook

* update version scheme
Stavros Kois преди 2 години
родител
ревизия
768be33a96
променени са 25 файла, в които са добавени 66 реда и са изтрити 60 реда
  1. 6 6
      .github/workflows/common_library_tests.yaml
  2. 0 6
      charts/ix-chart/2212.0.1/Chart.lock
  3. 0 27
      charts/ix-chart/2212.0.1/Chart.yaml
  4. BIN
      charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz
  5. 0 17
      charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml
  6. 0 0
      library/ix-dev/charts/ix-chart/.helmignore
  7. 6 0
      library/ix-dev/charts/ix-chart/Chart.lock
  8. 20 0
      library/ix-dev/charts/ix-chart/Chart.yaml
  9. 0 0
      library/ix-dev/charts/ix-chart/README.md
  10. 0 0
      library/ix-dev/charts/ix-chart/app-readme.md
  11. BIN
      library/ix-dev/charts/ix-chart/charts/common-2207.0.0.tgz
  12. 2 1
      library/ix-dev/charts/ix-chart/ci/test-values.yaml
  13. 0 0
      library/ix-dev/charts/ix-chart/item.yaml
  14. 0 0
      library/ix-dev/charts/ix-chart/questions.yaml
  15. 0 0
      library/ix-dev/charts/ix-chart/templates/NOTES.txt
  16. 0 0
      library/ix-dev/charts/ix-chart/templates/_containers.tpl
  17. 0 0
      library/ix-dev/charts/ix-chart/templates/_helpers.tpl
  18. 0 0
      library/ix-dev/charts/ix-chart/templates/_networking.tpl
  19. 0 0
      library/ix-dev/charts/ix-chart/templates/_volumes.tpl
  20. 29 0
      library/ix-dev/charts/ix-chart/templates/_workload.tpl
  21. 0 0
      library/ix-dev/charts/ix-chart/templates/external-interfaces.yaml
  22. 0 0
      library/ix-dev/charts/ix-chart/templates/service.yaml
  23. 0 0
      library/ix-dev/charts/ix-chart/templates/workload.yaml
  24. 0 0
      library/ix-dev/charts/ix-chart/values.yaml
  25. 3 3
      run_common_tests.sh

+ 6 - 6
.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:

+ 0 - 6
charts/ix-chart/2212.0.1/Chart.lock

@@ -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"

+ 0 - 27
charts/ix-chart/2212.0.1/Chart.yaml

@@ -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

BIN
charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz


+ 0 - 17
charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml

@@ -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

+ 0 - 0
charts/ix-chart/2212.0.1/.helmignore → library/ix-dev/charts/ix-chart/.helmignore


+ 6 - 0
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"

+ 20 - 0
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: []

+ 0 - 0
charts/ix-chart/2212.0.1/README.md → library/ix-dev/charts/ix-chart/README.md


+ 0 - 0
charts/ix-chart/2212.0.1/app-readme.md → library/ix-dev/charts/ix-chart/app-readme.md


BIN
library/ix-dev/charts/ix-chart/charts/common-2207.0.0.tgz


+ 2 - 1
charts/ix-chart/2212.0.1/test_values.yaml → 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

+ 0 - 0
charts/ix-chart/item.yaml → library/ix-dev/charts/ix-chart/item.yaml


+ 0 - 0
charts/ix-chart/2212.0.1/questions.yaml → library/ix-dev/charts/ix-chart/questions.yaml


+ 0 - 0
charts/ix-chart/2212.0.1/templates/NOTES.txt → library/ix-dev/charts/ix-chart/templates/NOTES.txt


+ 0 - 0
charts/ix-chart/2212.0.1/templates/_containers.tpl → library/ix-dev/charts/ix-chart/templates/_containers.tpl


+ 0 - 0
charts/ix-chart/2212.0.1/templates/_helpers.tpl → library/ix-dev/charts/ix-chart/templates/_helpers.tpl


+ 0 - 0
charts/ix-chart/2212.0.1/templates/_networking.tpl → library/ix-dev/charts/ix-chart/templates/_networking.tpl


+ 0 - 0
charts/ix-chart/2212.0.1/templates/_volumes.tpl → library/ix-dev/charts/ix-chart/templates/_volumes.tpl


+ 29 - 0
charts/ix-chart/2212.0.1/templates/_workload.tpl → 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 }}

+ 0 - 0
charts/ix-chart/2212.0.1/templates/external-interfaces.yaml → library/ix-dev/charts/ix-chart/templates/external-interfaces.yaml


+ 0 - 0
charts/ix-chart/2212.0.1/templates/service.yaml → library/ix-dev/charts/ix-chart/templates/service.yaml


+ 0 - 0
charts/ix-chart/2212.0.1/templates/workload.yaml → library/ix-dev/charts/ix-chart/templates/workload.yaml


+ 0 - 0
library/ix-dev/charts/ix-chart/values.yaml


+ 3 - 3
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