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

(go/v2) (config/v3) Webhook infomation missing in PROJECT #1996

Closed
Adirio opened this issue Feb 9, 2021 · 2 comments · Fixed by #1998
Closed

(go/v2) (config/v3) Webhook infomation missing in PROJECT #1996

Adirio opened this issue Feb 9, 2021 · 2 comments · Fixed by #1998
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@Adirio
Copy link
Contributor

Adirio commented Feb 9, 2021

Using plugin go.kubebuilder.io/v2 with config/v3 is not saving to the project file the webhook information:

The following PROJECT configuration file corresponds to the same project used for testdata/project-v2-multigroup but using config/v3 instead.

domain: testproject.org
layout: go.kubebuilder.io/v2
multigroup: true
projectName: go-v2-config-v3
repo: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup
resources:
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: crew
  kind: Captain
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/crew/v1
  version: v1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: ship
  kind: Frigate
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v1beta1
  version: v1beta1
- api:
    crdVersion: v1beta1
  controller: true
  domain: testproject.org
  group: ship
  kind: Destroyer
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v1
  version: v1
- api:
    crdVersion: v1beta1
  controller: true
  domain: testproject.org
  group: ship
  kind: Cruiser
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v2alpha1
  version: v2alpha1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: sea-creatures
  kind: Kraken
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/sea-creatures/v1beta1
  version: v1beta1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: sea-creatures
  kind: Leviathan
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/sea-creatures/v1beta2
  version: v1beta2
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: foo.policy
  kind: HealthCheckPolicy
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/foo.policy/v1
  version: v1
version: "3"

As it can be seen, despite having multiple webhooks in this project, no info about them is being stored. The expected PROJECT file should be:

domain: testproject.org
layout: go.kubebuilder.io/v2
multigroup: true
projectName: go-v2-config-v3
repo: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup
resources:
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: crew
  kind: Captain
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/crew/v1
  version: v1
  webhooks:
    defaulting: true
    validation: true
    webhookVersion: v1beta1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: ship
  kind: Frigate
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v1beta1
  version: v1beta1
  webhooks:
    conversion: true
    webhookVersion: v1beta1
- api:
    crdVersion: v1beta1
  controller: true
  domain: testproject.org
  group: ship
  kind: Destroyer
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v1
  version: v1
  webhooks:
    defaulting: true
    webhookVersion: v1beta1
- api:
    crdVersion: v1beta1
  controller: true
  domain: testproject.org
  group: ship
  kind: Cruiser
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/ship/v2alpha1
  version: v2alpha1
  webhooks:
    validation: true
    webhookVersion: v1beta1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: sea-creatures
  kind: Kraken
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/sea-creatures/v1beta1
  version: v1beta1
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: sea-creatures
  kind: Leviathan
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/sea-creatures/v1beta2
  version: v1beta2
- api:
    crdVersion: v1beta1
    namespaced: true
  controller: true
  domain: testproject.org
  group: foo.policy
  kind: HealthCheckPolicy
  path: sigs.k8s.io/kubebuilder/testdata/project-v2-multigroup/apis/foo.policy/v1
  version: v1
version: "3"

/kind bug

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

hi @Adirio,

Are you working on in this one?

@Adirio
Copy link
Contributor Author

Adirio commented Feb 9, 2021

Yes
/assign

@camilamacedo86 camilamacedo86 added this to the v3.0.0 milestone Feb 9, 2021
@camilamacedo86 camilamacedo86 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Feb 9, 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. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
3 participants