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

CRD Status: Implement L2 Service Status #2158

Closed
2 tasks done
oribon opened this issue Nov 9, 2023 · 6 comments
Closed
2 tasks done

CRD Status: Implement L2 Service Status #2158

oribon opened this issue Nov 9, 2023 · 6 comments
Assignees
Labels
enhancement go Pull requests that update Go code help wanted
Milestone

Comments

@oribon
Copy link
Member

oribon commented Nov 9, 2023

Is your feature request related to a problem?

https://github.com/metallb/metallb/blob/main/design/crd-status.md

Describe the solution you'd like

As described in https://github.com/metallb/metallb/blob/main/design/crd-status.md#service-announcement---l2 we want to implement the ServiceL2Status resource

Additional context

No response

I've read and agree with the following

  • I've checked all open and closed issues and my request is not there.
  • I've checked all open and closed pull requests and my request is not there.
@oribon oribon added enhancement help wanted go Pull requests that update Go code labels Nov 9, 2023
@oribon oribon added this to the CRD Status milestone Nov 9, 2023
@lwabish
Copy link
Contributor

lwabish commented Nov 14, 2023

I'd love to implement this

@oribon
Copy link
Member Author

oribon commented Nov 14, 2023

thanks! assigned, let us know if you need any help in #metallb-dev or here

@lwabish
Copy link
Contributor

lwabish commented Nov 15, 2023

The very first problem I met is:

❯ kubebuilder create api --version v1beta1 --kind ServiceL2Status --group metallb.io
Error: failed to create API: unable to load configuration file: 
unable to load the configuration: 
unable to read "PROJECT" file: open PROJECT: no such file or directory

On the other hand, it seems not possible to init a kubebuilder project based on a non empty folder.

❯ kubebuilder init --domain metallb.io
Error: failed to initialize project: unable to run pre-scaffold tasks of "base.go.kubebuilder.io/v4": 
target directory is not empty (only go.mod, go.sum, files and directories with the prefix ".", 
files with the suffix ".md" or capitalized files name are allowed); found existing file "api"

So now there seems no way to generate the xxx_type.go ? I wonder how was the xxx_types.go written before?

@fedepaol
Copy link
Member

The very first problem I met is:

❯ kubebuilder create api --version v1beta1 --kind ServiceL2Status --group metallb.io
Error: failed to create API: unable to load configuration file: 
unable to load the configuration: 
unable to read "PROJECT" file: open PROJECT: no such file or directory

On the other hand, it seems not possible to init a kubebuilder project based on a non empty folder.

❯ kubebuilder init --domain metallb.io
Error: failed to initialize project: unable to run pre-scaffold tasks of "base.go.kubebuilder.io/v4": 
target directory is not empty (only go.mod, go.sum, files and directories with the prefix ".", 
files with the suffix ".md" or capitalized files name are allowed); found existing file "api"

So now there seems no way to generate the xxx_type.go ? I wonder how was the xxx_types.go written before?

I honestly don't remember how it was done (and I did it). The thing is, metallb is kind of a frankenstein that started before kubebuilder (or controller runtime) was a thing. Lately, we introduced CRDs and the controller-runtime based controllers in place of the existing configmap.

If I were you, I'd just copy one existing file and adjust it, doesn't seem a big deal.

@fedepaol
Copy link
Member

@lwabish did you manage to sort it out?

@lwabish
Copy link
Contributor

lwabish commented Nov 21, 2023

@lwabish did you manage to sort it out?

I think so. I have finished coding and start working on testing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement go Pull requests that update Go code help wanted
Projects
None yet
Development

No branches or pull requests

3 participants