-
Notifications
You must be signed in to change notification settings - Fork 39
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
[#135] Allow specifying the mount path for ConfigMaps #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new feature itself looks good, thanks!
I've requested change to keep the code consistent but I'm fine with the new code.
// +k8s:openapi-gen=true | ||
type ConfigMapSpec struct { | ||
Name string `json:"name"` | ||
MountPath string `json:"mountPath,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please move the comment about the mount path from ConfigMapSpec to here so that is is correctly picked when the openapi and k8s resources are generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yersan @jmesnil @mchoma @jbliznak I don't think we can do it that way. This is a way we use to setup the configMaps field in EAP Operator (registry-proxy.engineering.redhat.com/rh-osbs/jboss-eap-7-eap73-rhel8-operator:1.0-8)
After the change, the same setup would be
Trying to use the old style config with this version of operator gives me
thus we're breaking the backward compatibility with this one. |
That's correct, this feature would break backwards compatibility. We should strive to preserve backwards compatibility when introducing a new feature but in that specific case, I prefer we provide a clean representation of a config map (with a name and an optional location) rather than preserve the backwards compatibility with a clunky api. |
let's close this PR as we will need first to have a conversion web hook to introduce this change without breaking compatibility |
This PR will allow the configuration of ConfigMpas by defining a
MountPath
in addition to theName
The
MountPath
could be a relative or an absolute path. If it is a relative path, then it is treated as relative to JBOSS_HOME. TheMountPath
is optional, and if it is not specified then it defaults to /etc/configmaps/This fixes #135