Skip to content
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

[Bug] failed calling webhook "vcryostat.kb.io" due to TLS error #924

Closed
ahus1 opened this issue Jul 30, 2024 · 2 comments · Fixed by #926
Closed

[Bug] failed calling webhook "vcryostat.kb.io" due to TLS error #924

ahus1 opened this issue Jul 30, 2024 · 2 comments · Fixed by #926
Assignees
Labels
bug Something isn't working needs-triage Needs thorough attention from code reviewers

Comments

@ahus1
Copy link

ahus1 commented Jul 30, 2024

Current Behavior

After successfully installing the Operator on OpenShift 4.15.x, when creating the first CR, I get the error message

Error "failed calling webhook "vcryostat.kb.io": failed to call webhook: Post "https://cryostat-operator-controller-manager-service.openshift-operators.svc:443/validate-operator-cryostat-io-v1beta2-cryostat?timeout=10s": tls: failed to verify certificate: x509: certificate is valid for infinispan-operator-controller-manager-service.openshift-operators, infinispan-operator-controller-manager-service.openshift-operators.svc, not cryostat-operator-controller-manager-service.openshift-operators.svc" for field "undefined".

The CR I'm trying to install is very minimal. As the name above suggests, also the Infinispan Operator is installed.

apiVersion: operator.cryostat.io/v1beta2
kind: Cryostat
metadata:
  name: cryostat
  namespace: {{ .Values.namespace }}
spec:
  enableCertManager: true

Expected Behavior

CR creation should succeed

Steps To Reproduce

  1. Installed Operators RH build of Cryostat 3.0.0+6, Infinispan 2.4.3
  2. When creating the CR, the error message above appears

Environment

- Environment: OpenShift 4.15.21
- Version:3.0.0+6

Anything else?

No response

@ahus1 ahus1 added bug Something isn't working needs-triage Needs thorough attention from code reviewers labels Jul 30, 2024
@andrewazores andrewazores transferred this issue from cryostatio/cryostat Jul 30, 2024
@andrewazores andrewazores moved this to Backlog in 3.0.1 release Jul 30, 2024
@andrewazores andrewazores moved this to Backlog in 4.0.0 release Jul 30, 2024
@andrewazores
Copy link
Member

@ebaron any idea what's happening here?

@ebaron ebaron self-assigned this Jul 30, 2024
@ebaron
Copy link
Member

ebaron commented Jul 30, 2024

Thanks for bringing this to our attention @ahus1! It looks like this is the problem:

$ oc get svc infinispan-operator-controller-manager-service -o jsonpath='{.spec.selector}' | yq -P
app.kubernetes.io/name: infinispan-operator
control-plane: controller-manager

$ oc get svc cryostat-operator-controller-manager-service -o jsonpath='{.spec.selector}' | yq -P
control-plane: controller-manager

Our operator's objects do not have an app.kubernetes.io/name label set. This is causing our webhook requests to sometimes be routes to Infinispan's webhook, which fails due to the TLS issue. This should be easily fixable by adding a similar label to our objects and selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Needs thorough attention from code reviewers
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants