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

Allow disabling of suffix hashes on merged ConfigMaps generated from ConfigMapGenerators #4693

Closed
elisshafer opened this issue Jun 29, 2022 · 11 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on. triage/resolved Indicates an issue has been resolved or doesn't need to be resolved.

Comments

@elisshafer
Copy link
Contributor

elisshafer commented Jun 29, 2022

Is your feature request related to a problem? Please describe.

Say there is some shared out of scope ConfigMapGenerator that is composed into a given cluster's configuration multiple times through multiple apps' ConfigMapGenerators merging into the shared ConfigMapGenerator in various commands to kustomize build and we'd like some ConfigMaps to have a suffix hash at the end of the name, and others to not have a suffix hash appended.

Describe the solution you'd like

I'd like to be able to specify

- name: example 
  behavior: merge
  options:
    disableNameSuffixHash: true

and for the resulting ConfigMap to not have a suffix hash appended to the specified name.

Describe alternatives you've considered

A desired solution may be to use a suffix hash in some of the ConfigMaps that are generated from the shared ConfigMapGenerator but not use a suffix hash in other ConfigMaps.

Additional context

@elisshafer elisshafer added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 29, 2022
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 29, 2022
@KnVerey
Copy link
Contributor

KnVerey commented Jul 14, 2022

This sounds reasonable to me. It looks like disableNameSuffixHash is effectively ignored in merge scenarios, because if it is true, that means we don't add an internal suffixing annotation to the resource, and the annotation from the base will be merged in. Wdyt @natasha41575 ?

/triage under-consideration

@natasha41575
Copy link
Contributor

It looks like disableNameSuffixHash is effectively ignored in merge scenarios, because if it is true, that means we don't add an internal suffixing annotation to the resource, and the annotation from the base will be merged in.

That sounds like a bug to me, I'm on board with accepting this issue.

@KnVerey
Copy link
Contributor

KnVerey commented Jul 15, 2022

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 15, 2022
@elisshafer
Copy link
Contributor Author

elisshafer commented Jul 16, 2022

Thanks so much for accepting the change request! I can take a look at making a PR for this if this works for others?

@KnVerey
Copy link
Contributor

KnVerey commented Jul 18, 2022

Yes please, we'd appreciate that! Please be sure to include e2e tests, I suggest in api/krusty/generatormergeandreplace_test.go.

/assign @elisshafer

@k8s-triage-robot
Copy link

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 Oct 16, 2022
@elisshafer
Copy link
Contributor Author

/remove-lifecycle stale

Got caught up in some other things lately since making this issue, I'll have a PR out soon

@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 Oct 16, 2022
@k8s-triage-robot
Copy link

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR 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 14, 2023
@elisshafer
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 Jan 25, 2023
@elisshafer
Copy link
Contributor Author

/triage resolved
/close

@k8s-ci-robot k8s-ci-robot added the triage/resolved Indicates an issue has been resolved or doesn't need to be resolved. label Jan 25, 2023
@k8s-ci-robot
Copy link
Contributor

@elisshafer: Closing this issue.

In response to this:

/triage resolved
/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.

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. triage/accepted Indicates an issue or PR is ready to be actively worked on. triage/resolved Indicates an issue has been resolved or doesn't need to be resolved.
Projects
None yet
Development

No branches or pull requests

5 participants