From 77c9ac704f34f0db38bbbe25fada8fc35150585b Mon Sep 17 00:00:00 2001 From: Bertrand Thomas Date: Thu, 17 Aug 2023 16:44:48 +0200 Subject: [PATCH] Updates --- charts/rancher-cluster-templates/README.md | 86 ++++++++++++++++---- charts/rancher-cluster-templates/values.yaml | 2 +- 2 files changed, 70 insertions(+), 18 deletions(-) diff --git a/charts/rancher-cluster-templates/README.md b/charts/rancher-cluster-templates/README.md index d47ec8f..a2542c9 100644 --- a/charts/rancher-cluster-templates/README.md +++ b/charts/rancher-cluster-templates/README.md @@ -1,6 +1,6 @@ # Helm chart for Rancher cluster templates -This Helm chart will create a Kubernetes cluster from Rancher through [Cluster Templates](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/manage-cluster-templates). +This Helm chart gives the possibility to create and manage a Kubernetes cluster from Rancher thanks to [Rancher Cluster Templates](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/manage-cluster-templates). ## Usage @@ -21,8 +21,6 @@ helm upgrade --install my-cluster rancher-cluster-templates -f values.yaml --nam helm uninstall my-cluster -n fleet-default ``` -## Configuration - ### Infrastructure providers 💡 Node driver must be enabled in Rancher prior to Helm chart installation @@ -30,7 +28,7 @@ helm uninstall my-cluster -n fleet-default Provider | Example | Template | Node Driver ---------------------------------|----------------------------------------------------------|---------------------------------------------------------|---------------- **Amazon Web Services (AWS)** | [values_aws](examples/values_aws.yaml) | [amazonec2config](templates/amazonec2config.yaml) | `Amazon EC2` -**Azure** | [values_azure](examples/values_azure.yaml) | [azureconfig](templates/azureconfig.yaml) | `Azure` +[**Azure**](docs/azure.md) | [values_azure](examples/values_azure.yaml) | [azureconfig](templates/azureconfig.yaml) | `Azure` **CloudScale** | [values_cloudscale](examples/values_cloudscale.yaml) | [cloudscaleconfig](templates/cloudscaleconfig.yaml) | `Cloudscale` **Digitial Ocean** | [values_digitalocean](examples/values_digitalocean.yaml) | [digitaloceanconfig](templates/digitaloceanconfig.yaml) | `DigitalOcean` **Exoscale** | [values_digitalocean](examples/values_digitalocean.yaml) | [digitaloceanconfig](templates/digitaloceanconfig.yaml) | `Exoscale` @@ -42,20 +40,74 @@ Provider | Example **Outscale** | [values_aws](examples/values_outscale.yaml) | [outscaleconfig](templates/outscaleconfig.yaml) | `Outscale` **VMware vSphere** | [values_vsphere](examples/values_vsphere.yaml) | [vsphereconfig](templates/vsphereconfig.yaml) | `vSphere` -## Contributing - -Follow the [guide](CONTRIBUTING.md). +### Automation + +This chart can be installed and managed by GitOps tools like [ArgoCD](https://github.com/devpro/helm-charts#from-argocd) and [Fleet](https://github.com/devpro/helm-charts#from-fleet). +It can also be installed in [Rancher Apps](https://github.com/devpro/helm-charts#from-rancher). + +#### Fleet example for creating RKE2 cluster in Azure + +- Git repository > `fleet.yaml` + +```yaml +helm: + repo: https://devpro.github.io/helm-charts + chart: rancher-cluster-templates + version: 0.1.1 + releaseName: rke2-azure-demo + values: + cluster: + name: "azurevm-rke2-01" + cloudprovider: azure + cloudCredentialSecretName: cattle-global-data:cc-xxxx + kubernetesVersion: "v1.24.14+rke2r1" + nodepools: + - etcd: true + controlplane: true + worker: true + quantity: 1 + name: nodepool-1 + region: westeurope + machineImage: "Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:20.04.202307240" + instanceType: Standard_DS2_v2 + storageType: Standard_LRS + sshUser: azureuser + availabilitySet: "avs-someprefix-rke2-01" + azureEnvironment: AzurePublicCloud + managedDisks: true + networkSecurityGroup: "nsg-someprefix-rke2-01" + resourceGroup: "rg-someprefix-rke2-01" + subnet: rke2 + subnetPrefix: "192.168.0.0/16" + virtualNetwork: "vnet-someprefix-rke2-01" +``` -### Going further +- Rancher > Continuous Delivery > Git Repo + +```yaml +apiVersion: fleet.cattle.io/v1alpha1 +kind: GitRepo +metadata: + name: cluster-templates + namespace: fleet-local +spec: + branch: release/demo + clientSecretName: auth-xxxx + insecureSkipTLSVerify: false + paths: + - fleet/rke2-azure-demo + repo: https://github.com/my-account/my-kubernetes-definitions.git + targets: + - clusterSelector: + matchExpressions: + - key: provider.cattle.io + operator: NotIn + values: + - harvester +``` -* Infrastructure providers - * [Azure](docs/azure.md) -* Chart installation - * [ArgoCD](https://github.com/devpro/helm-charts#from-argocd) - * [Fleet](https://github.com/devpro/helm-charts#from-fleet) - * [Rancher Apps](https://github.com/devpro/helm-charts#from-rancher) +## Going further -## Inspirations +If you feel like it, have a look at the [contibution guide](CONTRIBUTING.md). -* [bloriot/rancher-cluster-templates](https://github.com/bloriot/rancher-cluster-templates) -* [rancher/cluster-template-examples](https://github.com/rancher/cluster-template-examples) +This chart has been inspired by two examples: [bloriot/rancher-cluster-templates](https://github.com/bloriot/rancher-cluster-templates) and [rancher/cluster-template-examples](https://github.com/rancher/cluster-template-examples). diff --git a/charts/rancher-cluster-templates/values.yaml b/charts/rancher-cluster-templates/values.yaml index 54bbfe0..7e844a9 100644 --- a/charts/rancher-cluster-templates/values.yaml +++ b/charts/rancher-cluster-templates/values.yaml @@ -98,4 +98,4 @@ nodepools: [] # updateDomainCount: "5" # Azure only # usePrivateIp: false # Azure only # virtualNetwork: "vnet-AZURE_PREFIX" # Azure only - # diskIops: "1500" # Cloudscale only + # diskIops: "1500" # Outscale only