diff --git a/.github/renovate.json b/.github/renovate.json index 13a89f05ee..014adbdcb1 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,5 +2,8 @@ "extends": [ "config:base", ":disableDependencyDashboard" - ] + ], + "docker-compose": { + "enabled": false + } } diff --git a/.github/workflows/end-to-end-test.yaml b/.github/workflows/end-to-end-test.yaml index 5362da3cba..4be488a490 100644 --- a/.github/workflows/end-to-end-test.yaml +++ b/.github/workflows/end-to-end-test.yaml @@ -15,6 +15,10 @@ jobs: uses: actions/checkout@v3 - name: Setup Flux uses: fluxcd/flux2/action@main + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - name: Setup Kubernetes uses: nolar/setup-k3d-k3s@v1 with: @@ -26,7 +30,7 @@ jobs: run: | flux create source git flux-system \ --url=${{ github.event.repository.html_url }} \ - --branch=${GITHUB_REF} \ + --branch=${{ steps.extract_branch.outputs.branch }} \ --ignore-paths="./k8s/clusters/**/flux-system/" flux create kustomization flux-system \ --source=flux-system \ @@ -34,10 +38,11 @@ jobs: - name: Verify cluster reconciliation run: | kubectl -n flux-system wait kustomization/infra-controllers --for=condition=ready --timeout=5m + kubectl -n flux-system wait kustomization/infra-configs --for=condition=ready --timeout=5m kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=5m - - name: Verify helm reconciliation - run: | - kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m + # - name: Verify helm reconciliation + # run: | + # kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m - name: Debug failure if: failure() run: | diff --git a/k8s/apps/development/.gitkeep b/k8s/apps/development/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/k8s/apps/development/kustomization.yaml b/k8s/apps/development/kustomization.yaml new file mode 100644 index 0000000000..419dcad196 --- /dev/null +++ b/k8s/apps/development/kustomization.yaml @@ -0,0 +1,3 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: [] \ No newline at end of file diff --git a/k8s/apps/production/kustomization.yaml b/k8s/apps/production/kustomization.yaml new file mode 100644 index 0000000000..419dcad196 --- /dev/null +++ b/k8s/apps/production/kustomization.yaml @@ -0,0 +1,3 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: [] \ No newline at end of file diff --git a/k8s/clusters/production/apps.yaml b/k8s/clusters/production/apps.yaml new file mode 100644 index 0000000000..c56b471fb3 --- /dev/null +++ b/k8s/clusters/production/apps.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: apps + namespace: flux-system +spec: + interval: 10m + dependsOn: + - name: infra-configs + sourceRef: + kind: GitRepository + name: flux-system + path: ./k8s/apps/production + prune: true + wait: true \ No newline at end of file diff --git a/k8s/clusters/production/infrastructure.yaml b/k8s/clusters/production/infrastructure.yaml new file mode 100644 index 0000000000..f7304f4d99 --- /dev/null +++ b/k8s/clusters/production/infrastructure.yaml @@ -0,0 +1,39 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-controllers + namespace: flux-system +spec: + interval: 1h + retryInterval: 1m + sourceRef: + kind: GitRepository + name: flux-system + path: ./k8s/infrastructure/controllers + prune: true + wait: true +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-configs + namespace: flux-system +spec: + dependsOn: + - name: infra-controllers + interval: 1h + retryInterval: 1m + sourceRef: + kind: GitRepository + name: flux-system + path: ./k8s/infrastructure/configs + prune: true + patches: + - patch: | + - op: replace + path: /spec/acme/server + value: https://acme-staging-v02.api.letsencrypt.org/directory + target: + kind: ClusterIssuer + name: letsencrypt \ No newline at end of file diff --git a/k8s/infrastructure/configs/kustomization.yaml b/k8s/infrastructure/configs/kustomization.yaml index e6fff1fcfd..19f36876cc 100644 --- a/k8s/infrastructure/configs/kustomization.yaml +++ b/k8s/infrastructure/configs/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - cluster-issuers.yaml + # - cluster-issuers.yaml - network-policies.yaml \ No newline at end of file diff --git a/k8s/infrastructure/controllers/.gitkeep b/k8s/infrastructure/controllers/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/k8s/infrastructure/controllers/kustomization.yaml b/k8s/infrastructure/controllers/kustomization.yaml new file mode 100644 index 0000000000..419dcad196 --- /dev/null +++ b/k8s/infrastructure/controllers/kustomization.yaml @@ -0,0 +1,3 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: [] \ No newline at end of file