added repo
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{{/*
|
||||
Generate the complete node affinity configuration
|
||||
*/}}
|
||||
{{- define "conntrack-adjuster.nodeAffinity" -}}
|
||||
{{- if and .Values.nodeAffinity.enabled .Values.nodeAffinity.nodeSelectorTerms }}
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
{{- toYaml .Values.nodeAffinity.nodeSelectorTerms | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,62 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ .Values.daemonSet.name }}
|
||||
namespace: {{ .Values.daemonSet.namespace }}
|
||||
labels:
|
||||
app: {{ .Values.daemonSet.name }}
|
||||
{{- with .Values.daemonSet.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.daemonSet.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.daemonSet.name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.daemonSet.name }}
|
||||
{{- with .Values.pod.labels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.pod.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
hostNetwork: {{ .Values.pod.hostNetwork }}
|
||||
hostPID: {{ .Values.pod.hostPID }}
|
||||
hostIPC: {{ .Values.pod.hostIPC }}
|
||||
containers:
|
||||
- name: {{ .Values.container.name }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: {{ .Values.container.command | toJson }}
|
||||
args:
|
||||
- "while true; do sysctl -w net.netfilter.nf_conntrack_max={{ .Values.conntrack.max | int }} > /dev/null; echo {{ .Values.conntrack.hashsize | int }} > /sys/module/nf_conntrack/parameters/hashsize; sleep {{ .Values.conntrack.sleepInterval | int }}; done;"
|
||||
securityContext:
|
||||
{{- toYaml .Values.container.securityContext | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.container.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- toYaml .Values.volumeMounts | nindent 12 }}
|
||||
volumes:
|
||||
{{- toYaml .Values.volumes | nindent 8 }}
|
||||
{{- if and .Values.nodeAffinity.enabled .Values.nodeAffinity.nodeSelectorTerms }}
|
||||
affinity:
|
||||
{{- include "conntrack-adjuster.nodeAffinity" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.pod.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user