You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValidationWebhook in Gravitee Kubernetes Operator panics when ManagementContext's secret ref is in a different namespace to ApiDefinition, even when the ManagementContext includes the namespace of the secret ref
To Reproduce
Steps to reproduce the behaviour:
Run GKO
Create a secret including a username and a password in namespace A
apiVersion: v1
kind: Secret
metadata:
name: gravitee-manangement-context-secret
namespace: A
stringData:
username: user
password: pass
type: Opaque
Create a management context in namespace A using this secret for auth
Describe the bug
ValidationWebhook in Gravitee Kubernetes Operator panics when ManagementContext's secret ref is in a different namespace to ApiDefinition, even when the ManagementContext includes the namespace of the secret ref
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
ValidatingWebhook should either accept or reject the resource based on its validity, providing a clear description of the potential error.
Current behaviour
The gko-controller-manager pod raises a runtime error (panic) due to dereferencing a nil pointer.
Useful information
This happens due to a typo on the following line: https://github.com/gravitee-io/gravitee-kubernetes-operator/blob/e135e34af26733957054cf133b4340781a271689/internal/k8s/dynamic/mctx.go#L51
Here the parentNs gets inserted into the namespace, instead of taking it from the secretRef of the Context.
Environment
What is the impacted version?
My GKO deployment is using the image graviteeio/kubernetes-operator:4.5.5
Potential impacts
Which other features may be impacted by this fix. This could be populated after fix
What are the impacted versions?
Dependencies
Link a story or other related things...
The text was updated successfully, but these errors were encountered: