Skip to content

Commit 503222d

Browse files
fix: dind-volume-provisioner label filtering (#405)
1 parent 4514b0c commit 503222d

File tree

7 files changed

+113
-10
lines changed

7 files changed

+113
-10
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 6.1.8
4+
version: 6.1.9
55
keywords:
66
- codefresh
77
- runner
@@ -15,7 +15,7 @@ maintainers:
1515
annotations:
1616
artifacthub.io/changes: |
1717
- kind: fixed
18-
description: Fix appProxy in runtime environment spec template
18+
description: Fix dind-volume-provisioner label filtering
1919
dependencies:
2020
- name: cf-common
2121
repository: https://chartmuseum.codefresh.io/cf-common

charts/cf-runtime/README.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 6.1.8](https://img.shields.io/badge/Version-6.1.8-informational?style=flat-square)
3+
![Version: 6.1.9](https://img.shields.io/badge/Version-6.1.9-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

@@ -18,7 +18,8 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
1818
- [To 6.x](#to-6-x)
1919
- [Architecture](#architecture)
2020
- [Configuration](#configuration)
21-
- [EBS backend volume configuration](#ebs-backend-volume-configuration)
21+
- [EBS backend volume configuration in AWS](#ebs-backend-volume-configuration)
22+
- [Azure Disks backend volume configuration in AKS](#azure-disks-backend-volume-configuration)
2223
- [Custom volume mounts](#custom-volume-mounts)
2324
- [Custom global environment variables](#custom-global-environment-variables)
2425
- [Volume reuse policy](#volume-reuse-policy)
@@ -384,6 +385,56 @@ runtime:
384385

385386
```
386387

388+
### Azure Disks backend volume configuration
389+
390+
`dind-volume-provisioner` should have permissions to create/delete/get Azure Disks
391+
392+
Role definition for `dind-volume-provisioner`
393+
394+
`dind-volume-provisioner-role.json`
395+
```json
396+
{
397+
"Name": "CodefreshDindVolumeProvisioner",
398+
"Description": "Perform create/delete/get disks",
399+
"IsCustom": true,
400+
"Actions": [
401+
"Microsoft.Compute/disks/read",
402+
"Microsoft.Compute/disks/write",
403+
"Microsoft.Compute/disks/delete"
404+
405+
],
406+
"AssignableScopes": ["/subscriptions/<YOUR_SUBSCRIPTION_ID>"]
407+
}
408+
```
409+
410+
When creating an AKS cluster in Azure there is the option to use a [managed identity](https://learn.microsoft.com/en-us/azure/aks/use-managed-identity) that is assigned to the kubelet. This identity is assigned to the underlying node pool in the AKS cluster and can then be used by the dind-volume-provisioner.
411+
412+
```console
413+
export ROLE_DEFINITIN_FILE=dind-volume-provisioner-role.json
414+
export SUBSCRIPTION_ID=$(az account show --query "id" | xargs echo )
415+
export RESOURCE_GROUP=<YOUR_RESOURCE_GROUP_NAME>
416+
export AKS_NAME=<YOUR_AKS_NAME>
417+
export LOCATION=$(az aks show -g $RESOURCE_GROUP -n $AKS_NAME --query location | xargs echo)
418+
export NODES_RESOURCE_GROUP=MC_${RESOURCE_GROUP}_${AKS_NAME}_${LOCATION}
419+
export NODE_SERVICE_PRINCIPAL=$(az aks show -g $RESOURCE_GROUP -n $AKS_NAME --query identityProfile.kubeletidentity.objectId | xargs echo)
420+
421+
az role definition create --role-definition @${ROLE_DEFINITIN_FILE}
422+
az role assignment create --assignee $NODE_SERVICE_PRINCIPAL --scope /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$NODES_RESOURCE_GROUP --role CodefreshDindVolumeProvisioner
423+
```
424+
425+
Deploy Helm chart with the following values:
426+
427+
`values.yaml`
428+
```yaml
429+
storage:
430+
backend: azuredisk
431+
azuredisk:
432+
location: westcentralus
433+
resourceGroup: my-resource-group-name
434+
435+
mountAzureJson: true
436+
```
437+
387438
### Custom global environment variables
388439
389440
You can add your own environment variables to the runtime environment. All pipeline steps have access to the global variables.
@@ -1023,7 +1074,7 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
10231074
| volumeProvisioner.dind-lv-monitor | object | See below | `dind-lv-monitor` DaemonSet parameters (local volumes cleaner) |
10241075
| volumeProvisioner.enabled | bool | `true` | Enable volume-provisioner |
10251076
| volumeProvisioner.env | object | `{}` | Add additional env vars |
1026-
| volumeProvisioner.image | object | `{"registry":"quay.io","repository":"codefresh/dind-volume-provisioner","tag":"1.34.1"}` | Set image |
1077+
| volumeProvisioner.image | object | `{"registry":"quay.io","repository":"codefresh/dind-volume-provisioner","tag":"1.34.2"}` | Set image |
10271078
| volumeProvisioner.nodeSelector | object | `{}` | Set node selector |
10281079
| volumeProvisioner.podAnnotations | object | `{}` | Set pod annotations |
10291080
| volumeProvisioner.podSecurityContext | object | See below | Set security context for the pod |

charts/cf-runtime/README.md.gotmpl

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
1818
- [To 6.x](#to-6-x)
1919
- [Architecture](#architecture)
2020
- [Configuration](#configuration)
21-
- [EBS backend volume configuration](#ebs-backend-volume-configuration)
21+
- [EBS backend volume configuration in AWS](#ebs-backend-volume-configuration)
22+
- [Azure Disks backend volume configuration in AKS](#azure-disks-backend-volume-configuration)
2223
- [Custom volume mounts](#custom-volume-mounts)
2324
- [Custom global environment variables](#custom-global-environment-variables)
2425
- [Volume reuse policy](#volume-reuse-policy)
@@ -384,6 +385,57 @@ runtime:
384385

385386
```
386387

388+
### Azure Disks backend volume configuration
389+
390+
`dind-volume-provisioner` should have permissions to create/delete/get Azure Disks
391+
392+
Role definition for `dind-volume-provisioner`
393+
394+
`dind-volume-provisioner-role.json`
395+
```json
396+
{
397+
"Name": "CodefreshDindVolumeProvisioner",
398+
"Description": "Perform create/delete/get disks",
399+
"IsCustom": true,
400+
"Actions": [
401+
"Microsoft.Compute/disks/read",
402+
"Microsoft.Compute/disks/write",
403+
"Microsoft.Compute/disks/delete"
404+
405+
],
406+
"AssignableScopes": ["/subscriptions/<YOUR_SUBSCRIPTION_ID>"]
407+
}
408+
```
409+
410+
When creating an AKS cluster in Azure there is the option to use a [managed identity](https://learn.microsoft.com/en-us/azure/aks/use-managed-identity) that is assigned to the kubelet. This identity is assigned to the underlying node pool in the AKS cluster and can then be used by the dind-volume-provisioner.
411+
412+
```console
413+
export ROLE_DEFINITIN_FILE=dind-volume-provisioner-role.json
414+
export SUBSCRIPTION_ID=$(az account show --query "id" | xargs echo )
415+
export RESOURCE_GROUP=<YOUR_RESOURCE_GROUP_NAME>
416+
export AKS_NAME=<YOUR_AKS_NAME>
417+
export LOCATION=$(az aks show -g $RESOURCE_GROUP -n $AKS_NAME --query location | xargs echo)
418+
export NODES_RESOURCE_GROUP=MC_${RESOURCE_GROUP}_${AKS_NAME}_${LOCATION}
419+
export NODE_SERVICE_PRINCIPAL=$(az aks show -g $RESOURCE_GROUP -n $AKS_NAME --query identityProfile.kubeletidentity.objectId | xargs echo)
420+
421+
az role definition create --role-definition @${ROLE_DEFINITIN_FILE}
422+
az role assignment create --assignee $NODE_SERVICE_PRINCIPAL --scope /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$NODES_RESOURCE_GROUP --role CodefreshDindVolumeProvisioner
423+
```
424+
425+
Deploy Helm chart with the following values:
426+
427+
`values.yaml`
428+
```yaml
429+
storage:
430+
backend: azuredisk
431+
azuredisk:
432+
location: westcentralus
433+
resourceGroup: my-resource-group-name
434+
435+
mountAzureJson: true
436+
```
437+
438+
387439
### Custom global environment variables
388440

389441
You can add your own environment variables to the runtime environment. All pipeline steps have access to the global variables.

charts/cf-runtime/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ volumeProvisioner:
174174
image:
175175
registry: quay.io
176176
repository: codefresh/dind-volume-provisioner
177-
tag: 1.34.1
177+
tag: 1.34.2
178178
# -- Add additional env vars
179179
env: {}
180180
# E.g.

venona/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.2
1+
1.10.3

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.2
1+
1.10.3

venonactl/pkg/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (s *Values) BuildValues() map[string]interface{} {
174174
"AwsAccessKeyId": "",
175175
"AwsSecretAccessKey": "",
176176
"VolumeProvisioner": map[string]interface{}{
177-
"Image": "codefresh/dind-volume-provisioner:1.34.1",
177+
"Image": "codefresh/dind-volume-provisioner:1.34.2",
178178
"NodeSelector": s.KubernetesAPI.NodeSelector,
179179
"Resources": s.VolumeProvisioner.Resources,
180180
"MountAzureJson": false,

0 commit comments

Comments
 (0)