fluxcd : adding repo example with some apps

This commit is contained in:
2025-05-28 16:00:46 +02:00
parent 00a5e56c27
commit e5738c5c3f
111 changed files with 18051 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: ${project_name}
labels:
team: ${team}
spec:
chart:
spec:
chart: myChart
reconcileStrategy: ChartVersion
version: "2.x.x"
sourceRef:
kind: HelmRepository
name: myChart
namespace: infrastructure
interval: 10m0s
values:
environment: "${env}"
app:
image:
tag: 1.0.0-rc.1 # {"§imagepolicy": "${namespace}:${project_name}:tag"}
nginx:
parameters:
serverName: "REPLACE_ME"
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 4

View File

@@ -0,0 +1,26 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
metadata:
name: ${service_name}
labels:
team: ${team}
spec:
git:
checkout:
ref:
branch: main
commit:
author:
email: fluxcdbot@example.com
name: fluxcdbot
messageTemplate: 'deps(apps/${env_full}): {{ .AutomationObject }} ImageUpdateAutomation'
push:
branch: ${project_branch_iua_destination}
interval: 3m0s
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
update:
path: ./apps/${env_full}/${namespace}/${service_name}
strategy: Setters

View File

@@ -0,0 +1,15 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
metadata:
name: ${project_name}
labels:
team: ${team}
spec:
imageRepositoryRef:
name: ${project_name}
filterTags:
pattern: '${policy_pattern}'
extract: '§rv'
policy:
semver:
range: '^1.x.x-0'

View File

@@ -0,0 +1,15 @@
apiVersion: notification.toolkit.fluxcd.io/v1
kind: Receiver
metadata:
name: ${project_name}
spec:
type: generic
secretRef:
name: webhook-receiver-token
resources:
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: ${project_name}
- apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
name: ${service_name}

View File

@@ -0,0 +1,14 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
metadata:
name: ${project_name}
labels:
type: apps
team: ${team}
spec:
secretRef:
name: registry-credentials
image: REPLACE_ME
interval: 5m0s
exclusionList:
- "_dev§"