Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to get kpt v1 YAML changes match kubernetes YAML format? #2342

Closed
taisph opened this issue Jun 25, 2021 · 1 comment · Fixed by #2376
Closed

How to get kpt v1 YAML changes match kubernetes YAML format? #2342

taisph opened this issue Jun 25, 2021 · 1 comment · Fixed by #2376
Assignees
Labels
area/hydrate question Further information is requested triaged Issue has been triaged by adding an `area/` label
Milestone

Comments

@taisph
Copy link

taisph commented Jun 25, 2021

With kpt v0, YAML list indentation follows kubernetes formatting like below:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  template:
    spec:
      containers:
      - name: test
        env:
        - name: foo
          value: "bar"

With kpt v1 (fn fix and apply-setters) all lists gets indented like below:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  template:
    spec:
      containers:
        - name: test
          env:
            - name: foo
              value: "bar"
@taisph taisph added the question Further information is requested label Jun 25, 2021
@droot droot added triaged Issue has been triaged by adding an `area/` label area/hydrate labels Jun 25, 2021
@phanimarupaka phanimarupaka added this to the v1.0.0-beta.2 milestone Jul 15, 2021
@phanimarupaka
Copy link
Contributor

@taisph This is due to upstream go-yaml's decision to have 2 space indent for lists. We have made changes in kpt in order to preserve the lists indentation of resources and will be included in beta.2 version of kpt.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/hydrate question Further information is requested triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants