diff --git a/README.md b/README.md index 8418b8c..5098773 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ rke: foo: bar # enable local auth endpoint - localClusterAuthEndpoint: + localClusterAuthEndpoint: enabled: false # specify fqdn of local access endpoint # fqdn: foo.bar.example @@ -123,8 +123,8 @@ rke: # caCerts: "" # Specify upgrade options - upgradeStrategy: - controlPlaneDrainOptions: + upgradeStrategy: + controlPlaneDrainOptions: enabled: false # deleteEmptyDirData: false # disableEviction: false @@ -155,6 +155,8 @@ For different cloud provider options on nodepools, checkout [DigitalOcean](./charts/values-do.yaml) +[Harvester](./charts/values-harvester.yaml) + [Vsphere](./charts/values-vsphere.yaml) [Azure](./charts/values-azure.yaml) @@ -177,4 +179,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/charts/README.md b/charts/README.md index 34bcc7d..8aa596a 100644 --- a/charts/README.md +++ b/charts/README.md @@ -18,4 +18,6 @@ For different cloud provider drivers: [Digitalocean](./values-do.yaml) -[Azure](./values-azure.yaml) \ No newline at end of file +[Harvester](./values-harvester.yaml) + +[Azure](./values-azure.yaml) diff --git a/charts/questions.yaml b/charts/questions.yaml index bdbfec5..6480b61 100644 --- a/charts/questions.yaml +++ b/charts/questions.yaml @@ -7,7 +7,7 @@ questions: type: string group: "General" - variable: cloudCredentialSecretName - default: + default: description: "CloudCredentialName for provisioning cluster" label: "CloudCredential Name" type: cloudcredential @@ -23,20 +23,22 @@ questions: - digitalocean - azure - vsphere + - harvester - custom group: "General" - variable: kubernetesVersion - default: v1.21.3-rc5+rke2r2 + default: v1.22.6+rke2r1 description: "Specify Kubernetes version" label: "Kubernetes Version" type: enum required: true options: - - v1.18.17+rke2r1 - - v1.19.9+rke2r1 - - v1.20.5+rke2r1 - - v1.20.6+rke2r1 - - v1.21.3-rc5+rke2r2 + - v1.21.6+rke2r1 + - v1.21.7+rke2r1 + - v1.21.8+rke2r1 + - v1.21.9+rke2r1 + - v1.22.5+rke2r1 + - v1.21.6+rke2r1 group: "General" - variable: rke.localClusterAuthEndpoint.enabled default: false @@ -47,13 +49,13 @@ questions: show_subquestion_if: true subquestions: - variable: rke.localClusterAuthEndpoint.fqdn - default: + default: description: "Local auth access endpoint FQDN" label: "Auth Endpoint FQDN" type: hostname group: "Auth Access Endpoint" - variable: rke.localClusterAuthEndpoint.caCerts - default: + default: label: "Auth Endpoint Cacerts" description: "Local auth access endpoint CACerts" type: multiline @@ -67,53 +69,53 @@ questions: show_subquestion_if: true subquestions: - variable: monitoring.version - default: + default: label: "Monitoring Version" description: "Choose chart version of monitoring. If empty latest version will be installed" type: string group: "Monitoring" - variable: monitoring.values - default: + default: label: "Monitoring Values" description: "Custom monitoring chart values" type: multiline group: "Monitoring" -- variable: nodepool.name - default: +- variable: nodepools.0.name + default: description: "Specify nodepool name" type: string label: "Nodepool name" required: true - show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean + show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester group: "Nodepools" -- variable: nodepool.quantity +- variable: nodepools.0.quantity default: 1 description: "Specify node count" type: int required: true - show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean + show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester label: "Node count" group: "Nodepools" -- variable: nodepool.etcd +- variable: nodepools.0.etcd default: true label: etcd type: boolean - show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean + show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester group: "Nodepools" -- variable: nodepool.worker +- variable: nodepools.0.worker default: true label: worker type: boolean - show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean + show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester group: "Nodepools" -- variable: nodepool.controlplane +- variable: nodepools.0.controlplane label: controlplane default: true type: boolean - show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean + show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester group: "Nodepools" # EC2 -- variable: nodepool.region +- variable: nodepools.0.region label: "Region" default: us-west-2 type: string @@ -121,7 +123,7 @@ questions: required: true show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.zone +- variable: nodepools.0.zone label: "Zone" default: a type: string @@ -129,7 +131,7 @@ questions: required: true show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.instanceType +- variable: nodepools.0.instanceType label: "Instance Type" default: t3a.medium type: string @@ -137,14 +139,14 @@ questions: required: true show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.rootSize +- variable: nodepools.0.rootSize label: "Root Disk Size" default: 16g type: string description: "AWS EC2 root disk size" show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.vpcId +- variable: nodepools.0.vpcId label: "VPC/SUBNET" default: "" type: string @@ -152,28 +154,28 @@ questions: required: true show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.iamInstanceProfile +- variable: nodepools.0.iamInstanceProfile label: "Instance Profile Name" default: "" type: string description: "AWS EC2 Instance Profile Name" show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.ami +- variable: nodepools.0.ami label: "AMI ID" default: "" type: string description: "AWS EC2 AMI ID" show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.sshUser +- variable: nodepools.0.sshUser label: "SSH Username for AMI" default: ubuntu type: string description: "AWS EC2 SSH Username for AMI" show_if: cloudprovider=amazonec2 group: "Nodepools" -- variable: nodepool.createSecurityGroup +- variable: nodepools.0.createSecurityGroup label: "Create security group" default: true type: boolean @@ -182,14 +184,14 @@ questions: group: "Nodepools" show_subquestion_if: false subquestions: - - variable: nodepool.securityGroups + - variable: nodepools.0.securityGroups label: "Security groups" - default: + default: type: string description: "Using existing security groups" group: "Nodepools" # vsphere -- variable: nodepool.vcenter +- variable: nodepools.0.vcenter label: "vSphere IP/hostname" default: "" type: hostname @@ -197,7 +199,7 @@ questions: required: true show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.datacenter +- variable: nodepools.0.datacenter label: "Vsphere Datacenter" default: "" type: hostname @@ -205,7 +207,7 @@ questions: required: true show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.datastore +- variable: nodepools.0.datastore label: "Vsphere Datastore" default: "" type: string @@ -213,7 +215,7 @@ questions: required: true show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.datastoreCluster +- variable: nodepools.0.datastoreCluster label: "Vsphere DatastoreCluster" default: "" type: string @@ -221,61 +223,61 @@ questions: required: true show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.diskSize +- variable: nodepools.0.diskSize label: "Disk Size" default: "20480" type: string description: "vSphere size of disk for docker VM (in MB)" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.memorySize +- variable: nodepools.0.memorySize label: "Memory Size" default: "2048" type: string description: "vSphere size of memory for docker VM (in MB)" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.network +- variable: nodepools.0.network label: "Network" default: "" type: string description: "vSphere network where the virtual machine will be attached" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.pool +- variable: nodepools.0.pool label: "Resource Pool" default: "" type: string description: "vSphere resource pool for docker VM" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.sshPort +- variable: nodepools.0.sshPort label: "SSH Port" default: "22" type: string description: "If using a non-B2D image you can specify the ssh port" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.sshUserGroup +- variable: nodepools.0.sshUserGroup label: "SSH User Group" default: docker:staff type: hostname description: "If using a non-B2D image the uploaded keys will need chown'ed, defaults to staff e.g. docker:staff" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.vappIpallocationpolicy +- variable: nodepools.0.vappIpallocationpolicy label: "IP allocation policy" default: "" type: enum options: - dhcp - - fixed + - fixed - transient - fixedAllocated description: "'vSphere vApp IP allocation policy. Supported values are: dhcp, fixed, transient and fixedAllocated'" show_if: cloudprovider=vsphere group: "Nodepools" -- variable: nodepool.vappIpprotocol +- variable: nodepools.0.vappIpprotocol label: "IP protocol" default: "" type: enum @@ -285,71 +287,128 @@ questions: description: "'vSphere vApp IP protocol for this deployment. Supported values are: IPv4 and IPv6'" show_if: cloudprovider=vsphere group: "Nodepools" +# HARVESTER +- variable: nodepools.0.diskSize + label: "Disk Size" + default: 40 + type: string + description: "Size of virtual hard disk in GB" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.diskBus + label: "Disk Bus Type" + default: string + type: virtio + description: "harvester disk type" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.cpuCount + label: "CPUs" + default: 2 + type: string + description: "number of CPUs for your VM" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.memorySize + label: "Memory Size" + default: 4 + type: string + description: "Memory for VM in GB (available RAM)" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.networkName + label: "Network" + default: default/network-name-1 + type: string + description: "Name of vlan network in harvester" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.imageName + label: "Name of Image" + default: default/image-rand + type: string + description: "Name of image in harvester" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.vmNamespace + label: "vm Namespace" + default: default + type: string + description: "namespace to deploy the VM to" + show_if: cloudprovider=harvester + group: "Nodepools" +- variable: nodepools.0.sshUser + label: "SSH User" + default: ubuntu + type: string + description: "SSH username" + show_if: cloudprovider=harvester + group: "Nodepools" # DO -- variable: nodepool.image +- variable: nodepools.0.image label: "Image" default: ubuntu-20-04-x64 type: string description: "Digital Ocean Image" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.backups +- variable: nodepools.0.backups label: "Backup" default: false type: boolean description: "enable backups for droplet" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.ipv6 +- variable: nodepools.0.ipv6 label: "IPv6" default: false type: boolean description: "enable ipv6 for droplet" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.monitoring +- variable: nodepools.0.monitoring label: "Monitoring" default: false type: boolean description: "enable monitoring for droplet" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.privateNetworking +- variable: nodepools.0.privateNetworking label: "Private Networking" default: false type: boolean description: "enable private networking for droplet" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.region +- variable: nodepools.0.region label: "Region" default: sfo3 type: string description: "Digital Ocean region" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.size +- variable: nodepools.0.size label: "Size" default: s-4vcpu-8gb type: string description: "Digital Ocean size" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.userdata +- variable: nodepools.0.userdata label: "Userdata" - default: + default: type: multiline description: "File contents for userdata" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.sshPort +- variable: nodepools.0.sshPort label: "SSH Port" default: 22 type: string description: "SSH port" show_if: cloudprovider=digitalocean group: "Nodepools" -- variable: nodepool.sshUser +- variable: nodepools.0.sshUser label: "SSH User" default: root type: string @@ -357,28 +416,28 @@ questions: show_if: cloudprovider=digitalocean group: "Nodepools" # Azure -- variable: nodepool.availabilitySet +- variable: nodepools.0.availabilitySet label: "Availability Set" default: docker-machine type: string description: "Azure Availability Set to place the virtual machine into" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.diskSize +- variable: nodepools.0.diskSize label: "Disk Size" default: "" type: string description: "Disk size if using managed disk(Gib)" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.dns +- variable: nodepools.0.dns label: "DNS" default: "" type: string description: "A unique DNS label for the public IP adddress" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.environment +- variable: nodepools.0.environment label: "Environment" default: AzurePublicCloud type: enum @@ -390,115 +449,115 @@ questions: description: "Azure environment" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.faultDomainCount +- variable: nodepools.0.faultDomainCount label: "Fault Domain Count" default: "" type: string description: "Fault domain count to use for availability set" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.image +- variable: nodepools.0.image label: "Image" default: canonical:UbuntuServer:18.04-LTS:latest type: string description: "Azure virtual machine OS image" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.location +- variable: nodepools.0.location label: "Location" default: westus type: string description: "Azure region to create the virtual machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.managedDisks +- variable: nodepools.0.managedDisks label: "Managed Disks" default: false type: boolean description: "Configures VM and availability set for managed disks" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.noPublicIp +- variable: nodepools.0.noPublicIp label: "No Public IP" default: false type: boolean description: "Do not create a public IP address for the machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.privateIpAddress +- variable: nodepools.0.privateIpAddress label: "Private IP Address" default: "" type: string description: "Specify a static private IP address for the machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.resourceGroup +- variable: nodepools.0.resourceGroup label: "Resource Group" default: docker-machine type: string description: "Azure Resource Group name (will be created if missing)" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.size +- variable: nodepools.0.size label: "Size" default: "Standard_D2_v2" type: string description: "Size for Azure Virtual Machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.sshUser +- variable: nodepools.0.sshUser label: "SSH Username" default: docker-user type: string description: "Username for SSH login" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.staticPublicIp +- variable: nodepools.0.staticPublicIp label: "Static Public IP" default: false type: boolean description: "Assign a static public IP address to the machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.storageType +- variable: nodepools.0.storageType label: "Storage Account" default: "Standard_LRS" type: string description: "Type of Storage Account to host the OS Disk for the machine" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.subnet +- variable: nodepools.0.subnet label: "Subnet" default: docker-machine type: string description: "Azure Subnet Name to be used within the Virtual Network" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.subnetPrefix +- variable: nodepools.0.subnetPrefix label: "Subnet Prefix" default: "192.168.0.0/16" type: string description: "Private CIDR block to be used for the new subnet, should comply RFC 1918" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.updateDomainCount +- variable: nodepools.0.updateDomainCount label: "Update Domain Count" default: "" type: string description: "Update domain count to use for availability set" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.usePrivateIp +- variable: nodepools.0.usePrivateIp label: "Use Private IP" default: false type: boolean description: "Azure Subnet Name to be used within the Virtual Network" show_if: cloudprovider=azure group: "Nodepools" -- variable: nodepool.vnet +- variable: nodepools.0.vnet label: "Vnet" default: "docker-machine-vnet" type: string description: "Azure Virtual Network name to connect the virtual machine (in [resourcegroup:]name format)" show_if: cloudprovider=azure - group: "Nodepools" \ No newline at end of file + group: "Nodepools" diff --git a/charts/templates/cluster.yaml b/charts/templates/cluster.yaml index 47efe27..fc646e3 100644 --- a/charts/templates/cluster.yaml +++ b/charts/templates/cluster.yaml @@ -8,7 +8,7 @@ metadata: {{- if .Values.cluster.annotations }} annotations: {{ toYaml .Values.cluster.annotations | indent 4 }} - {{- end }} + {{- end }} name: {{ .Values.cluster.name }} namespace: fleet-default spec: @@ -36,6 +36,8 @@ spec: kind: Amazonec2Config {{- else if eq $.Values.cloudprovider "vsphere" }} kind: VmwarevsphereConfig + {{- else if eq $.Values.cloudprovider "harvester" }} + kind: HarvesterConfig {{- else if eq $.Values.cloudprovider "digitalocean" }} kind: DigitaloceanConfig {{- else if eq $.Values.cloudprovider "azure" }} @@ -45,16 +47,16 @@ spec: paused: {{ $nodepool.paused }} displayName: {{ $nodepool.displayName }} {{- if $nodepool.rollingUpdate }} - rollingUpdate: + rollingUpdate: maxUnavailable: {{ $nodepool.rollingUpdate.maxUnavailable }} maxSurge: {{ $nodepool.rollingUpdate.maxSurge }} {{- end }} {{- if $nodepool.machineDeploymentLabels }} - machineDeploymentLabels: + machineDeploymentLabels: {{ toYaml $nodepool.machineDeploymentLabels | indent 8 }} {{- end }} {{- if $nodepool.machineDeploymentAnnotations }} - machineDeploymentAnnotations: + machineDeploymentAnnotations: {{ toYaml $nodepool.machineDeploymentAnnotations | indent 8 }} {{- end }} {{- end }} @@ -71,6 +73,8 @@ spec: kind: Amazonec2Config {{- else if eq $.Values.cloudprovider "vsphere" }} kind: VmwarevsphereConfig + {{- else if eq $.Values.cloudprovider "harvester" }} + kind: HarvesterConfig {{- else if eq $.Values.cloudprovider "digitalocean" }} kind: DigitaloceanConfig {{- else if eq $.Values.cloudprovider "azure" }} @@ -80,16 +84,16 @@ spec: paused: {{ $nodepool.paused }} displayName: {{ $nodepool.displayName }} {{- if $nodepool.rollingUpdate }} - rollingUpdate: + rollingUpdate: maxUnavailable: {{ $nodepool.rollingUpdate.maxUnavailable }} maxSurge: {{ $nodepool.rollingUpdate.maxSurge }} {{- end }} {{- if $nodepool.machineDeploymentLabels }} - machineDeploymentLabels: + machineDeploymentLabels: {{ toYaml $nodepool.machineDeploymentLabels | indent 8 }} {{- end }} {{- if $nodepool.machineDeploymentAnnotations }} - machineDeploymentAnnotations: + machineDeploymentAnnotations: {{ toYaml $nodepool.machineDeploymentAnnotations | indent 8 }} {{- end }} {{- end }} @@ -136,7 +140,7 @@ spec: # Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert # tls-san: [] - # workerConfig: + # workerConfig: # - config: # Node name # node-name: "" @@ -160,14 +164,14 @@ spec: # cloud-provider-name: "" # Cloud provider configuration file path # cloud-provider-config: "" - {{- if .Values.rke.localClusterAuthEndpoint.enabled }} + {{- if .Values.rke.localClusterAuthEndpoint.enabled }} localClusterAuthEndpoint: enabled: {{ .Values.rke.localClusterAuthEndpoint.enabled }} fqdn: {{ .Values.rke.localClusterAuthEndpoint.fqdn }} caCerts: {{ .Values.rke.localClusterAuthEndpoint.caCerts }} {{- end }} upgradeStrategy: - controlPlaneDrainOptions: + controlPlaneDrainOptions: enabled: false # deleteEmptyDirData: false # disableEviction: false @@ -189,4 +193,3 @@ spec: agentEnvVars: {{ toYaml .Values.agentEnvs | indent 4 }} {{- end }} - diff --git a/charts/templates/nodeconfig-do.yaml b/charts/templates/nodeconfig-do.yaml index 22f0f8b..0a38fea 100644 --- a/charts/templates/nodeconfig-do.yaml +++ b/charts/templates/nodeconfig-do.yaml @@ -58,5 +58,5 @@ sshPort: {{ $nodepool.sshPort | quote }} sshUser: {{ $nodepool.sshUser }} tags: {{ $nodepool.tags }} userdata: {{ $nodepool.userdata }} -{{- end}} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/templates/nodeconfig-harvester.yaml b/charts/templates/nodeconfig-harvester.yaml new file mode 100644 index 0000000..64baf13 --- /dev/null +++ b/charts/templates/nodeconfig-harvester.yaml @@ -0,0 +1,52 @@ +{{- if eq .Values.cloudprovider "harvester" }} +{{- range $index, $nodepool := .Values.nodepools }} +apiVersion: rke-machine-config.cattle.io/v1 +kind: HarvesterConfig +metadata: + name: {{ $nodepool.name }} + namespace: fleet-default +common: +{{- if $nodepool.labels }} + labels: +{{ toYaml $nodepool.labels | indent 4 }} +{{- end }} +{{- if $nodepool.taints }} + taints: +{{ toYaml $nodepool.taints | indent 4 }} +{{- end }} +diskSize: {{ $nodepool.diskSize | quote }} +diskBus: {{ $nodepool.diskBus }} +cpuCount: {{ $nodepool.cpuCount | quote }} +memorySize: {{ $nodepool.memorySize | quote }} +networkName: {{ $nodepool.networkName }} +imageName: {{ $nodepool.imageName }} +vmNamespace: {{ $nodepool.vmNamespace }} +sshUser: {{ $nodepool.sshUser }} +--- +{{- end }} +{{ $nodepool := .Values.nodepool }} +{{- if $nodepool }} +apiVersion: rke-machine-config.cattle.io/v1 +kind: HarvesterConfig +metadata: + name: {{ $nodepool.name }} + namespace: fleet-default +common: +{{- if $nodepool.labels }} + labels: +{{ toYaml $nodepool.labels | indent 4 }} +{{- end }} +{{- if $nodepool.taints }} + taints: +{{ toYaml $nodepool.taints | indent 4 }} +{{- end }} +diskSize: {{ $nodepool.diskSize | quote }} +diskBus: {{ $nodepool.diskBus }} +cpuCount: {{ $nodepool.cpuCount | quote }} +memorySize: {{ $nodepool.memorySize | quote }} +networkName: {{ $nodepool.networkName }} +imageName: {{ $nodepool.imageName }} +vmNamespace: {{ $nodepool.vmNamespace }} +sshUser: {{ $nodepool.sshUser }} +{{- end }} +{{- end }} diff --git a/charts/values-harvester.yaml b/charts/values-harvester.yaml new file mode 100644 index 0000000..b73833f --- /dev/null +++ b/charts/values-harvester.yaml @@ -0,0 +1,71 @@ +cloudprovider: harvester + +cloudCredentialSecretName: harvester + +# Specify nodepool options. Can add multiple node groups, specify etcd, controlplane and worker roles. +nodepools: +- etcd: true + controlplane: true + worker: true + + # specify node labels + labels: {} + + # specify node taints + taints: {} + + # specify nodepool size + quantity: 1 + + + # Pause node pool + # paused: false + + # specify displayName + # displayName: "" + + # specify rolling update mechanism + # rollingUpdate: + # The maximum number of machines that can be unavailable during the update. + # Value can be an absolute number (ex: 5) or a percentage of desired + # machines (ex: 10%). + # Absolute number is calculated from percentage by rounding down. + # This can not be 0 if MaxSurge is 0. + # Defaults to 0. + # Example: when this is set to 30%, the old MachineSet can be scaled + # down to 70% of desired machines immediately when the rolling update + # starts. Once new machines are ready, old MachineSet can be scaled + # down further, followed by scaling up the new MachineSet, ensuring + # that the total number of machines available at all times + # during the update is at least 70% of desired machines. + # maxUnavailable: "5" + # The maximum number of machines that can be scheduled above the + # desired number of machines. + # Value can be an absolute number (ex: 5) or a percentage of + # desired machines (ex: 10%). + # This can not be 0 if MaxUnavailable is 0. + # Absolute number is calculated from percentage by rounding up. + # Defaults to 1. + # Example: when this is set to 30%, the new MachineSet can be scaled + # up immediately when the rolling update starts, such that the total + # number of old and new machines do not exceed 130% of desired + # machines. Once old machines have been killed, new MachineSet can + # be scaled up further, ensuring that total number of machines running + # at any time during the update is at most 130% of desired machines. + # maxSurge: "1" + + # specify machineDeployment Labels + # machineDeploymentLabels: {} + + # specify machineDeployment annotations + # machineDeploymentAnnotations: {} + + name: harvester-nodepool-1 + diskSize: 40 + diskBus: virtio + cpuCount: 4 + memorySize: 8 + networkName: default/network-name-1 + imageName: default/image-rand + vmNamespace: default + sshUser: ubuntu diff --git a/charts/values.yaml b/charts/values.yaml index 66c057e..81db0ef 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -20,7 +20,7 @@ kubernetesVersion: "" # general RKE options rke: # enable local auth endpoint - localClusterAuthEndpoint: + localClusterAuthEndpoint: enabled: false # specify fqdn of local access endpoint # fqdn: foo.bar.example @@ -28,7 +28,7 @@ rke: # caCerts: "" # specify user principal ids to be assiged as cluster members -# clusterMembers: +# clusterMembers: # - principalName: "local://u-z8zl5" # roleTemplateName: "cluster-member" @@ -40,5 +40,3 @@ monitoring: # specify cutsom values set # values: # foo: bar - - diff --git a/cluster-template-0.0.1.tgz b/cluster-template-0.0.1.tgz index d8cf28f..8435ccc 100644 Binary files a/cluster-template-0.0.1.tgz and b/cluster-template-0.0.1.tgz differ diff --git a/index.yaml b/index.yaml index b9a77b2..512375d 100644 --- a/index.yaml +++ b/index.yaml @@ -5,11 +5,11 @@ entries: catalog.cattle.io/namespace: fleet-default catalog.cattle.io/type: cluster-template apiVersion: v1 - created: "2021-08-13T10:29:10.631635-07:00" + created: "2022-02-25T15:54:51.604663-08:00" description: Cluster template for rke2 - digest: d3a3763369a72ab7f8684087039922d8c0a1af4c1fdf3e96ffdf02c5a62fecd9 + digest: d372363c814ac79e7d1f4b877e9b47ec39eaf3fde5a70137a0074dfa70e3dd2c name: cluster-template urls: - cluster-template-0.0.1.tgz version: 0.0.1 -generated: "2021-08-13T10:29:10.630636-07:00" +generated: "2022-02-25T15:54:51.600996-08:00"