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

Make better use of kustomize bases #615

Open
DirectXMan12 opened this issue Mar 1, 2019 · 13 comments
Open

Make better use of kustomize bases #615

DirectXMan12 opened this issue Mar 1, 2019 · 13 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@DirectXMan12
Copy link
Contributor

We should see if we can make better use of kustomize bases, instead of scaffolding out resources every time. This could range from kustomize remote bases (which raise questions about trusting things on the internet) to vendoring a separate repository or directory with the bases (and not pruning non-go in that directory).

@DirectXMan12
Copy link
Contributor Author

/kind feature
/priority backlog

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Mar 1, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 30, 2019
@DirectXMan12
Copy link
Contributor Author

/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 30, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Aug 28, 2019
@DirectXMan12
Copy link
Contributor Author

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 3, 2019
@camilamacedo86 camilamacedo86 added this to the next milestone Nov 3, 2020
@camilamacedo86 camilamacedo86 added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jul 1, 2022
@bjmask
Copy link

bjmask commented Nov 17, 2022

@DirectXMan12 I typically never suggest using remote bases as you're at the mercy of the upstream resource to keep the git URI's intact. Furthermore it would be impossible to build on airgapped environments.

@Kavinjsir
Copy link
Contributor

/cc

@camilamacedo86
Copy link
Member

camilamacedo86 commented Dec 6, 2022

Hi @andres-de-castro,

Furthermore it would be impossible to build on airgapped environments.
I think you made a good point which I also go along within.

In this case, I think we can close this one as deferred.

@Kavinjsir @varshaprasad96 @everettraven @erikgb have your thoughts on this one?

Could we agree to close it?

@Kavinjsir
Copy link
Contributor

Hi @andres-de-castro,

Furthermore it would be impossible to build on airgapped environments.
I think you made a good point which I also go along within.

In this case, I think we can close this one as deferred.

@Kavinjsir @varshaprasad96 @everettraven @erikgb have your thoughts on this one?

Could we agree to close it?

@camilamacedo86 I don't have hands on experience of kustomize remote basis so probably not able to evaluate the pros & cons in between. But I agree that we may close it for now. We may discuss later in case there are users mention it. (OR if necessary, I can keep track and try working with a PR.. 😃 )

@erikgb
Copy link
Contributor

erikgb commented Jan 25, 2023

I think this could be a big improvement to kubebuilder! To be honest, the awkward re-scaffolding is the main reason for only partially adopting kubebuilder in the projects I maintain. I just went through an upgrade from v3 to v4 in one of my projects using https://book.kubebuilder.io/migration/migration_guide_gov3_to_gov4.html, and it was really painful....

And the argument about air-gapped environments is not valid IMO. Kubebuilder is a CLI tool, and not a build tool AFAIK. And supporting developer workstations in air-gapped environments is not something I think we should take into account. I am also bothered by working in air-gapped environments, so I think I have some experience in this area. 😅 I have more issues with the code scaffolded by kubebuilder in air-gapped environments. Examples: setup-envtest and Dockerfile.

Finally, I don't see using remote Kustomize bases as any worse than installing a Helm chart from a Helm repository. And I prefer Kustomize over Helm any day!

@camilamacedo86
Copy link
Member

camilamacedo86 commented Jan 25, 2023

HI @erikgb,

I think this could be a big improvement to kubebuilder! To be honest, the awkward re-scaffolding is the main reason for only partially adopting kubebuilder in the projects I maintain. I just went through an upgrade from v3 to v4 in one of my projects using https://book.kubebuilder.io/migration/migration_guide_gov3_to_gov4.html, and it was really painful....

This one will not sorted out this problem. The hard part to upgrade is not related to the kustomize files but the go ones were is expected have code implementation on top. Also, I would say that what makes most hard those upgrades are customizations and changes made in the layout of what is scaffolded by default in general. If the project does not have changes in the default layout then is possible to just re-scaffold all, diff and add the code on top again.

To try add a helper for this need we have the idea: #2895

And the argument about air-gapped environments is not valid IMO. Kubebuilder is a CLI tool, and not a build tool AFAIK. And supporting developer workstations in air-gapped environments is not something I think we should take into account. I am also bothered by working in air-gapped environments, so I think I have some experience in this area. 😅 I have more issues with the code scaffolded by kubebuilder in air-gapped environments. Examples: setup-envtest and Dockerfile.
Finally, I don't see using remote Kustomize bases as any worse than installing a Helm chart from a Helm repository. And I prefer Kustomize over Helm any day!

I agree with you workstations in air-gapped environments is not something I think we should take into account
However, Kubebuilder help authors to build the project but we have none features to help them to distribute the project to their users. Helm provides features for that. That is another gap that I think we could be looking to see if we can address. (outside of the scope of this issue)

Now, let's speak about this specific task/issue requirement:

We should see if we can make better use of kustomize bases, instead of scaffolding out resources every time. This could range from kustomize remote bases (which raise questions about trusting things on the internet) to vendoring a separate repository or directory with the bases (and not pruning non-go in that directory).

So, what does it means? Are we here speaking about not provide all kustomize files?
If so:

  • a) how users can do things on top?
  • b) Would that affects how users distribute the projects today?
  • c) How projects like Operator-SDK can do their own customizations on top of kubebuider default scaffolds? How kubebuilder can be used as lib to help the community build their own plugins and helpers on top?
  • d) What infra kubebuilder would need to have to provide the support for that?
  • e) What kustomize manifests scaffolded by kubebuilder would never be changed by users?
  • f) What is the real value to address this? Would the effort to achieve this goal and keep it maintained pays off?

If someone, would like to propose a solution for this goal I think the best approach would to be push a PR with a PE https://github.com/kubernetes-sigs/kubebuilder/tree/master/designs so we can discuss the technical details, the impacts, the pros and cos and etc. WDYT?

PS.: I believe that was tracked a long time ago and before we move forward with the plugin ecosystem, to allow kubebuilder be used as lib and etc. Also, that shows for me that config-gen initiative could be a new project like "KubeGen" that moves in this direction, see: #3000

c/c @Kavinjsir

@camilamacedo86 camilamacedo86 removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jan 26, 2023
@camilamacedo86 camilamacedo86 self-assigned this Jan 26, 2023
@camilamacedo86 camilamacedo86 removed this from the kustomize/v2-alpha milestone Jan 26, 2023
@camilamacedo86
Copy link
Member

This issue was discussed today in the community meeting. It seems that it is not clear to us how that would work, so if someone is interested in this one, we would love to receive a proposal https://github.com/kubernetes-sigs/kubebuilder/tree/master/designs to discuss its details.

However, we decide to remove the freeze. If nobody from the community comes back with a proposal solution to achieve this goal after some time, the bot will close this issue automatically.

@camilamacedo86 camilamacedo86 removed the priority/backlog Higher priority than priority/awaiting-more-evidence. label Jan 26, 2023
@camilamacedo86 camilamacedo86 removed their assignment Jan 26, 2023
@camilamacedo86
Copy link
Member

Hi @erikgb,

It is still not clear to us how to achieve the goal. However, if you would like to push a PR or Enhance the Proposal with a solution to do this one, that would be very welcome.

Your points regarding envtest being something that will not work by default in airgap env are not sure if is a good argumentation because it is only valid for dev purposes and would not be used as the kustomize to delivery the solution. Could you please let us know more about your thoughts one how this one would work?

@camilamacedo86 camilamacedo86 added the triage/needs-information Indicates an issue needs more information in order to work on it. label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

7 participants