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 kustomize edit keep yaml structure and comments #2310

Open
pwittrock opened this issue Mar 30, 2020 · 10 comments
Open

make kustomize edit keep yaml structure and comments #2310

pwittrock opened this issue Mar 30, 2020 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@pwittrock
Copy link
Contributor

kustomize edit drops kustomization.yaml structure and comments due to the serialization

Rebasing on to kyaml/yaml would address this.

Example:

Change this to read using the kyaml/yaml libraries:

@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 Jun 28, 2020
@bat79a
Copy link

bat79a commented Jul 27, 2020

I think that I have similar probleme where my bases value is removed.

Here is my original file :

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../base/
namespace: dev

patchesStrategicMerge:
- configmap-patch.yml

images:
- name: my_image
  newName: my_image
  newTag: 0.1.0

I edit the image tag with this command :

 kustomize edit set image my_image=my_image:2.0.0

Here is the final file who doesn't work, because the bases attribute replaced by the ressources attribute :

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: dev

patchesStrategicMerge:
- configmap-patch.yml

images:
- name: my_image
  newName: my_image
  newTag: 2.0.0
resources:
- ../../base/

@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 Aug 26, 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.

@jp19214
Copy link

jp19214 commented May 30, 2024

/reopen

@k8s-ci-robot
Copy link
Contributor

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

In response to this:

/reopen

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-sigs/prow repository.

@jp19214
Copy link

jp19214 commented May 30, 2024

I think it's valuable to to be able to keep comments when kustomize edit command is used, especially when the root kustomization.yaml file gets bigger. Please consider reopening this issue

@stormqueen1990
Copy link
Member

/reopen
/lifecycle frozen
/triage accepted
/kind bug

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/bug Categorizes issue or PR as related to a bug. labels Jul 11, 2024
@k8s-ci-robot k8s-ci-robot reopened this Jul 11, 2024
@k8s-ci-robot
Copy link
Contributor

@stormqueen1990: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen
/triage accepted
/kind bug

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-sigs/prow repository.

@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/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

6 participants