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

Conversion webhook is not initialized #987

Closed
Lirt opened this issue Sep 7, 2021 · 4 comments
Closed

Conversion webhook is not initialized #987

Lirt opened this issue Sep 7, 2021 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Lirt
Copy link

Lirt commented Sep 7, 2021

/kind bug

CAPO conversion webhook from v1alpha3 to v1alpha4 is not initialized. You can notice this in two ways:

  1. Creating v1alpha3 CAPO resources doesn't work.
  2. There is no log about conversion webhook registered (log line should be conversion webhook enabled).

Error output:

Error from server (InternalError): error when creating "xxx.yaml": Internal error occurred: conversion webhook for infrastructure.cluster.x-k8s.io/v1alpha3, Kind=OpenStackMachine failed: the server could not find the requested resource

During troubleshooting me and my colleague @jsen- ran debug mode in VSCode and we noticed that during webhook setup the schema implemented only Hub interface and no Convertible. This was because the v1alpha3 schema is not added in the main.go.

Environment:

  • Cluster API Provider OpenStack version: Tested both with main (1576e9c1ff8e2f292d8ec01840367cf16246f21c) and 0.4.0
  • Cluster-API version: 0.4.1
  • OpenStack version: ---
  • Kubernetes version (use kubectl version): 1.20.2

Fix opened in MR #988

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 7, 2021
@tobiasgiese
Copy link
Member

There is already an open PR (#985) regarding this issue

@Lirt
Copy link
Author

Lirt commented Sep 7, 2021

Oh, I didn't notice this PR in the meantime, it was opened 1 day before mine. Difference in code change is that it includes also old CAPI schemas, which are IMO not needed here.

@jichenjc
Copy link
Contributor

@Lirt #985 merged, do we still have TODOs here? or can we close this?

@Lirt
Copy link
Author

Lirt commented Sep 20, 2021

Hi @jichenjc we can close this, but I assume you should do new release as this is critical otherwise users will use the old one and report this same bug.

@Lirt Lirt closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants