ea61be1ac4
Change-Id: Ia5c3ec489e5dc6c247b1ac3646285da4716d3e1a
112 lines
3.9 KiB
YAML
112 lines
3.9 KiB
YAML
{{/*
|
|
Copyright 2017 AT&T Intellectual Property. All other rights reserved.
|
|
|
|
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.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.daemonset_proxy }}
|
|
{{- $envAll := . }}
|
|
{{- $labels := tuple $envAll "kubernetes" "proxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" -}}
|
|
---
|
|
apiVersion: "apps/v1"
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: kubernetes-proxy
|
|
labels:
|
|
{{ $labels | indent 4 }}
|
|
annotations:
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{ $labels | indent 6 }}
|
|
{{ tuple $envAll "proxy" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ $labels | indent 8 }}
|
|
annotations:
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
|
{{ dict "envAll" $envAll "podName" "kubernetes-proxy" "containerNames" (list "proxy") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
|
spec:
|
|
{{ dict "envAll" $envAll "application" "proxy" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
hostNetwork: true
|
|
shareProcessNamespace: true
|
|
dnsPolicy: Default
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
effect: NoSchedule
|
|
- key: CriticalAddonsOnly
|
|
operator: Exists
|
|
- key: node.kubernetes.io/not-ready
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
containers:
|
|
- name: proxy
|
|
image: {{ .Values.images.tags.proxy }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
command:
|
|
{{- range .Values.command_prefix }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
- --hostname-override=$(NODE_NAME)
|
|
{{- if .Values.proxy.logging.log_level }}
|
|
- --v={{ .Values.proxy.logging.log_level }}
|
|
{{- end }}
|
|
{{ tuple $envAll $envAll.Values.pod.resources.proxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
|
|
{{ dict "envAll" $envAll "application" "proxy" "container" "proxy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 8 }}
|
|
env:
|
|
- name: KUBERNETES_SERVICE_HOST
|
|
value: {{ .Values.kube_service.host }}
|
|
- name: KUBERNETES_SERVICE_PORT
|
|
value: {{ .Values.kube_service.port | quote }}
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
livenessProbe:
|
|
{{ toYaml .Values.livenessProbe.config | indent 10 }}
|
|
exec:
|
|
command:
|
|
- /tmp/bin/liveness-probe.sh
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /tmp/bin/readiness-probe.sh
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 15
|
|
volumeMounts:
|
|
- name: bin
|
|
mountPath: /tmp/bin/
|
|
- mountPath: /run/xtables.lock
|
|
name: xtables-lock
|
|
readOnly: false
|
|
- mountPath: /lib/modules
|
|
name: lib-modules
|
|
readOnly: true
|
|
serviceAccountName: kube-proxy
|
|
volumes:
|
|
- name: bin
|
|
configMap:
|
|
name: kubernetes-proxy-bin
|
|
defaultMode: 0555
|
|
- name: xtables-lock
|
|
hostPath:
|
|
path: /run/xtables.lock
|
|
type: FileOrCreate
|
|
- name: lib-modules
|
|
hostPath:
|
|
path: /lib/modules
|
|
{{- end }}
|