Files
argoyle de495a8c5e fix(deployment): update label to use standardized format
Change the labels for the cron-checker application in the 
deployment configuration to adhere to Kubernetes' recommended 
labeling conventions. This improves consistency and allows 
better integration with tools that rely on standardized 
labels for application management.
2025-01-24 15:39:11 +01:00

69 lines
1.5 KiB
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: cron-checker
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cron-checker
namespace: kube-system
rules:
- apiGroups: ["", "batch"]
resources: ["cronjobs"]
verbs: ["list", "watch", "get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cron-checker
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cron-checker
subjects:
- kind: ServiceAccount
name: cron-checker
namespace: kube-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: cron-checker
name: cron-checker
spec:
selector:
matchLabels:
app.kubernetes.io/name: cron-checker
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: cron-checker
spec:
serviceAccountName: cron-checker
containers:
- name: cron-checker
resources:
limits:
memory: "50Mi"
requests:
memory: "50Mi"
imagePullPolicy: IfNotPresent
image: registry.gitlab.com/unboundsoftware/cron-checker:1.2
args:
- /cron-checker
env:
- name: SLACK_URL
value: <some Slack webhook URL>
restartPolicy: Always