-
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
Propagating Limitador's env vars #22
Conversation
64e633b
to
9bcba88
Compare
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.
Looking super nice
9bcba88
to
1b59e21
Compare
8631e8f
to
7fd7fd4
Compare
d8917f5
to
eea4cb1
Compare
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.
have you tested manually e2e?
- Deploy kuadrant with the operator.
- Deploy RLP
- Rate limit is happening
16007f6
to
caa9b4d
Compare
3822d12
to
9c3599b
Compare
* limitador namespace * limitador service name * limitador service grpc port * Using keyed values
* It needs some DRY up * There's no easy way, since obj is type interface when multiple case types
9c3599b
to
52402f4
Compare
} | ||
} | ||
newObj = obj | ||
default: |
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 some code style we're following?
@@ -389,14 +396,47 @@ func (r *KuadrantReconciler) createOnlyInKuadrantNSCb(ctx context.Context, kObj | |||
return err | |||
} | |||
|
|||
k8sObjKind := k8sObj.DeepCopyObject().GetObjectKind() | |||
var newObj client.Object | |||
newObj = k8sObj |
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.
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 know, it's a bit misleading the default
case, its block will be executed if none of the other cases match.
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.
switch obj := k8sObj.(type)
will only live within the switch block, so we need to copy it to a different var
.
I'd love the swith case to include a finally
clause, that will be executed at the very end, thus we could avoid a lot of repetition
This PR makes it possible to inject the
Name
andNamespace
to the Kuadrant Controller Deployment object.It also patches the
RoleBinding
andClusterRoleBinding
matching the Kuadrant namespace.Closes Kuadrant/kuadrant-controller#157
Part of #75
PR, verification steps
Deploy kuadrant operator (and operator dependencies) manually
Deploy empty Kuadrant CR
Wait until Kuadrant CR status reports it is ready
kubectl wait --for=condition=ready kuadrant/kuadrant-sample --timeout=-1s kuadrant.kuadrant.kuadrant.io/kuadrant-sample condition met
Deploy Service
Create HTTPRoute to configure routing to the toustore service
Port forward the istio gateway service in order to reach it
kubectl port-forward -n istio-system service/istio-ingressgateway 8080:80 &
Check if you can reach the toystore service
Apply a RLP
Rollout Limitador. // This is needed for now until a fix is merged in Limitador repo
Try again curling the service, you should be ratelimited to 2 request per 5 seconds
Voilá! Profit!