added repo
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
apiVersion: v2
|
||||
name: conntrack-adjuster
|
||||
description: A Helm chart for deploying conntrack-adjuster DaemonSet to adjust netfilter conntrack parameters
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0.0"
|
||||
keywords:
|
||||
- networking
|
||||
- conntrack
|
||||
- netfilter
|
||||
- daemonset
|
||||
home: https://github.com/your-org/conntrack-adjuster
|
||||
sources:
|
||||
- https://github.com/your-org/conntrack-adjuster
|
||||
maintainers:
|
||||
- name: Your Name
|
||||
email: your.email@example.com
|
||||
@@ -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 }}
|
||||
@@ -0,0 +1,103 @@
|
||||
# Default values for conntrack-adjuster
|
||||
|
||||
global:
|
||||
imageRegistry: ""
|
||||
imagePullSecrets: []
|
||||
|
||||
# Image settings
|
||||
image:
|
||||
repository: alpine
|
||||
tag: "3.6"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# DaemonSet configuration
|
||||
daemonSet:
|
||||
name: conntrack-adjuster
|
||||
namespace: kube-system
|
||||
labels: {}
|
||||
annotations: {}
|
||||
|
||||
# Container configuration
|
||||
container:
|
||||
name: sysctl
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- "while true; do sysctl -w net.netfilter.nf_conntrack_max=2097152 > /dev/null; echo 524288 > /sys/module/nf_conntrack/parameters/hashsize; sleep 30; done;"
|
||||
|
||||
# Security context
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
||||
# Resource limits and requests
|
||||
resources:
|
||||
requests:
|
||||
cpu: "10m"
|
||||
memory: "16Mi"
|
||||
limits:
|
||||
cpu: "50m"
|
||||
memory: "32Mi"
|
||||
|
||||
# Pod configuration
|
||||
pod:
|
||||
hostNetwork: true
|
||||
hostPID: true
|
||||
hostIPC: true
|
||||
|
||||
# Pod labels
|
||||
labels: {}
|
||||
|
||||
# Pod annotations
|
||||
annotations: {}
|
||||
|
||||
# Pod tolerations
|
||||
tolerations:
|
||||
- operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- operator: "Exists"
|
||||
effect: "NoExecute"
|
||||
- operator: "Exists"
|
||||
effect: "PreferNoSchedule"
|
||||
|
||||
# Volume configuration
|
||||
volumes:
|
||||
- name: sys
|
||||
hostPath:
|
||||
path: /sys
|
||||
|
||||
# Volume mounts
|
||||
volumeMounts:
|
||||
- name: sys
|
||||
mountPath: /sys
|
||||
|
||||
# Node affinity configuration
|
||||
# Each cluster should define its own nodeSelectorTerms in custom-values.yaml
|
||||
nodeAffinity:
|
||||
# Set to true to enable node affinity
|
||||
enabled: false
|
||||
# Define all nodeSelectorTerms for this cluster
|
||||
# Each item creates a separate nodeSelectorTerm (OR logic between terms)
|
||||
# matchExpressions within a term use AND logic
|
||||
nodeSelectorTerms: []
|
||||
# Example:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: dedicated
|
||||
# operator: In
|
||||
# values:
|
||||
# - "contour-internal-0"
|
||||
# - "contour-internal-1"
|
||||
# - "contour-external"
|
||||
# - matchExpressions:
|
||||
# - key: dedicated
|
||||
# operator: In
|
||||
# values:
|
||||
# - "megaquad"
|
||||
|
||||
# Conntrack configuration
|
||||
conntrack:
|
||||
# Maximum number of conntrack entries
|
||||
max: 2097152
|
||||
# Hash size for conntrack
|
||||
hashsize: 524288
|
||||
# Sleep interval between adjustments (seconds)
|
||||
sleepInterval: 30
|
||||
Reference in New Issue
Block a user