Skip to content

Instantly share code, notes, and snippets.

@ammmze
Created October 26, 2021 21:23
Show Gist options
  • Save ammmze/3f12393b3623dbb30179b95adc334ac1 to your computer and use it in GitHub Desktop.
Save ammmze/3f12393b3623dbb30179b95adc334ac1 to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: chrony
namespace: host-system
spec:
selector:
matchLabels:
app: chrony
template:
metadata:
labels:
app: chrony
spec:
updateStrategy:
type: RollingUpdate
volumes:
- name: chrony
hostPath:
path: /var/lib/chrony
type: DirectoryOrCreate
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
containers:
- name: chrony
image: geoffh1977/chrony
volumeMounts:
- mountPath: /var/lib/chrony
name: chrony
ports:
- name: ntp
containerPort: 123
protocol: UDP
readinessProbe:
exec:
command:
- chronyc
- tracking
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 5
livenessProbe:
exec:
command:
- chronyc
- tracking
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 5
resources:
requests:
cpu: 20m
memory: 15Mi
limits:
cpu: 100m
memory: 30Mi
securityContext:
capabilities:
add:
- SYS_TIME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment