From eaec41f6e92b3adc893c3bbd9213091f3017d513 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Fri, 11 Sep 2020 13:18:34 +0200 Subject: [PATCH] e2e: test HelmChart ValuesFile --- .github/workflows/e2e.yaml | 8 +++++++- .../source_v1alpha1_helmchart_gitrepository.yaml | 1 - .../testdata/helmchart-valuesfile/gitrepository.yaml | 12 ++++++++++++ .../helmchart_gitrepository.yaml | 11 +++++++++++ .../helmchart_helmrepository.yaml | 11 +++++++++++ .../helmchart-valuesfile/helmrepository.yaml | 7 +++++++ 6 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 config/testdata/helmchart-valuesfile/gitrepository.yaml create mode 100644 config/testdata/helmchart-valuesfile/helmchart_gitrepository.yaml create mode 100644 config/testdata/helmchart-valuesfile/helmchart_helmrepository.yaml create mode 100644 config/testdata/helmchart-valuesfile/helmrepository.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index c0fce8fd..70be4e51 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -57,7 +57,13 @@ jobs: kubectl -n source-system wait gitrepository/gitrepository-sample --for=condition=ready --timeout=1m kubectl -n source-system wait helmrepository/helmrepository-sample --for=condition=ready --timeout=1m kubectl -n source-system wait helmchart/helmchart-sample --for=condition=ready --timeout=1m - kubectl -n source-system logs deploy/source-controller + kubectl -n source-system delete -f ./config/samples + - name: Run HelmChart values file tests + run: | + kubectl -n source-system apply -f ./config/testdata/helmchart-valuesfile + kubectl -n source-system wait helmchart/mariadb --for=condition=ready --timeout=5m + kubectl -n source-system wait helmchart/mariadb-git --for=condition=ready --timeout=5m + kubectl -n source-system delete -f ./config/testdata/helmchart-valuesfile - name: Debug failure if: failure() run: | diff --git a/config/samples/source_v1alpha1_helmchart_gitrepository.yaml b/config/samples/source_v1alpha1_helmchart_gitrepository.yaml index 5cb5feef..5e8fec85 100644 --- a/config/samples/source_v1alpha1_helmchart_gitrepository.yaml +++ b/config/samples/source_v1alpha1_helmchart_gitrepository.yaml @@ -4,7 +4,6 @@ metadata: name: helmchart-git-sample spec: chart: charts/podinfo - version: '^2.0.0' sourceRef: kind: GitRepository name: gitrepository-sample diff --git a/config/testdata/helmchart-valuesfile/gitrepository.yaml b/config/testdata/helmchart-valuesfile/gitrepository.yaml new file mode 100644 index 00000000..a72ff950 --- /dev/null +++ b/config/testdata/helmchart-valuesfile/gitrepository.yaml @@ -0,0 +1,12 @@ +apiVersion: source.toolkit.fluxcd.io/v1alpha1 +kind: GitRepository +metadata: + name: bitnami-charts +spec: + interval: 1m + url: https://github.com/bitnami/charts + ref: + branch: master + ignore: + /* + !/bitnami/ diff --git a/config/testdata/helmchart-valuesfile/helmchart_gitrepository.yaml b/config/testdata/helmchart-valuesfile/helmchart_gitrepository.yaml new file mode 100644 index 00000000..f6e85fd8 --- /dev/null +++ b/config/testdata/helmchart-valuesfile/helmchart_gitrepository.yaml @@ -0,0 +1,11 @@ +apiVersion: source.toolkit.fluxcd.io/v1alpha1 +kind: HelmChart +metadata: + name: mariadb-git +spec: + chart: bitnami/mariadb + valuesFile: values-production.yaml + sourceRef: + kind: GitRepository + name: bitnami-charts + interval: 1m diff --git a/config/testdata/helmchart-valuesfile/helmchart_helmrepository.yaml b/config/testdata/helmchart-valuesfile/helmchart_helmrepository.yaml new file mode 100644 index 00000000..fa479fab --- /dev/null +++ b/config/testdata/helmchart-valuesfile/helmchart_helmrepository.yaml @@ -0,0 +1,11 @@ +apiVersion: source.toolkit.fluxcd.io/v1alpha1 +kind: HelmChart +metadata: + name: mariadb +spec: + chart: mariadb + valuesFile: values-production.yaml + sourceRef: + kind: HelmRepository + name: bitnami-charts + interval: 1m diff --git a/config/testdata/helmchart-valuesfile/helmrepository.yaml b/config/testdata/helmchart-valuesfile/helmrepository.yaml new file mode 100644 index 00000000..432e3e3c --- /dev/null +++ b/config/testdata/helmchart-valuesfile/helmrepository.yaml @@ -0,0 +1,7 @@ +apiVersion: source.toolkit.fluxcd.io/v1alpha1 +kind: HelmRepository +metadata: + name: bitnami-charts +spec: + interval: 1m + url: https://charts.bitnami.com/bitnami