Skip to content

Commit 1392aa6

Browse files
authored
[ACTP-745] update PAR configuration file location (#1909)
1 parent f3a5b12 commit 1392aa6

File tree

16 files changed

+81
-55
lines changed

16 files changed

+81
-55
lines changed

charts/private-action-runner/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Datadog changelog
22

3+
## 1.3.0
4+
5+
* Change the configuration directory to be `/etc/dd-action-runner/config`.
6+
37
## 1.2.3
48

59
* Add ability to include livenessProbe and readinessProbe configurations.

charts/private-action-runner/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: private-action-runner
33
description: A Helm chart to deploy the private action runner
44

55
type: application
6-
version: 1.2.3
6+
version: 1.3.0
77
appVersion: "v1.4.0"
88
keywords:
99
- app builder

charts/private-action-runner/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Datadog Private Action Runner
22

3-
![Version: 1.2.3](https://img.shields.io/badge/Version-1.2.3-informational?style=flat-square) ![AppVersion: v1.4.0](https://img.shields.io/badge/AppVersion-v1.4.0-informational?style=flat-square)
3+
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![AppVersion: v1.4.0](https://img.shields.io/badge/AppVersion-v1.4.0-informational?style=flat-square)
44

55
## Overview
66

@@ -164,10 +164,10 @@ Reference these secrets in your values.yaml:
164164
```yaml
165165
runner:
166166
credentialSecrets:
167-
# Mount all files from the secret at /etc/dd-action-runner/credentials/
167+
# Mount all files from the secret at /etc/dd-action-runner/config/credentials/
168168
- secretName: action-credentials
169169
directoryName: ""
170-
# Mount files in a subdirectory at /etc/dd-action-runner/credentials/jenkins/
170+
# Mount files in a subdirectory at /etc/dd-action-runner/config/credentials/jenkins/
171171
- secretName: jenkins-credentials
172172
directoryName: "jenkins"
173173
```
@@ -204,9 +204,9 @@ If actions requiring credentials fail:
204204
1. Verify that your credential files are properly formatted
205205
2. Check that the credentials are mounted correctly in the pod:
206206
```bash
207-
kubectl exec <pod-name> -- ls /etc/dd-action-runner/credentials/
207+
kubectl exec <pod-name> -- ls /etc/dd-action-runner/config/credentials/
208208
## Depending on how you pass the credentials they might appear in a different directory
209-
kubectl exec <pod-name> -- ls /etc/dd-action-runner/
209+
kubectl exec <pod-name> -- ls /etc/dd-action-runner/config
210210
```
211211

212212
3. Check the pod logs for credential-related errors
@@ -229,7 +229,7 @@ If actions requiring credentials fail:
229229
| runner.config.urn | string | `"CHANGE_ME_URN_FROM_CONFIG"` | The runner's URN from the enrollment page |
230230
| runner.credentialFiles | list | `[]` | List of credential files to be used by the Datadog Private Action Runner |
231231
| runner.credentialSecrets | list | `[]` | References to kubernetes secrets that contain credentials to be used by the Datadog Private Action Runner |
232-
| runner.env | list | `[]` | Environment variables to be passed to the Datadog Private Action Runner |
232+
| runner.env | list | `[{"name":"DD_PRIVATE_RUNNER_CONFIG_DIR","value":"/etc/dd-action-runner/config"}]` | Environment variables to be passed to the Datadog Private Action Runner |
233233
| runner.kubernetesActions | object | `{"configMaps":[],"controllerRevisions":[],"cronJobs":[],"customObjects":[],"customResourceDefinitions":[],"daemonSets":[],"deployments":[],"endpoints":[],"events":[],"jobs":[],"limitRanges":[],"namespaces":[],"nodes":[],"persistentVolumeClaims":[],"persistentVolumes":[],"podTemplates":[],"pods":["get","list"],"replicaSets":[],"replicationControllers":[],"resourceQuotas":[],"serviceAccounts":[],"services":[],"statefulSets":[]}` | Add Kubernetes actions to the `config.actionsAllowlist` and corresponding permissions for the service account |
234234
| runner.kubernetesActions.configMaps | list | `[]` | Actions related to configMaps (options: "get", "list", "create", "update", "patch", "delete", "deleteMultiple") |
235235
| runner.kubernetesActions.controllerRevisions | list | `[]` | Actions related to controllerRevisions (options: "get", "list", "create", "update", "patch", "delete", "deleteMultiple") |

charts/private-action-runner/README.md.gotmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ Reference these secrets in your values.yaml:
165165
```yaml
166166
runner:
167167
credentialSecrets:
168-
# Mount all files from the secret at /etc/dd-action-runner/credentials/
168+
# Mount all files from the secret at /etc/dd-action-runner/config/credentials/
169169
- secretName: action-credentials
170170
directoryName: ""
171-
# Mount files in a subdirectory at /etc/dd-action-runner/credentials/jenkins/
171+
# Mount files in a subdirectory at /etc/dd-action-runner/config/credentials/jenkins/
172172
- secretName: jenkins-credentials
173173
directoryName: "jenkins"
174174
```
@@ -205,9 +205,9 @@ If actions requiring credentials fail:
205205
1. Verify that your credential files are properly formatted
206206
2. Check that the credentials are mounted correctly in the pod:
207207
```bash
208-
kubectl exec <pod-name> -- ls /etc/dd-action-runner/credentials/
208+
kubectl exec <pod-name> -- ls /etc/dd-action-runner/config/credentials/
209209
## Depending on how you pass the credentials they might appear in a different directory
210-
kubectl exec <pod-name> -- ls /etc/dd-action-runner/
210+
kubectl exec <pod-name> -- ls /etc/dd-action-runner/config
211211
```
212212

213213
3. Check the pod logs for credential-related errors

charts/private-action-runner/UPGRADING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Upgrade to version 1.3.0
2+
3+
In version 1.3.0 the chart has been updated to change the default location for the runner's configuration and credentials files. The configuration file has been moved from `/etc/datadog-runner/config.yaml` to `/etc/datadog-runner/config/config.yaml`.
4+
Credentials have been moved from `/etc/datadog-runner/credentials` to `/etc/datadog-runner/config/credentials` so you might need to update your connection configurations to point to the new location.
5+
16
# Upgrade from version 0.x to version 1.x
27

38
Version 1.0.0 introduces changes to simplify the chart and better align with Helm best practices. The most significant change is the restructuring of the values.yaml file.

charts/private-action-runner/examples/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ runner:
1717
# Use a "Role" to scope the permissions to the runner's namespace or a "ClusterRole" to give permissions to the entire cluster
1818
roleType: "Role"
1919
env:
20-
- name: "ENV_VAR_NAME"
21-
value: "ENV_VAR_VALUE"
20+
- name: DD_PRIVATE_RUNNER_CONFIG_DIR
21+
value: /etc/dd-action-runner/config
2222
livenessProbe:
2323
httpGet:
2424
path: /liveness
@@ -73,7 +73,7 @@ runner:
7373
# - "patch"
7474
# - "update"
7575
# - "delete"
76-
# credential files provided here will be mounted in /etc/dd-action-runner/
76+
# credential files provided here will be mounted in /etc/dd-action-runner/config/
7777
# it is safe to remove unneeded files from this section
7878
credentialFiles:
7979
- fileName: "http_basic.json"
@@ -212,9 +212,9 @@ runner:
212212
}
213213
214214
credentialSecrets: []
215-
# a kubernetes secret containing multiple credentials files mounted at /etc/dd-action-runner/credentials/<filename-from-secret> see https://github.com/DataDog/helm-charts/blob/main/charts/private-action-runner/README.md
215+
# a kubernetes secret containing multiple credentials files mounted at /etc/dd-action-runner/config/credentials/<filename-from-secret> see https://github.com/DataDog/helm-charts/blob/main/charts/private-action-runner/README.md
216216
# - secretName: all-secrets-at-once
217217
# directoryName: ""
218-
# a kubernetes secret containing a single credentials file mounted at /etc/dd-action-runner/credentials/jenkins/<filename-from-secret> see https://github.com/DataDog/helm-charts/blob/main/charts/private-action-runner/README.md
218+
# a kubernetes secret containing a single credentials file mounted at /etc/dd-action-runner/config/credentials/jenkins/<filename-from-secret> see https://github.com/DataDog/helm-charts/blob/main/charts/private-action-runner/README.md
219219
# - secretName: jenkins-secret
220220
# directoryName: jenkins

charts/private-action-runner/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ spec:
3838
{{- toYaml $.Values.runner.resources | nindent 12 }}
3939
volumeMounts:
4040
- name: secrets
41-
mountPath: /etc/dd-action-runner
41+
mountPath: /etc/dd-action-runner/config
4242
{{- range $_, $credentialSecret := $.Values.runner.credentialSecrets }}
4343
- name: {{ $credentialSecret.secretName }}
44-
mountPath: /etc/dd-action-runner/credentials/{{ $credentialSecret.directoryName }}
44+
mountPath: /etc/dd-action-runner/config/credentials/{{ $credentialSecret.directoryName }}
4545
{{- end }}
4646
{{- if $.Values.runner.env }}
4747
env: {{ $.Values.runner.env | toYaml | nindent 12 }}

charts/private-action-runner/values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ runner:
3737
# -- List of actions that the Datadog Private Action Runner is allowed to execute
3838
actionsAllowlist: []
3939
# -- Environment variables to be passed to the Datadog Private Action Runner
40-
env: []
40+
env:
41+
- name: DD_PRIVATE_RUNNER_CONFIG_DIR
42+
value: /etc/dd-action-runner/config
4143
# -- Allow the private action runner pods to schedule on selected nodes
4244
nodeSelector: {}
4345
# -- Kubernetes affinity settings for the runner pods
@@ -113,8 +115,8 @@ runner:
113115
# -- List of credential files to be used by the Datadog Private Action Runner
114116
credentialFiles: []
115117
# see examples/values.yaml for examples on how to specify secrets
116-
# credential files provided here will be mounted in /etc/dd-action-runner/
118+
# credential files provided here will be mounted in /etc/dd-action-runner/config/
117119
# -- References to kubernetes secrets that contain credentials to be used by the Datadog Private Action Runner
118120
credentialSecrets: []
119-
# credential files provided here will be mounted in /etc/dd-action-runner/credentials/
121+
# credential files provided here will be mounted in /etc/dd-action-runner/config/credentials/
120122
# see examples/values.yaml for examples on how to specify secrets

test/private-action-runner/__snapshot__/config-overrides.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ metadata:
7777
name: custom-full-name
7878
namespace: datadog-agent
7979
labels:
80-
helm.sh/chart: private-action-runner-1.2.3
80+
helm.sh/chart: private-action-runner-1.3.0
8181
app.kubernetes.io/name: private-action-runner
8282
app.kubernetes.io/instance: override-test
8383
app.kubernetes.io/version: "v1.4.0"
@@ -92,7 +92,7 @@ spec:
9292
template:
9393
metadata:
9494
labels:
95-
helm.sh/chart: private-action-runner-1.2.3
95+
helm.sh/chart: private-action-runner-1.3.0
9696
app.kubernetes.io/name: private-action-runner
9797
app.kubernetes.io/instance: override-test
9898
app.kubernetes.io/version: "v1.4.0"
@@ -117,7 +117,7 @@ spec:
117117
memory: 1Gi
118118
volumeMounts:
119119
- name: secrets
120-
mountPath: /etc/dd-action-runner
120+
mountPath: /etc/dd-action-runner/config
121121
env:
122122
- name: FOO
123123
value: foo

test/private-action-runner/__snapshot__/custom-pod-scheduling.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ metadata:
7777
name: resources-test-private-action-runner
7878
namespace: datadog-agent
7979
labels:
80-
helm.sh/chart: private-action-runner-1.2.3
80+
helm.sh/chart: private-action-runner-1.3.0
8181
app.kubernetes.io/name: private-action-runner
8282
app.kubernetes.io/instance: resources-test
8383
app.kubernetes.io/version: "v1.4.0"
@@ -92,13 +92,13 @@ spec:
9292
template:
9393
metadata:
9494
labels:
95-
helm.sh/chart: private-action-runner-1.2.3
95+
helm.sh/chart: private-action-runner-1.3.0
9696
app.kubernetes.io/name: private-action-runner
9797
app.kubernetes.io/instance: resources-test
9898
app.kubernetes.io/version: "v1.4.0"
9999
app.kubernetes.io/managed-by: Helm
100100
annotations:
101-
checksum/values: f42d26f7e0b678aa3235b43bcd592b9e213fbe2dbb95009c20262347abc6f70f
101+
checksum/values: 80cf8a4e558b434efcb5ed7013d2495a6ecdf4d5dbba496f0971b7d023f02497
102102
spec:
103103
serviceAccountName: resources-test-private-action-runner
104104
containers:
@@ -117,7 +117,10 @@ spec:
117117
memory: 1Gi
118118
volumeMounts:
119119
- name: secrets
120-
mountPath: /etc/dd-action-runner
120+
mountPath: /etc/dd-action-runner/config
121+
env:
122+
- name: DD_PRIVATE_RUNNER_CONFIG_DIR
123+
value: /etc/dd-action-runner/config
121124
nodeSelector:
122125
kubernetes.io/os: linux
123126
affinity:

0 commit comments

Comments
 (0)