Files
helm-charts-hardened/examples/mysql-using-spire/mysqlclient-statefulset.yaml
T
Eric Cavalcanti 5e40cfb222 Update imagePullPolicy to IfNotPresent (#643)
* Change selinux image pullpolicy and tag version

Signed-off-by: Eric Cavalcanti <[email protected]>

* Change image pullpolicy

Signed-off-by: Eric Cavalcanti <[email protected]>

* Update readme

Signed-off-by: Eric Cavalcanti <[email protected]>

* update examples

Signed-off-by: Eric Cavalcanti <[email protected]>

* Update image pullpolicy

Signed-off-by: Eric Cavalcanti <[email protected]>

* Fix readme as well

Signed-off-by: Eric Cavalcanti <[email protected]>

* Undo pullpolicy readme

Signed-off-by: Eric Cavalcanti <[email protected]>

* Add selinux

Signed-off-by: Eric Cavalcanti <[email protected]>

* Revert code block

Signed-off-by: Eric Cavalcanti <[email protected]>

* Change regex

Signed-off-by: Eric Cavalcanti <[email protected]>

---------

Signed-off-by: Eric Cavalcanti <[email protected]>
2025-08-11 06:19:27 -07:00

79 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysqlclient
spec:
replicas: 1
#serviceName: mysqlclient
selector:
matchLabels:
app.kubernetes.io/instance: mysqlclient
template:
metadata:
labels:
app.kubernetes.io/instance: mysqlclient
spec:
terminationGracePeriodSeconds: 0
initContainers:
- name: init-tls
image: ghcr.io/spiffe/spiffe-helper:0.8.0
imagePullPolicy: IfNotPresent
command:
- /spiffe-helper
- -config
- /etc/spiffe-helper.conf
- -daemon-mode=false
securityContext:
runAsUser: 1001
runAsGroup: 1001
volumeMounts:
- name: spiffe-workload-api
mountPath: /spiffe-workload-api
readOnly: true
- name: spiffe-helper-configmap
mountPath: /etc/spiffe-helper.conf
subPath: spiffe-helper.conf
readOnly: true
- name: certdir
mountPath: /certs
containers:
- name: main
image: docker.io/bitnami/mysql:8.0.35-debian-11-r0
command: [sleep, inf]
securityContext:
runAsUser: 1001
runAsGroup: 1001
volumeMounts:
- name: certdir
mountPath: /certs
- name: refresh-tls
image: ghcr.io/spiffe/spiffe-helper:0.8.0
imagePullPolicy: IfNotPresent
command:
- /spiffe-helper
- -config
- /etc/spiffe-helper.conf
securityContext:
runAsUser: 1001
runAsGroup: 1001
volumeMounts:
- name: spiffe-workload-api
mountPath: /spiffe-workload-api
readOnly: true
- name: spiffe-helper-configmap
mountPath: /etc/spiffe-helper.conf
subPath: spiffe-helper.conf
readOnly: true
- name: certdir
mountPath: /certs
volumes:
- name: certdir
emptyDir: {}
- name: spiffe-helper-configmap
configMap:
name: mysqlclient
- name: spiffe-workload-api
csi:
driver: "csi.spiffe.io"
readOnly: true