-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
jenkins: Version 2.421
k8s: 1.25.0
plugin version: 4029.v5712230ccb_f8
-
-
kubernetes-plugin:4208.v4017b_a_27a_d67
I'm using pod template, and use Raw YAML to config my volumes.
I have use this for a long time(at least 3 months), it always works.
However, when i upgrade Kubernetes plugin to latest version(4029.v5712230ccb_f8) today, my pod cannot create successfully, it shows :
... message-pod "xxx' is invalid: [spec.volumes5).configMap.defaultMode: Invalid value: 755: must be a number between 0 and 0777 (octal), both inclusive, ...
my pod template's row yaml is:
apiVersion: "v1" kind: "Pod" metadata: namespace: build spec: shareProcessNamespace: true automountServiceAccountToken: false tolerations: - key: "build_node" operator: "Exists" effect: "NoSchedule" nodeSelector: build-node: node containers: - name: "k8s" volumeMounts: - mountPath: "/usr/local/bin/help_deploy.sh" name: "helm-volume" readOnly: false subPath: "script.sh" volumes: - configMap: name: "helm" defaultMode: 0755 optional: false name: "helm-volume"
this sees be a bug of new version.
- causes
-
JENKINS-73383 Can't use yaml anchors/aliases in pod definition
-
- Open
-
We are having a similar issue after updating to kubernetes: 4029.v5712230ccb_f8.
We have a similar pod spec (see below), which was working before the update.
After the update, we notice in the console logs that the defaultMode gets rendered as 272 when set as 420. Before the update, the value was passed through.
The permissions we want to set is 0644.
We set 420 in decimal notation which results to 0644 in octal notation.
272 in decimal notation is 0420 in octal notation.
The docs mention that octal notations are not supported on podTemplate . volumes . secretVolume . defaultMode
The issue seems to be related to a recent change
Pod spec:
Rendered manifest before the update, as seen in the logs (emphasis on defaultMode):
Rendered manifest after the update, as seen in the logs: