From 215461738b59ba514e59dea8f3521a3b79ebcb23 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Sat, 15 Jun 2024 22:31:59 -0400 Subject: [PATCH] fluxFaster.yaml - values to speed things up this change was the real motivation for introducing flux-operator +fixup Signed-off-by: Kingdon Barrett --- packages/core/fluxcd/Makefile | 4 ++-- packages/core/fluxcd/fluxFaster.yaml | 18 ++++++++++++++++++ .../core/fluxcd/templates/flux-instance.yaml | 5 ++++- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 packages/core/fluxcd/fluxFaster.yaml diff --git a/packages/core/fluxcd/Makefile b/packages/core/fluxcd/Makefile index 15494d2dd..032115591 100644 --- a/packages/core/fluxcd/Makefile +++ b/packages/core/fluxcd/Makefile @@ -7,11 +7,11 @@ show: helm template -n $(NAMESPACE) $(NAME) . --no-hooks --dry-run=server $(API_VERSIONS_FLAGS) apply: - helm template -n $(NAMESPACE) $(NAME) . --no-hooks -f valuesFile.yaml \ + helm template -n $(NAMESPACE) $(NAME) . --no-hooks -f valuesFile.yaml -f fluxFaster.yaml \ --dry-run=server $(API_VERSIONS_FLAGS) | kubectl apply -n $(NAMESPACE) -f- diff: - helm template -n $(NAMESPACE) $(NAME) . --no-hooks -f valuesFile.yaml \ + helm template -n $(NAMESPACE) $(NAME) . --no-hooks -f valuesFile.yaml -f fluxFaster.yaml \ --dry-run=server $(API_VERSIONS_FLAGS) | kubectl diff -n $(NAMESPACE) -f- update: diff --git a/packages/core/fluxcd/fluxFaster.yaml b/packages/core/fluxcd/fluxFaster.yaml new file mode 100644 index 000000000..cc6299a90 --- /dev/null +++ b/packages/core/fluxcd/fluxFaster.yaml @@ -0,0 +1,18 @@ +fluxInstance: + kustomize: + patches: + - patch: | + - op: add + path: /spec/template/spec/containers/0/args/- + value: --concurrent=20 + - op: add + path: /spec/template/spec/containers/0/args/- + value: --requeue-dependency=5s + - op: replace + path: /spec/template/spec/containers/0/resources/limits + value: + cpu: 2000m + memory: 2048Mi + target: + kind: Deployment + name: "(kustomize-controller|helm-controller|source-controller)" diff --git a/packages/core/fluxcd/templates/flux-instance.yaml b/packages/core/fluxcd/templates/flux-instance.yaml index b3b08d084..b2de99f40 100644 --- a/packages/core/fluxcd/templates/flux-instance.yaml +++ b/packages/core/fluxcd/templates/flux-instance.yaml @@ -12,4 +12,7 @@ spec: {{- if .Values.fluxInstance.components }} {{- toYaml .Values.fluxInstance.components | nindent 4 }} {{- end }} - + kustomize: + {{- if .Values.fluxInstance.kustomize }} + {{- toYaml .Values.fluxInstance.kustomize | nindent 4 }} + {{- end }}