-
Notifications
You must be signed in to change notification settings - Fork 59
[WIP] Add Mtls patch to Mutating Webhook #508
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
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
raycluster_webhook/src/patches.go
Outdated
svcDomain := rayCluster.Name + "-head-svc." + rayCluster.Namespace + ".svc" | ||
secretName := `ca-secret-` + rayCluster.Name | ||
fmt.Println("Start") | ||
domain, err := getDomainName() |
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.
We know the error starts here.
raycluster_webhook/src/patches.go
Outdated
func getDomainName() (string, error) { | ||
consoleRoute := &routev1.Route{} | ||
fmt.Println("1") | ||
fmt.Printf(client.ObjectKey{Name: NameConsoleLink, Namespace: NamespaceConsoleLink}.String()) |
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.
and that this technically works, which I suppose isn't terribly shocking.
fmt.Println("2") | ||
fmt.Printf(consoleRoute.String()) | ||
|
||
if err := k8Client.Get(context.TODO(), types.NamespacedName{Name: NameConsoleLink, Namespace: NamespaceConsoleLink}, consoleRoute); err != nil { |
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.
But this fails.
So, something is misbehaving into this .Get()
.
- It's probably not the
context.TODO()
- I think we fixed the
types.NamespacedName
Struct but we should definitely try to confirm that. - The
consoleRoute
seemed reasonable from what I recall as that was the object that was passed to be updated.
We should definitely confirm these 3 things though and I'd dig into them slightly differently.
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.
What is the error?
Do you run the container locally, connecting to the remote OpenShift cluster, or directly as a Deployment on the cluster?
If the latter, I see that you doesn't provide RBAC for accessing Routes - https://github.com/project-codeflare/codeflare-operator/pull/508/files#diff-d44acd75643a4ccbb2ddc671e641c9f520d495dbc01fe1dbcf305bd4c13915d9R53-R61
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.
@sutaakar This was the error we were receiving. I will update RBAC:
no kind is registered for the type v1.Route in scheme "go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:100"
Issue link
What changes have been made
Verification steps
Checks