You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/11 11:45:18 UTC

[GitHub] [apisix-helm-chart] Gallardot opened a new issue, #370: [bug] update podAnnotations

Gallardot opened a new issue, #370:
URL: https://github.com/apache/apisix-helm-chart/issues/370

   
   When I want to update the `podAnnotations`,  get error.
   
   ```
   helm upgrade -i apisix apisix/apisix \
   --namespace apisix \
   --set apisix.podAnnotations.a=123
   Error: UPGRADE FAILED: cannot patch "apisix" with kind Deployment:  "" is invalid: patch: Invalid value: "{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{\"deployment.kubernetes.io/revision\":\"1\",\"meta.helm.sh/release-name\":\"apisix\",\"meta.helm.sh/release-namespace\":\"apisix\"},\"creationTimestamp\":\"2022-10-11T11:16:16Z\",\"generation\":1,\"labels\":{\"app.kubernetes.io/instance\":\"apisix\",\"app.kubernetes.io/managed-by\":\"Helm\",\"app.kubernetes.io/name\":\"apisix\",\"app.kubernetes.io/version\":\"2.15.0\",\"helm.sh/chart\":\"apisix-0.11.1\"},\"managedFields\":[{\"manager\":\"helm\",\"operation\":\"Update\",\"apiVersion\":\"apps/v1\",\"time\":\"2022-10-11T11:16:16Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:metadata\":{\"f:annotations\":{\".\":{},\"f:meta.helm.sh/release-name\":{},\"f:meta.helm.sh/release-namespace\":{}},\"f:labels\":{\".\":{},\"f:app.kubernetes.io/instance\":{},\"f:app.kubernetes.io/managed-by\":{},\"f:app.kube
 rnetes.io/name\":{},\"f:app.kubernetes.io/version\":{},\"f:helm.sh/chart\":{}}},\"f:spec\":{\"f:progressDeadlineSeconds\":{},\"f:replicas\":{},\"f:revisionHistoryLimit\":{},\"f:selector\":{},\"f:strategy\":{\"f:rollingUpdate\":{\".\":{},\"f:maxSurge\":{},\"f:maxUnavailable\":{}},\"f:type\":{}},\"f:template\":{\"f:metadata\":{\"f:annotations\":{\".\":{},\"f:a\":{},\"f:checksum/config\":{}},\"f:labels\":{\".\":{},\"f:app.kubernetes.io/instance\":{},\"f:app.kubernetes.io/name\":{}}},\"f:spec\":{\"f:affinity\":{},\"f:containers\":{\"k:{\\\"name\\\":\\\"apisix\\\"}\":{\".\":{},\"f:image\":{},\"f:imagePullPolicy\":{},\"f:lifecycle\":{\".\":{},\"f:preStop\":{\".\":{},\"f:exec\":{\".\":{},\"f:command\":{}}}},\"f:name\":{},\"f:ports\":{\".\":{},\"k:{\\\"containerPort\\\":9080,\\\"protocol\\\":\\\"TCP\\\"}\":{\".\":{},\"f:containerPort\":{},\"f:name\":{},\"f:protocol\":{}},\"k:{\\\"containerPort\\\":9180,\\\"protocol\\\":\\\"TCP\\\"}\":{\".\":{},\"f:containerPort\":{},\"f:name\":{},\"f:protoc
 ol\":{}},\"k:{\\\"containerPort\\\":9443,\\\"protocol\\\":\\\"TCP\\\"}\":{\".\":{},\"f:containerPort\":{},\"f:name\":{},\"f:protocol\":{}}},\"f:readinessProbe\":{\".\":{},\"f:failureThreshold\":{},\"f:initialDelaySeconds\":{},\"f:periodSeconds\":{},\"f:successThreshold\":{},\"f:tcpSocket\":{\".\":{},\"f:port\":{}},\"f:timeoutSeconds\":{}},\"f:resources\":{},\"f:terminationMessagePath\":{},\"f:terminationMessagePolicy\":{},\"f:volumeMounts\":{\".\":{},\"k:{\\\"mountPath\\\":\\\"/usr/local/apisix/conf/config.yaml\\\"}\":{\".\":{},\"f:mountPath\":{},\"f:name\":{},\"f:subPath\":{}}}}},\"f:dnsPolicy\":{},\"f:initContainers\":{\".\":{},\"k:{\\\"name\\\":\\\"wait-etcd\\\"}\":{\".\":{},\"f:command\":{},\"f:image\":{},\"f:imagePullPolicy\":{},\"f:name\":{},\"f:resources\":{},\"f:terminationMessagePath\":{},\"f:terminationMessagePolicy\":{}}},\"f:restartPolicy\":{},\"f:schedulerName\":{},\"f:securityContext\":{},\"f:serviceAccount\":{},\"f:serviceAccountName\":{},\"f:terminationGracePeriodSec
 onds\":{},\"f:volumes\":{\".\":{},\"k:{\\\"name\\\":\\\"apisix-config\\\"}\":{\".\":{},\"f:configMap\":{\".\":{},\"f:defaultMode\":{},\"f:name\":{}},\"f:name\":{}}}}}}}},{\"manager\":\"kube-controller-manager\",\"operation\":\"Update\",\"apiVersion\":\"apps/v1\",\"time\":\"2022-10-11T11:16:38Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:metadata\":{\"f:annotations\":{\"f:deployment.kubernetes.io/revision\":{}}},\"f:status\":{\"f:availableReplicas\":{},\"f:conditions\":{\".\":{},\"k:{\\\"type\\\":\\\"Available\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:lastUpdateTime\":{},\"f:message\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}},\"k:{\\\"type\\\":\\\"Progressing\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:lastUpdateTime\":{},\"f:message\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}}},\"f:observedGeneration\":{},\"f:readyReplicas\":{},\"f:replicas\":{},\"f:updatedReplicas\":{}}}}],\"name\":\"apisix\",\"namespace\":\"apisix\",\"resourceVersion\":\"37040\",\"ui
 d\":\"5a6fa707-4e7d-4825-91e8-dc431d98bf1f\"},\"spec\":{\"progressDeadlineSeconds\":600,\"replicas\":1,\"revisionHistoryLimit\":10,\"selector\":{\"matchLabels\":{\"app.kubernetes.io/instance\":\"apisix\",\"app.kubernetes.io/name\":\"apisix\"}},\"strategy\":{\"type\":\"RollingUpdate\",\"rollingUpdate\":{\"maxUnavailable\":\"25%!\(MISSING)",\"maxSurge\":\"25%!\(MISSING)"}},\"template\":{\"metadata\":{\"annotations\":{\"a\":123,\"checksum/config\":\"191936aea0d9157207017f3b4aa06b8328dafdb0bd85c935dfd654cb148e8ea6\"},\"creationTimestamp\":null,\"labels\":{\"app.kubernetes.io/instance\":\"apisix\",\"app.kubernetes.io/name\":\"apisix\"}},\"spec\":{\"volumes\":[{\"name\":\"apisix-config\",\"configMap\":{\"name\":\"apisix\",\"defaultMode\":420}}],\"initContainers\":[{\"name\":\"wait-etcd\",\"image\":\"busybox:1.28\",\"command\":[\"sh\",\"-c\",\"until nc -z apisix-etcd.apisix.svc.cluster.local 2379; do echo waiting for etcd `date`; sleep 2; done;\"],\"resources\":{},\"terminationMessagePath\
 ":\"/dev/termination-log\",\"terminationMessagePolicy\":\"File\",\"imagePullPolicy\":\"IfNotPresent\"}],\"containers\":[{\"name\":\"apisix\",\"image\":\"apache/apisix:2.15.0-alpine\",\"ports\":[{\"name\":\"http\",\"containerPort\":9080,\"protocol\":\"TCP\"},{\"name\":\"tls\",\"containerPort\":9443,\"protocol\":\"TCP\"},{\"name\":\"admin\",\"containerPort\":9180,\"protocol\":\"TCP\"}],\"resources\":{},\"volumeMounts\":[{\"name\":\"apisix-config\",\"mountPath\":\"/usr/local/apisix/conf/config.yaml\",\"subPath\":\"config.yaml\"}],\"readinessProbe\":{\"tcpSocket\":{\"port\":9080},\"initialDelaySeconds\":10,\"timeoutSeconds\":1,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":6},\"lifecycle\":{\"preStop\":{\"exec\":{\"command\":[\"/bin/sh\",\"-c\",\"sleep 30\"]}}},\"terminationMessagePath\":\"/dev/termination-log\",\"terminationMessagePolicy\":\"File\",\"imagePullPolicy\":\"IfNotPresent\"}],\"restartPolicy\":\"Always\",\"terminationGracePeriodSeconds\":30,\"dnsPolicy\":\"
 ClusterFirst\",\"serviceAccountName\":\"default\",\"serviceAccount\":\"default\",\"securityContext\":{},\"affinity\":{},\"schedulerName\":\"default-scheduler\"}}},\"status\":{\"observedGeneration\":1,\"replicas\":1,\"updatedReplicas\":1,\"readyReplicas\":1,\"availableReplicas\":1,\"conditions\":[{\"type\":\"Available\",\"status\":\"True\",\"lastUpdateTime\":\"2022-10-11T11:16:38Z\",\"lastTransitionTime\":\"2022-10-11T11:16:38Z\",\"reason\":\"MinimumReplicasAvailable\",\"message\":\"Deployment has minimum availability.\"},{\"type\":\"Progressing\",\"status\":\"True\",\"lastUpdateTime\":\"2022-10-11T11:16:38Z\",\"lastTransitionTime\":\"2022-10-11T11:16:16Z\",\"reason\":\"NewReplicaSetAvailable\",\"message\":\"ReplicaSet \\\"apisix-74767fcd7\\\" has successfully progressed.\"}]}}": v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found 1, error found in #10 byte of ...|ns":{"a":123,"checks|..., big
 ger context ...|5%!"(MISSING)}},"template":{"metadata":{"annotations":{"a":123,"checksum/config":"191936aea0d9157207017f3b4aa0|...
   ```
   
   https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/_pod.tpl#L5-L6
   
   We need double quotation marks for numbers. I'll fix this later.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] tao12345666333 closed issue #370: [bug] update podAnnotations

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #370: [bug] update podAnnotations
URL: https://github.com/apache/apisix-helm-chart/issues/370


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org