diff --git a/kubernetes/main/flux/config/flux.yaml b/kubernetes/main/flux/config/flux.yaml deleted file mode 100644 index 6332a5398dd55..0000000000000 --- a/kubernetes/main/flux/config/flux.yaml +++ /dev/null @@ -1,121 +0,0 @@ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/ocirepository_v1beta2.json -apiVersion: source.toolkit.fluxcd.io/v1beta2 -kind: OCIRepository -metadata: - name: flux-manifests - namespace: flux-system -spec: - interval: 10m - url: oci://ghcr.io/fluxcd/flux-manifests - ref: - tag: v2.4.0 ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: flux - namespace: flux-system -spec: - interval: 10m - path: ./ - prune: false - wait: true - sourceRef: - kind: OCIRepository - name: flux-manifests - patches: - # Remove image automation and image reflector controllers - - patch: | - $patch: delete - apiVersion: apps/v1 - kind: Deployment - metadata: - name: all - target: - kind: Deployment - name: (image-automation-controller|image-reflector-controller) - # Remove the built-in network policies - - patch: | - $patch: delete - apiVersion: networking.k8s.io/v1 - kind: NetworkPolicy - metadata: - name: all - target: - group: networking.k8s.io - kind: NetworkPolicy - # Increase the number of workers and limits - # Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits - - patch: | - - op: add - path: /spec/template/spec/containers/0/args/- - value: --concurrent=10 - - op: add - path: /spec/template/spec/containers/0/args/- - value: --requeue-dependency=5s - target: - kind: Deployment - name: (kustomize-controller|helm-controller|source-controller) - - patch: | - apiVersion: apps/v1 - kind: Deployment - metadata: - name: all - spec: - template: - spec: - containers: - - name: manager - resources: - limits: - memory: 2Gi - target: - kind: Deployment - name: (kustomize-controller|helm-controller|source-controller) - # Enable in-memory kustomize builds - # Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#enable-in-memory-kustomize-builds - - patch: | - - op: add - path: /spec/template/spec/containers/0/args/- - value: --concurrent=20 - - op: replace - path: /spec/template/spec/volumes/0 - value: - name: temp - emptyDir: - medium: Memory - target: - kind: Deployment - name: kustomize-controller - # Enable Helm repositories caching - # Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#enable-helm-repositories-caching - - patch: | - - op: add - path: /spec/template/spec/containers/0/args/- - value: --helm-cache-max-size=10 - - op: add - path: /spec/template/spec/containers/0/args/- - value: --helm-cache-ttl=60m - - op: add - path: /spec/template/spec/containers/0/args/- - value: --helm-cache-purge-interval=5m - target: - kind: Deployment - name: source-controller - # Flux near OOM detection for Helm - # Ref: https://fluxcd.io/flux/installation/configuration/helm-oom-detection/ - - patch: | - - op: add - path: /spec/template/spec/containers/0/args/- - value: --feature-gates=OOMWatch=true - - op: add - path: /spec/template/spec/containers/0/args/- - value: --oom-watch-memory-threshold=95 - - op: add - path: /spec/template/spec/containers/0/args/- - value: --oom-watch-interval=500ms - target: - kind: Deployment - name: helm-controller diff --git a/kubernetes/main/flux/config/kustomization.yaml b/kubernetes/main/flux/config/kustomization.yaml index 27dcadbf49eee..7461365079281 100644 --- a/kubernetes/main/flux/config/kustomization.yaml +++ b/kubernetes/main/flux/config/kustomization.yaml @@ -5,4 +5,3 @@ kind: Kustomization namespace: flux-system resources: - ./cluster.yaml - - ./flux.yaml