-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1251 from crossplane-contrib/fix-clusterauth-wron…
…g-signature pin aws-sdk-go-v2 dependency versions for ClusterAuth presign breaking change
- Loading branch information
Showing
5 changed files
with
241 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
|
||
apiVersion: eks.aws.upbound.io/v1beta1 | ||
kind: ClusterAuth | ||
metadata: | ||
name: auth | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
uptest.upbound.io/post-assert-hook: testhooks/check-clusterauth.sh | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
clusterNameSelector: | ||
matchLabels: | ||
testing.upbound.io/example-name: example-clusterauth | ||
writeConnectionSecretToRef: | ||
name: sample-eks-cluster-conn | ||
namespace: upbound-system | ||
|
||
--- | ||
|
||
apiVersion: eks.aws.upbound.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
uptest.upbound.io/timeout: "2400" | ||
name: sample-eks-cluster | ||
labels: | ||
testing.upbound.io/example-name: example-clusterauth | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
roleArnRef: | ||
name: sample-eks-cluster | ||
vpcConfig: | ||
- subnetIdRefs: | ||
- name: sample-subnet1 | ||
- name: sample-subnet2 | ||
|
||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
name: sample-eks-cluster | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
assumeRolePolicy: | | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "eks.amazonaws.com" | ||
}, | ||
"Action": "sts:AssumeRole" | ||
} | ||
] | ||
} | ||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: RolePolicyAttachment | ||
metadata: | ||
name: sample-cluster-policy | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
policyArn: arn:aws:iam::aws:policy/AmazonEKSClusterPolicy | ||
roleRef: | ||
name: sample-eks-cluster | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
name: sample-subnet1 | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
mapPublicIpOnLaunch: true | ||
availabilityZone: us-west-1b | ||
vpcIdRef: | ||
name: sample-vpc | ||
cidrBlock: 172.16.10.0/24 | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
name: sample-subnet2 | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
mapPublicIpOnLaunch: true | ||
availabilityZone: us-west-1a | ||
vpcIdRef: | ||
name: sample-vpc | ||
cidrBlock: 172.16.11.0/24 | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
name: private-subnet | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
availabilityZone: us-west-1b | ||
vpcIdRef: | ||
name: sample-vpc | ||
cidrBlock: 172.16.12.0/24 | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: RouteTable | ||
metadata: | ||
name: example | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
tags: | ||
Name: example | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: RouteTableAssociation | ||
metadata: | ||
name: example | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
routeTableIdRef: | ||
name: example | ||
subnetIdRef: | ||
name: private-subnet | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: VPC | ||
metadata: | ||
name: sample-vpc | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
enableDnsHostnames: true | ||
region: us-west-1 | ||
cidrBlock: 172.16.0.0/16 | ||
tags: | ||
Name: DemoVpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: InternetGateway | ||
metadata: | ||
name: example | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: DefaultRouteTable | ||
metadata: | ||
name: example | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
spec: | ||
forProvider: | ||
defaultRouteTableIdRef: | ||
name: sample-vpc | ||
region: us-west-1 | ||
route: | ||
- gatewayIdRef: | ||
name: example | ||
cidrBlock: 0.0.0.0/0 |
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,18 @@ | ||
#!/usr/bin/env bash | ||
set -aeuo pipefail | ||
|
||
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
echo "obtain kubeconfig from ClusterAuth connection secret" | ||
${KUBECTL} -n upbound-system get secret sample-eks-cluster-conn -o go-template='{{ .data.kubeconfig | base64decode }}' > /tmp/sampleclusterkube | ||
echo "checking kubectl version" | ||
${KUBECTL} --kubeconfig /tmp/sampleclusterkube version | ||
echo "checking cluster-info" | ||
${KUBECTL} --kubeconfig /tmp/sampleclusterkube cluster-info | ||
echo "listing nodes" | ||
${KUBECTL} --kubeconfig /tmp/sampleclusterkube get nodes | ||
echo "listing pods" | ||
${KUBECTL} --kubeconfig /tmp/sampleclusterkube get pods | ||
|
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