mirror of
				https://github.com/optim-enterprises-bv/terraform-talos.git
				synced 2025-10-31 02:08:32 +00:00 
			
		
		
		
	add flux
This commit is contained in:
		| @@ -23,3 +23,5 @@ create-deployments: ## create templates | ||||
|  | ||||
| 	helm template --namespace=ingress-nginx --version=4.11.1 -f vars/ingress.yaml ingress-nginx \ | ||||
| 		ingress-nginx/ingress-nginx > vars/ingress-result.yaml | ||||
|  | ||||
| 	kube kustomize flux > vars/flux-result.yaml | ||||
|   | ||||
							
								
								
									
										157
									
								
								_deployments/flux/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								_deployments/flux/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -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 | ||||
							
								
								
									
										14094
									
								
								_deployments/vars/flux-result.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14094
									
								
								_deployments/vars/flux-result.yaml
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user
	 Serge Logvinov
					Serge Logvinov