ArgoCD Custom Resource Definition too long
When CRD's get too lengthy, we need to use server side apply
Mon, 18 Mar 2024
Without getting too technical, these docs explain why we need to use server side apply on certain actions and the differences between a client side(regular) apply. Heres how we would use it with ArgoCD. This example deploys a redis operator instance
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: redis-operator
namespace: argo-cd
spec:
destination:
namespace: databases
server: 'https://kubernetes.default.svc'
sources:
- chart: redis-operator
repoURL: 'https://ot-container-kit.github.io/helm-charts/'
targetRevision: "0"
project: default
syncPolicy:
syncOptions:
- ServerSideApply=true # Here is where we add in the server side apply
automated:
prune: true
selfHeal: true
```