generated from onedr0p/cluster-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
c054705
commit ad9bea1
Showing
23 changed files
with
427 additions
and
17 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
73 changes: 73 additions & 0 deletions
73
kubernetes/main/apps/flux-system/flux/app/helm-values.yaml
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,73 @@ | ||
--- | ||
crds: | ||
annotations: | ||
helm.sh/resource-policy: keep | ||
|
||
helmController: | ||
container: | ||
additionalArgs: | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
# Flux near OOM detection for Helm | ||
# Ref: https://fluxcd.io/flux/installation/configuration/helm-oom-detection/ | ||
- --feature-gates=OOMWatch=true | ||
- --oom-watch-memory-threshold=95 | ||
- --oom-watch-interval=500ms | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
imageAutomationController: | ||
create: false | ||
|
||
imageReflectionController: | ||
create: false | ||
|
||
kustomizeController: | ||
container: | ||
additionalArgs: | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
notificationController: | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
sourceController: | ||
container: | ||
additionalArgs: | ||
# Enable Helm repositories caching | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#enable-helm-repositories-caching | ||
- --helm-cache-max-size=10 | ||
- --helm-cache-ttl=60m | ||
- --helm-cache-purge-interval=5m | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
policies: | ||
create: false | ||
|
||
prometheus: | ||
podMonitor: | ||
create: true |
27 changes: 27 additions & 0 deletions
27
kubernetes/main/apps/flux-system/flux/app/helmrelease.yaml
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,27 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: flux | ||
spec: | ||
interval: 30m | ||
chart: | ||
spec: | ||
chart: flux2 | ||
version: 2.14.0 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: fluxcd-community | ||
namespace: flux-system | ||
install: | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
strategy: rollback | ||
retries: 3 | ||
valuesFrom: | ||
- kind: ConfigMap | ||
name: flux-helm-values |
13 changes: 13 additions & 0 deletions
13
kubernetes/main/apps/flux-system/flux/app/kustomization.yaml
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,13 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./helmrelease.yaml | ||
- ./prometheusrule.yaml | ||
configMapGenerator: | ||
- name: flux-helm-values | ||
files: | ||
- values.yaml=./helm-values.yaml | ||
configurations: | ||
- kustomizeconfig.yaml |
7 changes: 7 additions & 0 deletions
7
kubernetes/main/apps/flux-system/flux/app/kustomizeconfig.yaml
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,7 @@ | ||
--- | ||
nameReference: | ||
- kind: ConfigMap | ||
version: v1 | ||
fieldSpecs: | ||
- path: spec/valuesFrom/name | ||
kind: HelmRelease |
32 changes: 32 additions & 0 deletions
32
kubernetes/main/apps/flux-system/flux/app/prometheusrule.yaml
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,32 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/monitoring.coreos.com/prometheusrule_v1.json | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: flux-rules | ||
namespace: flux-system | ||
spec: | ||
groups: | ||
- name: flux.rules | ||
rules: | ||
- alert: FluxComponentAbsent | ||
annotations: | ||
summary: Flux component has disappeared from Prometheus target discovery. | ||
expr: | | ||
absent(up{job=~".*flux-system.*"} == 1) | ||
for: 15m | ||
labels: | ||
severity: critical | ||
- alert: FluxReconciliationFailure | ||
annotations: | ||
summary: >- | ||
{{ $labels.kind }} {{ $labels.namespace }}/{{ $labels.name }} reconciliation | ||
has been failing for more than 15 minutes. | ||
expr: | | ||
max(gotk_reconcile_condition{status="False",type="Ready"}) by (namespace, name, kind) | ||
+ | ||
on(namespace, name, kind) (max(gotk_reconcile_condition{status="Deleted"}) | ||
by (namespace, name, kind)) * 2 == 1 | ||
for: 15m | ||
labels: | ||
severity: critical |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./github | ||
- ./webhooks |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,42 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app flux | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: flux-system | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
path: ./kubernetes/main/apps/flux-system/flux/app | ||
prune: false # never should be deleted | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-kubernetes | ||
wait: false | ||
interval: 30m | ||
timeout: 5m | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app flux-github | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: flux-system | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
dependsOn: | ||
- name: external-secrets-stores | ||
path: ./kubernetes/main/apps/flux-system/flux/github | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-kubernetes | ||
wait: false | ||
interval: 30m | ||
timeout: 5m |
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
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,11 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1.json | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: HelmRepository | ||
metadata: | ||
name: fluxcd-community | ||
namespace: flux-system | ||
spec: | ||
type: oci | ||
interval: 5m | ||
url: oci://ghcr.io/fluxcd-community/charts |
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
73 changes: 73 additions & 0 deletions
73
kubernetes/utility/apps/flux-system/flux/app/helm-values.yaml
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,73 @@ | ||
--- | ||
crds: | ||
annotations: | ||
helm.sh/resource-policy: keep | ||
|
||
helmController: | ||
container: | ||
additionalArgs: | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
# Flux near OOM detection for Helm | ||
# Ref: https://fluxcd.io/flux/installation/configuration/helm-oom-detection/ | ||
- --feature-gates=OOMWatch=true | ||
- --oom-watch-memory-threshold=95 | ||
- --oom-watch-interval=500ms | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
imageAutomationController: | ||
create: false | ||
|
||
imageReflectionController: | ||
create: false | ||
|
||
kustomizeController: | ||
container: | ||
additionalArgs: | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
notificationController: | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
sourceController: | ||
container: | ||
additionalArgs: | ||
# Enable Helm repositories caching | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#enable-helm-repositories-caching | ||
- --helm-cache-max-size=10 | ||
- --helm-cache-ttl=60m | ||
- --helm-cache-purge-interval=5m | ||
# Increase the number of workers and limits | ||
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits | ||
- --concurrent=10 | ||
- --requeue-dependency=5s | ||
resources: | ||
requests: | ||
cpu: 100m | ||
limits: | ||
memory: 2Gi | ||
|
||
policies: | ||
create: false | ||
|
||
prometheus: | ||
podMonitor: | ||
create: true |
Oops, something went wrong.