-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SecretVolumeSource invalid defaultMode - needs to be sent as a string with a leading 0 #2572
Comments
Not familiar with the codebase, but this seems like it should address fabric8io#2572?
Did you try the octal losing the leading zero (many systems admit this)? The model is generated from the go Types |
I'm not sure what to make of this suggestion - I know just enough to be dangerous when it comes to kubernetes... This is a more complete version of the statefulset yaml (I can provide the full manifest if needed). If I upload this to the Kubernetes Dashboard, or apply with kubectl, it works. However, this fails because of the leading zero being dropped in the "defaultMode":
If there is some other way of specifying that value, I'd be glad to try. |
Ok.. came across this:
After doing some step debugging, it does appear that this client is transforming the yaml to json. However, in that transformation, the octal is not being converted to decimal as required by the JSON API. Changing 0640 to 416 gets me around the problem for now, but it's a bit of a gotcha... |
Yes, this might bring some confusion. |
The schema for io.fabric8.kubernetes.api.model.SecretVolumeSource specifies defaultMode as "integer"
kubernetes-client/kubernetes-model-generator/kubernetes-model-core/src/main/resources/schema/kube-schema.json
Line 7306 in ca0a124
However, the API requires defaultMode to be a string with a leading zero, as indicated by this error:
This is the relevant excerpt from my statefulset yaml:
The text was updated successfully, but these errors were encountered: