apiVersion: apps/v1 {{- if not .Values.router.deployAsDaemonSet }} kind: Deployment {{- else }} kind: DaemonSet {{- end }} metadata: name: router labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" svc: router application: fission-router spec: {{- if not .Values.router.deployAsDaemonSet }} replicas: {{ .Values.router.replicas | default 1 }} {{- end }} selector: matchLabels: application: fission-router svc: router template: metadata: labels: application: fission-router svc: router annotations: prometheus.io/scrape: "true" prometheus.io/path: "/metrics" prometheus.io/port: "8080" spec: {{- if .Values.router.securityContext.enabled }} securityContext: {{- omit .Values.router.securityContext "enabled" | toYaml | nindent 8 }} {{- end }} containers: - name: router image: {{ include "fission-bundleImage" . | quote }} imagePullPolicy: {{ .Values.pullPolicy }} command: ["/fission-bundle"] args: ["--routerPort", "8888", "--executorUrl", "http://executor.{{ .Release.Namespace }}"] env: {{- if .Values.authentication.enabled }} - name: AUTH_USERNAME valueFrom: secretKeyRef: name: router key: username - name: AUTH_PASSWORD valueFrom: secretKeyRef: name: router key: password - name: JWT_SIGNING_KEY valueFrom: secretKeyRef: name: router key: jwtSigningKey {{- end }} - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: ROUTER_ROUND_TRIP_TIMEOUT value: {{ .Values.router.roundTrip.timeout | default "50ms" | quote }} - name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT value: {{ .Values.router.roundTrip.timeoutExponent | default 2 | quote }} - name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME value: {{ .Values.router.roundTrip.keepAliveTime | default "30s" | quote }} - name: ROUTER_ROUND_TRIP_DISABLE_KEEP_ALIVE value: {{ .Values.router.roundTrip.disableKeepAlive | default true | quote }} - name: ROUTER_ROUND_TRIP_MAX_RETRIES value: {{ .Values.router.roundTrip.maxRetries | default 10 | quote }} - name: ROUTER_SVC_ADDRESS_MAX_RETRIES value: {{ .Values.router.svcAddressMaxRetries | default 5 | quote }} - name: ROUTER_SVC_ADDRESS_UPDATE_TIMEOUT value: {{ .Values.router.svcAddressUpdateTimeout | default "30s" | quote }} - name: ROUTER_UNTAP_SERVICE_TIMEOUT value: {{ .Values.router.unTapServiceTimeout | default "3600s" | quote }} - name: USE_ENCODED_PATH value: {{ .Values.router.useEncodedPath | default false | quote }} - name: DEBUG_ENV value: {{ .Values.debugEnv | quote }} - name: PPROF_ENABLED value: {{ .Values.pprof.enabled | quote }} - name: DISPLAY_ACCESS_LOG value: {{ .Values.router.displayAccessLog | default false | quote }} {{- include "fission-resource-namespace.envs" . | indent 8 }} {{- include "kube_client.envs" . | indent 8 }} {{- include "opentelemtry.envs" . | indent 8 }} resources: {{- toYaml .Values.router.resources | nindent 10 }} readinessProbe: httpGet: path: "/router-healthz" port: 8888 initialDelaySeconds: 1 periodSeconds: 1 failureThreshold: 30 livenessProbe: httpGet: path: "/router-healthz" port: 8888 initialDelaySeconds: 35 periodSeconds: 5 volumeMounts: - name: config-volume mountPath: /etc/config/config.yaml subPath: config.yaml ports: - containerPort: 8080 name: metrics - containerPort: 8888 name: http {{- if .Values.pprof.enabled }} - containerPort: 6060 name: pprof {{- end }} {{- if .Values.router.terminationMessagePath }} terminationMessagePath: {{ .Values.router.terminationMessagePath }} {{- else if .Values.terminationMessagePath }} terminationMessagePath: {{ .Values.terminationMessagePath }} {{- end }} {{- if .Values.router.terminationMessagePolicy }} terminationMessagePolicy: {{ .Values.router.terminationMessagePolicy }} {{- else if .Values.terminationMessagePolicy }} terminationMessagePolicy: {{ .Values.terminationMessagePolicy }} {{- end }} serviceAccountName: fission-router volumes: - name: config-volume configMap: name: feature-config {{- if .Values.router.priorityClassName }} priorityClassName: {{ .Values.router.priorityClassName }} {{- else if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.router.extraCoreComponentPodConfig }} {{ toYaml .Values.router.extraCoreComponentPodConfig | indent 6 -}} {{- else }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} {{- end }}