diff --git a/.github/workflows/flux-schedule.yaml b/.github/workflows/flux-schedule.yaml deleted file mode 100644 index 94fbc0f6..00000000 --- a/.github/workflows/flux-schedule.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Schedule - Update Flux - -on: # yamllint disable-line rule:truthy - workflow_dispatch: - schedule: - - cron: "0 12 * * *" - -jobs: - flux-upgrade: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - - name: Setup Flux CLI - uses: fluxcd/flux2/action@main - - - name: Upgrade Flux - id: upgrade - run: | - CLI_VERSION="$(flux -v)" - VERSION="v${CLI_VERSION#*flux version }" - flux install --version="${VERSION}" \ - --network-policy=false \ - --export > ./cluster/base/flux-system/gotk-components.yaml - echo "::set-output name=flux_version::$VERSION" - - - name: Create pull request for Flux upgrade - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: "flux/upgrade-${{ steps.upgrade.outputs.flux_version }}" - delete-branch: true - title: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}" - signoff: false - committer: GitHub - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - commit-message: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}" - body: | - Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.upgrade.outputs.flux_version }} - labels: flux/upgrade diff --git a/cluster/base/flux-system/gotk-patches.yaml b/cluster/base/flux-system/gotk-patches.yaml new file mode 100644 index 00000000..9023416f --- /dev/null +++ b/cluster/base/flux-system/gotk-patches.yaml @@ -0,0 +1,24 @@ +--- +# Delete the allow-egress NetworkPolicy +$patch: delete +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-egress + namespace: flux-system +--- +# Delete the allow-scraping NetworkPolicy +$patch: delete +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-scraping + namespace: flux-system +--- +# Delete the allow-webhooks NetworkPolicy +$patch: delete +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-webhooks + namespace: flux-system diff --git a/cluster/base/flux-system/kustomization.yaml b/cluster/base/flux-system/kustomization.yaml index 3b407e72..6cf83ade 100644 --- a/cluster/base/flux-system/kustomization.yaml +++ b/cluster/base/flux-system/kustomization.yaml @@ -4,3 +4,5 @@ resources: - gotk-components.yaml - gotk-sync.yaml - charts +patchesStrategicMerge: + - ./gotk-patches.yaml