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

applyconfiguration-gen does not respect the +groupName tag and uses the plain apiVersion #150

Open
EraYaN opened this issue Feb 15, 2023 · 8 comments

Comments

@EraYaN
Copy link

EraYaN commented Feb 15, 2023

So when using the Operator-SDK it generates a go file like groupversion_info.go in your main API package. This defines stuff like:

// Package v1alpha1 contains API Schema definitions for the cal.casa.eu v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=group.example.com
// +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +genclient
package v1alpha1

I added the genclient and k8s:openapi-gen=true, both of those are ignored by the way and need to be on every type.

But it also ignores the groupName so the applyconfiguration object ends up with

b.WithAPIVersion("v1alpha1")

While I expect

b.WithAPIVersion("group.example.com/v1alpha1")

Which I can fix with sed but I feel like it shouldn't really be a thing. I'm at a loss currently as to how to get it to first respect the tags on the package and then to actually include the groupName.

I got my generation code from here: cert-manager/cert-manager#5383

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 16, 2023
@EraYaN
Copy link
Author

EraYaN commented May 16, 2023

This is still an issue.

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 16, 2023
@lburgazzoli
Copy link

I've experienced a very similar issue https://kubernetes.slack.com/archives/CAR30FCJZ/p1692114473185959.

According to the code, the group is derived either from the path or from the field of the defined groupName

@erikgb
Copy link

erikgb commented Oct 21, 2023

FWIW, I got this to work if the +groupName marker is located in a doc.go file in the API package. No idea why. From the referenced code this should not matter. 🤔

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2024
@EraYaN
Copy link
Author

EraYaN commented Jan 31, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 30, 2024
@EraYaN
Copy link
Author

EraYaN commented Apr 30, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants