diff --git a/.github/workflows/x-test.yaml b/.github/workflows/e2e.yaml similarity index 93% rename from .github/workflows/x-test.yaml rename to .github/workflows/e2e.yaml index e491263..8e6bd56 100644 --- a/.github/workflows/x-test.yaml +++ b/.github/workflows/e2e.yaml @@ -1,12 +1,10 @@ -name: x-test +name: e2e on: workflow_dispatch: push: branches: - '*' - branches-ignore: - - main tags-ignore: - '*' @@ -19,6 +17,7 @@ jobs: fail-fast: false matrix: variant: + - alpine - distroless kubernetes: - v1.29.0 @@ -66,7 +65,10 @@ jobs: --path=./tests/${{ matrix.flux }}/clusters/kind - name: Verify cluster reconciliation run: | - kubectl -n flux-system wait kustomization/sources --for=condition=ready --timeout=5m + kubectl -n flux-system wait kustomization/sources --for=condition=ready --timeout=2m + - name: Verify managed resources + run: | + flux tree kustomization flux-system - name: Debug failure if: failure() run: | diff --git a/tests/v2.2/clusters/kind/sources.yaml b/tests/v2.2/clusters/kind/sources.yaml new file mode 100644 index 0000000..104132e --- /dev/null +++ b/tests/v2.2/clusters/kind/sources.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: sources + namespace: flux-system +spec: + serviceAccountName: kustomize-controller + interval: 10m + sourceRef: + kind: GitRepository + name: flux-system + path: ./tests/v2.2/sources + prune: true + wait: true + timeout: 5m diff --git a/tests/v2.2/sources/helm.yaml b/tests/v2.2/sources/helm.yaml new file mode 100644 index 0000000..109aa5b --- /dev/null +++ b/tests/v2.2/sources/helm.yaml @@ -0,0 +1,69 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: podinfo-https + namespace: sources +spec: + interval: 10m + url: https://stefanprodan.github.io/podinfo +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmChart +metadata: + name: podinfo-https + namespace: sources +spec: + interval: 10m + chart: podinfo + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: podinfo-https +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: podinfo-oci + namespace: sources +spec: + type: oci + interval: 10m + url: oci://ghcr.io/stefanprodan/charts +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmChart +metadata: + name: podinfo-oci + namespace: sources +spec: + interval: 10m + chart: podinfo + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: podinfo-oci +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: podinfo-git + namespace: sources +spec: + interval: 10m + url: https://github.com/stefanprodan/podinfo + ref: + semver: ">1.0.0" +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmChart +metadata: + name: podinfo-git + namespace: sources +spec: + interval: 10m + chart: ./charts/podinfo + reconcileStrategy: Revision + sourceRef: + kind: GitRepository + name: podinfo-git diff --git a/tests/v2.2/sources/namespace.yaml b/tests/v2.2/sources/namespace.yaml new file mode 100644 index 0000000..51fd880 --- /dev/null +++ b/tests/v2.2/sources/namespace.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: sources + diff --git a/tests/v2.2/sources/oci.yaml b/tests/v2.2/sources/oci.yaml new file mode 100644 index 0000000..c5d323a --- /dev/null +++ b/tests/v2.2/sources/oci.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: OCIRepository +metadata: + name: podinfo-cosign + namespace: sources +spec: + interval: 10m + url: oci://ghcr.io/stefanprodan/manifests/podinfo + ref: + semver: ">1.0.0" + verify: + provider: cosign + matchOIDCIdentity: + - issuer: "^https://token.actions.githubusercontent.com$" + subject: "^https://github.com/stefanprodan/podinfo.*$"