-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
248 changed files
with
22,967 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2020 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
. "$(dirname "${BASH_SOURCE[0]}")/common.sh" | ||
|
||
# integration test cluster directories that are terraform 0.12 compatible | ||
CLUSTERS_0_12=( | ||
"minimal-json" | ||
) | ||
|
||
# Terraform versions | ||
TAG_0_12=0.12.23 | ||
TAG_0_11=0.11.14 | ||
|
||
RC=0 | ||
while IFS= read -r -d '' -u 3 test_dir; do | ||
[ -f "${test_dir}/kubernetes.tf" ] || [ -f "${test_dir}/kubernetes.tf.json" ] || continue | ||
echo -e "${test_dir}\n" | ||
cluster=$(basename "${test_dir}") | ||
kube::util::array_contains "${cluster}" "${CLUSTERS_0_12[@]}" && tag=$TAG_0_12 || tag=$TAG_0_11 | ||
|
||
docker run --rm -it -v "${test_dir}":"${test_dir}" -w "${test_dir}" --entrypoint=sh hashicorp/terraform:$tag -c '/bin/terraform init >/dev/null && /bin/terraform validate' || RC=$? | ||
done 3< <(find "${KOPS_ROOT}/tests/integration/update_cluster" -type d -maxdepth 1 -print0) | ||
|
||
if [ $RC != 0 ]; then | ||
echo -e "\nTerraform validation failed\n" | ||
# TODO(rifelpet): make this script blocking in PRs by exiting non-zero on failure | ||
# exit $RC | ||
exit 0 | ||
else | ||
echo -e "\nTerraform validation succeeded\n" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...pdate_cluster/additional_cidr/data/aws_iam_role_masters.additionalcidr.example.com_policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { "Service": "ec2.amazonaws.com"}, | ||
"Action": "sts:AssumeRole" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
.../update_cluster/additional_cidr/data/aws_iam_role_nodes.additionalcidr.example.com_policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { "Service": "ec2.amazonaws.com"}, | ||
"Action": "sts:AssumeRole" | ||
} | ||
] | ||
} |
102 changes: 102 additions & 0 deletions
102
...luster/additional_cidr/data/aws_iam_role_policy_masters.additionalcidr.example.com_policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:*" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"autoscaling:DescribeAutoScalingGroups", | ||
"autoscaling:DescribeAutoScalingInstances", | ||
"autoscaling:DescribeLaunchConfigurations", | ||
"autoscaling:DescribeTags", | ||
"autoscaling:SetDesiredCapacity", | ||
"autoscaling:TerminateInstanceInAutoScalingGroup", | ||
"autoscaling:UpdateAutoScalingGroup", | ||
"ec2:DescribeLaunchTemplateVersions" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"elasticloadbalancing:*" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:ListServerCertificates", | ||
"iam:GetServerCertificate" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ChangeResourceRecordSets", | ||
"route53:ListResourceRecordSets", | ||
"route53:GetHostedZone" | ||
], | ||
"Resource": [ | ||
"arn:aws:route53:::hostedzone/Z1AFAKE1ZON3YO" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:GetChange" | ||
], | ||
"Resource": [ | ||
"arn:aws:route53:::change/*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ListHostedZones" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ListHostedZones" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ecr:GetAuthorizationToken", | ||
"ecr:BatchCheckLayerAvailability", | ||
"ecr:GetDownloadUrlForLayer", | ||
"ecr:GetRepositoryPolicy", | ||
"ecr:DescribeRepositories", | ||
"ecr:ListImages", | ||
"ecr:BatchGetImage" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} |
68 changes: 68 additions & 0 deletions
68
..._cluster/additional_cidr/data/aws_iam_role_policy_nodes.additionalcidr.example.com_policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:DescribeInstances", | ||
"ec2:DescribeRegions" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ChangeResourceRecordSets", | ||
"route53:ListResourceRecordSets", | ||
"route53:GetHostedZone" | ||
], | ||
"Resource": [ | ||
"arn:aws:route53:::hostedzone/Z1AFAKE1ZON3YO" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:GetChange" | ||
], | ||
"Resource": [ | ||
"arn:aws:route53:::change/*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ListHostedZones" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ListHostedZones" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ecr:GetAuthorizationToken", | ||
"ecr:BatchCheckLayerAvailability", | ||
"ecr:GetDownloadUrlForLayer", | ||
"ecr:GetRepositoryPolicy", | ||
"ecr:DescribeRepositories", | ||
"ecr:ListImages", | ||
"ecr:BatchGetImage" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...ey_pair_kubernetes.additionalcidr.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCtWu40XQo8dczLsCq0OWV+hxm9uV3WxeH9Kgh4sMzQxNtoU1pvW0XdjpkBesRKGoolfWeCLXWxpyQb1IaiMkKoz7MdhQ/6UKjMjP66aFWWp3pwD0uj0HuJ7tq4gKHKRYGTaZIRWpzUiANBrjugVgA+Sd7E/mYwc/DMXkIyRZbvhQ== |
Oops, something went wrong.