149 lines
6.5 KiB
YAML
Executable File
149 lines
6.5 KiB
YAML
Executable File
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "snmp.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "snmp.name" . }}
|
|
helm.sh/chart: {{ include "snmp.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "snmp.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "snmp.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: default-registry-key
|
|
tolerations:
|
|
- key: "node-role.kubernetes.io/master"
|
|
operator: "Exists"
|
|
effect: "NoSchedule"
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: 161
|
|
protocol: UDP
|
|
- containerPort: 162
|
|
protocol: UDP
|
|
- containerPort: 705
|
|
protocol: TCP
|
|
env:
|
|
- name: "OPTIONDEBUG"
|
|
value: {{ .Values.image.debug }}
|
|
# Issues with liveness and readiness: https://bit.ly/3nVRQrL
|
|
# K8s issue related: https://github.com/kubernetes/kubernetes/issues/81713
|
|
#
|
|
# livenessProbe:
|
|
# tcpSocket:
|
|
# port: 705
|
|
# initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
# readinessProbe:
|
|
# tcpSocket:
|
|
# port: 705
|
|
# initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
|
volumeMounts:
|
|
- name: snmpd-etc-volume
|
|
mountPath: /etc/snmp
|
|
- name: {{ .Values.image.subagent_name }}
|
|
image: "{{ .Values.image.repository_subagent }}:{{ .Values.image.tag_subagent }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy_subagent }}
|
|
volumeMounts:
|
|
- name: snmpd-fm-volume
|
|
mountPath: /etc/fm/
|
|
env:
|
|
- name: "OPTIONDEBUG"
|
|
value: {{ .Values.image.debug }}
|
|
- name: "MASTER_AGENT_HOST"
|
|
value: {{ .Values.deployment.master_agent_host | quote}}
|
|
- name: "MASTER_AGENT_PORT"
|
|
value: {{ .Values.deployment.master_agent_port | quote}}
|
|
- name: "MASTER_AGENT_CONNECTION_RETRIES"
|
|
value: {{ .Values.deployment.master_agent_connection_retries | quote}}
|
|
# Fail on liveness and readiness as here: https://bit.ly/3nVRQrL
|
|
# K8s issue related: https://github.com/kubernetes/kubernetes/issues/81713
|
|
#
|
|
# args:
|
|
# - /bin/sh
|
|
# - -c
|
|
# - touch /tmp/healthy
|
|
# livenessProbe:
|
|
# exec:
|
|
# command:
|
|
# - cat
|
|
# - /tmp/healthy
|
|
# initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
# readinessProbe:
|
|
# exec:
|
|
# command:
|
|
# - cat
|
|
# - /tmp/healthy
|
|
# initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
|
- name: {{ .Values.image.trap_subagent_name }}
|
|
image: "{{ .Values.image.repository_trap_subagent }}:{{ .Values.image.tag_trap_subagent }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy_trap_subagent }}
|
|
ports:
|
|
- containerPort: 162
|
|
protocol: TCP
|
|
env:
|
|
- name: "OPTIONDEBUG"
|
|
value: {{ .Values.image.debug }}
|
|
- name: "MASTER_AGENT_HOST"
|
|
value: {{ .Values.deployment.master_agent_host | quote}}
|
|
- name: "MASTER_AGENT_PORT"
|
|
value: {{ .Values.deployment.master_agent_port | quote}}
|
|
- name: "MASTER_AGENT_CONNECTION_RETRIES"
|
|
value: {{ .Values.deployment.master_agent_connection_retries | quote}}
|
|
# Fail on liveness and readiness as here: https://bit.ly/3nVRQrL
|
|
# K8s issue related: https://github.com/kubernetes/kubernetes/issues/81713
|
|
#
|
|
# livenessProbe:
|
|
# tcpSocket:
|
|
# port: 162
|
|
# initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
# readinessProbe:
|
|
# tcpSocket:
|
|
# port: 162
|
|
# initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
|
# periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
|
# timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
|
# successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
|
# failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
|
volumes:
|
|
- name: snmpd-etc-volume
|
|
configMap:
|
|
name: {{ .Values.configmap.name_snmpd }}
|
|
- name: snmpd-fm-volume
|
|
configMap:
|
|
name: {{ .Values.configmap.name_fm }}
|