-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use WASM pull secret if protected registry #1083
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1083 +/- ##
==========================================
+ Coverage 76.15% 83.77% +7.62%
==========================================
Files 111 81 -30
Lines 8986 6712 -2274
==========================================
- Hits 6843 5623 -1220
+ Misses 1852 870 -982
+ Partials 291 219 -72
Flags with carried forward coverage won't be shown. Click here to find out more.
|
adding an update to the OpenShfit install doc |
3b90c00
to
7dab328
Compare
Have you considered doing the same for EnvoyGateway (in the EnvoyExtensionPolicy)? (Not asking to do so...) |
I am aware that this is still in draft and design/implementation, however, I drop here some verification steps that should work regardless of the implementation being done. Verification Steps
make local-env-setup
PROTECTED_REGISTRY=registry.redhat.io RELATED_IMAGE_WASMSHIM=registry.redhat.io/rhcl-1/wasm-shim-rhel9@sha256:458a5ff405922b20142416993f486d22ea23d375f9ef4fc239a42f00649129e4 make run
kubectl -n kuadrant-system apply -f - <<EOF
apiVersion: kuadrant.io/v1beta1
kind: Kuadrant
metadata:
name: kuadrant
spec: {}
EOF
kubectl apply -f examples/toystore/toystore.yaml Create a HTTPRoute to route traffic to the service via Istio Ingress Gateway: kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: toystore
spec:
parentRefs:
- name: kuadrant-ingressgateway
namespace: gateway-system
hostnames:
- api.toystore.com
rules:
- matches:
- method: GET
path:
type: PathPrefix
value: "/toys"
backendRefs:
- name: toystore
port: 80
- matches: # it has to be a separate HTTPRouteRule so we do not rate limit other endpoints
- method: POST
path:
type: Exact
value: "/toys"
backendRefs:
- name: toystore
port: 80
EOF Export the gateway hostname and port: export INGRESS_HOST=$(kubectl get gtw kuadrant-ingressgateway -n gateway-system -o jsonpath='{.status.addresses[0].value}')
export INGRESS_PORT=$(kubectl get gtw kuadrant-ingressgateway -n gateway-system -o jsonpath='{.spec.listeners[?(@.name=="http")].port}')
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT Verify the route works: curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toys -i
# HTTP/1.1 200 OK
kubectl apply -f - <<EOF
apiVersion: kuadrant.io/v1
kind: AuthPolicy
metadata:
name: toystore-authn
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: toystore
defaults:
strategy: merge
rules:
authentication:
"api-key-authn":
apiKey:
selector:
matchLabels:
app: toystore
credentials:
authorizationHeader:
prefix: APIKEY
EOF
kubectl get wasmplugin kuadrant-kuadrant-ingressgateway -n gateway-system -o jsonpath="{.spec.imagePullSecret}" It should return
Verify the route works: curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toys -i
# HTTP/1.1 401 Unauthorized
Stop the operator with make run
kubectl get wasmplugin kuadrant-kuadrant-ingressgateway -n gateway-system -o jsonpath="{.spec.url}"
kubectl get wasmplugin kuadrant-kuadrant-ingressgateway -n gateway-system -o jsonpath="{.spec.imagePullSecret}" Verify the route works: curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toys -i
# HTTP/1.1 401 Unauthorized |
@trepel FYI pull secret update |
@smccarthy-ie FYI pull secret change |
Verification steps working like a charm for Istio and EnvoyGateway 🎖️ |
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.
LGTM
@maleck13 One thing I found, worth mentioning, is that the |
43f24d2
to
800770e
Compare
add instructions to install guide ensure pull secret is reconciled when changed Signed-off-by: craig <[email protected]> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
Updated the verification steps to cover the reconciliation when the url changes |
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.
LGTM
Verification steps passed
Great work 🎖️
closes #1077
Signed-off-by: craig [email protected]
rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED