├── charts ├── templates │ ├── _helpers.tpl │ ├── clusterroletemplatebinding.yaml │ ├── nodeconfig-harvester.yaml │ ├── nodeconfig-do.yaml │ ├── managedcharts.yaml │ ├── nodeconfig-azure.yaml │ ├── nodeconfig-vsphere.yaml │ ├── nodeconfig-aws.yaml │ └── cluster.yaml ├── Chart.yaml ├── README.md ├── values.yaml ├── values-harvester.yaml ├── values-do.yaml ├── values-azure.yaml ├── values-aws.yaml ├── values-vsphere.yaml └── questions.yaml ├── cluster-template-0.0.1.tgz ├── .gitignore ├── index.yaml ├── README.md └── LICENSE /charts/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cluster-template-0.0.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rancher/cluster-template-examples/HEAD/cluster-template-0.0.1.tgz -------------------------------------------------------------------------------- /charts/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: cluster-template 3 | description: Cluster template for rke2 4 | version: 0.0.1 5 | annotations: 6 | catalog.cattle.io/type: cluster-template 7 | catalog.cattle.io/namespace: fleet-default 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /index.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | entries: 3 | cluster-template: 4 | - annotations: 5 | catalog.cattle.io/namespace: fleet-default 6 | catalog.cattle.io/type: cluster-template 7 | apiVersion: v1 8 | created: "2022-02-25T15:54:51.604663-08:00" 9 | description: Cluster template for rke2 10 | digest: d372363c814ac79e7d1f4b877e9b47ec39eaf3fde5a70137a0074dfa70e3dd2c 11 | name: cluster-template 12 | urls: 13 | - cluster-template-0.0.1.tgz 14 | version: 0.0.1 15 | generated: "2022-02-25T15:54:51.600996-08:00" 16 | -------------------------------------------------------------------------------- /charts/README.md: -------------------------------------------------------------------------------- 1 | # rke2 cluster template 2 | 3 | Helm chart that can be used as rke2 cluster template 4 | 5 | ### how to use 6 | 7 | ```bash 8 | helm install --namespace fleet-default --value ./your-values.yaml my-cluster ./charts 9 | ``` 10 | 11 | General cluster options are available through [values.yaml](./values.yaml) 12 | 13 | For different cloud provider drivers: 14 | 15 | [Amazonec2](./values-aws.yaml) 16 | 17 | [Vsphere](./values-vsphere.yaml) 18 | 19 | [Digitalocean](./values-do.yaml) 20 | 21 | [Harvester](./values-harvester.yaml) 22 | 23 | [Azure](./values-azure.yaml) 24 | -------------------------------------------------------------------------------- /charts/templates/clusterroletemplatebinding.yaml: -------------------------------------------------------------------------------- 1 | {{ $root := . }} 2 | {{- range $index, $member := .Values.clusterMembers }} 3 | apiVersion: management.cattle.io/v3 4 | clusterName: c-m-{{ trunc 8 (sha256sum (printf "%s/%s" $root.Release.Namespace $root.Values.cluster.name)) }} 5 | kind: ClusterRoleTemplateBinding 6 | metadata: 7 | name: ctrb-{{ trunc 8 (sha256sum (printf "%s/%s" $root.Release.Namespace $member.principalName )) }} 8 | namespace: c-m-{{ trunc 8 (sha256sum (printf "%s/%s" $root.Release.Namespace $root.Values.cluster.name)) }} 9 | roleTemplateName: {{ $member.roleTemplateName }} 10 | userPrincipalName: {{ $member.principalName }} 11 | {{- end }} -------------------------------------------------------------------------------- /charts/values.yaml: -------------------------------------------------------------------------------- 1 | # cluster specific values 2 | cluster: 3 | # specify cluster name 4 | name: template-rke2 5 | 6 | # specify cluster labels 7 | labels: {} 8 | 9 | # specify cluster annotations 10 | annotations: {} 11 | 12 | # specify cloud credential secret name, do not need to be provided if using custom driver 13 | cloudCredentialSecretName: "" 14 | 15 | # specify cloud provider, options are amazonec2, digitalocean, azure, vsphere or custom 16 | cloudprovider: "digitalocean" 17 | 18 | kubernetesVersion: "" 19 | 20 | # enable local auth endpoint 21 | localClusterAuthEndpoint: 22 | enabled: false 23 | # specify fqdn of local access endpoint 24 | # fqdn: foo.bar.example 25 | # specify cacert of local access endpoint 26 | # caCerts: "" 27 | 28 | # specify user principal ids to be assiged as cluster members 29 | # clusterMembers: 30 | # - principalName: "local://u-z8zl5" 31 | # roleTemplateName: "cluster-member" 32 | 33 | # enable monitoring 34 | monitoring: 35 | enabled: false 36 | # specify which version to install, can be semver range. If version is empty or is semver range, it will pick up the latest version. 37 | # version: "" 38 | # specify cutsom values set 39 | # values: 40 | # foo: bar 41 | -------------------------------------------------------------------------------- /charts/templates/nodeconfig-harvester.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.cloudprovider "harvester" }} 2 | {{- range $index, $nodepool := .Values.nodepools }} 3 | apiVersion: rke-machine-config.cattle.io/v1 4 | kind: HarvesterConfig 5 | metadata: 6 | name: {{ $nodepool.name }} 7 | namespace: fleet-default 8 | diskSize: {{ $nodepool.diskSize | quote }} 9 | diskBus: {{ $nodepool.diskBus }} 10 | cpuCount: {{ $nodepool.cpuCount | quote }} 11 | memorySize: {{ $nodepool.memorySize | quote }} 12 | networkName: {{ $nodepool.networkName }} 13 | imageName: {{ $nodepool.imageName }} 14 | vmNamespace: {{ $nodepool.vmNamespace }} 15 | sshUser: {{ $nodepool.sshUser }} 16 | --- 17 | {{- end }} 18 | {{ $nodepool := .Values.nodepool }} 19 | {{- if $nodepool }} 20 | apiVersion: rke-machine-config.cattle.io/v1 21 | kind: HarvesterConfig 22 | metadata: 23 | name: {{ $nodepool.name }} 24 | namespace: fleet-default 25 | diskSize: {{ $nodepool.diskSize | quote }} 26 | diskBus: {{ $nodepool.diskBus }} 27 | cpuCount: {{ $nodepool.cpuCount | quote }} 28 | memorySize: {{ $nodepool.memorySize | quote }} 29 | networkName: {{ $nodepool.networkName }} 30 | imageName: {{ $nodepool.imageName }} 31 | vmNamespace: {{ $nodepool.vmNamespace }} 32 | sshUser: {{ $nodepool.sshUser }} 33 | {{- end }} 34 | {{- end }} 35 | -------------------------------------------------------------------------------- /charts/templates/nodeconfig-do.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.cloudprovider "digitalocean" }} 2 | {{- range $index, $nodepool := .Values.nodepools }} 3 | apiVersion: rke-machine-config.cattle.io/v1 4 | kind: DigitaloceanConfig 5 | metadata: 6 | name: {{ $nodepool.name }} 7 | namespace: fleet-default 8 | backups: {{ $nodepool.backups }} 9 | image: {{ $nodepool.image }} 10 | ipv6: {{ $nodepool.ipv6 }} 11 | monitoring: {{ $nodepool.monitoring }} 12 | privateNetworking: {{ $nodepool.privateNetworking }} 13 | region: {{ $nodepool.region }} 14 | size: {{ $nodepool.size }} 15 | sshKeyContents: {{ $nodepool.sshKeyContents }} 16 | sshKeyFingerprint: {{ $nodepool.sshKeyFingerprint }} 17 | sshPort: {{ $nodepool.sshPort | quote }} 18 | sshUser: {{ $nodepool.sshUser }} 19 | tags: {{ $nodepool.tags }} 20 | userdata: {{ $nodepool.userdata }} 21 | --- 22 | {{- end }} 23 | {{ $nodepool := .Values.nodepool }} 24 | {{- if $nodepool }} 25 | apiVersion: rke-machine-config.cattle.io/v1 26 | kind: DigitaloceanConfig 27 | metadata: 28 | name: {{ $nodepool.name }} 29 | namespace: fleet-default 30 | backups: {{ $nodepool.backups }} 31 | image: {{ $nodepool.image }} 32 | ipv6: {{ $nodepool.ipv6 }} 33 | monitoring: {{ $nodepool.monitoring }} 34 | privateNetworking: {{ $nodepool.privateNetworking }} 35 | region: {{ $nodepool.region }} 36 | size: {{ $nodepool.size }} 37 | sshKeyContents: {{ $nodepool.sshKeyContents }} 38 | sshKeyFingerprint: {{ $nodepool.sshKeyFingerprint }} 39 | sshPort: {{ $nodepool.sshPort | quote }} 40 | sshUser: {{ $nodepool.sshUser }} 41 | tags: {{ $nodepool.tags }} 42 | userdata: {{ $nodepool.userdata }} 43 | {{- end }} 44 | {{- end }} 45 | -------------------------------------------------------------------------------- /charts/templates/managedcharts.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.monitoring.enabled }} 2 | apiVersion: management.cattle.io/v3 3 | kind: ManagedChart 4 | metadata: 5 | name: monitoring-crd-{{ .Values.cluster.name }} 6 | namespace: fleet-default 7 | spec: 8 | chart: "rancher-monitoring-crd" 9 | repoName: "rancher-charts" 10 | releaseName: "rancher-monitoring-crd" 11 | version: {{ .Values.monitoring.version }} 12 | {{- if .Values.monitoring.values }} 13 | values: 14 | {{ toYaml .Values.monitoring.values | indent 4 }} 15 | {{- end }} 16 | defaultNamespace: "cattle-monitoring-system" 17 | targets: 18 | - clusterName: {{ .Values.cluster.name }} 19 | --- 20 | apiVersion: management.cattle.io/v3 21 | kind: ManagedChart 22 | metadata: 23 | name: monitoring-{{ .Values.cluster.name }} 24 | namespace: fleet-default 25 | spec: 26 | chart: "rancher-monitoring" 27 | repoName: "rancher-charts" 28 | releaseName: "rancher-monitoring" 29 | version: {{ .Values.monitoring.version }} 30 | {{- if .Values.monitoring.values }} 31 | values: 32 | {{ toYaml .Values.monitoring.values | indent 4 }} 33 | {{- end }} 34 | diff: 35 | comparePatches: 36 | - apiVersion: admissionregistration.k8s.io/v1beta1 37 | kind: MutatingWebhookConfiguration 38 | name: rancher-monitoring-admission 39 | jsonPointers: 40 | - /webhooks/0/failurePolicy 41 | - apiVersion: admissionregistration.k8s.io/v1beta1 42 | kind: ValidatingWebhookConfiguration 43 | name: rancher-monitoring-admission 44 | jsonPointers: 45 | - /webhooks/0/failurePolicy 46 | defaultNamespace: "cattle-monitoring-system" 47 | targets: 48 | - clusterName: {{ .Values.cluster.name }} 49 | --- 50 | {{- end }} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RKE2 cluster template 2 | 3 | This project contains rke2 cluster template helm chart, which can be applied with values.yaml as configurations to create clusters. 4 | 5 | ### Adding the Helm Chart via CLI 6 | 7 | ```bash 8 | helm repo add cluster-templates https://raw.githubusercontent.com/rancher/cluster-template-examples/main 9 | helm repo update 10 | ``` 11 | 12 | ### Adding the Helm Chart via Rancher Manager 13 | 14 | 1. Authenticate into the Rancher Manager UI. 15 | 2. Open `local` cluster in **Cluster Explorer**. 16 | 3. In the left sidebar, go to **Apps -> Charts -> Repositories**. 17 | 4. Click **Create** and provide the following details: 18 | 19 | ``` 20 | Name: cluster-templates 21 | Target: Git Repository containing Helm chart definitions 22 | Git Repo URL: https://github.com/rancher/cluster-template-examples 23 | Authentication: None 24 | ``` 25 | 26 | ### How to use 27 | 28 | The general cluster configuration options are available through [values.yaml](./charts/values.yaml). 29 | 30 | To provide your own configuration, modify the original values.yaml and create your own version, and pass it to helm. For example: 31 | 32 | ```bash 33 | helm install --namespace fleet-default --values ./charts/your-own-values.yaml do-cluster ./charts 34 | ``` 35 | 36 | For different cloud provider options on nodepools, checkout 37 | 38 | [Amazonec2](./charts/values-aws.yaml) 39 | 40 | [DigitalOcean](./charts/values-do.yaml) 41 | 42 | [Harvester](./charts/values-harvester.yaml) 43 | 44 | [Vsphere](./charts/values-vsphere.yaml) 45 | 46 | [Azure](./charts/values-azure.yaml) 47 | 48 | ### Version control 49 | 50 | The version control is implemented as helm release history and can easily be implemented by UI to provide operation history and rollback. 51 | 52 | # License 53 | 54 | Copyright (c) 2014-2021 [Rancher Labs, Inc.](http://rancher.com) 55 | 56 | Licensed under the Apache License, Version 2.0 (the "License"); 57 | you may not use this file except in compliance with the License. 58 | You may obtain a copy of the License at 59 | 60 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) 61 | 62 | Unless required by applicable law or agreed to in writing, software 63 | distributed under the License is distributed on an "AS IS" BASIS, 64 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 65 | See the License for the specific language governing permissions and 66 | limitations under the License. 67 | -------------------------------------------------------------------------------- /charts/values-harvester.yaml: -------------------------------------------------------------------------------- 1 | cloudprovider: harvester 2 | 3 | cloudCredentialSecretName: harvester 4 | 5 | # Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. 6 | nodepools: 7 | - etcd: true 8 | controlplane: true 9 | worker: true 10 | 11 | # specify node labels 12 | labels: {} 13 | 14 | # specify node taints 15 | taints: {} 16 | 17 | # specify nodepool size 18 | quantity: 1 19 | 20 | 21 | # Pause node pool 22 | # paused: false 23 | 24 | # specify displayName 25 | # displayName: "" 26 | 27 | # specify rolling update mechanism 28 | # rollingUpdate: 29 | # The maximum number of machines that can be unavailable during the update. 30 | # Value can be an absolute number (ex: 5) or a percentage of desired 31 | # machines (ex: 10%). 32 | # Absolute number is calculated from percentage by rounding down. 33 | # This can not be 0 if MaxSurge is 0. 34 | # Defaults to 0. 35 | # Example: when this is set to 30%, the old MachineSet can be scaled 36 | # down to 70% of desired machines immediately when the rolling update 37 | # starts. Once new machines are ready, old MachineSet can be scaled 38 | # down further, followed by scaling up the new MachineSet, ensuring 39 | # that the total number of machines available at all times 40 | # during the update is at least 70% of desired machines. 41 | # maxUnavailable: "5" 42 | # The maximum number of machines that can be scheduled above the 43 | # desired number of machines. 44 | # Value can be an absolute number (ex: 5) or a percentage of 45 | # desired machines (ex: 10%). 46 | # This can not be 0 if MaxUnavailable is 0. 47 | # Absolute number is calculated from percentage by rounding up. 48 | # Defaults to 1. 49 | # Example: when this is set to 30%, the new MachineSet can be scaled 50 | # up immediately when the rolling update starts, such that the total 51 | # number of old and new machines do not exceed 130% of desired 52 | # machines. Once old machines have been killed, new MachineSet can 53 | # be scaled up further, ensuring that total number of machines running 54 | # at any time during the update is at most 130% of desired machines. 55 | # maxSurge: "1" 56 | 57 | # specify machineDeployment Labels 58 | # machineDeploymentLabels: {} 59 | 60 | # specify machineDeployment annotations 61 | # machineDeploymentAnnotations: {} 62 | 63 | name: harvester-nodepool-1 64 | diskSize: 40 65 | diskBus: virtio 66 | cpuCount: 4 67 | memorySize: 8 68 | networkName: default/network-name-1 69 | imageName: default/image-rand 70 | vmNamespace: default 71 | sshUser: ubuntu 72 | -------------------------------------------------------------------------------- /charts/templates/nodeconfig-azure.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.cloudprovider "azure" }} 2 | {{- range $index, $nodepool := .Values.nodepools }} 3 | apiVersion: rke-machine-config.cattle.io/v1 4 | kind: AzureConfig 5 | metadata: 6 | name: {{ $nodepool.name }} 7 | namespace: fleet-default 8 | availabilitySet: {{ $nodepool.availabilitySet }} 9 | clientId: {{ $nodepool.clientId }} 10 | customData: {{ $nodepool.customData }} 11 | diskSize: {{ $nodepool.diskSize }} 12 | dns: {{ $nodepool.dns }} 13 | environment: {{ $nodepool.environment }} 14 | faultDomainCount: {{ $nodepool.faultDomainCount }} 15 | image: {{ $nodepool.image }} 16 | location: {{ $nodepool.location }} 17 | managedDisks: {{ $nodepool.managedDisks }} 18 | noPublicIp: {{ $nodepool.noPublicIp }} 19 | {{- if $nodepool.openPort}} 20 | openPort: 21 | {{- range $i, $port := $nodepool.openPort }} 22 | - {{ $port }} 23 | {{- end }} 24 | {{- end }} 25 | privateIpAddress: {{ $nodepool.privateIpAddress }} 26 | resourceGroup: {{ $nodepool.resourceGroup }} 27 | size: {{ $nodepool.size }} 28 | sshUser: {{ $nodepool.sshUser }} 29 | staticPublicIp: {{ $nodepool.staticPublicIp }} 30 | storageType: {{ $nodepool.storageType }} 31 | subnet: {{ $nodepool.subnet }} 32 | subnetPrefix: {{ $nodepool.subnetPrefix }} 33 | subscriptionId: {{ $nodepool.subscriptionId }} 34 | updateDomainCount: {{ $nodepool.updateDomainCount }} 35 | usePrivateIp: {{ $nodepool.usePrivateIp }} 36 | vnet: {{ $nodepool.vnet }} 37 | --- 38 | {{- end }} 39 | {{ $nodepool := .Values.nodepool }} 40 | {{- if $nodepool }} 41 | apiVersion: rke-machine-config.cattle.io/v1 42 | kind: AzureConfig 43 | metadata: 44 | name: {{ $nodepool.name }} 45 | namespace: fleet-default 46 | availabilitySet: {{ $nodepool.availabilitySet }} 47 | clientId: {{ $nodepool.clientId }} 48 | customData: {{ $nodepool.customData }} 49 | diskSize: {{ $nodepool.diskSize }} 50 | dns: {{ $nodepool.dns }} 51 | environment: {{ $nodepool.environment }} 52 | faultDomainCount: {{ $nodepool.faultDomainCount }} 53 | image: {{ $nodepool.image }} 54 | location: {{ $nodepool.location }} 55 | managedDisks: {{ $nodepool.managedDisks }} 56 | noPublicIp: {{ $nodepool.noPublicIp }} 57 | {{- if $nodepool.openPort}} 58 | openPort: 59 | {{- range $i, $port := $nodepool.openPort }} 60 | - {{ $port }} 61 | {{- end }} 62 | {{- end }} 63 | privateIpAddress: {{ $nodepool.privateIpAddress }} 64 | resourceGroup: {{ $nodepool.resourceGroup }} 65 | size: {{ $nodepool.size }} 66 | sshUser: {{ $nodepool.sshUser }} 67 | staticPublicIp: {{ $nodepool.staticPublicIp }} 68 | storageType: {{ $nodepool.storageType }} 69 | subnet: {{ $nodepool.subnet }} 70 | subnetPrefix: {{ $nodepool.subnetPrefix }} 71 | subscriptionId: {{ $nodepool.subscriptionId }} 72 | updateDomainCount: {{ $nodepool.updateDomainCount }} 73 | usePrivateIp: {{ $nodepool.usePrivateIp }} 74 | vnet: {{ $nodepool.vnet }} 75 | {{- end }} 76 | {{- end }} 77 | 78 | -------------------------------------------------------------------------------- /charts/values-do.yaml: -------------------------------------------------------------------------------- 1 | cloudprovider: digitalocean 2 | 3 | cloudCredentialSecretName: digitalocean 4 | 5 | # Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. 6 | nodepools: 7 | - etcd: true 8 | controlplane: true 9 | worker: true 10 | 11 | # specify node labels 12 | labels: {} 13 | 14 | # specify node taints 15 | taints: {} 16 | 17 | # specify nodepool size 18 | quantity: 1 19 | 20 | # Pause node pool 21 | # paused: false 22 | 23 | # specify displayName 24 | # displayName: "" 25 | 26 | # specify rolling update mechanism 27 | # rollingUpdate: 28 | # The maximum number of machines that can be unavailable during the update. 29 | # Value can be an absolute number (ex: 5) or a percentage of desired 30 | # machines (ex: 10%). 31 | # Absolute number is calculated from percentage by rounding down. 32 | # This can not be 0 if MaxSurge is 0. 33 | # Defaults to 0. 34 | # Example: when this is set to 30%, the old MachineSet can be scaled 35 | # down to 70% of desired machines immediately when the rolling update 36 | # starts. Once new machines are ready, old MachineSet can be scaled 37 | # down further, followed by scaling up the new MachineSet, ensuring 38 | # that the total number of machines available at all times 39 | # during the update is at least 70% of desired machines. 40 | # maxUnavailable: "5" 41 | # The maximum number of machines that can be scheduled above the 42 | # desired number of machines. 43 | # Value can be an absolute number (ex: 5) or a percentage of 44 | # desired machines (ex: 10%). 45 | # This can not be 0 if MaxUnavailable is 0. 46 | # Absolute number is calculated from percentage by rounding up. 47 | # Defaults to 1. 48 | # Example: when this is set to 30%, the new MachineSet can be scaled 49 | # up immediately when the rolling update starts, such that the total 50 | # number of old and new machines do not exceed 130% of desired 51 | # machines. Once old machines have been killed, new MachineSet can 52 | # be scaled up further, ensuring that total number of machines running 53 | # at any time during the update is at most 130% of desired machines. 54 | # maxSurge: "1" 55 | 56 | # specify machineDeployment Labels 57 | # machineDeploymentLabels: {} 58 | 59 | # specify machineDeployment annotations 60 | # machineDeploymentAnnotations: {} 61 | 62 | # specify nodepool name 63 | name: digitalocean-nodepool-1 64 | 65 | # enable backups for droplet 66 | # backups: true 67 | 68 | # Digital Ocean Image 69 | image: ubuntu-20-04-x64 70 | 71 | # enable ipv6 for droplet 72 | ipv6: false 73 | 74 | # enable monitoring for droplet 75 | monitoring: false 76 | 77 | # enable private networking for droplet 78 | privateNetworking: false 79 | 80 | # Digital Ocean region 81 | region: sfo3 82 | 83 | # Digital Ocean size 84 | size: s-4vcpu-8gb 85 | 86 | # File contents for sshKeyContents 87 | # sshKeyContents: "" 88 | 89 | # SSH key fingerprint 90 | # sshKeyFingerprint: "" 91 | 92 | # SSH port 93 | sshPort: 22 94 | 95 | # SSH username 96 | sshUser: root 97 | 98 | # comma-separated list of tags to apply to the Droplet 99 | # tags: "" 100 | 101 | # File contents for userdata 102 | # userdata: "" -------------------------------------------------------------------------------- /charts/templates/nodeconfig-vsphere.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.cloudprovider "vsphere" }} 2 | {{- range $index, $nodepool := .Values.nodepools }} 3 | apiVersion: rke-machine-config.cattle.io/v1 4 | kind: VmwarevsphereConfig 5 | metadata: 6 | name: {{ $nodepool.name }} 7 | namespace: fleet-default 8 | common: 9 | {{- if $nodepool.labels }} 10 | labels: 11 | {{ toYaml $nodepool.labels | indent 4 }} 12 | {{- end }} 13 | {{- if $nodepool.taints }} 14 | taints: 15 | {{ toYaml $nodepool.taints | indent 4 }} 16 | {{- end }} 17 | {{- if $nodepool.cfgparam }} 18 | cfgparam: {{ $nodepool.cfgparam }} 19 | {{- end }} 20 | cloneFrom: {{ $nodepool.cloneFrom }} 21 | cloudConfig: | 22 | {{ $nodepool.cloudConfig | indent 2 }} 23 | cloudinit: {{ $nodepool.cloudinit }} 24 | contentLibrary: {{ $nodepool.contentLibrary }} 25 | cpuCount: {{ $nodepool.cpuCount | quote }} 26 | creationType: {{ $nodepool.creationType }} 27 | customAttribute: {{ $nodepool.customAttribute }} 28 | datacenter: {{ $nodepool.datacenter }} 29 | datastore: {{ $nodepool.datastore }} 30 | datastoreCluster: {{ $nodepool.datastoreCluster }} 31 | diskSize: {{ $nodepool.diskSize | quote }} 32 | folder: {{ $nodepool.folder }} 33 | hostsystem: {{ $nodepool.hostsystem }} 34 | memorySize: {{ $nodepool.memorySize | quote }} 35 | network: {{ $nodepool.network }} 36 | pool: {{ $nodepool.pool }} 37 | sshPort: {{ $nodepool.sshPort | quote }} 38 | sshUser: {{ $nodepool.sshUser }} 39 | sshUserGroup: {{ $nodepool.sshUserGroup }} 40 | tag: {{ $nodepool.tag }} 41 | vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }} 42 | vappIpprotocol: {{ $nodepool.vappIpprotocol }} 43 | vappProperty: {{ $nodepool.vappProperty }} 44 | vappTransport: {{ $nodepool.vappTransport }} 45 | vcenter: {{ $nodepool.vcenter }} 46 | vcenterPort: {{ $nodepool.vcenterPort | quote }} 47 | --- 48 | {{- end }} 49 | {{ $nodepool := .Values.nodepool }} 50 | {{- if $nodepool }} 51 | apiVersion: rke-machine-config.cattle.io/v1 52 | kind: VmwarevsphereConfig 53 | metadata: 54 | name: {{ $nodepool.name }} 55 | namespace: fleet-default 56 | common: 57 | {{- if $nodepool.labels }} 58 | labels: 59 | {{ toYaml $nodepool.labels | indent 4 }} 60 | {{- end }} 61 | {{- if $nodepool.taints }} 62 | taints: 63 | {{ toYaml $nodepool.taints | indent 4 }} 64 | {{- end }} 65 | {{- if $nodepool.cfgparam }} 66 | cfgparam: {{ $nodepool.cfgparam }} 67 | {{- end }} 68 | cloneFrom: {{ $nodepool.cloneFrom }} 69 | cloudConfig: | 70 | {{ $nodepool.cloudConfig | indent 2 }} 71 | cloudinit: {{ $nodepool.cloudinit }} 72 | contentLibrary: {{ $nodepool.contentLibrary }} 73 | cpuCount: {{ $nodepool.cpuCount | quote }} 74 | creationType: {{ $nodepool.creationType }} 75 | customAttribute: {{ $nodepool.customAttribute }} 76 | datacenter: {{ $nodepool.datacenter }} 77 | datastore: {{ $nodepool.datastore }} 78 | datastoreCluster: {{ $nodepool.datastoreCluster }} 79 | diskSize: {{ $nodepool.diskSize | quote }} 80 | folder: {{ $nodepool.folder }} 81 | hostsystem: {{ $nodepool.hostsystem }} 82 | memorySize: {{ $nodepool.memorySize | quote }} 83 | network: {{ $nodepool.network }} 84 | pool: {{ $nodepool.pool }} 85 | sshPort: {{ $nodepool.sshPort | quote }} 86 | sshUser: {{ $nodepool.sshUser }} 87 | sshUserGroup: {{ $nodepool.sshUserGroup }} 88 | tag: {{ $nodepool.tag }} 89 | vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }} 90 | vappIpprotocol: {{ $nodepool.vappIpprotocol }} 91 | vappProperty: {{ $nodepool.vappProperty }} 92 | vappTransport: {{ $nodepool.vappTransport }} 93 | vcenter: {{ $nodepool.vcenter }} 94 | vcenterPort: {{ $nodepool.vcenterPort }} 95 | {{- end }} 96 | {{- end }} 97 | 98 | 99 | -------------------------------------------------------------------------------- /charts/values-azure.yaml: -------------------------------------------------------------------------------- 1 | cloudprovider: azure 2 | 3 | cloudCredentialSecretName: azure 4 | 5 | # Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. 6 | nodepools: 7 | - etcd: true 8 | controlplane: true 9 | worker: true 10 | 11 | # specify node labels 12 | labels: {} 13 | 14 | # specify node taints 15 | taints: {} 16 | 17 | # specify nodepool size 18 | quantity: 1 19 | 20 | # Pause node pool 21 | paused: false 22 | 23 | # specify displayName 24 | # displayName: "" 25 | 26 | # specify rolling update mechanism 27 | # rollingUpdate: 28 | # The maximum number of machines that can be unavailable during the update. 29 | # Value can be an absolute number (ex: 5) or a percentage of desired 30 | # machines (ex: 10%). 31 | # Absolute number is calculated from percentage by rounding down. 32 | # This can not be 0 if MaxSurge is 0. 33 | # Defaults to 0. 34 | # Example: when this is set to 30%, the old MachineSet can be scaled 35 | # down to 70% of desired machines immediately when the rolling update 36 | # starts. Once new machines are ready, old MachineSet can be scaled 37 | # down further, followed by scaling up the new MachineSet, ensuring 38 | # that the total number of machines available at all times 39 | # during the update is at least 70% of desired machines. 40 | # maxUnavailable: "5" 41 | # The maximum number of machines that can be scheduled above the 42 | # desired number of machines. 43 | # Value can be an absolute number (ex: 5) or a percentage of 44 | # desired machines (ex: 10%). 45 | # This can not be 0 if MaxUnavailable is 0. 46 | # Absolute number is calculated from percentage by rounding up. 47 | # Defaults to 1. 48 | # Example: when this is set to 30%, the new MachineSet can be scaled 49 | # up immediately when the rolling update starts, such that the total 50 | # number of old and new machines do not exceed 130% of desired 51 | # machines. Once old machines have been killed, new MachineSet can 52 | # be scaled up further, ensuring that total number of machines running 53 | # at any time during the update is at most 130% of desired machines. 54 | # maxSurge: "1" 55 | 56 | # specify machineDeployment Labels 57 | # machineDeploymentLabels: {} 58 | 59 | # specify machineDeployment annotations 60 | # machineDeploymentAnnotations: {} 61 | 62 | # specify nodepool name 63 | name: azure-nodepool-1 64 | 65 | # Azure Availability Set to place the virtual machine into 66 | # availabilitySet: docker-machine 67 | 68 | # Azure Service Principal Account ID (optional, browser auth is used if not specified) 69 | # clientId: "" 70 | 71 | # File contents for customData 72 | # customData: "" 73 | 74 | # Disk size if using managed disk 75 | # diskSize: "30" 76 | 77 | # A unique DNS label for the public IP adddress 78 | # dns: "" 79 | 80 | # Azure environment (e.g. AzurePublicCloud, AzureChinaCloud) 81 | # environment: AzurePublicCloud 82 | 83 | # Fault domain count to use for availability set 84 | # faultDomainCount: 3 85 | 86 | # Azure virtual machine OS image 87 | # image: "canonical:UbuntuServer:18.04-LTS:latest" 88 | 89 | # Azure region to create the virtual machine 90 | # location: westus 91 | 92 | # Configures VM and availability set for managed disks 93 | # managedDisks: false 94 | 95 | # Do not create a public IP address for the machine 96 | # noPublicIp: false 97 | 98 | # Make the specified port number accessible from the Internet 99 | # openPort: ["8080", "8443"] 100 | 101 | # Specify a static private IP address for the machine 102 | # privateIpAddress: "" 103 | 104 | # Azure Resource Group name (will be created if missing) 105 | # resourceGroup: "docker-machine" 106 | 107 | # Size for Azure Virtual Machine 108 | # size: Standard_D2_v2 109 | 110 | # Username for SSH login 111 | # sshUser: docker-user 112 | 113 | # Assign a static public IP address to the machine 114 | # staticPublicIp: false 115 | 116 | # Type of Storage Account to host the OS Disk for the machine 117 | # storageType: Standard_LRS 118 | 119 | # Azure Subnet Name to be used within the Virtual Network 120 | # subnet: docker-machine 121 | 122 | # Private CIDR block to be used for the new subnet, should comply RFC 1918 123 | # subnetPrefix: "192.168.0.0/16" 124 | 125 | # Azure Subscription ID 126 | # subscriptionId: "" 127 | 128 | # Update domain count to use for availability set 129 | # updateDomainCount: "5" 130 | 131 | # Use private IP address of the machine to connect 132 | # usePrivateIp: "false" 133 | 134 | # Azure Virtual Network name to connect the virtual machine (in [resourcegroup:]name format) 135 | # vnet: "docker-machine-vnet" 136 | -------------------------------------------------------------------------------- /charts/values-aws.yaml: -------------------------------------------------------------------------------- 1 | cloudprovider: amazonec2 2 | 3 | cloudCredentialSecretName: amazonec2 4 | 5 | # Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. 6 | nodepools: 7 | - etcd: true 8 | controlplane: true 9 | worker: true 10 | 11 | # specify node labels 12 | labels: {} 13 | 14 | # specify node taints 15 | taints: {} 16 | 17 | # specify nodepool size 18 | quantity: 1 19 | 20 | # Pause node pool 21 | paused: false 22 | 23 | # specify displayName 24 | # displayName: "" 25 | 26 | # specify rolling update mechanism 27 | # rollingUpdate: 28 | # The maximum number of machines that can be unavailable during the update. 29 | # Value can be an absolute number (ex: 5) or a percentage of desired 30 | # machines (ex: 10%). 31 | # Absolute number is calculated from percentage by rounding down. 32 | # This can not be 0 if MaxSurge is 0. 33 | # Defaults to 0. 34 | # Example: when this is set to 30%, the old MachineSet can be scaled 35 | # down to 70% of desired machines immediately when the rolling update 36 | # starts. Once new machines are ready, old MachineSet can be scaled 37 | # down further, followed by scaling up the new MachineSet, ensuring 38 | # that the total number of machines available at all times 39 | # during the update is at least 70% of desired machines. 40 | # maxUnavailable: "5" 41 | # The maximum number of machines that can be scheduled above the 42 | # desired number of machines. 43 | # Value can be an absolute number (ex: 5) or a percentage of 44 | # desired machines (ex: 10%). 45 | # This can not be 0 if MaxUnavailable is 0. 46 | # Absolute number is calculated from percentage by rounding up. 47 | # Defaults to 1. 48 | # Example: when this is set to 30%, the new MachineSet can be scaled 49 | # up immediately when the rolling update starts, such that the total 50 | # number of old and new machines do not exceed 130% of desired 51 | # machines. Once old machines have been killed, new MachineSet can 52 | # be scaled up further, ensuring that total number of machines running 53 | # at any time during the update is at most 130% of desired machines. 54 | # maxSurge: "1" 55 | 56 | # specify machineDeployment Labels 57 | # machineDeploymentLabels: {} 58 | 59 | # specify machineDeployment annotations 60 | # machineDeploymentAnnotations: {} 61 | 62 | # specify nodepool name 63 | name: ec2-nodepool-1 64 | 65 | # AWS machine image 66 | # ami: "" 67 | 68 | # AWS spot instance duration in minutes (60, 120, 180, 240, 300, or 360) 69 | # blockDurationMinutes: 0 70 | 71 | # AWS root device name 72 | deviceName: "/dev/sda1" 73 | 74 | # Encrypt the EBS volume using the AWS Managed CMK 75 | encryptEbsVolume: false 76 | 77 | # Optional endpoint URL (hostname only or fully qualified) 78 | endpoint: "" 79 | 80 | # AWS IAM Instance Profile 81 | iamInstanceProfile: "" 82 | 83 | # Disable SSL when sending requests 84 | insecureTransport: false 85 | 86 | # AWS instance type 87 | instanceType: t3a.medium 88 | 89 | # AWS region 90 | region: us-west-2 91 | 92 | # Whether to create `rancher-node` security group. If false, can provide with existing security group 93 | createSecurityGroup: true 94 | # createSecurityGroup: false 95 | # securityGroups: [] 96 | 97 | # AWS keypair to use 98 | keypairName: "" 99 | 100 | # Skip adding default rules to security groups 101 | securityGroupReadonly: false 102 | 103 | # File contents for sshKeyContents 104 | sshKeyContents: "" 105 | 106 | # AWS VPC subnet id 107 | subnetId: "" 108 | 109 | # Set this flag to enable CloudWatch monitoring 110 | monitoring: false 111 | 112 | # Make the specified port number accessible from the Internet 113 | # openPort: ["8080", "8443"] 114 | 115 | # Only use a private IP address 116 | privateAddressOnly: false 117 | 118 | # Set this flag to request spot instance 119 | requestSpotInstance: false 120 | 121 | # AWS Tags (e.g. key1,value1,key2,value2) 122 | # tags: "foo,bar" 123 | 124 | # Set retry count for recoverable failures (use -1 to disable) 125 | retries: 5 126 | 127 | # AWS root disk size (in GB) 128 | rootSize: 16 129 | 130 | # AWS spot instance bid price (in dollar) 131 | spotPrice: 0.5 132 | 133 | # Set the name of the ssh user 134 | sshUser: ubuntu 135 | 136 | # Amazon EBS volume type 137 | volumeType: gp2 138 | 139 | # AWS VPC id 140 | # vpcId: "" 141 | 142 | # Create an EBS optimized instance 143 | useEbsOptimizedInstance: false 144 | 145 | # Force the usage of private IP address 146 | usePrivateAddress: false 147 | 148 | # File contents for userdata 149 | userdata: "" 150 | 151 | # AWS zone for instance (i.e. a,b,c,d,e) 152 | zone: a 153 | 154 | -------------------------------------------------------------------------------- /charts/values-vsphere.yaml: -------------------------------------------------------------------------------- 1 | cloudprovider: vsphere 2 | 3 | cloudCredentialSecretName: vsphere 4 | 5 | # Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. 6 | nodepools: 7 | - etcd: true 8 | controlplane: true 9 | worker: true 10 | 11 | # specify node labels 12 | labels: {} 13 | 14 | # specify node taints 15 | taints: {} 16 | 17 | # specify nodepool size 18 | quantity: 1 19 | 20 | # Pause node pool 21 | paused: false 22 | 23 | # specify displayName 24 | # displayName: "" 25 | 26 | # specify rolling update mechanism 27 | # rollingUpdate: 28 | # The maximum number of machines that can be unavailable during the update. 29 | # Value can be an absolute number (ex: 5) or a percentage of desired 30 | # machines (ex: 10%). 31 | # Absolute number is calculated from percentage by rounding down. 32 | # This can not be 0 if MaxSurge is 0. 33 | # Defaults to 0. 34 | # Example: when this is set to 30%, the old MachineSet can be scaled 35 | # down to 70% of desired machines immediately when the rolling update 36 | # starts. Once new machines are ready, old MachineSet can be scaled 37 | # down further, followed by scaling up the new MachineSet, ensuring 38 | # that the total number of machines available at all times 39 | # during the update is at least 70% of desired machines. 40 | # maxUnavailable: "5" 41 | # The maximum number of machines that can be scheduled above the 42 | # desired number of machines. 43 | # Value can be an absolute number (ex: 5) or a percentage of 44 | # desired machines (ex: 10%). 45 | # This can not be 0 if MaxUnavailable is 0. 46 | # Absolute number is calculated from percentage by rounding up. 47 | # Defaults to 1. 48 | # Example: when this is set to 30%, the new MachineSet can be scaled 49 | # up immediately when the rolling update starts, such that the total 50 | # number of old and new machines do not exceed 130% of desired 51 | # machines. Once old machines have been killed, new MachineSet can 52 | # be scaled up further, ensuring that total number of machines running 53 | # at any time during the update is at most 130% of desired machines. 54 | # maxSurge: "1" 55 | 56 | # specify machineDeployment Labels 57 | # machineDeploymentLabels: {} 58 | 59 | # specify machineDeployment annotations 60 | # machineDeploymentAnnotations: {} 61 | 62 | # specify nodepool name 63 | name: vsphere-nodepool-1 64 | 65 | # vSphere vm configuration parameters (used for guestinfo) 66 | # cfgparam: [] 67 | 68 | # If you choose creation type clone a name of what you want to clone is required 69 | # cloneFrom: "" 70 | 71 | # Contents of cloud-config yaml file to put into the ISO user-data; Format should be: 72 | # cloudConfig: | 73 | # #cloud-config 74 | # 75 | 76 | # vSphere cloud-init filepath or url to add to guestinfo, filepath will be read and base64 encoded before adding 77 | # cloudinit: "" 78 | 79 | # If you choose to clone from a content library template specify the name of the library 80 | # contentLibrary: "" 81 | 82 | # vSphere CPU number for docker VM 83 | cpuCount: "2" 84 | 85 | # 'Creation type when creating a new virtual machine. Supported values: vm, template, library, legacy' 86 | creationType: "vm" 87 | 88 | # vSphere custom attribute, format key/value e.g. '200=mycustom value' 89 | # customAttribute: ["200=mycustom value"] 90 | 91 | # vSphere datacenter for virtual machine 92 | # datacenter: "" 93 | 94 | # vSphere datastore for virtual machine 95 | # datastore: "" 96 | 97 | # vSphere datastore cluster for virtual machine 98 | # datastoreCluster: "" 99 | 100 | # vSphere size of disk for docker VM (in MB) 101 | diskSize: "20480" 102 | 103 | # vSphere folder for the docker VM. This folder must already exist in the datacenter 104 | # folder: "" 105 | 106 | # vSphere compute resource where the docker VM will be instantiated. This can be omitted if using a cluster with DRS 107 | # hostsystem: "" 108 | 109 | # vSphere size of memory for docker VM (in MB) 110 | # memorySize: "2048" 111 | 112 | # vSphere network where the virtual machine will be attached 113 | # network: "" 114 | 115 | # vSphere resource pool for docker VM 116 | # pool: "" 117 | 118 | # If using a non-B2D image you can specify the ssh port 119 | sshPort: "22" 120 | 121 | # If using a non-B2D image the uploaded keys will need chown'ed, defaults to staff e.g. docker:staff 122 | sshUserGroup: staff 123 | 124 | # vSphere tag id e.g. urn:xxx 125 | # tag: ["urn:xxx"] 126 | 127 | # 'vSphere vApp IP allocation policy. Supported values are: dhcp, fixed, transient and fixedAllocated' 128 | # vappIpallocationpolicy: "" 129 | 130 | # 'vSphere vApp IP protocol for this deployment. Supported values are: IPv4 and IPv6' 131 | # vappIpprotocol: "" 132 | 133 | # vSphere vApp properties 134 | # vappProperty: [] 135 | 136 | # 'vSphere OVF environment transports to use for properties. Supported values are: iso and com.vmware.guestInfo' 137 | # vappTransport: "" 138 | 139 | # vSphere IP/hostname for vCenter 140 | # vcenter: "" 141 | 142 | # vSphere Port for vCenter 143 | vcenterPort: 443 144 | -------------------------------------------------------------------------------- /charts/templates/nodeconfig-aws.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.cloudprovider "amazonec2" }} 2 | {{- range $index, $nodepool := .Values.nodepools }} 3 | apiVersion: rke-machine-config.cattle.io/v1 4 | kind: Amazonec2Config 5 | metadata: 6 | name: {{ $nodepool.name }} 7 | namespace: fleet-default 8 | {{- if $nodepool.ami }} 9 | ami: {{ $nodepool.ami }} 10 | {{- end }} 11 | {{- if $nodepool.blockDurationMinutes }} 12 | blockDurationMinutes: {{ $nodepool.blockDurationMinutes }} 13 | {{- end }} 14 | {{- if $nodepool.deviceName }} 15 | deviceName: {{ $nodepool.deviceName }} 16 | {{- end }} 17 | {{- if $nodepool.encryptEbsVolume }} 18 | encryptEbsVolume: {{ $nodepool.encryptEbsVolume }} 19 | {{- end }} 20 | {{- if $nodepool.endpoint }} 21 | endpoint: {{ $nodepool.endpoint }} 22 | {{- end }} 23 | {{- if $nodepool.iamInstanceProfile }} 24 | iamInstanceProfile: {{ $nodepool.iamInstanceProfile }} 25 | {{- end }} 26 | {{- if $nodepool.insecureTransport }} 27 | insecureTransport: {{ $nodepool.insecureTransport }} 28 | {{- end }} 29 | {{- if $nodepool.instanceType }} 30 | instanceType: {{ $nodepool.instanceType }} 31 | {{- end }} 32 | {{- if $nodepool.keypairName }} 33 | keypairName: {{ $nodepool.keypairName }} 34 | {{- end }} 35 | {{- if $nodepool.monitoring }} 36 | monitoring: {{ $nodepool.monitoring }} 37 | {{- end }} 38 | {{- if $nodepool.openPort}} 39 | openPort: 40 | {{- range $i, $port := $nodepool.openPort }} 41 | - {{ $port }} 42 | {{- end }} 43 | {{- end }} 44 | {{- if $nodepool.privateAddressOnly }} 45 | privateAddressOnly: {{ $nodepool.privateAddressOnly }} 46 | {{- end }} 47 | {{- if $nodepool.region }} 48 | region: {{ $nodepool.region }} 49 | {{- end }} 50 | {{- if $nodepool.requestSpotInstance }} 51 | requestSpotInstance: {{ $nodepool.requestSpotInstance }} 52 | {{- end }} 53 | {{- if $nodepool.retries }} 54 | retries: {{ $nodepool.retries | quote }} 55 | {{- end }} 56 | {{- if $nodepool.rootSize }} 57 | rootSize: {{ $nodepool.rootSize | quote }} 58 | {{- end }} 59 | securityGroup: 60 | {{- if $nodepool.createSecurityGroup }} 61 | - rancher-nodes 62 | {{- else }} 63 | {{ toYaml $nodepool.securityGroups }} 64 | {{- end }} 65 | {{- if $nodepool.securityGroupReadonly }} 66 | securityGroupReadonly: {{ $nodepool.securityGroupReadonly }} 67 | {{- end }} 68 | {{- if $nodepool.sessionToken }} 69 | sessionToken: {{ $nodepool.sessionToken }} 70 | {{- end }} 71 | {{- if $nodepool.spotPrice }} 72 | spotPrice: {{ $nodepool.spotPrice | quote }} 73 | {{- end }} 74 | {{- if $nodepool.sshKeyContents }} 75 | sshKeyContents: {{ $nodepool.sshKeyContents }} 76 | {{- end }} 77 | {{- if $nodepool.sshUser }} 78 | sshUser: {{ $nodepool.sshUser }} 79 | {{- end }} 80 | {{- if $nodepool.subnetId }} 81 | subnetId: {{ $nodepool.subnetId }} 82 | {{- end }} 83 | {{- if $nodepool.tags }} 84 | tags: {{ $nodepool.tags }} 85 | {{- end }} 86 | {{- if $nodepool.useEbsOptimizedInstance }} 87 | useEbsOptimizedInstance: {{ $nodepool.useEbsOptimizedInstance }} 88 | {{- end }} 89 | {{- if $nodepool.usePrivateAddress }} 90 | usePrivateAddress: {{ $nodepool.usePrivateAddress }} 91 | {{- end }} 92 | {{- if $nodepool.userdata }} 93 | userdata: {{ $nodepool.userdata }} 94 | {{- end }} 95 | {{- if $nodepool.volumeType }} 96 | volumeType: {{ $nodepool.volumeType }} 97 | {{- end }} 98 | {{- if $nodepool.vpcId }} 99 | vpcId: {{ $nodepool.vpcId }} 100 | {{- end }} 101 | {{- if $nodepool.zone }} 102 | zone: {{ $nodepool.zone }} 103 | {{- end }} 104 | --- 105 | {{- end }} 106 | {{ $nodepool := .Values.nodepool }} 107 | {{- if $nodepool }} 108 | apiVersion: rke-machine-config.cattle.io/v1 109 | kind: Amazonec2Config 110 | metadata: 111 | name: {{ $nodepool.name }} 112 | namespace: fleet-default 113 | {{- if $nodepool.ami }} 114 | ami: {{ $nodepool.ami }} 115 | {{- end }} 116 | {{- if $nodepool.blockDurationMinutes }} 117 | blockDurationMinutes: {{ $nodepool.blockDurationMinutes }} 118 | {{- end }} 119 | {{- if $nodepool.deviceName }} 120 | deviceName: {{ $nodepool.deviceName }} 121 | {{- end }} 122 | {{- if $nodepool.encryptEbsVolume }} 123 | encryptEbsVolume: {{ $nodepool.encryptEbsVolume }} 124 | {{- end }} 125 | {{- if $nodepool.endpoint }} 126 | endpoint: {{ $nodepool.endpoint }} 127 | {{- end }} 128 | {{- if $nodepool.iamInstanceProfile }} 129 | iamInstanceProfile: {{ $nodepool.iamInstanceProfile }} 130 | {{- end }} 131 | {{- if $nodepool.insecureTransport }} 132 | insecureTransport: {{ $nodepool.insecureTransport }} 133 | {{- end }} 134 | {{- if $nodepool.instanceType }} 135 | instanceType: {{ $nodepool.instanceType }} 136 | {{- end }} 137 | {{- if $nodepool.keypairName }} 138 | keypairName: {{ $nodepool.keypairName }} 139 | {{- end }} 140 | {{- if $nodepool.monitoring }} 141 | monitoring: {{ $nodepool.monitoring }} 142 | {{- end }} 143 | {{- if $nodepool.openPort}} 144 | openPort: 145 | {{- range $i, $port := $nodepool.openPort }} 146 | - {{ $port }} 147 | {{- end }} 148 | {{- end }} 149 | {{- if $nodepool.privateAddressOnly }} 150 | privateAddressOnly: {{ $nodepool.privateAddressOnly }} 151 | {{- end }} 152 | {{- if $nodepool.region }} 153 | region: {{ $nodepool.region }} 154 | {{- end }} 155 | {{- if $nodepool.requestSpotInstance }} 156 | requestSpotInstance: {{ $nodepool.requestSpotInstance }} 157 | {{- end }} 158 | {{- if $nodepool.retries }} 159 | retries: {{ $nodepool.retries | quote }} 160 | {{- end }} 161 | {{- if $nodepool.rootSize }} 162 | rootSize: {{ $nodepool.rootSize | quote }} 163 | {{- end }} 164 | {{- if $nodepool.createSecurityGroup }} 165 | securityGroup: 166 | - rancher-nodes 167 | {{- else if $nodepool.securityGroups }} 168 | securityGroup: 169 | {{ toYaml $nodepool.securityGroups }} 170 | {{- end }} 171 | {{- if $nodepool.securityGroupReadonly }} 172 | securityGroupReadonly: {{ $nodepool.securityGroupReadonly }} 173 | {{- end }} 174 | {{- if $nodepool.sessionToken }} 175 | sessionToken: {{ $nodepool.sessionToken }} 176 | {{- end }} 177 | {{- if $nodepool.spotPrice }} 178 | spotPrice: {{ $nodepool.spotPrice }} 179 | {{- end }} 180 | {{- if $nodepool.sshKeyContents }} 181 | sshKeyContents: {{ $nodepool.sshKeyContents }} 182 | {{- end }} 183 | {{- if $nodepool.sshUser }} 184 | sshUser: {{ $nodepool.sshUser }} 185 | {{- end }} 186 | {{- if $nodepool.subnetId }} 187 | subnetId: {{ $nodepool.subnetId }} 188 | {{- end }} 189 | {{- if $nodepool.tags }} 190 | tags: {{ $nodepool.tags }} 191 | {{- end }} 192 | {{- if $nodepool.useEbsOptimizedInstance }} 193 | useEbsOptimizedInstance: {{ $nodepool.useEbsOptimizedInstance }} 194 | {{- end }} 195 | {{- if $nodepool.usePrivateAddress }} 196 | usePrivateAddress: {{ $nodepool.usePrivateAddress }} 197 | {{- end }} 198 | {{- if $nodepool.userdata }} 199 | userdata: {{ $nodepool.userdata }} 200 | {{- end }} 201 | {{- if $nodepool.volumeType }} 202 | volumeType: {{ $nodepool.volumeType }} 203 | {{- end }} 204 | {{- if $nodepool.vpcId }} 205 | vpcId: {{ $nodepool.vpcId }} 206 | {{- end }} 207 | {{- if $nodepool.zone }} 208 | zone: {{ $nodepool.zone }} 209 | {{- end }} 210 | {{- end }} 211 | {{- end }} 212 | -------------------------------------------------------------------------------- /charts/templates/cluster.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: provisioning.cattle.io/v1 2 | kind: Cluster 3 | metadata: 4 | {{- if .Values.cluster.labels }} 5 | labels: 6 | {{ toYaml .Values.cluster.labels | indent 4 }} 7 | {{- end }} 8 | {{- if .Values.cluster.annotations }} 9 | annotations: 10 | {{ toYaml .Values.cluster.annotations | indent 4 }} 11 | {{- end }} 12 | name: {{ .Values.cluster.name }} 13 | namespace: fleet-default 14 | spec: 15 | {{- if .Values.cloudCredentialSecretName }} 16 | cloudCredentialSecretName: {{ .Values.cloudCredentialSecretName }} 17 | {{- end }} 18 | {{- if .Values.kubernetesVersion }} 19 | kubernetesVersion: {{ .Values.kubernetesVersion }} 20 | {{- end }} 21 | {{- if .Values.localClusterAuthEndpoint.enabled }} 22 | localClusterAuthEndpoint: 23 | enabled: {{ .Values.localClusterAuthEndpoint.enabled }} 24 | fqdn: {{ .Values.localClusterAuthEndpoint.fqdn }} 25 | caCerts: {{ .Values.localClusterAuthEndpoint.caCerts }} 26 | {{- end }} 27 | # enable network policy 28 | enableNetworkPolicy: true 29 | # specify rancher helm chart values deployed into downstream cluster 30 | # rancherValues: {} 31 | rkeConfig: 32 | {{- if ne .Values.cloudprovider "custom" }} 33 | machinePools: 34 | {{- if .Values.nodepools }} {{ range $index, $nodepool := .Values.nodepools }} 35 | - controlPlaneRole: {{ $nodepool.controlplane }} 36 | etcdRole: {{ $nodepool.etcd }} 37 | workerRole: {{ $nodepool.worker }} 38 | quantity: {{ $nodepool.quantity }} 39 | name: {{ $nodepool.name }} 40 | machineConfigRef: 41 | {{- if eq $.Values.cloudprovider "amazonec2" }} 42 | kind: Amazonec2Config 43 | {{- else if eq $.Values.cloudprovider "vsphere" }} 44 | kind: VmwarevsphereConfig 45 | {{- else if eq $.Values.cloudprovider "harvester" }} 46 | kind: HarvesterConfig 47 | {{- else if eq $.Values.cloudprovider "digitalocean" }} 48 | kind: DigitaloceanConfig 49 | {{- else if eq $.Values.cloudprovider "azure" }} 50 | kind: AzureConfig 51 | {{- end}} 52 | name: {{ $nodepool.name }} 53 | paused: {{ $nodepool.paused }} 54 | displayName: {{ $nodepool.displayName }} 55 | {{- if $nodepool.rollingUpdate }} 56 | rollingUpdate: 57 | maxUnavailable: {{ $nodepool.rollingUpdate.maxUnavailable }} 58 | maxSurge: {{ $nodepool.rollingUpdate.maxSurge }} 59 | {{- end }} 60 | {{- if $nodepool.labels }} 61 | labels: 62 | {{ toYaml $nodepool.labels | indent 8 }} 63 | {{- end }} 64 | {{- if $nodepool.taints }} 65 | taints: 66 | {{ toYaml $nodepool.taints | indent 8 }} 67 | {{- end }} 68 | {{- if $nodepool.machineDeploymentLabels }} 69 | machineDeploymentLabels: 70 | {{ toYaml $nodepool.machineDeploymentLabels | indent 8 }} 71 | {{- end }} 72 | {{- if $nodepool.machineDeploymentAnnotations }} 73 | machineDeploymentAnnotations: 74 | {{ toYaml $nodepool.machineDeploymentAnnotations | indent 8 }} 75 | {{- end }} 76 | {{- end }} 77 | {{- end }} 78 | {{- if .Values.nodepool }} 79 | {{ $nodepool := .Values.nodepool }} 80 | - controlPlaneRole: {{ $nodepool.controlplane }} 81 | etcdRole: {{ $nodepool.etcd }} 82 | workerRole: {{ $nodepool.worker }} 83 | quantity: {{ $nodepool.quantity }} 84 | name: {{ $nodepool.name }} 85 | machineConfigRef: 86 | {{- if eq $.Values.cloudprovider "amazonec2" }} 87 | kind: Amazonec2Config 88 | {{- else if eq $.Values.cloudprovider "vsphere" }} 89 | kind: VmwarevsphereConfig 90 | {{- else if eq $.Values.cloudprovider "harvester" }} 91 | kind: HarvesterConfig 92 | {{- else if eq $.Values.cloudprovider "digitalocean" }} 93 | kind: DigitaloceanConfig 94 | {{- else if eq $.Values.cloudprovider "azure" }} 95 | kind: AzureConfig 96 | {{- end}} 97 | name: {{ $nodepool.name }} 98 | paused: {{ $nodepool.paused }} 99 | displayName: {{ $nodepool.displayName }} 100 | {{- if $nodepool.rollingUpdate }} 101 | rollingUpdate: 102 | maxUnavailable: {{ $nodepool.rollingUpdate.maxUnavailable }} 103 | maxSurge: {{ $nodepool.rollingUpdate.maxSurge }} 104 | {{- end }} 105 | {{- if $nodepool.labels }} 106 | labels: 107 | {{ toYaml $nodepool.labels | indent 8 }} 108 | {{- end }} 109 | {{- if $nodepool.taints }} 110 | taints: 111 | {{ toYaml $nodepool.taints | indent 8 }} 112 | {{- end }} 113 | {{- if $nodepool.machineDeploymentLabels }} 114 | machineDeploymentLabels: 115 | {{ toYaml $nodepool.machineDeploymentLabels | indent 8 }} 116 | {{- end }} 117 | {{- if $nodepool.machineDeploymentAnnotations }} 118 | machineDeploymentAnnotations: 119 | {{ toYaml $nodepool.machineDeploymentAnnotations | indent 8 }} 120 | {{- end }} 121 | {{- end }} 122 | {{- end }} 123 | machineGlobalConfig: 124 | # Path to the file that defines the audit policy configuration 125 | # audit-policy-file: "" 126 | # IPv4/IPv6 network CIDRs to use for pod IPs (default: 10.42.0.0/16) 127 | # cluster-cidr: "" 128 | # IPv4 Cluster IP for coredns service. Should be in your service-cidr range (default: 10.43.0.10) 129 | # cluster-dns: "" 130 | # Cluster Domain (default: "cluster.local") 131 | # cluster-domain: "" 132 | # CNI Plugin to deploy, one of none, canal, cilium (default: "canal") 133 | cni: calico 134 | # Do not deploy packaged components and delete any deployed components (valid items: rke2-coredns, rke2-ingress-nginx, rke2-kube-proxy, rke2-metrics-server) 135 | # disable: false 136 | # Disable automatic etcd snapshots 137 | # etcd-disable-snapshots: false 138 | # Expose etcd metrics to client interface. (Default false) 139 | # etcd-expose-metrics: false 140 | # Directory to save db snapshots. (Default location: ${data-dir}/db/snapshots) 141 | # etcd-snapshot-dir: "" 142 | # Set the base name of etcd snapshots. Default: etcd-snapshot- (default: "etcd-snapshot") 143 | # etcd-snapshot-name: "" 144 | # Number of snapshots to retain (default: 5) 145 | # etcd-snapshot-retention: 5 146 | # Snapshot interval time in cron spec. eg. every 5 hours '* */5 * * *' (default: "0 */12 * * *") 147 | # etcd-snapshot-schedule-cron: "0 */12 * * *" 148 | # Customized flag for kube-apiserver process 149 | # kube-apiserver-arg: "" 150 | # Customized flag for kube-scheduler process 151 | # kube-scheduler-arg: "" 152 | # Customized flag for kube-controller-manager process 153 | # kube-controller-manager-arg: "" 154 | # Validate system configuration against the selected benchmark (valid items: cis-1.5, cis-1.6 ) 155 | # profile: "cis-1.6" 156 | # Enable Secret encryption at rest 157 | # secrets-encryption: false 158 | # IPv4/IPv6 network CIDRs to use for service IPs (default: 10.43.0.0/16) 159 | # service-cidr: "10.43.0.0/16" 160 | # Port range to reserve for services with NodePort visibility (default: "30000-32767") 161 | # service-node-port-range: "30000-32767" 162 | # Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert 163 | # tls-san: [] 164 | 165 | # machineSelectorConfig: 166 | # - config: 167 | # Node name 168 | # node-name: "" 169 | # Disable embedded containerd and use alternative CRI implementation 170 | # container-runtime-endpoint: "" 171 | # Override default containerd snapshotter (default: "overlayfs") 172 | # snapshotter: "" 173 | # IP address to advertise for node 174 | # node-ip: "1.1.1.1" 175 | # Kubelet resolv.conf file 176 | # resolv-conf: "" 177 | # Customized flag for kubelet process 178 | # kubelet-arg: "" 179 | # Customized flag for kube-proxy process 180 | # kube-proxy-arg: "" 181 | # Kernel tuning behavior. If set, error if kernel tunables are different than kubelet defaults. (default: false) 182 | # protect-kernel-defaults: false 183 | # Enable SELinux in containerd (default: false) 184 | # selinux: true 185 | # Cloud provider name 186 | # cloud-provider-name: "" 187 | # Cloud provider configuration file path 188 | # cloud-provider-config: "" 189 | upgradeStrategy: 190 | controlPlaneDrainOptions: 191 | enabled: false 192 | # deleteEmptyDirData: false 193 | # disableEviction: false 194 | # gracePeriod: 0 195 | # ignoreErrors: false 196 | # skipWaitForDeleteTimeoutSeconds: 0 197 | # timeout: 0 198 | workerDrainOptions: 199 | enabled: false 200 | # deleteEmptyDirData: false 201 | # disableEviction: false 202 | # gracePeriod: 0 203 | # ignoreErrors: false 204 | # skipWaitForDeleteTimeoutSeconds: 0 205 | # timeout: 0 206 | workerConcurrency: "10%" 207 | controlPlaneConcurrency: "10%" 208 | {{- if .Values.agentEnvs }} 209 | agentEnvVars: 210 | {{ toYaml .Values.agentEnvs | indent 4 }} 211 | {{- end }} 212 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /charts/questions.yaml: -------------------------------------------------------------------------------- 1 | questions: 2 | - variable: cluster.name 3 | default: mycluster 4 | description: "Specify the name of the cluster" 5 | label: "Cluster Name" 6 | required: true 7 | type: string 8 | group: "General" 9 | - variable: cloudCredentialSecretName 10 | default: 11 | description: "CloudCredentialName for provisioning cluster" 12 | label: "CloudCredential Name" 13 | type: cloudcredential 14 | group: "General" 15 | - variable: cloudprovider 16 | default: custom 17 | description: "Specify Infrastructure provider for underlying nodes" 18 | label: "Infrastructure Provider" 19 | type: enum 20 | required: true 21 | options: 22 | - amazonec2 23 | - digitalocean 24 | - azure 25 | - vsphere 26 | - harvester 27 | - custom 28 | group: "General" 29 | - variable: kubernetesVersion 30 | default: v1.32.3+rke2r1 31 | description: "Specify Kubernetes version" 32 | label: "Kubernetes Version" 33 | type: enum 34 | required: true 35 | options: 36 | - v1.32.3+rke2r1 37 | - v1.31.7+rke2r1 38 | - v1.30.11+rke2r1 39 | group: "General" 40 | - variable: localClusterAuthEndpoint.enabled 41 | default: false 42 | label: "Local Auth endpoint" 43 | description: "Enable local auth access endpoint" 44 | type: boolean 45 | group: "Auth Access Endpoint" 46 | show_subquestion_if: true 47 | subquestions: 48 | - variable: localClusterAuthEndpoint.fqdn 49 | default: "" 50 | description: "Local auth access endpoint FQDN" 51 | label: "Auth Endpoint FQDN" 52 | type: hostname 53 | group: "Auth Access Endpoint" 54 | - variable: localClusterAuthEndpoint.caCerts 55 | default: 56 | label: "Auth Endpoint Cacerts" 57 | description: "Local auth access endpoint CACerts" 58 | type: multiline 59 | group: "Auth Access Endpoint" 60 | - variable: monitoring.enabled 61 | default: false 62 | label: "Enable monitoring" 63 | description: "Enable monitoring" 64 | type: boolean 65 | group: "Monitoring" 66 | show_subquestion_if: true 67 | subquestions: 68 | - variable: monitoring.version 69 | default: 70 | label: "Monitoring Version" 71 | description: "Choose chart version of monitoring. If empty latest version will be installed" 72 | type: string 73 | group: "Monitoring" 74 | - variable: monitoring.values 75 | default: 76 | label: "Monitoring Values" 77 | description: "Custom monitoring chart values" 78 | type: multiline 79 | group: "Monitoring" 80 | - variable: nodepools.0.name 81 | default: 82 | description: "Specify nodepool name" 83 | type: string 84 | label: "Nodepool name" 85 | required: true 86 | show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester 87 | group: "Nodepools" 88 | - variable: nodepools.0.quantity 89 | default: 1 90 | description: "Specify node count" 91 | type: int 92 | required: true 93 | show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester 94 | label: "Node count" 95 | group: "Nodepools" 96 | - variable: nodepools.0.etcd 97 | default: true 98 | label: etcd 99 | type: boolean 100 | show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester 101 | group: "Nodepools" 102 | - variable: nodepools.0.worker 103 | default: true 104 | label: worker 105 | type: boolean 106 | show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester 107 | group: "Nodepools" 108 | - variable: nodepools.0.controlplane 109 | label: controlplane 110 | default: true 111 | type: boolean 112 | show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester 113 | group: "Nodepools" 114 | # EC2 115 | - variable: nodepools.0.region 116 | label: "Region" 117 | default: us-west-2 118 | type: string 119 | description: "AWS EC2 region" 120 | required: true 121 | show_if: cloudprovider=amazonec2 122 | group: "Nodepools" 123 | - variable: nodepools.0.zone 124 | label: "Zone" 125 | default: a 126 | type: string 127 | description: "AWS EC2 zone" 128 | required: true 129 | show_if: cloudprovider=amazonec2 130 | group: "Nodepools" 131 | - variable: nodepools.0.instanceType 132 | label: "Instance Type" 133 | default: t3a.medium 134 | type: string 135 | description: "AWS instance type" 136 | required: true 137 | show_if: cloudprovider=amazonec2 138 | group: "Nodepools" 139 | - variable: nodepools.0.rootSize 140 | label: "Root Disk Size" 141 | default: 16g 142 | type: string 143 | description: "AWS EC2 root disk size" 144 | show_if: cloudprovider=amazonec2 145 | group: "Nodepools" 146 | - variable: nodepools.0.vpcId 147 | label: "VPC/SUBNET" 148 | default: "" 149 | type: string 150 | description: "AWS EC2 vpc ID" 151 | required: true 152 | show_if: cloudprovider=amazonec2 153 | group: "Nodepools" 154 | - variable: nodepools.0.iamInstanceProfile 155 | label: "Instance Profile Name" 156 | default: "" 157 | type: string 158 | description: "AWS EC2 Instance Profile Name" 159 | show_if: cloudprovider=amazonec2 160 | group: "Nodepools" 161 | - variable: nodepools.0.ami 162 | label: "AMI ID" 163 | default: "" 164 | type: string 165 | description: "AWS EC2 AMI ID" 166 | show_if: cloudprovider=amazonec2 167 | group: "Nodepools" 168 | - variable: nodepools.0.sshUser 169 | label: "SSH Username for AMI" 170 | default: ubuntu 171 | type: string 172 | description: "AWS EC2 SSH Username for AMI" 173 | show_if: cloudprovider=amazonec2 174 | group: "Nodepools" 175 | - variable: nodepools.0.createSecurityGroup 176 | label: "Create security group" 177 | default: true 178 | type: boolean 179 | description: "Whether to create `rancher-node` security group. If false, can provide with existing security group" 180 | show_if: cloudprovider=amazonec2 181 | group: "Nodepools" 182 | show_subquestion_if: false 183 | subquestions: 184 | - variable: nodepools.0.securityGroups 185 | label: "Security groups" 186 | default: 187 | type: string 188 | description: "Using existing security groups" 189 | group: "Nodepools" 190 | # vsphere 191 | - variable: nodepools.0.vcenter 192 | label: "vSphere IP/hostname" 193 | default: "" 194 | type: hostname 195 | description: "vSphere IP/hostname for vCenter" 196 | required: true 197 | show_if: cloudprovider=vsphere 198 | group: "Nodepools" 199 | - variable: nodepools.0.datacenter 200 | label: "Vsphere Datacenter" 201 | default: "" 202 | type: hostname 203 | description: "vSphere datacenter for virtual machine" 204 | required: true 205 | show_if: cloudprovider=vsphere 206 | group: "Nodepools" 207 | - variable: nodepools.0.datastore 208 | label: "Vsphere Datastore" 209 | default: "" 210 | type: string 211 | description: "vSphere datastore for virtual machine" 212 | required: true 213 | show_if: cloudprovider=vsphere 214 | group: "Nodepools" 215 | - variable: nodepools.0.datastoreCluster 216 | label: "Vsphere DatastoreCluster" 217 | default: "" 218 | type: string 219 | description: "vSphere datastore cluster for virtual machine" 220 | required: true 221 | show_if: cloudprovider=vsphere 222 | group: "Nodepools" 223 | - variable: nodepools.0.diskSize 224 | label: "Disk Size" 225 | default: "20480" 226 | type: string 227 | description: "vSphere size of disk for docker VM (in MB)" 228 | show_if: cloudprovider=vsphere 229 | group: "Nodepools" 230 | - variable: nodepools.0.memorySize 231 | label: "Memory Size" 232 | default: "2048" 233 | type: string 234 | description: "vSphere size of memory for docker VM (in MB)" 235 | show_if: cloudprovider=vsphere 236 | group: "Nodepools" 237 | - variable: nodepools.0.network 238 | label: "Network" 239 | default: "" 240 | type: string 241 | description: "vSphere network where the virtual machine will be attached" 242 | show_if: cloudprovider=vsphere 243 | group: "Nodepools" 244 | - variable: nodepools.0.pool 245 | label: "Resource Pool" 246 | default: "" 247 | type: string 248 | description: "vSphere resource pool for docker VM" 249 | show_if: cloudprovider=vsphere 250 | group: "Nodepools" 251 | - variable: nodepools.0.sshPort 252 | label: "SSH Port" 253 | default: "22" 254 | type: string 255 | description: "If using a non-B2D image you can specify the ssh port" 256 | show_if: cloudprovider=vsphere 257 | group: "Nodepools" 258 | - variable: nodepools.0.sshUserGroup 259 | label: "SSH User Group" 260 | default: docker:staff 261 | type: hostname 262 | description: "If using a non-B2D image the uploaded keys will need chown'ed, defaults to staff e.g. docker:staff" 263 | show_if: cloudprovider=vsphere 264 | group: "Nodepools" 265 | - variable: nodepools.0.vappIpallocationpolicy 266 | label: "IP allocation policy" 267 | default: "" 268 | type: enum 269 | options: 270 | - dhcp 271 | - fixed 272 | - transient 273 | - fixedAllocated 274 | description: "'vSphere vApp IP allocation policy. Supported values are: dhcp, fixed, transient and fixedAllocated'" 275 | show_if: cloudprovider=vsphere 276 | group: "Nodepools" 277 | - variable: nodepools.0.vappIpprotocol 278 | label: "IP protocol" 279 | default: "" 280 | type: enum 281 | options: 282 | - IPv4 283 | - IPv6 284 | description: "'vSphere vApp IP protocol for this deployment. Supported values are: IPv4 and IPv6'" 285 | show_if: cloudprovider=vsphere 286 | group: "Nodepools" 287 | # HARVESTER 288 | - variable: nodepools.0.diskSize 289 | label: "Disk Size" 290 | default: 40 291 | type: string 292 | description: "Size of virtual hard disk in GB" 293 | show_if: cloudprovider=harvester 294 | group: "Nodepools" 295 | - variable: nodepools.0.diskBus 296 | label: "Disk Bus Type" 297 | default: string 298 | type: virtio 299 | description: "harvester disk type" 300 | show_if: cloudprovider=harvester 301 | group: "Nodepools" 302 | - variable: nodepools.0.cpuCount 303 | label: "CPUs" 304 | default: 2 305 | type: string 306 | description: "number of CPUs for your VM" 307 | show_if: cloudprovider=harvester 308 | group: "Nodepools" 309 | - variable: nodepools.0.memorySize 310 | label: "Memory Size" 311 | default: 4 312 | type: string 313 | description: "Memory for VM in GB (available RAM)" 314 | show_if: cloudprovider=harvester 315 | group: "Nodepools" 316 | - variable: nodepools.0.networkName 317 | label: "Network" 318 | default: default/network-name-1 319 | type: string 320 | description: "Name of vlan network in harvester" 321 | show_if: cloudprovider=harvester 322 | group: "Nodepools" 323 | - variable: nodepools.0.imageName 324 | label: "Name of Image" 325 | default: default/image-rand 326 | type: string 327 | description: "Name of image in harvester" 328 | show_if: cloudprovider=harvester 329 | group: "Nodepools" 330 | - variable: nodepools.0.vmNamespace 331 | label: "vm Namespace" 332 | default: default 333 | type: string 334 | description: "namespace to deploy the VM to" 335 | show_if: cloudprovider=harvester 336 | group: "Nodepools" 337 | - variable: nodepools.0.sshUser 338 | label: "SSH User" 339 | default: ubuntu 340 | type: string 341 | description: "SSH username" 342 | show_if: cloudprovider=harvester 343 | group: "Nodepools" 344 | # DO 345 | - variable: nodepools.0.image 346 | label: "Image" 347 | default: ubuntu-20-04-x64 348 | type: string 349 | description: "Digital Ocean Image" 350 | show_if: cloudprovider=digitalocean 351 | group: "Nodepools" 352 | - variable: nodepools.0.backups 353 | label: "Backup" 354 | default: false 355 | type: boolean 356 | description: "enable backups for droplet" 357 | show_if: cloudprovider=digitalocean 358 | group: "Nodepools" 359 | - variable: nodepools.0.ipv6 360 | label: "IPv6" 361 | default: false 362 | type: boolean 363 | description: "enable ipv6 for droplet" 364 | show_if: cloudprovider=digitalocean 365 | group: "Nodepools" 366 | - variable: nodepools.0.monitoring 367 | label: "Monitoring" 368 | default: false 369 | type: boolean 370 | description: "enable monitoring for droplet" 371 | show_if: cloudprovider=digitalocean 372 | group: "Nodepools" 373 | - variable: nodepools.0.privateNetworking 374 | label: "Private Networking" 375 | default: false 376 | type: boolean 377 | description: "enable private networking for droplet" 378 | show_if: cloudprovider=digitalocean 379 | group: "Nodepools" 380 | - variable: nodepools.0.region 381 | label: "Region" 382 | default: sfo3 383 | type: string 384 | description: "Digital Ocean region" 385 | show_if: cloudprovider=digitalocean 386 | group: "Nodepools" 387 | - variable: nodepools.0.size 388 | label: "Size" 389 | default: s-4vcpu-8gb 390 | type: string 391 | description: "Digital Ocean size" 392 | show_if: cloudprovider=digitalocean 393 | group: "Nodepools" 394 | - variable: nodepools.0.userdata 395 | label: "Userdata" 396 | default: 397 | type: multiline 398 | description: "File contents for userdata" 399 | show_if: cloudprovider=digitalocean 400 | group: "Nodepools" 401 | - variable: nodepools.0.sshPort 402 | label: "SSH Port" 403 | default: 22 404 | type: string 405 | description: "SSH port" 406 | show_if: cloudprovider=digitalocean 407 | group: "Nodepools" 408 | - variable: nodepools.0.sshUser 409 | label: "SSH User" 410 | default: root 411 | type: string 412 | description: "SSH username" 413 | show_if: cloudprovider=digitalocean 414 | group: "Nodepools" 415 | # Azure 416 | - variable: nodepools.0.availabilitySet 417 | label: "Availability Set" 418 | default: docker-machine 419 | type: string 420 | description: "Azure Availability Set to place the virtual machine into" 421 | show_if: cloudprovider=azure 422 | group: "Nodepools" 423 | - variable: nodepools.0.diskSize 424 | label: "Disk Size" 425 | default: "" 426 | type: string 427 | description: "Disk size if using managed disk(Gib)" 428 | show_if: cloudprovider=azure 429 | group: "Nodepools" 430 | - variable: nodepools.0.dns 431 | label: "DNS" 432 | default: "" 433 | type: string 434 | description: "A unique DNS label for the public IP adddress" 435 | show_if: cloudprovider=azure 436 | group: "Nodepools" 437 | - variable: nodepools.0.environment 438 | label: "Environment" 439 | default: AzurePublicCloud 440 | type: enum 441 | options: 442 | - AzurePublicCloud 443 | - AzureGermanCloud 444 | - AzureChinaCloud 445 | - AzureUSGovernmentCloud 446 | description: "Azure environment" 447 | show_if: cloudprovider=azure 448 | group: "Nodepools" 449 | - variable: nodepools.0.faultDomainCount 450 | label: "Fault Domain Count" 451 | default: "" 452 | type: string 453 | description: "Fault domain count to use for availability set" 454 | show_if: cloudprovider=azure 455 | group: "Nodepools" 456 | - variable: nodepools.0.image 457 | label: "Image" 458 | default: canonical:UbuntuServer:18.04-LTS:latest 459 | type: string 460 | description: "Azure virtual machine OS image" 461 | show_if: cloudprovider=azure 462 | group: "Nodepools" 463 | - variable: nodepools.0.location 464 | label: "Location" 465 | default: westus 466 | type: string 467 | description: "Azure region to create the virtual machine" 468 | show_if: cloudprovider=azure 469 | group: "Nodepools" 470 | - variable: nodepools.0.managedDisks 471 | label: "Managed Disks" 472 | default: false 473 | type: boolean 474 | description: "Configures VM and availability set for managed disks" 475 | show_if: cloudprovider=azure 476 | group: "Nodepools" 477 | - variable: nodepools.0.noPublicIp 478 | label: "No Public IP" 479 | default: false 480 | type: boolean 481 | description: "Do not create a public IP address for the machine" 482 | show_if: cloudprovider=azure 483 | group: "Nodepools" 484 | - variable: nodepools.0.privateIpAddress 485 | label: "Private IP Address" 486 | default: "" 487 | type: string 488 | description: "Specify a static private IP address for the machine" 489 | show_if: cloudprovider=azure 490 | group: "Nodepools" 491 | - variable: nodepools.0.resourceGroup 492 | label: "Resource Group" 493 | default: docker-machine 494 | type: string 495 | description: "Azure Resource Group name (will be created if missing)" 496 | show_if: cloudprovider=azure 497 | group: "Nodepools" 498 | - variable: nodepools.0.size 499 | label: "Size" 500 | default: "Standard_D2_v2" 501 | type: string 502 | description: "Size for Azure Virtual Machine" 503 | show_if: cloudprovider=azure 504 | group: "Nodepools" 505 | - variable: nodepools.0.sshUser 506 | label: "SSH Username" 507 | default: docker-user 508 | type: string 509 | description: "Username for SSH login" 510 | show_if: cloudprovider=azure 511 | group: "Nodepools" 512 | - variable: nodepools.0.staticPublicIp 513 | label: "Static Public IP" 514 | default: false 515 | type: boolean 516 | description: "Assign a static public IP address to the machine" 517 | show_if: cloudprovider=azure 518 | group: "Nodepools" 519 | - variable: nodepools.0.storageType 520 | label: "Storage Account" 521 | default: "Standard_LRS" 522 | type: string 523 | description: "Type of Storage Account to host the OS Disk for the machine" 524 | show_if: cloudprovider=azure 525 | group: "Nodepools" 526 | - variable: nodepools.0.subnet 527 | label: "Subnet" 528 | default: docker-machine 529 | type: string 530 | description: "Azure Subnet Name to be used within the Virtual Network" 531 | show_if: cloudprovider=azure 532 | group: "Nodepools" 533 | - variable: nodepools.0.subnetPrefix 534 | label: "Subnet Prefix" 535 | default: "192.168.0.0/16" 536 | type: string 537 | description: "Private CIDR block to be used for the new subnet, should comply RFC 1918" 538 | show_if: cloudprovider=azure 539 | group: "Nodepools" 540 | - variable: nodepools.0.updateDomainCount 541 | label: "Update Domain Count" 542 | default: "" 543 | type: string 544 | description: "Update domain count to use for availability set" 545 | show_if: cloudprovider=azure 546 | group: "Nodepools" 547 | - variable: nodepools.0.usePrivateIp 548 | label: "Use Private IP" 549 | default: false 550 | type: boolean 551 | description: "Azure Subnet Name to be used within the Virtual Network" 552 | show_if: cloudprovider=azure 553 | group: "Nodepools" 554 | - variable: nodepools.0.vnet 555 | label: "Vnet" 556 | default: "docker-machine-vnet" 557 | type: string 558 | description: "Azure Virtual Network name to connect the virtual machine (in [resourcegroup:]name format)" 559 | show_if: cloudprovider=azure 560 | group: "Nodepools" 561 | --------------------------------------------------------------------------------