Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
devpro committed Aug 17, 2023
1 parent f93d92a commit 77c9ac7
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 18 deletions.
86 changes: 69 additions & 17 deletions charts/rancher-cluster-templates/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -21,16 +21,14 @@ 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

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`
Expand All @@ -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).
2 changes: 1 addition & 1 deletion charts/rancher-cluster-templates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 77c9ac7

Please sign in to comment.