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.
$ helm backup --restore utilities
2019/11/26 15:54:34 extracting backup from file utilities.tgz
2019/11/26 15:54:34 reading backup data
2019/11/26 15:54:34 releases found to restore: prom, …
2019/11/26 15:54:34 applying backup data to tiller (this command will fail if releases exist)
2019/11/26 15:54:51 Error: command execution failed: [kubectl --namespace kube-system apply -f restore/manifests.yaml]
2019/11/26 15:54:51 Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
configmap/cluster-autoscaler.v1 configured
…
The ConfigMap "prom.v1" is invalid: metadata.annotations: Too long: must have at most 262144 characters
Error: plugin "backup" exited with error
Versions
$ kubectl version --short
Client Version: v1.16.2
Server Version: v1.14.6-eks-5047ed
$ helm version --short
Client: v2.15.2+g8dce272
Server: v2.15.2+g8dce272
# helm-backup version
# 0.1.2
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 :)
I have a release of prometheus-operator called
prom
. The release key fromprom.v1
configMap has value with character length 467908. We are usingkubectl 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.prom.v1 configMap
Error from plugin:
Versions
Should we use
kubectl create
orkubectl replace
instead ofkubectl apply
while creating the configMaps? I can work on this if we plan to make the change :)