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

Add verify-cloudformation script #10130

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

rifelpet
Copy link
Member

This is an official AWS linter for cloudformation: https://github.com/aws-cloudformation/cfn-python-lint

It has already caught a few bugs in our cloudformation json generation logic. Examples:

E3002 Invalid Property Resources/AWSAutoScalingAutoScalingGroupnodesmixedinstancesexamplecom/Properties/MixedInstancesPolicy/InstancesDistribution/SpotInstancePool
//kops/tests/integration/update_cluster/mixed_instances_spot/cloudformation.json:321:13

E3031 CidrIp contains invalid characters (Pattern: x.x.x.x/y) at Resources/AWSEC2SecurityGroupIngresssshexternaltonode2001085a348/Properties/CidrIp
//kops/tests/integration/update_cluster/complex/cloudformation.json:833:9

I3011 The default action when replacing/removing a resource is to delete it. Set explicit values for UpdateReplacePolicy / DeletionPolicy on potentially stateful resource: Resources/AWSEC2Volumeustest1aetcdeventsprivateciliumexamplecom
//kops/tests/integration/update_cluster/privatecilium2/cloudformation.json:1227:5

It currently exits 0 while we add it to the presubmit jobs. Once we address the issues we'll update it to exit nonzero if there are regressions.

ref: #10015

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 28, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2020
This is an official AWS linter for cloudformation.
It has already caught a few bugs in our cloudformation json generation logic
@rifelpet
Copy link
Member Author

/test pull-kops-bazel-test

@hakman
Copy link
Member

hakman commented Oct 28, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2020
@hakman
Copy link
Member

hakman commented Oct 28, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 8ef754e into kubernetes:master Oct 28, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Oct 28, 2020
@rifelpet rifelpet deleted the verify-cloudformation branch October 29, 2020 02:03
k8s-ci-robot added a commit that referenced this pull request Oct 29, 2020
#10131-origin-release-1.19

Automated cherry pick of #10130: Add verify-cloudformation script #10131: Fix cloudformation lint errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants