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

Broken aws-k8s-cni.yaml in 1.7? #1268

Closed
therc opened this issue Oct 21, 2020 · 4 comments
Closed

Broken aws-k8s-cni.yaml in 1.7? #1268

therc opened this issue Oct 21, 2020 · 4 comments
Labels

Comments

@therc
Copy link

therc commented Oct 21, 2020

Compare

https://github.com/aws/amazon-vpc-cni-k8s/blob/master/config/v1.7/aws-k8s-cni.yaml#L243

with

https://github.com/aws/amazon-vpc-cni-k8s/blob/master/config/v1.6/aws-k8s-cni.yaml#L30

The new file seems to be truncated. Plus, it's in a different order and fields are all quoted strings, so a diff becomes a lot noisier.

@therc therc added the bug label Oct 21, 2020
@jayanthvn
Copy link
Contributor

Hi @therc

We validated the 1.7 yaml and it is not broken. Please let us know if you are having any issues applying the yaml. 1.7 onwards we auto generate the config files please refer to #986 hence the order will be bit different. Three dots indicates the end of a block at L243.

Thank you!

@therc
Copy link
Author

therc commented Oct 21, 2020

Hi @jayanthvn
I was not aware of the three dot syntax, you always learn something new... We had made custom tweaks to the YAML file, hence my attempts to run a textual diff. I guess the 1.6->1.7 jump will be disruptive, but after that changes will be incremental only.

Thanks for the details, I'll close for now.

@therc therc closed this as completed Oct 21, 2020
@therc
Copy link
Author

therc commented Oct 21, 2020

For anyone in the same boat, you can use this script to convert both 1.6-style and 1.7-style YAML to a format that's easier to diff:

import sys
import yaml

def rewrite(x):
  i = open(x, "r")
  y = yaml.load_all(i)
  with open(x+".new", "w") as o:
    yaml.dump_all(y, o)
  i.close()

for x in sys.argv[1:]:
  rewrite(x)

You might have to sort the objects in the 1.6 document by the "kind" field, e.g. with ServiceAccount last.

@jayanthvn
Copy link
Contributor

Thanks for checking @therc :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants