-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example for test, this change will be reverted after testing
Signed-off-by: Fatih Türken <[email protected]>
- Loading branch information
Showing
1 changed file
with
283 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,283 @@ | ||
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: eks.aws.upbound.io/v1beta2 | ||
kind: NodeGroup | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-eks-ng | ||
spec: | ||
forProvider: | ||
clusterNameRef: | ||
name: sample-eks-cluster | ||
nodeRoleArnRef: | ||
name: sample-node-role | ||
region: us-west-1 | ||
subnetIdRefs: | ||
- name: sample-subnet1 | ||
- name: sample-subnet2 | ||
initProvider: | ||
scalingConfig: | ||
desiredSize: 1 | ||
maxSize: 1 | ||
minSize: 1 | ||
|
||
|
||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-node-role | ||
spec: | ||
forProvider: | ||
assumeRolePolicy: | | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "ec2.amazonaws.com" | ||
}, | ||
"Action": "sts:AssumeRole" | ||
} | ||
] | ||
} | ||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: RolePolicyAttachment | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-node-policy | ||
spec: | ||
forProvider: | ||
policyArn: arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy | ||
roleRef: | ||
name: sample-node-role | ||
|
||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: RolePolicyAttachment | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-node-policy-2 | ||
spec: | ||
forProvider: | ||
policyArn: arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy | ||
roleRef: | ||
name: sample-node-role | ||
|
||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: RolePolicyAttachment | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-node-policy-3 | ||
spec: | ||
forProvider: | ||
policyArn: arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly | ||
roleRef: | ||
name: sample-node-role | ||
|
||
--- | ||
|
||
apiVersion: eks.aws.upbound.io/v1beta2 | ||
kind: Cluster | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
uptest.upbound.io/timeout: "2400" | ||
labels: | ||
testing.upbound.io/example-name: example | ||
name: sample-eks-cluster | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
roleArnRef: | ||
name: sample-eks-cluster | ||
vpcConfig: | ||
subnetIdRefs: | ||
- name: sample-subnet1 | ||
- name: sample-subnet2 | ||
|
||
--- | ||
|
||
apiVersion: eks.aws.upbound.io/v1beta1 | ||
kind: ClusterAuth | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta1/cluster | ||
name: auth | ||
spec: | ||
forProvider: | ||
clusterNameSelector: | ||
matchLabels: | ||
testing.upbound.io/example-name: example | ||
region: us-west-1 | ||
writeConnectionSecretToRef: | ||
name: cluster-conn | ||
namespace: upbound-system | ||
|
||
--- | ||
|
||
apiVersion: iam.aws.upbound.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-eks-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: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-cluster-policy | ||
spec: | ||
forProvider: | ||
policyArn: arn:aws:iam::aws:policy/AmazonEKSClusterPolicy | ||
roleRef: | ||
name: sample-eks-cluster | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-subnet1 | ||
spec: | ||
forProvider: | ||
availabilityZone: us-west-1b | ||
cidrBlock: 172.16.10.0/24 | ||
mapPublicIpOnLaunch: true | ||
region: us-west-1 | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-subnet2 | ||
spec: | ||
forProvider: | ||
availabilityZone: us-west-1a | ||
cidrBlock: 172.16.11.0/24 | ||
mapPublicIpOnLaunch: true | ||
region: us-west-1 | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: Subnet | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: private-subnet | ||
spec: | ||
forProvider: | ||
availabilityZone: us-west-1b | ||
cidrBlock: 172.16.12.0/24 | ||
region: us-west-1 | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: RouteTable | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: example | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
tags: | ||
Name: example | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: VPC | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: sample-vpc | ||
spec: | ||
forProvider: | ||
cidrBlock: 172.16.0.0/16 | ||
enableDnsHostnames: true | ||
region: us-west-1 | ||
tags: | ||
Name: DemoVpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: InternetGateway | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: example | ||
spec: | ||
forProvider: | ||
region: us-west-1 | ||
vpcIdRef: | ||
name: sample-vpc | ||
|
||
--- | ||
|
||
apiVersion: ec2.aws.upbound.io/v1beta1 | ||
kind: DefaultRouteTable | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: eks/v1beta2/nodegroup | ||
name: example | ||
spec: | ||
forProvider: | ||
defaultRouteTableIdRef: | ||
name: sample-vpc | ||
region: us-west-1 | ||
route: | ||
- cidrBlock: 0.0.0.0/0 | ||
gatewayIdRef: | ||
name: example |