-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23c6b7b
commit b19d87b
Showing
3 changed files
with
14,253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- github.com/fluxcd/flux2/manifests/install?ref=v2.4.0 | ||
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) | ||
- patch: | | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: all | ||
spec: | ||
template: | ||
spec: | ||
tolerations: | ||
- key: node-role.kubernetes.io/control-plane | ||
effect: NoSchedule | ||
target: | ||
kind: Deployment | ||
name: (kustomize-controller|helm-controller|source-controller|notification-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 | ||
# Resources renamed to match those installed by oci://ghcr.io/fluxcd/flux-manifests | ||
- target: | ||
kind: ResourceQuota | ||
name: critical-pods | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: critical-pods-flux-system | ||
- target: | ||
kind: ClusterRoleBinding | ||
name: cluster-reconciler | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: cluster-reconciler-flux-system | ||
- target: | ||
kind: ClusterRoleBinding | ||
name: crd-controller | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: crd-controller-flux-system | ||
- target: | ||
kind: ClusterRole | ||
name: crd-controller | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: crd-controller-flux-system | ||
- target: | ||
kind: ClusterRole | ||
name: flux-edit | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: flux-edit-flux-system | ||
- target: | ||
kind: ClusterRole | ||
name: flux-view | ||
patch: | | ||
- op: replace | ||
path: /metadata/name | ||
value: flux-view-flux-system |
Oops, something went wrong.