95 lines
3.4 KiB
YAML
95 lines
3.4 KiB
YAML
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: 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:
|
|
containers:
|
|
- name: router
|
|
image: {{ include "fission-bundleImage" . | quote }}
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--routerPort", "8888", "--executorUrl", "http://executor.{{ .Release.Namespace }}"]
|
|
env:
|
|
- 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: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
|
value: "{{ .Values.traceCollectorEndpoint }}"
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.router.traceSamplingRate | default "0.5" | quote }}
|
|
- name: USE_ENCODED_PATH
|
|
value: {{ .Values.router.useEncodedPath | default false | quote }}
|
|
- name: DEBUG_ENV
|
|
value: {{ .Values.debugEnv | quote }}
|
|
- name: DISPLAY_ACCESS_LOG
|
|
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
|
{{- if .Values.analytics }}
|
|
- name: ANALYTICS_URL
|
|
value: "https://g.fission.io/metrics"
|
|
{{- else if .Values.analyticsNonHelmInstall }}
|
|
- name: ANALYTICS_URL
|
|
value: "https://g.fission.io/metrics"
|
|
{{- end }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/router-healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 1
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/router-healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 35
|
|
periodSeconds: 5
|
|
ports:
|
|
- containerPort: 8080
|
|
name: metrics
|
|
- containerPort: 8888
|
|
name: http
|
|
serviceAccountName: fission-svc
|
|
{{- if .Values.extraCoreComponentPodConfig }}
|
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
|
{{- end }}
|