Kuadrant / authorino-operator

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

Support for Authorino enable/disable superseding strict host subsets #143

Closed guicassolato closed 1 year ago

guicassolato commented 1 year ago

Exposes Authorino's --allow-superseding-host-subsets command-line flag (https://github.com/Kuadrant/authorino/pull/434) as a new API option spec.supersedingHostSubsets: Boolean (default: false)

Verification steps

kind create cluster --name authorino-operator-test
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.1/cert-manager.yaml
kubectl -n cert-manager wait --timeout=300s --for=condition=Available deployments --all
kubectl create namespace authorino-operator
make install
make run

In a separate shell:

kubectl apply -f -<<EOF
apiVersion: operator.authorino.kuadrant.io/v1beta1
kind: Authorino
metadata:
  name: authorino
spec:
  supersedingHostSubsets: true
  image: quay.io/kuadrant/authorino:host-collision-switch
  listener:
    tls:
      enabled: false
  oidcServer:
    tls:
      enabled: false
EOF

Confirm the --allow-superseding-host-subsets flag included in the command-line args of the Authorino container:

kubectl get deployment/authorino -o jsonpath='{.spec.template.spec.containers[0].args}'
# ["--watch-namespace=default","--allow-superseding-host-subsets"]%
codecov-commenter commented 1 year ago

Codecov Report

Merging #143 (3cb0cef) into main (45f17d5) will decrease coverage by 0.26%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
- Coverage   63.11%   62.85%   -0.26%     
==========================================
  Files           1        1              
  Lines         732      735       +3     
==========================================
  Hits          462      462              
- Misses        220      222       +2     
- Partials       50       51       +1     
Flag Coverage Δ
unit 62.85% <0.00%> (-0.26%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
controllers/authorino_controller.go 62.85% <0.00%> (-0.26%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more