-
Notifications
You must be signed in to change notification settings - Fork 24
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
1 parent
e7c3cec
commit 72b2887
Showing
7 changed files
with
104 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,8 @@ | ||
apiVersion: v1 | ||
name: rancher-aws-cluster-template | ||
description: RKE2 Cluster template for AWS | ||
version: 0.1.0 | ||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Amazon_Web_Services_Logo.svg/512px-Amazon_Web_Services_Logo.svg.png | ||
annotations: | ||
catalog.cattle.io/type: cluster-template | ||
catalog.cattle.io/namespace: fleet-default |
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,3 @@ | ||
# RKE2 Cluster template for AWS | ||
|
||
Helm chart that can be used as RKE2 cluster template in Rancher to provision clusters easily on AWS. |
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,12 @@ | ||
questions: | ||
- variable: cluster.name | ||
description: "Specify the name of the cluster" | ||
label: "Cluster Name" | ||
required: true | ||
type: string | ||
group: "General" | ||
- variable: cloudCredentialSecretName | ||
description: "CloudCredentialName for provisioning cluster" | ||
label: "CloudCredential Name" | ||
type: cloudcredential | ||
group: "General" |
43 changes: 43 additions & 0 deletions
43
charts/rancher-aws-cluster-template/templates/cluster.yaml
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,43 @@ | ||
{{- $clustername := .Values.cluster.name }} | ||
apiVersion: provisioning.cattle.io/v1 | ||
kind: Cluster | ||
metadata: | ||
{{- if .Values.cluster.labels }} | ||
labels: | ||
{{ toYaml .Values.cluster.labels | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.cluster.annotations }} | ||
annotations: | ||
{{ toYaml .Values.cluster.annotations | indent 4 }} | ||
{{- end }} | ||
name: {{ $clustername }} | ||
namespace: fleet-default | ||
spec: | ||
{{- if .Values.cloudCredentialSecretName }} | ||
cloudCredentialSecretName: {{ .Values.cloudCredentialSecretName }} | ||
{{- end }} | ||
kubernetesVersion: v1.21.9+rke2r1 | ||
rkeConfig: | ||
machinePools: | ||
- controlPlaneRole: true | ||
etcdRole: true | ||
workerRole: false | ||
quantity: 3 | ||
name: {{ $clustername }}-controlplane | ||
machineConfigRef: | ||
kind: Amazonec2Config | ||
name: {{ $clustername }}-controlplane | ||
paused: false | ||
displayName: {{ $clustername }}-controlplane | ||
- controlPlaneRole: false | ||
etcdRole: false | ||
workerRole: true | ||
quantity: 2 | ||
name: {{ $clustername }}-worker | ||
machineConfigRef: | ||
kind: Amazonec2Config | ||
name: {{ $clustername }}-worker | ||
paused: false | ||
displayName: {{ $clustername }}-worker | ||
controlPlaneConfig: | ||
cni: calico |
12 changes: 12 additions & 0 deletions
12
charts/rancher-aws-cluster-template/templates/nodeconfig-controlplane.yaml
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,12 @@ | ||
{{- $clustername := .Values.cluster.name }} | ||
apiVersion: rke-machine-config.cattle.io/v1 | ||
kind: Amazonec2Config | ||
metadata: | ||
name: {{ $clustername }}-controlplane | ||
namespace: fleet-default | ||
instanceType: t3a.medium | ||
region: eu-central-1 | ||
subnetId: subnet-0984ae232db1d4391 | ||
vpcId: vpc-0c7c6085a97724ca9 | ||
zone: a | ||
sshUser: ubuntu |
12 changes: 12 additions & 0 deletions
12
charts/rancher-aws-cluster-template/templates/nodeconfig-worker.yaml
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,12 @@ | ||
{{- $clustername := .Values.cluster.name }} | ||
apiVersion: rke-machine-config.cattle.io/v1 | ||
kind: Amazonec2Config | ||
metadata: | ||
name: {{ $clustername }}-worker | ||
namespace: fleet-default | ||
instanceType: t3a.large | ||
region: eu-central-1 | ||
subnetId: subnet-0984ae232db1d4391 | ||
vpcId: vpc-0c7c6085a97724ca9 | ||
zone: a | ||
sshUser: ubuntu |
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,14 @@ | ||
# cluster specific values | ||
cluster: | ||
# specify cluster name | ||
name: aws-cluster | ||
|
||
# specify cluster labels | ||
labels: {} | ||
|
||
# specify cluster annotations | ||
annotations: {} | ||
|
||
# specify cloud credential secret name, do not need to be provided if using custom driver | ||
cloudCredentialSecretName: "" | ||
|