-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ArgoCD sync option server-side apply for CRDs
This prevents sync errors when the last-applied-configuration annotation becomes too big.
- Loading branch information
Showing
3 changed files
with
2,656 additions
and
1,216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
local prometheus = import 'lib/prometheus.libsonnet'; | ||
local inv = kap.inventory(); | ||
local params = inv.parameters.backup_k8up; | ||
|
||
local load_crds(name) = | ||
std.parseJson(kap.yaml_load_stream( | ||
'dependencies/backup-k8up/crds/%s/%s.yaml' % [ | ||
params.images.k8up.tag, | ||
name, | ||
] | ||
)); | ||
|
||
local syncOptionAnnotation = { | ||
metadata+: { | ||
annotations+: { | ||
'argocd.argoproj.io/sync-options': 'ServerSideApply=true', | ||
}, | ||
}, | ||
}; | ||
|
||
local crds = [ crd + syncOptionAnnotation for crd in load_crds('02_k8up_crds') ]; | ||
|
||
{ '02_k8up_crds': crds } |
Oops, something went wrong.