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

skip kustomize transformers for paths #896

Closed
Liujingfang1 opened this issue Mar 19, 2019 · 18 comments
Closed

skip kustomize transformers for paths #896

Liujingfang1 opened this issue Mar 19, 2019 · 18 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Liujingfang1
Copy link
Contributor

This is a feature request for allowing users to skip paths for transformers.

Kustomize uses a series of transformers to set fields for all resources inside one kustomization directory. Those transformers include

  • name prefix transformer
  • name suffix transformer
  • namespace transformer
  • common label transformer
  • common annotation transformer

Each of these transformers modifies resource configuration by changing the value of a certain path inside the resource. The paths that a transformer can modify is from a set of configurations. Here are some transformer configurations

namePrefix:
- path: metadata/name

commonLabels:
- path: metadata/labels
  create: true
- path: spec/selector
  create: true
  version: v1
  kind: Service

Kustomize allow users to add extra configurations so that the transformers can perform as expect for non core types. However, if users want to skip a path in certain transformer, they couldn't do that since Kustomize lacks the customization to skip a path.

There have been quite a few requests, which are looking for a feature to skip certain path. Here is the list of those requests.

@Liujingfang1 Liujingfang1 added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 19, 2019
@Liujingfang1 Liujingfang1 changed the title skip kustomize transformers for paths/kind skip kustomize transformers for paths Mar 19, 2019
@yujunz
Copy link
Member

yujunz commented Mar 19, 2019

/assign @yujunz

@k8s-ci-robot
Copy link
Contributor

@yujunz: GitHub didn't allow me to assign the following users: yujunz.

Note that only kubernetes-sigs members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @yujunz

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yujunz
Copy link
Member

yujunz commented Mar 19, 2019

It seems I can't assign my self for it, @Liujingfang1 😄

@orirawlings
Copy link

Does this issue supersede #91? I'm just trying to make sense of the network of linked issues.

@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 Jul 8, 2019
@alenkacz
Copy link

@Liujingfang1 is anyone working on this? Would you be interested in community contribution?

@verult
Copy link

verult commented Jul 19, 2019

/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 Jul 19, 2019
@jbrette
Copy link
Contributor

jbrette commented Sep 4, 2019

@alenkacz @verult @orirawlings @yujunz

Please have a look at:

@yujunz
Copy link
Member

yujunz commented Sep 4, 2019

Left some comments in the KEP.

@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 Dec 3, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 2, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@micnncim
Copy link

micnncim commented Nov 16, 2020

/reopen
/remove-lifecycle rotten

Any update? Seems some of parts haven't been implemented yet like:

// A Gvk skip list for prefix/suffix modification.
// hard coded for now - eventually should be part of config.
var prefixSuffixFieldSpecsToSkip = types.FsSlice{
{Gvk: resid.Gvk{Kind: "CustomResourceDefinition"}},
{Gvk: resid.Gvk{Group: "apiregistration.k8s.io", Kind: "APIService"}},
{Gvk: resid.Gvk{Kind: "Namespace"}},
}

@k8s-ci-robot
Copy link
Contributor

@micnncim: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen
/remove-lifecycle rotten

Any update? Seems some of parts haven't been implemented yet like

// A Gvk skip list for prefix/suffix modification.
// hard coded for now - eventually should be part of config.
var prefixSuffixFieldSpecsToSkip = types.FsSlice{
{Gvk: resid.Gvk{Kind: "CustomResourceDefinition"}},
{Gvk: resid.Gvk{Group: "apiregistration.k8s.io", Kind: "APIService"}},
{Gvk: resid.Gvk{Kind: "Namespace"}},
}
.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 16, 2020
@Shell32-Natsu
Copy link
Contributor

@micnncim You can use the explicit way described here to override the fieldSpec for buitlin plugins.

@micnncim
Copy link

@Shell32-Natsu I tried it and confirmed it works well as I expected. Thanks!

@mukundjalan
Copy link

@Shell32-Natsu the link you provided seems to be broken. Can you please provide reference to the new page for this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests