Skip to content

Commit

Permalink
move ix-chart to ix-dev (truenas#1054)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
stavros-k authored Apr 11, 2023
1 parent 178fa60 commit 768be33
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 60 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/common_library_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions charts/ix-chart/2212.0.1/Chart.lock

This file was deleted.

27 changes: 0 additions & 27 deletions charts/ix-chart/2212.0.1/Chart.yaml

This file was deleted.

Binary file removed charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz
Binary file not shown.
17 changes: 0 additions & 17 deletions charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml

This file was deleted.

File renamed without changes.
6 changes: 6 additions & 0 deletions library/ix-dev/charts/ix-chart/Chart.lock
Original file line number Diff line number Diff line change
@@ -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 changes: 20 additions & 0 deletions library/ix-dev/charts/ix-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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: []
File renamed without changes.
File renamed without changes.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Default values for ix-chart.

image:
repository: nginx
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -43,3 +42,5 @@ securityContext:
capabilities: []
tty: true
stdin: true
# CI Enabled
ci: true
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Empty file.
6 changes: 3 additions & 3 deletions run_common_tests.sh
Original file line number Diff line number Diff line change
@@ -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"

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

0 comments on commit 768be33

Please sign in to comment.