From 655555980ccf567a0b9917467a8326524834ae6e Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:50:07 +0300 Subject: [PATCH 1/9] add tests for tailscale addon (#241) --- cspell.config.yaml | 2 + .../common-test/tests/addons/vpn_test.yaml | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 cspell.config.yaml diff --git a/cspell.config.yaml b/cspell.config.yaml new file mode 100644 index 00000000..6b06eb75 --- /dev/null +++ b/cspell.config.yaml @@ -0,0 +1,2 @@ +words: +- tailscale diff --git a/helper-charts/common-test/tests/addons/vpn_test.yaml b/helper-charts/common-test/tests/addons/vpn_test.yaml index 8db67590..17fde3aa 100644 --- a/helper-charts/common-test/tests/addons/vpn_test.yaml +++ b/helper-charts/common-test/tests/addons/vpn_test.yaml @@ -78,3 +78,64 @@ tests: equal: path: spec.template.spec.containers[0].name value: vpn + + - it: tailscale addon enabled with authkey should pass + set: + addons: + vpn: + type: tailscale + tailscale: + authkey: something + asserts: + - hasDocuments: + count: 6 + - documentIndex: &ServiceAccountDocument 0 + isKind: + of: ServiceAccount + - documentIndex: *ServiceAccountDocument + equal: + path: metadata.name + value: RELEASE-NAME-common-test-tailscale-addon + - documentIndex: &ClusterRoleDocument 1 + isKind: + of: ClusterRole + - documentIndex: *ClusterRoleDocument + equal: + path: rules[1].resourceNames[0] + value: RELEASE-NAME-common-test-tailscale-secret + - documentIndex: &ClusterRoleBindingDocument 2 + isKind: + of: ClusterRoleBinding + - documentIndex: *ClusterRoleBindingDocument + equal: + path: subjects[0].name + value: RELEASE-NAME-common-test-tailscale-addon + - documentIndex: &SecretDocument 3 + isKind: + of: Secret + - documentIndex: *SecretDocument + equal: + path: metadata.name + value: RELEASE-NAME-common-test-tailscale-secret + - documentIndex: *SecretDocument + isNotNull: + path: data.TS_AUTH_KEY + - documentIndex: &DeploymentDocument 4 + isKind: + of: Deployment + - documentIndex: *DeploymentDocument + not: true + equal: + path: spec.template.spec.containers[0].name + value: tailscale + - documentIndex: *DeploymentDocument + equal: + path: spec.template.spec.containers[1].name + value: tailscale + - documentIndex: *DeploymentDocument + equal: + path: spec.template.spec.containers[1].env[0].value + value: RELEASE-NAME-common-test-tailscale-secret + - documentIndex: &ServiceDocument 5 + isKind: + of: Service From 241c0f3e97a713c39ce4662f00a139eedb8f7062 Mon Sep 17 00:00:00 2001 From: TrueCharts-Admin Date: Wed, 28 Sep 2022 18:32:47 +0000 Subject: [PATCH 2/9] chore(deps): update helm/chart-testing-action action to v2.3.1 --- .github/workflows/charts-lint-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/charts-lint-test.yaml b/.github/workflows/charts-lint-test.yaml index f4ef4d6d..ff82b26d 100644 --- a/.github/workflows/charts-lint-test.yaml +++ b/.github/workflows/charts-lint-test.yaml @@ -29,7 +29,7 @@ jobs: python-version: 3.7 - name: Set up chart-testing - uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0 + uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # tag=v2.3.1 - name: Run chart-testing (list-changed) id: list-changed @@ -86,7 +86,7 @@ jobs: python-version: 3.7 - name: Set up chart-testing - uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0 + uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # tag=v2.3.1 - name: Create k3d cluster uses: nolar/setup-k3d-k3s@v1 From 67781daa437652ad3c79282938dedfad9bdba8f1 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 30 Sep 2022 19:19:33 +0200 Subject: [PATCH 3/9] Update _pvc.tpl --- charts/common/templates/class/_pvc.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/templates/class/_pvc.tpl b/charts/common/templates/class/_pvc.tpl index 1fe87269..28b04626 100644 --- a/charts/common/templates/class/_pvc.tpl +++ b/charts/common/templates/class/_pvc.tpl @@ -42,7 +42,7 @@ spec: - {{ ( $values.accessMode | default "ReadWriteOnce" ) | quote }} resources: requests: - storage: {{ $values.size | default "999Gi" | quote }} + storage: {{ $values.size | default "256Gi" | quote }} {{- with $values.spec }} {{ tpl ( toYaml . ) $ | indent 2 }} {{- end }} From 9c72cd8dff08dfbc38b794122dd875f0163c0e69 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 30 Sep 2022 19:19:51 +0200 Subject: [PATCH 4/9] Update Chart.yaml --- charts/common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index a6116daa..aefca020 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 10.6.5 +version: 10.6.6 From 08988267ebb1d5fae297a45d165508c8c5866147 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 30 Sep 2022 19:20:57 +0200 Subject: [PATCH 5/9] Update values.yaml --- charts/common/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/values.yaml b/charts/common/values.yaml index 9e62b85b..0508a764 100644 --- a/charts/common/values.yaml +++ b/charts/common/values.yaml @@ -740,7 +740,7 @@ persistence: accessMode: ReadWriteOnce # -- The amount of storage that is requested for the persistent volume. - size: 999Gi + size: 256Gi # -- Set to true to retain the PVC upon `helm uninstall` retain: false From 5b73b95aa6594d50095b1522d685fab346f7d974 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 30 Sep 2022 19:21:42 +0200 Subject: [PATCH 6/9] Update _statefulset.tpl --- charts/common/templates/pods/_statefulset.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/templates/pods/_statefulset.tpl b/charts/common/templates/pods/_statefulset.tpl index c603c4e7..26c33db0 100644 --- a/charts/common/templates/pods/_statefulset.tpl +++ b/charts/common/templates/pods/_statefulset.tpl @@ -55,7 +55,7 @@ spec: - {{ tpl ( $vct.accessMode | default "ReadWriteOnce" ) $ | quote }} resources: requests: - storage: {{ tpl ( $vct.size | default "999Gi" ) $ | quote }} + storage: {{ tpl ( $vct.size | default "256Gi" ) $ | quote }} {{ include "tc.common.storage.class" ( dict "persistence" $vct "global" $) }} {{- end }} {{- end }} From 9a8f35522dfd9584dfe600ec4a99b7218a8d665d Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 30 Sep 2022 19:21:52 +0200 Subject: [PATCH 7/9] Update Chart.yaml --- charts/common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index aefca020..ff69537b 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 10.6.6 +version: 10.6.7 From 26fe9f632156f2577d1b3252d9112b5c70f3588d Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sat, 1 Oct 2022 01:15:50 +0200 Subject: [PATCH 8/9] Update _statefulset.tpl --- charts/common/templates/pods/_statefulset.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/templates/pods/_statefulset.tpl b/charts/common/templates/pods/_statefulset.tpl index 26c33db0..c603c4e7 100644 --- a/charts/common/templates/pods/_statefulset.tpl +++ b/charts/common/templates/pods/_statefulset.tpl @@ -55,7 +55,7 @@ spec: - {{ tpl ( $vct.accessMode | default "ReadWriteOnce" ) $ | quote }} resources: requests: - storage: {{ tpl ( $vct.size | default "256Gi" ) $ | quote }} + storage: {{ tpl ( $vct.size | default "999Gi" ) $ | quote }} {{ include "tc.common.storage.class" ( dict "persistence" $vct "global" $) }} {{- end }} {{- end }} From b4407b038b7c6b3c3604e18c5aeb061621f2c19a Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sat, 1 Oct 2022 01:16:01 +0200 Subject: [PATCH 9/9] Update Chart.yaml --- charts/common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index ff69537b..b6f755fd 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 10.6.7 +version: 10.6.8