Merge pull request 'Light refactor' (#38) from dev into main
Reviewed-on: #38
This commit was merged in pull request #38.
This commit is contained in:
@@ -107,12 +107,13 @@ spec:
|
|||||||
fsGroupChangePolicy: "Always"
|
fsGroupChangePolicy: "Always"
|
||||||
|
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: setup-directory
|
- name: fix-ssh-path
|
||||||
image: busybox:latest
|
image: busybox:latest
|
||||||
command: ["sh", "-c", "mkdir -p /mnt/data/.ssh"]
|
# Ensure the directory exists AND is clean before the subPath mount attempts to anchor
|
||||||
|
command: ["sh", "-c", "mkdir -p /home/semaphore/.ssh && chmod 700 /home/semaphore/.ssh"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: semaphore-persistent-storage
|
- name: semaphore-persistent-storage
|
||||||
mountPath: /mnt/data
|
mountPath: /home/semaphore
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: semaphore
|
- name: semaphore
|
||||||
@@ -158,6 +159,7 @@ spec:
|
|||||||
- name: semaphore-persistent-storage
|
- name: semaphore-persistent-storage
|
||||||
mountPath: /tmp/semaphore
|
mountPath: /tmp/semaphore
|
||||||
subPath: tmp
|
subPath: tmp
|
||||||
|
# Using subPath here is essential to put the file into the existing folder
|
||||||
- name: ssh-keys-volume
|
- name: ssh-keys-volume
|
||||||
mountPath: /home/semaphore/.ssh/id_ed25519
|
mountPath: /home/semaphore/.ssh/id_ed25519
|
||||||
subPath: id_ed25519
|
subPath: id_ed25519
|
||||||
@@ -171,7 +173,7 @@ spec:
|
|||||||
- name: ssh-keys-volume
|
- name: ssh-keys-volume
|
||||||
secret:
|
secret:
|
||||||
secretName: semaphore-secrets
|
secretName: semaphore-secrets
|
||||||
defaultMode: 384
|
defaultMode: 384 # This is octal 0600
|
||||||
items:
|
items:
|
||||||
- key: id_ed25519
|
- key: id_ed25519
|
||||||
path: id_ed25519
|
path: id_ed25519
|
||||||
|
|||||||
Reference in New Issue
Block a user