fluxcd : adding repo example with some apps
This commit is contained in:
29
fluxcd/repo/templates/app/api/hr-php-api.yaml
Normal file
29
fluxcd/repo/templates/app/api/hr-php-api.yaml
Normal 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
|
||||
26
fluxcd/repo/templates/app/automations/iua-service.yaml
Normal file
26
fluxcd/repo/templates/app/automations/iua-service.yaml
Normal 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
|
||||
15
fluxcd/repo/templates/app/automations/policy-php-api.yaml
Normal file
15
fluxcd/repo/templates/app/automations/policy-php-api.yaml
Normal 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'
|
||||
15
fluxcd/repo/templates/app/automations/receiver-php-api.yaml
Normal file
15
fluxcd/repo/templates/app/automations/receiver-php-api.yaml
Normal 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}
|
||||
14
fluxcd/repo/templates/app/automations/registry-php-api.yaml
Normal file
14
fluxcd/repo/templates/app/automations/registry-php-api.yaml
Normal 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§"
|
||||
Reference in New Issue
Block a user