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
This commit is contained in:
Stavros Kois
2023-04-11 18:36:44 +03:00
committed by GitHub
parent 178fa6002a
commit 768be33a96
25 changed files with 66 additions and 60 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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: []

View File

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

View File

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

View File

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