apiVersion: apps/v1
kind: DaemonSet metadata: name: openbao-logging-dir namespace: openbao spec: selector: matchLabels: app: openbao-logging-dir template: metadata: labels: app: openbao-logging-dir spec: initContainers: - name: creator image: busybox command: ["/bin/sh", "-c"] args: - | set -e mkdir -p /var/log/openbao chown 100:100 /var/log/openbao securityContext: runAsUser: 0 volumeMounts: - name: host-log mountPath: /var/log containers: - name: running-container image: busybox command: ["sleep", "infinity"] volumes: - name: host-log hostPath: path: /var/log type: Directory
This commit is contained in:
parent
3853370a8c
commit
881b65fcec
2 changed files with 66 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: openbao-logging-setup
|
||||
namespace: argocd
|
||||
labels:
|
||||
env: dev
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||
targetRevision: HEAD
|
||||
path: "stacks/ref-implementation/openbao-logging"
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: openbao
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
automated:
|
||||
selfHeal: true
|
||||
retry:
|
||||
limit: -1
|
||||
backoff:
|
||||
duration: 15s
|
||||
factor: 1
|
||||
maxDuration: 15s
|
|
@ -0,0 +1,37 @@
|
|||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: openbao-logging-dir
|
||||
namespace: openbao
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: openbao-logging-dir
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: openbao-logging-dir
|
||||
spec:
|
||||
initContainers:
|
||||
- name: creator
|
||||
image: busybox
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
mkdir -p /var/log/openbao
|
||||
chown 100:100 /var/log/openbao
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: host-log
|
||||
mountPath: /var/log
|
||||
containers:
|
||||
- name: running-container
|
||||
image: busybox
|
||||
command: ["sleep", "infinity"]
|
||||
volumes:
|
||||
- name: host-log
|
||||
hostPath:
|
||||
path: /var/log
|
||||
type: Directory
|
Loading…
Reference in a new issue