Skip to content

Commit

Permalink
more chart updates and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Nov 28, 2023
1 parent 97a3631 commit 293ccc3
Show file tree
Hide file tree
Showing 15 changed files with 479 additions and 118 deletions.
9 changes: 8 additions & 1 deletion charts/cluster-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

## Important Notes

### Verified and Tested Providers:
### Actively Maintained Providers

- AWS Commercial
- AWS GovCloud
- Custom

### Verified/Tested Providers:

- AWS Commercial
- AWS GovCloud
- Rancher Harvester
- VMWare vSphere
- Custom

## Installing the Chart

Expand Down
47 changes: 47 additions & 0 deletions charts/cluster-templates/app-readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Rancher Cluster Templates Helm Chart

| Type | Chart Version | App Version |
| :-----: | :-----------: | :---------: |
| library | `v0.2.0` | `v0.2.0` |

## Important Notes

### Actively Maintained Providers

- AWS Commercial
- AWS GovCloud
- Custom

### Verified/Tested Providers:

- AWS Commercial
- AWS GovCloud
- Rancher Harvester
- VMWare vSphere
- Custom

## Installing the Chart

```bash
helm repo add cluster-templates https://rancherfederal.github.io/rancher-cluster-templates
helm upgrade -i cluster cluster-templates/rancher-cluster-templates -n fleet-default -f values.yaml
```

```bash
helm status cluster -n fleet-default
```

## Uninstalling the Chart

```bash
helm delete cluster -n fleet-default
```

## Example Configurations

- [Amazon EC2](values-aws.yaml)
- [Example](../../examples/aws/values-aws.yaml)
- [Microsoft Azure](values-azure.yaml)
- [Digital Ocean](values-do.yaml)
- [Rancher Harvester](values-harvester.yaml)
- [VMWare vSphere](values-vsphere.yaml)
46 changes: 22 additions & 24 deletions charts/cluster-templates/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,48 @@ questions:
required: true
options:
- amazonec2
- digitalocean
- azure
- vsphere
- digitalocean
- harvester
- vsphere
- custom
group: 'General'
- variable: kubernetesVersion
default: v1.22.6+rke2r1
description: 'Specify Kubernetes version'
default: v1.26.10+rke2r2
description: 'Specify Kubernetes Version'
label: 'Kubernetes Version'
type: enum
required: true
options:
- v1.21.6+rke2r1
- v1.21.7+rke2r1
- v1.21.8+rke2r1
- v1.21.9+rke2r1
- v1.22.5+rke2r1
- v1.21.6+rke2r1
- v1.26.10+rke2r2
- v1.25.15+rke2r2
- v1.24.17+rke2r2
- v1.23.17+rke2r2
group: 'General'
- variable: localClusterAuthEndpoint.enabled
default: false
label: 'Local Auth endpoint'
description: 'Enable local auth access endpoint'
label: 'Local Auth Access Endpoint'
description: 'Enable Local Auth Access Endpoint'
type: boolean
group: 'Auth Access Endpoint'
show_subquestion_if: true
subquestions:
- variable: localClusterAuthEndpoint.fqdn
default:
description: 'Local auth access endpoint FQDN'
description: 'Local Auth Access Endpoint FQDN'
label: 'Auth Endpoint FQDN'
type: hostname
group: 'Auth Access Endpoint'
- variable: localClusterAuthEndpoint.caCerts
default:
label: 'Auth Endpoint Cacerts'
description: 'Local auth access endpoint CACerts'
description: 'Local Auth Access Endpoint CACerts'
type: multiline
group: 'Auth Access Endpoint'
- variable: monitoring.enabled
- variable: addons.monitoring.enabled
default: false
label: 'Enable monitoring'
description: 'Enable monitoring'
label: 'Enable Monitoring'
description: 'Enable Rancher Monitoring'
type: boolean
group: 'Monitoring'
show_subquestion_if: true
Expand Down Expand Up @@ -114,20 +112,20 @@ questions:
type: boolean
show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester
group: 'Nodepools'
# EC2
# amazonec2
- variable: nodepools.0.region
label: 'Region'
default: us-west-2
default: us-east-1
type: string
description: 'AWS EC2 region'
description: 'AWS EC2 Region'
required: true
show_if: cloudprovider=amazonec2
group: 'Nodepools'
- variable: nodepools.0.zone
label: 'Zone'
default: a
type: string
description: 'AWS EC2 zone'
description: 'AWS EC2 Zone'
required: true
show_if: cloudprovider=amazonec2
group: 'Nodepools'
Expand Down Expand Up @@ -287,7 +285,7 @@ questions:
description: "'vSphere vApp IP protocol for this deployment. Supported values are: IPv4 and IPv6'"
show_if: cloudprovider=vsphere
group: 'Nodepools'
# HARVESTER
# harvester
- variable: nodepools.0.diskSize
label: 'Disk Size'
default: 40
Expand Down Expand Up @@ -344,7 +342,7 @@ questions:
description: 'SSH username'
show_if: cloudprovider=harvester
group: 'Nodepools'
# DO
# digitalocean
- variable: nodepools.0.image
label: 'Image'
default: ubuntu-20-04-x64
Expand Down Expand Up @@ -415,7 +413,7 @@ questions:
description: 'SSH username'
show_if: cloudprovider=digitalocean
group: 'Nodepools'
# Azure
# azure
- variable: nodepools.0.availabilitySet
label: 'Availability Set'
default: docker-machine
Expand Down
6 changes: 4 additions & 2 deletions charts/cluster-templates/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Congratulations! You've successfully deployed a cluster using the Rancher Cluster Templates (by RGS).
Congratulations! You've successfully deployed a cluster using the Helm Chart for Rancher Cluster Templates.

Please be patient for the cluster to provision and deploy on your infrastructure.

View the Github: https://github.com/rancherfederal/rancher-cluster-templates
View the Cluster -> https://{{ .Values.rancher.cattle.url }}/dashboard/c/_/manager/provisioning.cattle.io.cluster/fleet-default/{{ .Values.cluster.name }}

View the Docs -> https://github.com/rancherfederal/rancher-cluster-templates
62 changes: 62 additions & 0 deletions charts/cluster-templates/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "rancher-cluster-templates.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "rancher-cluster-templates.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "rancher-cluster-templates.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "rancher-cluster-templates.labels" -}}
helm.sh/chart: {{ include "rancher-cluster-templates.chart" . }}
{{ include "rancher-cluster-templates.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "rancher-cluster-templates.selectorLabels" -}}
app.kubernetes.io/name: {{ include "rancher-cluster-templates.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "rancher-cluster-templates.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "rancher-cluster-templates.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit 293ccc3

Please sign in to comment.