maorfr / helm-backup

Helm plugin which performs backup/restore of releases in a namespace to/from a file
Other
83 stars 18 forks source link

The ConfigMap is invalid: metadata.annotations: Too long: must have at most 262144 characters #10

Closed bhavin192 closed 4 years ago

bhavin192 commented 4 years ago

I have a release of prometheus-operator called prom. The release key from prom.v1 configMap has value with character length 467908. We are using kubectl apply … command while creating the release configMaps.

https://github.com/maorfr/helm-backup/blob/2e7d6b8e996867fb2cc44dd1364824fe51b83246/main.go#L134-L138

kubectl apply adds annotation kubectl.kubernetes.io/last-applied-configuration in the configMap which has whole object in JSON format.

Should we use kubectl create or kubectl replace instead of kubectl apply while creating the configMaps? I can work on this if we plan to make the change :)

maorfr commented 4 years ago

thanks for bringing this up! i think that using create or replace will make sense. i'll leave the decision for you.

thanks again!