Bootstrap flux with ignore option #4590
-
Hey! We are using flux in production and I recently uninstalled flux accidentally. When I tried to bootstrap it again I couldn't, since flux was throwing an error of an incorrect YAML file in the repo. This YAML file is a pre-commit-config.yaml file which contains configuration. To solve this initially(before uninstall) I just ignored the file after the initial bootstrap and everything was fine. # This manifest was generated by flux. DO NOT EDIT.
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 1m0s
ref:
branch: master
secretRef:
name: flux-system
url: ssh://user@git.com:/kubernetes/flux-fleet
ignore: |
# exclude pre-commit configuration
.pre-commit-config.yaml
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 1m0s
# Perform health checks, hence it will send notifications via the notification controller
wait: true
path: ./
prune: true
sourceRef:
kind: GitRepository
name: flux-system The problem is that after uninstalling and bootstrapping again, FLux is creating new manifests that don't have the ignore option. /Angelos |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Bootstrap is meant to be run for a path within |
Beta Was this translation helpful? Give feedback.
Bootstrap is meant to be run for a path within
./clusters
, running bootstrap for the repo root is not supported. Please see here anexample of how to organise your repository https://github.com/fluxcd/flux2-kustomize-helm-example