As of K8s 1.8, RBAC mode is stable and backed by the rbac.authorization.k8s.io/v1 API. Using v1beta1 API version for RBAC based objects fails helm deployment of fission on minikube
426 lines
12 KiB
YAML
426 lines
12 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: {{ .Values.functionNamespace }}
|
|
labels:
|
|
name: fission-function
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
{{- if .Values.enableIstio }}
|
|
istio-injection: enabled
|
|
{{- end }}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: {{ .Values.builderNamespace }}
|
|
labels:
|
|
name: fission-builder
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
{{- if .Values.enableIstio }}
|
|
istio-injection: enabled
|
|
{{- end }}
|
|
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: secret-configmap-getter
|
|
rules:
|
|
- apiGroups:
|
|
- '*'
|
|
resources:
|
|
- secrets
|
|
- configmaps
|
|
verbs:
|
|
- get
|
|
- watch
|
|
- list
|
|
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: package-getter
|
|
rules:
|
|
- apiGroups:
|
|
- '*'
|
|
resources:
|
|
- packages
|
|
verbs:
|
|
- get
|
|
- watch
|
|
- list
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fission-svc
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: fission-admin
|
|
namespace: {{ .Release.Namespace }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: fission-svc
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: admin
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: fission-crd
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: fission-svc
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: cluster-admin
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fission-fetcher
|
|
namespace: {{ .Values.functionNamespace }}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fission-builder
|
|
namespace: {{ .Values.builderNamespace }}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: feature-config
|
|
namespace: {{ .Release.Namespace }}
|
|
data:
|
|
"config.yaml": {{ include "config" . | b64enc }}
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: controller
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: controller
|
|
application: fission-api
|
|
spec:
|
|
containers:
|
|
- name: controller
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--controllerPort", "8888", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
- name: FISSION_FUNCTION_NAMESPACE
|
|
value: "{{ .Values.functionNamespace }}"
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 1
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 35
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /etc/config/config.yaml
|
|
subPath: config.yaml
|
|
serviceAccount: fission-svc
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: feature-config
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: router
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
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: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--routerPort", "8888", "--executorUrl", "http://executor.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
- name: ROUTER_ROUND_TRIP_TIMEOUT
|
|
value: {{ .Values.routerRoundTripTimeout | default "50ms" | quote }}
|
|
- name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT
|
|
value: {{ .Values.routerRoundTripTimeoutExponent | default 2 | quote }}
|
|
- name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME
|
|
value: {{ .Values.routerRoundTripKeepAliveTime | default "30s" | quote }}
|
|
- name: ROUTER_ROUND_TRIP_MAX_RETRIES
|
|
value: {{ .Values.routerRoundTripMaxRetries | default 10 | quote }}
|
|
- name: ROUTER_ROUND_TRIP_SVC_ADDRESS_MAX_RETRIES
|
|
value: {{ .Values.routerRoundTripSvcAddressMaxRetries | default 5 | quote }}
|
|
- name: ROUTER_ROUND_TRIP_SVC_ADDRESS_UPDATE_TIMEOUT
|
|
value: {{ .Values.routerRoundTripSvcAddressUpdateTimeout | default 30 | quote }}
|
|
- name: DEBUG_ENV
|
|
value: {{ .Values.debugEnv | quote }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/router-healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 1
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/router-healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 35
|
|
periodSeconds: 5
|
|
serviceAccount: fission-svc
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: executor
|
|
labels:
|
|
svc: executor
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8888
|
|
selector:
|
|
svc: executor
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: executor
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: executor
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/path: "/metrics"
|
|
prometheus.io/port: "8080"
|
|
spec:
|
|
containers:
|
|
- name: executor
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--fission-namespace", "{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: FETCHER_IMAGE
|
|
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
|
- name: FETCHER_IMAGE_PULL_POLICY
|
|
value: "{{ .Values.pullPolicy }}"
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
- name: ENABLE_ISTIO
|
|
value: "{{ .Values.enableIstio }}"
|
|
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
|
value: "{{ .Values.traceCollectorEndpoint }}"
|
|
- name: FETCHER_MINCPU
|
|
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
|
- name: FETCHER_MINMEM
|
|
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
|
- name: FETCHER_MAXCPU
|
|
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
|
- name: FETCHER_MAXMEM
|
|
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 1
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/healthz"
|
|
port: 8888
|
|
initialDelaySeconds: 35
|
|
periodSeconds: 5
|
|
serviceAccount: fission-svc
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: buildermgr
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: buildermgr
|
|
spec:
|
|
containers:
|
|
- name: buildermgr
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: FETCHER_IMAGE
|
|
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
|
- name: FETCHER_IMAGE_PULL_POLICY
|
|
value: "{{ .Values.pullPolicy }}"
|
|
- name: BUILDER_IMAGE_PULL_POLICY
|
|
value: "{{ .Values.pullPolicy }}"
|
|
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
|
value: "{{ .Values.traceCollectorEndpoint }}"
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
- name: ENABLE_ISTIO
|
|
value: "{{ .Values.enableIstio }}"
|
|
serviceAccount: fission-svc
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: kubewatcher
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: kubewatcher
|
|
spec:
|
|
containers:
|
|
- name: kubewatcher
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--kubewatcher", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
serviceAccount: fission-svc
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: timer
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: timer
|
|
spec:
|
|
containers:
|
|
- name: timer
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--timer", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
serviceAccount: fission-svc
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: storagesvc
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: storagesvc
|
|
application: fission-storage
|
|
spec:
|
|
containers:
|
|
- name: storagesvc
|
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--storageServicePort", "8000", "--filePath", "/fission", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
|
env:
|
|
- name: PRUNE_INTERVAL
|
|
value: "{{.Values.pruneInterval}}"
|
|
- name: TRACING_SAMPLING_RATE
|
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
|
volumeMounts:
|
|
- name: fission-storage
|
|
mountPath: /fission
|
|
serviceAccount: fission-svc
|
|
volumes:
|
|
- name: fission-storage
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.existingClaim | default "fission-storage-pvc" }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end -}}
|