-
Notifications
You must be signed in to change notification settings - Fork 21
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
RELATED_IMAGE_AUTHORINO env var #229
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
- Coverage 61.78% 61.54% -0.24%
==========================================
Files 2 2
Lines 785 788 +3
==========================================
Hits 485 485
- Misses 249 251 +2
- Partials 51 52 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
supersedes #174 |
controllers/authorino_controller.go
Outdated
// `DefaultAuthorinoImage can be empty string. But image cannot be or deployment will fail | ||
image = "quay.io/kuadrant/authorino:latest" |
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.
This is dangerous. DefaultAuthorinoImage
should never be empty. If we're keeping this build-arg variable as an option to set the default Authorino image, then IMO the variable should be set at every build to a non-empty value.
If this variable can be empty, I think I'd rather break the operator than make it silently reset all Authorino instances in the cluster to latest
if the RELATED_IMAGE_AUTHORINO
is removed from the deployment.
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.
ok, panicking if it is empty
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.
Assuming @guicassolato is happy with the proposed solution, I've verified this locally with the various different settings for DEFAULT_AUTHORINO_IMAGE
, .spec.image
and RELATED_IMAGE_AUTHORINO
and it all seems to be working well (and following intended precedence)
he requested changes, so I |
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'm happy with panicking if it goes all the way down and DefaultAuthorinoImage
is empty. Thanks for addressing it!
I also like the explanation about the order of precedence in the description of the PR. We should probably add it to the last paragraph of https://github.com/Kuadrant/authorino-operator/blob/main/RELEASE.md (otherwise RELATED_IMAGE_AUTHORINO
in undocumented).
But I'll approve the PR now, in light that it has been tested and it works. Docs can be added later.
Thanks, @eguzki and @adam-cattermole!
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
76f7331
to
f0150c1
Compare
Signed the commits |
What
Authorino image can be read from
RELATED_IMAGE_AUTHORINO
env var. Defaults toquay.io/kuadrant/authorino:latest
Required to specify the authorino image from the CSV manifest
The authorino image being used in the deployment is read from different sources with some order of precedence:
spec.image
RELATED_IMAGE_AUTHORINO
env var-X github.com/kuadrant/authorino-operator/controllers.DefaultAuthorinoImage=VALUE
quay.io/kuadrant/limitador:latest
Verification steps
run cluster
install CRDs
run operator locally with specific
RELATED_IMAGE_AUTHORINO
env var.Create authorino object without
spec.image
to deploy version from env var.Check authorino's version is
quay.io/kuadrant/authorino:v0.18.0
$ kubectl get deployments authorino -o jsonpath='{.spec.template.spec.containers[0].image}'
The response should be
Clean up