-
Notifications
You must be signed in to change notification settings - Fork 137
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
Set default value for version label when custom image is used #843
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.
I am just nitpicking, you can ignore my comments or commit the suggestions as they are only concerning white-space. I will now continue to test, but it lgtm
src/controllers/activegate/reconciler/statefulset/statefulset.go
Outdated
Show resolved
Hide resolved
src/controllers/activegate/reconciler/statefulset/statefulset.go
Outdated
Show resolved
Hide resolved
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.
An image is apparently not a valid label value
{"error":"StatefulSet.apps \"dynakube-activegate\" is invalid: [metadata.labels: Invalid value: \"API_URL/linux/activegate:latest\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
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.
just a few more minor things, otherwise looks good
9d90c30
to
c54b37c
Compare
268cc83
to
4c9d6f2
Compare
Description
When setting the version label for components managed by the operator (oneagent and activegate) the latest version on the cluster is used instead of the tag of the image in case an image is used.Now when an image is used for activegate or oneagent, we use its tag as value for theapp.kubernetes.io/version
label.To not to confuse the customer when using custom image, the version label is set to a default value of
custom-image
.Using the image tag is not reliable/safe (it can be longer then the max label value)
How can this be tested?
Deploy a dynakube where the oneagent/activegate image field is set, and see that the deployed daemonset/statefulset has the correct labels
Checklist