Kuadrant / authorino-operator

Kubernetes Operator to manage Authorino instances
Apache License 2.0
9 stars 20 forks source link

RELATED_IMAGE_AUTHORINO env var #229

Closed eguzki closed 1 week ago

eguzki commented 1 week ago

What

Authorino image can be read from RELATED_IMAGE_AUTHORINO env var. Defaults to quay.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:

  1. Authorino CR's spec.image
  2. RELATED_IMAGE_AUTHORINO env var
  3. Value set at the operator compilation time passed as ldflags -X github.com/kuadrant/authorino-operator/controllers.DefaultAuthorinoImage=VALUE
  4. quay.io/kuadrant/limitador:latest

Verification steps

run cluster

kind create cluster --name authorino-operator-system

install CRDs

make install

run operator locally with specific RELATED_IMAGE_AUTHORINO env var.

RELATED_IMAGE_AUTHORINO=quay.io/kuadrant/authorino:v0.18.0 make run

Create authorino object without spec.image to deploy version from env var.

k apply -f - <<EOF
apiVersion: operator.authorino.kuadrant.io/v1beta1
kind: Authorino
metadata:
  name: authorino
spec:
  listener:
    tls:
      enabled: false
  oidcServer:
    tls:
      enabled: false
EOF

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

quay.io/kuadrant/authorino:v0.18.0

Clean up

kind delete cluster --name authorino-operator-system
codecov-commenter commented 1 week ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 61.54%. Comparing base (66594a6) to head (f0150c1).

Files with missing lines Patch % Lines
controllers/authorino_controller.go 25.00% 4 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ 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 ``` | [Flag](https://app.codecov.io/gh/Kuadrant/authorino-operator/pull/229/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/Kuadrant/authorino-operator/pull/229/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `61.54% <25.00%> (-0.24%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

eguzki commented 1 week ago

supersedes https://github.com/Kuadrant/authorino-operator/pull/174

eguzki commented 1 week ago

he requested changes, so I ~cannot~ shoud not merge even with one approval.

eguzki commented 1 week ago

Signed the commits