Transition secrets into vault
This commit is contained in:
parent
8638f906cf
commit
c5c00dacb7
6 changed files with 91 additions and 39 deletions
19
services/foundryvtt/foundry-vtt-account.yaml
Normal file
19
services/foundryvtt/foundry-vtt-account.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: foundry-vtt-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: foundry-vtt-auth-delegator
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: foundry-vtt-sa
|
||||||
|
namespace: default
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:auth-delegator
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
@ -19,41 +19,32 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert -f foundry-compose.yml
|
kompose.cmd: kompose convert -f foundry-compose.yml
|
||||||
kompose.version: 1.38.0 (HEAD)
|
kompose.version: 1.38.0 (HEAD)
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/role: "foundry-role"
|
||||||
|
vault.hashicorp.com/agent-inject-secret-credentials: "secret/data/foundry-vtt/config"
|
||||||
|
vault.hashicorp.com/agent-inject-template-credentials: |
|
||||||
|
{{- with secret "secret/data/foundry-vtt/config" -}}
|
||||||
|
export FOUNDRY_ADMIN_KEY="{{ .Data.data.admin_key }}"
|
||||||
|
export FOUNDRY_LICENSE_KEY="{{ .Data.data.license_key }}"
|
||||||
|
export FOUNDRY_PASSWORD="{{ .Data.data.password }}"
|
||||||
|
export FOUNDRY_USERNAME="{{ .Data.data.username }}"
|
||||||
|
{{- end -}}
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: foundry-vtt
|
io.kompose.service: foundry-vtt
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: foundry-vtt-sa
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- name: foundry-vtt
|
||||||
- name: CONTAINER_PRESERVE_CONFIG
|
|
||||||
value: "true"
|
|
||||||
- name: FOUNDRY_ADMIN_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: main-pass
|
|
||||||
key: password
|
|
||||||
- name: FOUNDRY_LICENSE_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: foundry-license-key
|
|
||||||
key: license_key
|
|
||||||
- name: FOUNDRY_MINIFY_STATIC_FILES
|
|
||||||
value: "true"
|
|
||||||
- name: FOUNDRY_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: foundry-password
|
|
||||||
key: password
|
|
||||||
- name: FOUNDRY_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: foundry-user
|
|
||||||
key: user
|
|
||||||
image: felddy/foundryvtt:release
|
image: felddy/foundryvtt:release
|
||||||
name: foundry-vtt
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 30000
|
- containerPort: 30000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: web-ui
|
name: web-ui
|
||||||
|
env:
|
||||||
|
- name: CONTAINER_PRESERVE_CONFIG
|
||||||
|
value: "true"
|
||||||
|
- name: FOUNDRY_MINIFY_STATIC_FILES
|
||||||
|
value: "true"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /data
|
||||||
name: foundry-vtt-volume
|
name: foundry-vtt-volume
|
||||||
|
|
|
||||||
19
services/lazy-librarian/lazylibrarian-account.yaml
Normal file
19
services/lazy-librarian/lazylibrarian-account.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: lazylibrarian-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: lazylibrarian-auth-delegator
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: lazylibrarian-sa
|
||||||
|
namespace: default
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:auth-delegator
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
@ -19,9 +19,17 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert -f compose-ll.yaml
|
kompose.cmd: kompose convert -f compose-ll.yaml
|
||||||
kompose.version: 1.38.0 (HEAD)
|
kompose.version: 1.38.0 (HEAD)
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/role: "lazylibrarian-role"
|
||||||
|
vault.hashicorp.com/agent-inject-secret-credentials: "secret/data/lazylibrarian/config"
|
||||||
|
vault.hashicorp.com/agent-inject-template-credentials: |
|
||||||
|
{{- with secret "secret/data/lazylibrarian/config" -}}
|
||||||
|
export HARDCOVER_API_KEY="{{ .Data.data.hardcover_api_key }}"
|
||||||
|
{{- end -}}
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: lazylibrarian
|
io.kompose.service: lazylibrarian
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: lazylibrarian-sa
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: DOCKER_MODS
|
- name: DOCKER_MODS
|
||||||
|
|
@ -32,11 +40,6 @@ spec:
|
||||||
value: "1000"
|
value: "1000"
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: America/New_York
|
value: America/New_York
|
||||||
- name: HARDCOVER_API_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: hardcover-api-key
|
|
||||||
key: key
|
|
||||||
image: lscr.io/linuxserver/lazylibrarian:latest
|
image: lscr.io/linuxserver/lazylibrarian:latest
|
||||||
name: lazylibrarian
|
name: lazylibrarian
|
||||||
ports:
|
ports:
|
||||||
|
|
|
||||||
19
services/navidrome/navidrome-account.yaml
Normal file
19
services/navidrome/navidrome-account.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: navidrome-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: navidrome-auth-delegator
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: navidrome-sa
|
||||||
|
namespace: default
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:auth-delegator
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
@ -19,23 +19,24 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert -f compose-navidrome.yaml
|
kompose.cmd: kompose convert -f compose-navidrome.yaml
|
||||||
kompose.version: 1.38.0 (HEAD)
|
kompose.version: 1.38.0 (HEAD)
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/role: "navidrome-role"
|
||||||
|
vault.hashicorp.com/agent-inject-secret-credentials: "secret/data/navidrome/config"
|
||||||
|
vault.hashicorp.com/agent-inject-template-credentials: |
|
||||||
|
{{- with secret "secret/data/navidrome/config" -}}
|
||||||
|
export ND_LASTFM_APIKEY="{{ .Data.data.lastfm_api_key }}"
|
||||||
|
export ND_LASTFM_SECRET="{{ .Data.data.lastfm_secret }}"
|
||||||
|
{{- end -}}
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: navidrome
|
io.kompose.service: navidrome
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: navidrome-sa
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: ND_LASTFM_APIKEY
|
- name: ND_LASTFM_APIKEY
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: lastfm-api-key
|
|
||||||
key: api_key
|
|
||||||
- name: ND_LASTFM_ENABLED
|
- name: ND_LASTFM_ENABLED
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: ND_LASTFM_SECRET
|
- name: ND_LASTFM_SECRET
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: lastfm-secret
|
|
||||||
key: secret
|
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: America/New_York
|
value: America/New_York
|
||||||
image: deluan/navidrome:latest
|
image: deluan/navidrome:latest
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue