From 1b10af4cec165d86522d60b571e48322a7ba59b7 Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Thu, 30 Nov 2023 19:14:22 +0300 Subject: [PATCH 1/2] fix: storage class spec for azure disk --- charts/cf-runtime/Chart.yaml | 4 ++-- charts/cf-runtime/README.md | 16 ++++++++++++++-- charts/cf-runtime/README.md.gotmpl | 14 +++++++++++++- .../volume-provisioner/_storageclass.yaml | 4 ++-- charts/cf-runtime/values.yaml | 2 +- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/charts/cf-runtime/Chart.yaml b/charts/cf-runtime/Chart.yaml index 137fc2b5..a2d259c1 100644 --- a/charts/cf-runtime/Chart.yaml +++ b/charts/cf-runtime/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A Helm chart for Codefresh Runner name: cf-runtime -version: 6.3.2 +version: 6.3.3 keywords: - codefresh - runner @@ -15,7 +15,7 @@ maintainers: annotations: artifacthub.io/changes: | - kind: fixed - description: Exclude inactive memory from memory metrics + description: Fix storage class template for Azure Disk storage backend dependencies: - name: cf-common repository: oci://quay.io/codefresh/charts diff --git a/charts/cf-runtime/README.md b/charts/cf-runtime/README.md index f6f7122d..f72abe3e 100644 --- a/charts/cf-runtime/README.md +++ b/charts/cf-runtime/README.md @@ -1,6 +1,6 @@ ## Codefresh Runner -![Version: 6.3.2](https://img.shields.io/badge/Version-6.3.2-informational?style=flat-square) +![Version: 6.3.3](https://img.shields.io/badge/Version-6.3.3-informational?style=flat-square) Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes. @@ -419,13 +419,25 @@ Deploy Helm chart with the following values: `values.yaml` ```yaml +volumeProvisioner: + podSecurityContext: + enabled: true + runAsUser: 0 + runAsGroup: 0 + fsGroup: 0 + storage: backend: azuredisk azuredisk: - location: westcentralus + availabilityZone: northeurope-1 # replace with your zone resourceGroup: my-resource-group-name mountAzureJson: true + +runtime: + dind: + nodeSelector: + topology.kubernetes.io/zone: northeurope-1 ``` ### Custom global environment variables diff --git a/charts/cf-runtime/README.md.gotmpl b/charts/cf-runtime/README.md.gotmpl index d3ed9b3d..9b3bdd93 100644 --- a/charts/cf-runtime/README.md.gotmpl +++ b/charts/cf-runtime/README.md.gotmpl @@ -419,13 +419,25 @@ Deploy Helm chart with the following values: `values.yaml` ```yaml +volumeProvisioner: + podSecurityContext: + enabled: true + runAsUser: 0 + runAsGroup: 0 + fsGroup: 0 + storage: backend: azuredisk azuredisk: - location: westcentralus + availabilityZone: northeurope-1 # replace with your zone resourceGroup: my-resource-group-name mountAzureJson: true + +runtime: + dind: + nodeSelector: + topology.kubernetes.io/zone: northeurope-1 ``` diff --git a/charts/cf-runtime/templates/_components/volume-provisioner/_storageclass.yaml b/charts/cf-runtime/templates/_components/volume-provisioner/_storageclass.yaml index f9512771..62e910c8 100644 --- a/charts/cf-runtime/templates/_components/volume-provisioner/_storageclass.yaml +++ b/charts/cf-runtime/templates/_components/volume-provisioner/_storageclass.yaml @@ -37,8 +37,8 @@ parameters: skuName: {{ .Values.storage.azuredisk.skuName | default "Premium_LRS" }} fsType: {{ .Values.storage.fsType | default "ext4" }} cachingMode: {{ .Values.storage.azuredisk.cachingMode | default "None" }} - {{- with .Values.storage.azuredisk.location }} - location: {{ . | quote }} + {{- with .Values.storage.azuredisk.availabilityZone }} + availabilityZone: {{ . | quote }} {{- end }} {{- with .Values.storage.azuredisk.resourceGroup }} resourceGroup: {{ . | quote }} diff --git a/charts/cf-runtime/values.yaml b/charts/cf-runtime/values.yaml index 83a652c3..a2d14847 100644 --- a/charts/cf-runtime/values.yaml +++ b/charts/cf-runtime/values.yaml @@ -383,7 +383,7 @@ storage: # -- Set storage type (`Premium_LRS`) skuName: Premium_LRS cachingMode: None - # location: westcentralus + # availabilityZone: northeurope-1 # resourceGroup: # DiskIOPSReadWrite: 500 # DiskMBpsReadWrite: 100 From 1ef9fd5343c43f7676abdf3a02e505caa141925d Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Thu, 30 Nov 2023 19:25:04 +0300 Subject: [PATCH 2/2] fix: storage class spec for azure disk --- .../tests/volume-provisioner/volume-provisioner_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cf-runtime/tests/volume-provisioner/volume-provisioner_test.yaml b/charts/cf-runtime/tests/volume-provisioner/volume-provisioner_test.yaml index 7c40a066..2f1c770f 100644 --- a/charts/cf-runtime/tests/volume-provisioner/volume-provisioner_test.yaml +++ b/charts/cf-runtime/tests/volume-provisioner/volume-provisioner_test.yaml @@ -362,7 +362,7 @@ tests: - it: Test volume-provisioner with azure disks set: storage.backend: azuredisk - storage.azuredisk.location: somewhere + storage.azuredisk.availabilityZone: somewhere storage.azuredisk.resourceGroup: some-rg storage.mountAzureJson: true asserts: @@ -405,7 +405,7 @@ tests: value: azuredisk template: templates/volume-provisioner/storageclass.yaml - equal: - path: parameters.location + path: parameters.availabilityZone value: somewhere template: templates/volume-provisioner/storageclass.yaml - equal: