-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from cognifloyd/stanley_rsa-permissions
Fix stanley_rsa permissions via postStart pod lifecycle hook
- Loading branch information
Showing
4 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ $.Release.Name }}-st2actionrunner-post-start-script | ||
annotations: | ||
description: Custom postStart lifecycle event handler script for st2actionrunner | ||
labels: | ||
app: st2 | ||
tier: backend | ||
vendor: stackstorm | ||
chart: {{ $.Chart.Name }}-{{ $.Chart.Version }} | ||
release: {{ $.Release.Name }} | ||
heritage: {{ $.Release.Service }} | ||
data: | ||
# k8s calls this script in parallel with starting st2actionrunner (ie the same time as ENTRYPOINT) | ||
# The pod will not be marked as "running" until this script completes successfully. | ||
# see: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ | ||
post-start.sh: | | ||
#!/bin/bash | ||
mkdir -p /home/stanley/.ssh | ||
cp -L /home/stanley/.ssh{-key-vol,}/stanley_rsa | ||
chown -R stanley:stanley /home/stanley/.ssh/ | ||
chmod 400 /home/stanley/.ssh/stanley_rsa | ||
chmod 500 /home/stanley/.ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters