| # Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| # license agreements; and to You under the Apache License, Version 2.0. |
| |
| {{ if .Values.invoker.containerFactory.kubernetes.agent.enabled }} |
| apiVersion: apps/v1 |
| kind: DaemonSet |
| metadata: |
| name: {{ .Release.Name }}-invoker-agent |
| labels: |
| name: {{ .Release.Name }}-invoker-agent |
| {{ include "openwhisk.label_boilerplate" .| indent 4 }} |
| spec: |
| selector: |
| matchLabels: |
| name: {{ .Release.Name }}-invoker-agent |
| template: |
| metadata: |
| labels: |
| name: {{ .Release.Name }}-invoker-agent |
| {{ include "openwhisk.label_boilerplate" . | indent 8 }} |
| spec: |
| restartPolicy: Always |
| hostNetwork: true |
| |
| affinity: |
| {{ include "openwhisk.affinity.invoker" . | indent 8 }} |
| |
| volumes: |
| {{ include "openwhisk.docker_volumes" . | indent 6 }} |
| - name: userlogs |
| emptyDir: {} |
| - name: scripts-dir |
| configMap: |
| name: {{ .Release.Name }}-invoker-scripts |
| |
| initContainers: |
| # Pull images for all default runtimes before starting invoker |
| {{ include "openwhisk.docker_pull_runtimes" . | indent 6 }} |
| {{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }} |
| containers: |
| - name: invoker-agent |
| image: "{{- .Values.docker.registry.name -}}{{- .Values.invoker.containerFactory.kubernetes.agent.imageName -}}:{{- .Values.invoker.containerFactory.kubernetes.agent.imageTag -}}" |
| imagePullPolicy: {{ .Values.invoker.containerFactory.kubernetes.agent.imagePullPolicy | quote }} |
| securityContext: |
| privileged: true |
| ports: |
| - name: agent |
| containerPort: {{ .Values.invoker.containerFactory.kubernetes.agent.port }} |
| volumeMounts: |
| {{ include "openwhisk.docker_volume_mounts" . | indent 8 }} |
| - name: userlogs |
| mountPath: "/action-logs" |
| {{- end }} |