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

[Backport release-1.3] pin aws-sdk-go-v2 dependency versions for ClusterAuth presign breaking change #1257

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions examples/eks/v1beta1/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ spec:

---

apiVersion: eks.aws.upbound.io/v1beta1
kind: ClusterAuth
metadata:
name: auth
annotations:
meta.upbound.io/example-id: eks/v1beta1/cluster
spec:
forProvider:
region: us-west-1
clusterNameSelector:
matchLabels:
testing.upbound.io/example-name: example
writeConnectionSecretToRef:
name: cluster-conn
namespace: upbound-system

---

apiVersion: iam.aws.upbound.io/v1beta1
kind: Role
metadata:
Expand Down
210 changes: 210 additions & 0 deletions examples/eks/v1beta1/clusterauth.yaml
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
18 changes: 18 additions & 0 deletions examples/eks/v1beta1/testhooks/check-clusterauth.sh
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

7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,10 @@ replace golang.org/x/exp => golang.org/x/exp v0.0.0-20231006140011-7918f672742d
replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraform-provider-aws v0.0.0-20240328111213-f2f0fdd63866

replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb

// pin versions for https://github.com/crossplane-contrib/provider-upjet-aws/issues/1248
replace (
github.com/aws/aws-sdk-go-v2 v1.24.1 => github.com/aws/aws-sdk-go-v2 v1.24.0
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 => github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/aws/aws-sdk-go v1.49.2 h1:+4BEcm1nPCoDbVd+gg8cdxpa1qJfrvnddy12vpEVWjw=
github.com/aws/aws-sdk-go v1.49.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU=
github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo=
github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o=
Expand All @@ -40,10 +40,10 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6Jk
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw=
Expand Down
Loading