81 lines
2.1 KiB
Django/Jinja
81 lines
2.1 KiB
Django/Jinja
---
|
|
# Copyright 2020 VEXXHOST, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: chronyd
|
|
namespace: openstack
|
|
labels:
|
|
{{ labels("chronyd", "chronyd") | indent(4) }}
|
|
spec:
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
{{ labels("chronyd", "chronyd") | indent(6) }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ labels("chronyd", "chronyd") | indent(8) }}
|
|
spec:
|
|
containers:
|
|
- name: main
|
|
image: vexxhost/chronyd:latest
|
|
imagePullPolicy: Always
|
|
resources:
|
|
limits:
|
|
cpu: 50m
|
|
ephemeral-storage: 100M
|
|
memory: 64M
|
|
requests:
|
|
cpu: 10m
|
|
ephemeral-storage: 100M
|
|
memory: 32M
|
|
securityContext:
|
|
capabilities:
|
|
add: ["SYS_TIME"]
|
|
volumeMounts:
|
|
- mountPath: /etc/chrony/chrony.conf
|
|
subPath: chrony.conf
|
|
name: config
|
|
- mountPath: /var/run/chrony
|
|
name: run
|
|
- mountPath: /var/lib/chrony
|
|
name: state
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: chronyd
|
|
- name: run
|
|
emptyDir: {}
|
|
- name: state
|
|
emptyDir: {}
|
|
{% if 'nodeSelector' in spec %}
|
|
nodeSelector:
|
|
{{ spec.nodeSelector | to_yaml | indent(8) }}
|
|
{% endif %}
|
|
tolerations:
|
|
- key: CriticalAddonsOnly
|
|
operator: Exists
|
|
- operator: Exists
|
|
- effect: NoSchedule
|
|
key: node-role.kubernetes.io/master
|
|
{% if 'tolerations' in spec %}
|
|
{{ spec.tolerations | to_yaml | indent(8) }}
|
|
{% endif %}
|