Skip to content

Commit

Permalink
minor updates and added support for pulling from ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Dec 15, 2023
1 parent a534ac9 commit 0456c4f
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 116 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Release Charts

name: Release, Build, and Push Chart
on:
push:
branches:
Expand All @@ -9,17 +8,44 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout Repository
uses: actions/checkout@v4

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
- name: Run Helm Chart Releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Setup Helm
uses: azure/setup-helm@v3

- name: Package Helm Chart
run: |
cd charts/cluster-templates
helm package .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get Chart Information
id: chart_info
run: |
chart_file=$(find . -name '*.tgz' -type f)
chart_filename=${chart_file##*/}
chart_tag=${chart_filename##*-}
chart_tag=${chart_tag%.tgz}
echo ::set-output name=chart_filename::$chart_filename
echo ::set-output name=chart_tag::$chart_tag
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Push Helm Chart Release to GitHub Container Registry
run: |
docker tag ${{ steps.chart_info.outputs.chart_filename }} ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${{ steps.chart_info.outputs.chart_tag }}
docker push ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${{ steps.chart_info.outputs.chart_tag }}
6 changes: 3 additions & 3 deletions charts/cluster-templates/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v2
name: rancher-cluster-templates
description: RGS - Hardened Rancher Cluster Templates
description: Rancher Cluster Templates - Hardened by Rancher Government Solutions (RGS)
icon: https://raw.githubusercontent.com/rancherfederal/carbide-docs/main/static/img/carbide-logo.svg
type: application
version: 0.3.1
appVersion: 0.3.1
version: 0.3.2
appVersion: 0.3.2
annotations:
catalog.cattle.io/type: cluster-template
catalog.cattle.io/namespace: fleet-default
2 changes: 1 addition & 1 deletion charts/cluster-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Type | Chart Version | App Version |
| :---------: | :-----------: | :---------: |
| application | `v0.3.1` | `v0.3.1` |
| application | `v0.3.2` | `v0.3.2` |

⚠️ This project is still in active development. As we continued to develop it, there will be breaking changes. ⚠️

Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-templates/app-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Type | Chart Version | App Version |
| :---------: | :-----------: | :---------: |
| application | `v0.3.1` | `v0.3.1` |
| application | `v0.3.2` | `v0.3.2` |

⚠️ This project is still in active development. As we continued to develop it, there will be breaking changes. ⚠️

Expand Down
224 changes: 120 additions & 104 deletions charts/cluster-templates/questions.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
questions:
# cluster values
- variable: cluster.name
default: mycluster
description: 'Specify the name of the cluster'
description: 'Name of the Cluster'
label: 'Cluster Name'
required: true
type: string
group: 'General'
group: 'Cluster Options'
- variable: cloudCredentialSecretName
default:
description: 'CloudCredentialName for provisioning cluster'
Expand All @@ -20,9 +21,9 @@ questions:
required: true
options:
- amazonec2
- harvester
- azure
- digitalocean
- harvester
- vsphere
- custom
group: 'General'
Expand All @@ -39,46 +40,6 @@ questions:
- v1.25.16+rke2r1
- v1.24.17+rke2r1
group: 'General'
- variable: localClusterAuthEndpoint.enabled
default: false
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'
label: 'Auth Endpoint FQDN'
type: hostname
group: 'Auth Access Endpoint'
- variable: localClusterAuthEndpoint.caCerts
default:
label: 'Auth Endpoint Cacerts'
description: 'Local Auth Access Endpoint CACerts'
type: multiline
group: 'Auth Access Endpoint'
- variable: addons.monitoring.enabled
default: false
label: 'Enable Monitoring'
description: 'Enable Rancher Monitoring'
type: boolean
group: 'Monitoring'
show_subquestion_if: true
subquestions:
- variable: monitoring.version
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:
label: 'Monitoring Values'
description: 'Custom monitoring chart values'
type: multiline
group: 'Monitoring'
- variable: nodepools.0.name
default:
description: 'Specify nodepool name'
Expand Down Expand Up @@ -113,7 +74,7 @@ questions:
type: boolean
show_if: cloudprovider=amazonec2 || cloudprovider=vsphere || cloudprovider=azure || cloudprovider=digitalocean || cloudprovider=harvester
group: 'Nodepools'
# amazonec2
# amazonec2 nodepool(s) values
- variable: nodepools.0.region
label: 'Region'
default: us-east-1
Expand Down Expand Up @@ -189,7 +150,64 @@ questions:
type: string
description: 'Using existing security groups'
group: 'Nodepools'
# vsphere
# harvester nodepool(s) values
- 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'
# vsphere nodepool(s) values
- variable: nodepools.0.vcenter
label: 'vSphere IP/hostname'
default: ''
Expand Down Expand Up @@ -286,64 +304,7 @@ 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'
# digitalocean
# digitalocean nodepool(s) values
- variable: nodepools.0.image
label: 'Image'
default: ubuntu-20-04-x64
Expand Down Expand Up @@ -414,7 +375,7 @@ questions:
description: 'SSH username'
show_if: cloudprovider=digitalocean
group: 'Nodepools'
# azure
# azure nodepool(s) values
- variable: nodepools.0.availabilitySet
label: 'Availability Set'
default: docker-machine
Expand Down Expand Up @@ -560,3 +521,58 @@ questions:
description: 'Azure Virtual Network name to connect the virtual machine (in [resourcegroup:]name format)'
show_if: cloudprovider=azure
group: 'Nodepools'
# addons values
- variable: addons.monitoring.enabled
default: false
label: 'Enable Monitoring'
description: 'Enable Rancher Monitoring'
type: boolean
group: 'Cluster Addons'
show_subquestion_if: true
subquestions:
- variable: addons.monitoring.version
label: 'Monitoring Version'
description: 'Specify the Rancher Monitoring Chart Version (defaults to latest)'
type: string
group: 'Cluster Addons'
- variable: addons.monitoring.values
label: 'Monitoring Values'
description: 'Specify the Rancher Monitoring Chart Values'
type: multiline
group: 'Cluster Addons'
- variable: addons.longhorn.enabled
default: false
label: 'Enable Longhorn'
description: 'Enable Rancher Longhorn'
type: boolean
group: 'Cluster Addons'
show_subquestion_if: true
subquestions:
- variable: addons.longhorn.version
label: 'Longhorn Version'
description: 'Specify the Rancher Longhorn Chart Version (defaults to latest)'
type: string
group: 'Cluster Addons'
- variable: addons.longhorn.values
label: 'Longhorn Values'
description: 'Specify the Rancher Longhorn Chart Values'
type: multiline
group: 'Cluster Addons'
- variable: addons.neuvector.enabled
default: false
label: 'Enable NeuVector'
description: 'Enable Rancher NeuVector'
type: boolean
group: 'Cluster Addons'
show_subquestion_if: true
subquestions:
- variable: addons.neuvector.version
label: 'NeuVector Version'
description: 'Specify the Rancher NeuVector Chart Version (defaults to latest)'
type: string
group: 'Cluster Addons'
- variable: addons.neuvector.values
label: 'NeuVector Values'
description: 'Specify the Rancher NeuVector Chart Values'
type: multiline
group: 'Cluster Addons'
Binary file not shown.

0 comments on commit 0456c4f

Please sign in to comment.