From ff80b7e2fdff0160cdc33fc13a7fde35811ae6e3 Mon Sep 17 00:00:00 2001 From: scrungus Date: Tue, 15 Nov 2022 16:39:32 +0000 Subject: [PATCH 1/6] fixed linting errors --- charts/cluster-addons/values.yaml | 8 ++++---- charts/openstack-cluster/values.yaml | 30 +++++++++++++++------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/charts/cluster-addons/values.yaml b/charts/cluster-addons/values.yaml index f89d1a7..c48f66b 100644 --- a/charts/cluster-addons/values.yaml +++ b/charts/cluster-addons/values.yaml @@ -1,12 +1,12 @@ # The name of the Cluster API cluster -# If not given, the release name is used +# if not given, the release name is used +--- clusterName: - # Settings for hook jobs hooks: image: repository: ghcr.io/stackhpc/capi-helm-utils - tag: # Defaults to chart appVersion if not given + tag: # Defaults to chart appVersion if not given pullPolicy: IfNotPresent imagePullSecrets: [] backoffLimit: 1000 @@ -218,7 +218,7 @@ mellanoxNetworkOperator: # Settings for any custom addons custom: {} - # # Indexed by the name of the release on the target cluster + # #Indexed by the name of the release on the target cluster # my-custom-helm-release: # # Indicates that this is a Helm addon # kind: HelmRelease diff --git a/charts/openstack-cluster/values.yaml b/charts/openstack-cluster/values.yaml index 5fa9317..87f0360 100644 --- a/charts/openstack-cluster/values.yaml +++ b/charts/openstack-cluster/values.yaml @@ -1,4 +1,5 @@ # The name of an existing secret containing a clouds.yaml and optional cacert +--- cloudCredentialsSecretName: # OR # Content for the clouds.yaml file @@ -51,10 +52,10 @@ clusterNetworking: # Details of the internal network to use internalNetwork: # Filter to find an existing network for the cluster internal network - # See Cluster API documentation for details + # see Cluster API documentation for details networkFilter: - # id: e63ca1a0-f69d-4fbf-b306-310857b1afe5 - # name: tenant-internal-net + # id: e63ca1a0-f69d-4fbf-b306-310857b1afe5 + # name: tenant-internal-net # Filter to find an existing subnet for the cluster internal network # See Cluster API documentation for details subnetFilter: @@ -134,8 +135,9 @@ controlPlane: # The time to wait for a node to finish draining before it can be removed nodeDrainTimeout: 5m # The rollout strategy to use for the control plane nodes + # By default, the strategy allows the control plane to begin provisioning new nodes - # without first tearing down old ones + # without first tearing down old ones rolloutStrategy: type: RollingUpdate rollingUpdate: @@ -150,8 +152,8 @@ controlPlane: kubeletExtraArgs: cloud-provider: external # As well as enabling an external cloud provider, we set the bind addresses for the - # etcd metrics, controller-manager, scheduler and kube-proxy to 0.0.0.0 so that Prometheus - # can reach them to collect metrics + # etcd metrics, controller-manager, scheduler and kube-proxy to 0.0.0.0 so that Prometheus + # can reach them to collect metrics clusterConfiguration: etcd: local: @@ -184,7 +186,7 @@ controlPlane: # By default, unhealthy control plane nodes are always remediated maxUnhealthy: 100% # By default, consider a control plane node that has not been Ready - # for more than 5 mins unhealthy + # for more than 5 mins unhealthy unhealthyConditions: - type: Ready status: Unknown @@ -222,17 +224,17 @@ nodeGroupDefaults: # The time to wait for a node to finish draining before it can be removed nodeDrainTimeout: 5m # The rollout strategy to use for the node group - # By default, this is set to do a rolling update within the existing resource envelope - # of the node group, even if that means the node group temporarily has zero nodes + # By default, this is set to do a rolling update within the existing resource envelope + # of the node group, even if that means the node group temporarily has zero nodes rolloutStrategy: type: RollingUpdate rollingUpdate: # The maximum number of node group machines that can be unavailable during the update - # Can be an absolute number or a percentage of the desired count + # Can be an absolute number or a percentage of the desired count maxUnavailable: 1 # The maximum number of machines that can be scheduled above the desired count for - # the group during an update - # Can be an absolute number or a percentage of the desired count + # the group during an update + # Can be an absolute number or a percentage of the desired count maxSurge: 0 # One of Random, Newest, Oldest deletePolicy: Random @@ -258,7 +260,7 @@ nodeGroupDefaults: # If a node takes longer than 10 mins to startup, remediate it nodeStartupTimeout: 10m # By default, consider a worker node that has not been Ready for - # more than 5 mins unhealthy + # more than 5 mins unhealthy unhealthyConditions: - type: Ready status: Unknown @@ -269,7 +271,7 @@ nodeGroupDefaults: # The worker node groups for the cluster nodeGroups: - - # The name of the node group + - # The name of the node group name: md-0 # The number of machines in the node group if autoscale is false machineCount: 3 From 0cf3c36f6fd098a9fac306ab46233a5b3ae47ad7 Mon Sep 17 00:00:00 2001 From: scrungus Date: Thu, 17 Nov 2022 13:36:35 +0000 Subject: [PATCH 2/6] linting workflow --- .github/workflows/lint.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..67ff757 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,27 @@ +name: Lint Helm Charts +# Run the tasks on every push +on: push +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.10.0 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + check-latest: true + + - name: Set up chart-testing + uses: scrungus/chart-testing-action@v3.7.3 + + - name: Run chart-testing (lint) + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --extra-values ${{ secrets.TYLER_CLOUDS }} From d5c66361fdb9ded73f43bf76f48565e5871f372b Mon Sep 17 00:00:00 2001 From: scrungus Date: Thu, 17 Nov 2022 13:36:44 +0000 Subject: [PATCH 3/6] test-values --- charts/openstack-cluster/ci/test-values.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 charts/openstack-cluster/ci/test-values.yaml diff --git a/charts/openstack-cluster/ci/test-values.yaml b/charts/openstack-cluster/ci/test-values.yaml new file mode 100644 index 0000000..60650fe --- /dev/null +++ b/charts/openstack-cluster/ci/test-values.yaml @@ -0,0 +1,12 @@ +--- +kubernetesVersion: 1.24.2 + +machineImageId: 9b5d513c-67b4-4fd6-8bf1-3bf4525c04c3 + +controlPlane: + machineFlavor: vm.alaska.cpu.general.small + +nodeGroups: + - machineCount: 2 + machineFlavor: vm.alaska.cpu.general.small + name: test-group From 213ebaf3a92f20eaa99fbfafba44607f3efefa76 Mon Sep 17 00:00:00 2001 From: scrungus <33693738+scrungus@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:47:27 +0000 Subject: [PATCH 4/6] Update lint.yaml --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 67ff757..c7c2f60 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -24,4 +24,4 @@ jobs: uses: scrungus/chart-testing-action@v3.7.3 - name: Run chart-testing (lint) - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --extra-values ${{ secrets.TYLER_CLOUDS }} + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --extra-values "${{ secrets.TYLER_CLOUDS }}" From 7dc1a8894de7f35f23e8c9b50fec79c90b85648c Mon Sep 17 00:00:00 2001 From: scrungus Date: Thu, 17 Nov 2022 14:32:18 +0000 Subject: [PATCH 5/6] fixed secret issue --- .github/workflows/lint.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c7c2f60..611d581 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,6 +22,12 @@ jobs: - name: Set up chart-testing uses: scrungus/chart-testing-action@v3.7.3 + + - name: Copy cloud creds to file + run: 'echo "$TYLER_CLOUDS" > clouds.yml' + shell: bash + env: + TYLER_CLOUDS: ${{ secrets.TYLER_CLOUDS }} - name: Run chart-testing (lint) - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --extra-values "${{ secrets.TYLER_CLOUDS }}" + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --extra-values clouds.yml From c589bf5f2eaa7678fa0a84b8e7724cb4239c4b6c Mon Sep 17 00:00:00 2001 From: scrungus <33693738+scrungus@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:10:15 +0000 Subject: [PATCH 6/6] Update lint.yaml --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 611d581..1138702 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,6 +1,6 @@ name: Lint Helm Charts # Run the tasks on every push -on: push +on: [pull_request] jobs: lint: runs-on: ubuntu-latest