60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
|
apiVersion: v1
|
||
|
kind: ServiceAccount
|
||
|
metadata:
|
||
|
name: kreaper-debug
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: Role
|
||
|
metadata:
|
||
|
name: kreaper-debug
|
||
|
rules:
|
||
|
- verbs:
|
||
|
- list
|
||
|
- watch
|
||
|
- deletecollection
|
||
|
apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- pods
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: RoleBinding
|
||
|
metadata:
|
||
|
name: kreaper-debug
|
||
|
roleRef:
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
kind: Role
|
||
|
name: kreaper-debug
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: kreaper-debug
|
||
|
---
|
||
|
apiVersion: batch/v1
|
||
|
kind: Job
|
||
|
metadata:
|
||
|
name: kreaper
|
||
|
spec:
|
||
|
backoffLimit: 3
|
||
|
completions: 1
|
||
|
ttlSecondsAfterFinished: 30
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app.kubernetes.io/name: kreaper
|
||
|
spec:
|
||
|
restartPolicy: OnFailure
|
||
|
serviceAccountName: kreaper-debug
|
||
|
containers:
|
||
|
- name: kreaper
|
||
|
image: kreaper
|
||
|
args:
|
||
|
- -log-level=debug
|
||
|
env:
|
||
|
- name: KREAPER_TARGET
|
||
|
value: org.testcontainers.golang/sessionID=ee8dcc4d-72b5-4e77-8244-37abe525f948
|
||
|
- name: KREAPER_LIFETIME
|
||
|
value: "30s"
|
||
|
- name: KREAPER_TARGET_NAMESPACE
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.namespace
|