Skip to content

Commit 0cb1949

Browse files
gkechhors
andauthored
K8SPSMDB-1268 PMM_AGENT_PATHS_TEMPDIR configured to /tmp/pmm (#2001)
Co-authored-by: Viacheslav Sarzhan <[email protected]>
1 parent 67d62ff commit 0cb1949

8 files changed

+8
-8
lines changed

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-cfg-oc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ spec:
216216
- name: PMM_AGENT_SIDECAR_SLEEP
217217
value: "5"
218218
- name: PMM_AGENT_PATHS_TEMPDIR
219-
value: /tmp
219+
value: /tmp/pmm
220220
- name: PMM_AGENT_PRERUN_SCRIPT
221221
value: |-
222222
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-cfg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ spec:
217217
- name: PMM_AGENT_SIDECAR_SLEEP
218218
value: "5"
219219
- name: PMM_AGENT_PATHS_TEMPDIR
220-
value: /tmp
220+
value: /tmp/pmm
221221
- name: PMM_AGENT_PRERUN_SCRIPT
222222
value: |-
223223
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-mongos-oc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ spec:
217217
- name: PMM_AGENT_SIDECAR_SLEEP
218218
value: "5"
219219
- name: PMM_AGENT_PATHS_TEMPDIR
220-
value: /tmp
220+
value: /tmp/pmm
221221
- name: PMM_AGENT_PRERUN_SCRIPT
222222
value: |-
223223
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-mongos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ spec:
218218
- name: PMM_AGENT_SIDECAR_SLEEP
219219
value: "5"
220220
- name: PMM_AGENT_PATHS_TEMPDIR
221-
value: /tmp
221+
value: /tmp/pmm
222222
- name: PMM_AGENT_PRERUN_SCRIPT
223223
value: |-
224224
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-rs0-oc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ spec:
204204
- name: PMM_AGENT_SIDECAR_SLEEP
205205
value: "5"
206206
- name: PMM_AGENT_PATHS_TEMPDIR
207-
value: /tmp
207+
value: /tmp/pmm
208208
- name: PMM_AGENT_PRERUN_SCRIPT
209209
value: |-
210210
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

e2e-tests/monitoring-pmm3/compare/statefulset_monitoring-pmm3-rs0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ spec:
205205
- name: PMM_AGENT_SIDECAR_SLEEP
206206
value: "5"
207207
- name: PMM_AGENT_PATHS_TEMPDIR
208-
value: /tmp
208+
value: /tmp/pmm
209209
- name: PMM_AGENT_PRERUN_SCRIPT
210210
value: |-
211211
cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;

pkg/psmdb/pmm/pmm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ func containerForPMM3(cr *api.PerconaServerMongoDB, secret *corev1.Secret, dbPor
471471
},
472472
{
473473
Name: "PMM_AGENT_PATHS_TEMPDIR",
474-
Value: "/tmp",
474+
Value: "/tmp/pmm",
475475
},
476476
},
477477
Ports: ports,

pkg/psmdb/pmm/pmm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func buildExpectedPMMContainer() *corev1.Container {
119119
portEnd = 30105
120120
listenPort = 7777
121121
configFile = "/usr/local/percona/pmm/config/pmm-agent.yaml"
122-
tempDir = "/tmp"
122+
tempDir = "/tmp/pmm"
123123
prerunScript = `cat /etc/mongodb-ssl/tls.key /etc/mongodb-ssl/tls.crt > /tmp/tls.pem;
124124
pmm-admin status --wait=10s;
125125
pmm-admin add $(DB_TYPE) $(PMM_ADMIN_CUSTOM_PARAMS) --skip-connection-check --metrics-mode=push --username=$(DB_USER) --password=$(DB_PASSWORD) --cluster=$(CLUSTER_NAME) --service-name=$(PMM_AGENT_SETUP_NODE_NAME) --host=$(DB_HOST) --port=$(DB_PORT) --tls --tls-skip-verify --tls-certificate-key-file=/tmp/tls.pem --tls-ca-file=/etc/mongodb-ssl/ca.crt --authentication-mechanism=SCRAM-SHA-1 --authentication-database=admin;

0 commit comments

Comments
 (0)