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

Certgen job should make sure cert is valid for the requested service #6403

Closed
jenshu opened this issue May 3, 2022 · 0 comments · Fixed by #6349
Closed

Certgen job should make sure cert is valid for the requested service #6403

jenshu opened this issue May 3, 2022 · 0 comments · Fixed by #6349
Assignees
Labels
Type: Bug Something isn't working

Comments

@jenshu
Copy link
Contributor

jenshu commented May 3, 2022

Gloo Edge Version

1.12.x (beta)

Kubernetes Version

No response

Describe the bug

Prior to the gloo/gateway merge, the certgen job generated a cert for the gateway service. Now the service has been renamed to gloo. This causes errors on upgrades from older gloo releases.

Steps to reproduce the bug

Install a version of gloo from before the gloo/gateway merge:

helm repo update
helm install -n gloo-system gloo gloo/gloo --create-namespace --version v1.11.0

and then upgrade to a version post-gloo/gateway merge:

helm upgrade -n gloo-system gloo gloo/gloo --version v1.12.0-beta8 -f - <<EOF
gateway:
  validation:
    allowWarnings: false
    alwaysAcceptResources: false
    failurePolicy: Fail
EOF

It will fail with an error like this:

ExitError:  Error: UPGRADE FAILED: post-upgrade hooks failed: Internal error occurred: failed calling webhook
 "gloo.gloo-system.svc": Post "https://gloo.gloo-system.svc:443/validation?timeout=10s": x509: certificate is valid for 
gateway, gateway.gloo-system, gateway.gloo-system.svc, gateway.gloo-system.svc.cluster.local, not gloo.gloo-system.svc

Expected Behavior

When the certgen job checks to see if it can use an existing Secret, it should consider a cert with the old service name (gateway) as invalid, instead of trying to reuse it.

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant