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

🐛 (API) remove KustomizeVersion const from golang plugin ( the version is defined in the kustomize plugins which is responsable for ) #2787

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

camilamacedo86
Copy link
Member

Description

The plugin responsable for define the Kustomize Version is the Kustomize one.

If you have consumer Kubebuilder as a lib ensure that you properly get the version from the Kustomize Plugin instead of Golang base language. Note that to create helpers and/or plugin versions that are able to deal with more than on version you can, example:

        kustomizeVersion = kustomizecommonv1.KustomizeVersion
	kustomizev2 := kustomizecommonv2alpha.Plugin{}
	pluginKeyForKustomizeV2 := plugin.KeyFor(kustomizev2)

	for _, pluginKey := range s.config.GetPluginChain() {
		if pluginKey == pluginKeyForKustomizeV2 {
			kustomizeVersion = kustomizecommonv2alpha.KustomizeVersion
			break
		}
	}

        ....

        &templates.Makefile{
	      ....
	      KustomizeVersion:         kustomizeVersion,
	      ....
      },

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 1, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2022
@camilamacedo86 camilamacedo86 changed the title 🐛 (API) remove Kustomize_version const from golang plugin - the version is defined in the kustomize plugins 🐛 (API) remove KustomizeVersion const from golang plugin - the version is defined in the kustomize plugins Jul 1, 2022
@camilamacedo86 camilamacedo86 changed the title 🐛 (API) remove KustomizeVersion const from golang plugin - the version is defined in the kustomize plugins 🐛 (API) remove KustomizeVersion const from golang plugin ( Note that the version is defined in the kustomize plugins which is responsable for ) Jul 1, 2022
@camilamacedo86 camilamacedo86 changed the title 🐛 (API) remove KustomizeVersion const from golang plugin ( Note that the version is defined in the kustomize plugins which is responsable for ) 🐛 (API) remove KustomizeVersion const from golang plugin ( the version is defined in the kustomize plugins which is responsable for ) Jul 1, 2022
@camilamacedo86
Copy link
Member Author

Note in this case is expected the PR fails in the APIDiff / Verify API differences (pull_request).
We will skip this one to move forward. This check is done only to help us not introduce breaking changes.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@camilamacedo86 camilamacedo86 merged commit ac091b4 into kubernetes-sigs:master Jul 4, 2022
@camilamacedo86 camilamacedo86 deleted the kust-ver branch July 4, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants