all repos — janny @ 9f26b2436e13adeca2721f669d3d8368735d340b

clean up Kubernetes resources after a set TTL

deploy/deployment.yaml (view raw)

 1apiVersion: apps/v1
 2kind: Deployment
 3metadata:
 4  name: janny
 5  labels:
 6    app: janny
 7  annotations:
 8    janny.ttl: "2m"
 9spec:
10  selector:
11    matchLabels:
12      app: janny
13  replicas: 1
14  strategy:
15    type: RollingUpdate
16  template:
17    metadata:
18      labels:
19        app: janny
20    spec:
21      serviceAccountName: janny
22      containers:
23        - name: janny
24          image: janny:latest
25          imagePullPolicy: IfNotPresent