flux2-hub-spoke-example/hub/staging.yaml
Stefan Prodan b8466506b8
Use flux-app SA for HR impersonation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-10 09:11:39 +03:00

56 lines
1.1 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: staging
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: tenants-sync
namespace: staging
spec:
interval: 1h
retryInterval: 3m
timeout: 5m
prune: true
wait: true
path: ./clusters/staging/tenants
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
kubeConfig:
secretRef:
name: cluster-kubeconfig
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: releases-sync
namespace: staging
spec:
dependsOn:
- name: tenants-sync
targetNamespace: staging
interval: 1h
retryInterval: 3m
timeout: 5m
prune: true
wait: true
path: ./clusters/staging/releases
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
patches:
- target:
kind: HelmRelease
patch: |
- op: add
path: /spec/kubeConfig
value:
secretRef:
name: cluster-kubeconfig
- op: add
path: /spec/serviceAccountName
value: flux-apps