2025-02-19 15:59:07 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: good-deployment-1
|
|
|
|
labels:
|
|
|
|
prod: "true"
|
|
|
|
app: good-nginx
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
prod: "true"
|
|
|
|
app: good-nginx
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
prod: "true"
|
|
|
|
app: good-nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:latest
|
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
2025-03-13 19:52:51 +05:30
|
|
|
---
|
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: CronJob
|
|
|
|
metadata:
|
|
|
|
name: good-cronjob
|
|
|
|
spec:
|
|
|
|
schedule: "*/5 * * * *"
|
|
|
|
jobTemplate:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
prod: "true"
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
prod: "true"
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: secure-container
|
|
|
|
image: busybox
|
|
|
|
command: ["echo", "Hello, world"]
|
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
restartPolicy: OnFailure
|