Senior
How do you pass application configurations in ArgoCD or FluxCD?
sobes.tech AI
Answer from AI
In ArgoCD and FluxCD, application configurations are usually passed through a Git repository, which serves as the single source of truth (GitOps). The repository contains Kubernetes manifests (YAML files), Helm charts, or Kustomize patches.
The following approaches are used to pass configurations:
- Direct storage of YAML manifests — all necessary resources are stored in the repository, which ArgoCD or FluxCD synchronize with the cluster.
- Using Helm charts — a Helm chart with parameters in values.yaml is stored in the repository or an external storage, which can be overridden through ArgoCD Application or Flux Kustomization.
- Kustomize — allows applying patches and overriding parameters without copying the original manifests.
- Secrets and parameters — tools like Sealed Secrets, SOPS, or HashiCorp Vault are used for securely storing confidential data, integrated with GitOps.
Example of passing configuration via ArgoCD using a Helm chart:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
spec:
source:
repoURL: 'https://github.com/myorg/myrepo.git'
targetRevision: HEAD
path: charts/myapp
helm:
valueFiles:
- values-prod.yaml
destination:
server: 'https://kubernetes.default.svc'
namespace: production
syncPolicy:
automated: {}
Thus, configurations are passed through Git, and ArgoCD/FluxCD ensure automatic synchronization and deployment.