Skip to content

Commit

Permalink
add aws chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bashofmann committed Feb 21, 2022
1 parent e7c3cec commit 72b2887
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/rancher-aws-cluster-template/Chart.yaml
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
3 changes: 3 additions & 0 deletions charts/rancher-aws-cluster-template/README.md
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.
12 changes: 12 additions & 0 deletions charts/rancher-aws-cluster-template/questions.yaml
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 charts/rancher-aws-cluster-template/templates/cluster.yaml
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
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
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
14 changes: 14 additions & 0 deletions charts/rancher-aws-cluster-template/values.yaml
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: ""

0 comments on commit 72b2887

Please sign in to comment.