diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index baabbd7..4301db0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,5 +1,4 @@ -name: Release Charts - +name: Release, Build, and Push Chart on: push: branches: @@ -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 "$GITHUB_ACTOR@users.noreply.github.com" - - name: Run chart-releaser + - name: Run Helm Chart Releaser uses: helm/chart-releaser-action@v1.5.0 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 }} \ No newline at end of file diff --git a/charts/cluster-templates/Chart.yaml b/charts/cluster-templates/Chart.yaml index 5697196..2702c43 100644 --- a/charts/cluster-templates/Chart.yaml +++ b/charts/cluster-templates/Chart.yaml @@ -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 diff --git a/charts/cluster-templates/README.md b/charts/cluster-templates/README.md index 1c16f5a..4ba92e0 100644 --- a/charts/cluster-templates/README.md +++ b/charts/cluster-templates/README.md @@ -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. ⚠️ diff --git a/charts/cluster-templates/app-readme.md b/charts/cluster-templates/app-readme.md index 1c16f5a..4ba92e0 100644 --- a/charts/cluster-templates/app-readme.md +++ b/charts/cluster-templates/app-readme.md @@ -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. ⚠️ diff --git a/charts/cluster-templates/questions.yaml b/charts/cluster-templates/questions.yaml index 4660389..b653154 100644 --- a/charts/cluster-templates/questions.yaml +++ b/charts/cluster-templates/questions.yaml @@ -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' @@ -20,9 +21,9 @@ questions: required: true options: - amazonec2 + - harvester - azure - digitalocean - - harvester - vsphere - custom group: 'General' @@ -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' @@ -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 @@ -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: '' @@ -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 @@ -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 @@ -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' \ No newline at end of file diff --git a/charts/cluster-templates/rancher-cluster-templates-0.3.2.tgz b/charts/cluster-templates/rancher-cluster-templates-0.3.2.tgz new file mode 100644 index 0000000..dd56c3a Binary files /dev/null and b/charts/cluster-templates/rancher-cluster-templates-0.3.2.tgz differ