59b0b44593dc04eaab5d9210ddce6094e7a6547a
[osm/devops.git] /
1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
17
18 ---
19 apiVersion: eks.aws.upbound.io/v1beta1
20 kind: Cluster
21 metadata:
22   name: ${cluster_resource_name}-cluster
23   annotations:
24     crossplane.io/external-name: ${cluster_name}
25   labels:
26     provider: aws
27     cluster: ${cluster_resource_name}
28     type: cluster
29 spec:
30   forProvider:
31     region: ${cluster_location}
32     version: ${k8s_version}
33     roleArnSelector:
34       matchLabels:
35         provider: aws
36         cluster: ${cluster_resource_name}
37         type: cluster
38     vpcConfig:
39       - endpointPrivateAccess: true
40         endpointPublicAccess: true
41         subnetIdSelector:
42           matchLabels:
43             provider: aws
44             cluster: ${cluster_resource_name}
45             type: subnet
46             access: private
47   publishConnectionDetailsTo:
48     name: kubeconfig-${cluster_resource_name}
49   # Use in case you wanted to use different credentials (i.e., ProviderConfig different than default)
50   providerConfigRef:
51     name: ${providerconfig_name}
52
53 ---
54 apiVersion: eks.aws.upbound.io/v1beta1
55 kind: ClusterAuth
56 metadata:
57   name: ${cluster_resource_name}-clusterauth
58 spec:
59   forProvider:
60     region: ${cluster_location}
61     clusterName: ${cluster_name}
62   writeConnectionSecretToRef:
63     namespace: managed-resources
64     name: kubeconfig-${cluster_resource_name}
65   # Use in case you wanted to use different credentials (i.e., ProviderConfig different than default)
66   providerConfigRef:
67     name: ${providerconfig_name}