-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwasm-function.yaml
733 lines (732 loc) · 16.6 KB
/
wasm-function.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
---
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: wasm
handler: wasm
---
# Source: fission-all/templates/misc-functions/namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: fission-function
labels:
name: fission-function
chart: "fission-all-v1.17.0"
---
# Source: fission-all/templates/misc-functions/namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: fission-builder
labels:
name: fission-builder
chart: "fission-all-v1.17.0"
---
# Source: fission-all/templates/common/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: fission-svc
namespace: fission
---
# Source: fission-all/templates/misc-functions/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: fission-fetcher
namespace: fission-function
---
# Source: fission-all/templates/misc-functions/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: fission-builder
namespace: fission-builder
---
# Source: fission-all/templates/controller/cm.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-config
namespace: fission
data:
"config.yaml": Y2FuYXJ5OgogIGVuYWJsZWQ6IGZhbHNlCiAgcHJvbWV0aGV1c1N2YzogIiIKYXV0aDoKICBlbmFibGVkOiBmYWxzZQ==
---
# Source: fission-all/templates/common/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: fission-v1-17-0-fission-cr-admin
rules:
- apiGroups:
- ""
resources:
- configmaps
- pods
- secrets
- services
- serviceaccounts
- replicationcontrollers
- namespaces
- events
verbs:
- create
- delete
- get
- list
- watch
- patch
- apiGroups:
- apps
resources:
- deployments
- deployments/scale
- replicasets
verbs:
- '*'
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- apiGroups:
- fission.io
resources:
- canaryconfigs
- environments
- functions
- httptriggers
- kuberneteswatchtriggers
- messagequeuetriggers
- packages
- timetriggers
verbs:
- '*'
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- '*'
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- '*'
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
verbs:
- bind
- apiGroups:
- keda.sh
resources:
- scaledjobs
- scaledobjects
- scaledjobs/finalizers
- scaledjobs/status
- triggerauthentications
- triggerauthentications/status
verbs:
- '*'
- apiGroups:
- keda.k8s.io
resources:
- scaledjobs
- scaledobjects
- scaledjobs/finalizers
- scaledjobs/status
- triggerauthentications
- triggerauthentications/status
verbs:
- '*'
- apiGroups:
- metrics.k8s.io
resources:
- pods
verbs:
- get
- list
---
# Source: fission-all/templates/misc-functions/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: fission-v1-17-0-secret-configmap-getter
rules:
- apiGroups:
- "*"
resources:
- secrets
- configmaps
verbs:
- get
- watch
- list
---
# Source: fission-all/templates/misc-functions/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: fission-v1-17-0-package-getter
rules:
- apiGroups:
- "*"
resources:
- packages
verbs:
- "*"
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- "*"
---
# Source: fission-all/templates/common/clusterrolebinding.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fission-v1-17-0-fission-cr-admin
subjects:
- kind: ServiceAccount
name: fission-svc
namespace: fission
roleRef:
kind: ClusterRole
name: fission-v1-17-0-fission-cr-admin
apiGroup: rbac.authorization.k8s.io
---
# Source: fission-all/templates/misc-functions/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: fission-v1-17-0-fission-fetcher
namespace: default
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- "*"
- apiGroups:
- fission.io
resources:
- canaryconfigs
- environments
- functions
- httptriggers
- kuberneteswatchtriggers
- messagequeuetriggers
- packages
- timetriggers
verbs:
- "*"
---
# Source: fission-all/templates/misc-functions/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: fission-v1-17-0-fission-builder
namespace: default
rules:
- apiGroups:
- fission.io
resources:
- canaryconfigs
- environments
- functions
- httptriggers
- kuberneteswatchtriggers
- messagequeuetriggers
- packages
- timetriggers
verbs:
- "*"
---
# Source: fission-all/templates/misc-functions/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: fission-function
name: fission-v1-17-0-event-fetcher
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
- apiGroups: [""] # "" indicates the core API group
resources: ["events"]
verbs: ["*"]
---
# Source: fission-all/templates/misc-functions/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: fission-v1-17-0-fission-fetcher
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: fission-v1-17-0-fission-fetcher
subjects:
- kind: ServiceAccount
name: fission-fetcher
namespace: fission-function
---
# Source: fission-all/templates/misc-functions/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: fission-v1-17-0-fission-builder
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: fission-v1-17-0-fission-builder
subjects:
- kind: ServiceAccount
name: fission-builder
namespace: fission-builder
---
# Source: fission-all/templates/misc-functions/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: fission-v1-17-0-fission-fetcher-pod-reader
namespace: fission-function
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: fission-v1-17-0-event-fetcher
subjects:
- kind: ServiceAccount
name: fission-fetcher
namespace: fission-function
---
# Source: fission-all/templates/controller/svc.yaml
apiVersion: v1
kind: Service
metadata:
name: controller
labels:
svc: controller
application: fission-api
chart: "fission-all-v1.17.0"
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8888
selector:
svc: controller
---
# Source: fission-all/templates/executor/svc.yaml
apiVersion: v1
kind: Service
metadata:
name: executor
labels:
svc: executor
chart: "fission-all-v1.17.0"
spec:
type: NodePort
ports:
- nodePort: 32088
port: 80
targetPort: 8888
selector:
svc: executor
---
# Source: fission-all/templates/router/svc.yaml
apiVersion: v1
kind: Service
metadata:
name: router
labels:
svc: router
application: fission-router
chart: "fission-all-v1.17.0"
spec:
type: NodePort
ports:
- nodePort: 32046
port: 80
targetPort: 8888
selector:
svc: router
---
# apiVersion: v1
# kind: Service
# metadata:
# name: agent
# labels:
# svc: agent
# application: fission-agent
# chart: "fission-all-v1.17.0"
# spec:
# type: NodePort
# ports:
# - NodePort: 32338
# port: 80
# targetPort: 8888
# selector:
# svc: agent
---
# Source: fission-all/templates/controller/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller
labels:
chart: "fission-all-v1.17.0"
svc: controller
application: fission-api
spec:
replicas: 1
selector:
matchLabels:
svc: controller
application: fission-api
template:
metadata:
labels:
svc: controller
application: fission-api
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
prometheus.io/port: "8080"
spec:
containers:
- name: controller
image: "amnesia1997/fission-bundle:v0.1.1"
imagePullPolicy: IfNotPresent
command: ["/fission-bundle"]
args: ["--controllerPort", "8888"]
env:
- name: FISSION_FUNCTION_NAMESPACE
value: "fission-function"
- name: DEBUG_ENV
value: "false"
- name: PPROF_ENABLED
value: "false"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: ""
- name: OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: OTEL_TRACES_SAMPLER
value: "parentbased_traceidratio"
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.1"
- name: OTEL_PROPAGATORS
value: "tracecontext,baggage"
- name: REAPER_IDLE_POD_REAP_TIME
value: "3m"
resources:
{}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
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
ports:
- containerPort: 8080
name: metrics
- containerPort: 8888
name: http
serviceAccountName: fission-svc
volumes:
- name: config-volume
configMap:
name: feature-config
---
# Source: fission-all/templates/executor/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: executor
labels:
chart: "fission-all-v1.17.0"
svc: executor
spec:
replicas: 1
selector:
matchLabels:
svc: executor
template:
metadata:
labels:
svc: executor
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
prometheus.io/port: "8080"
spec:
containers:
- name: executor
image: "amnesia1997/fission-bundle:v0.1.1"
imagePullPolicy: IfNotPresent
command: ["/fission-bundle"]
args: ["--executorPort", "8888", "--namespace", "fission-function"]
env:
- name: FETCHER_IMAGE
value: "fission/fetcher:v1.17.0"
- name: FETCHER_IMAGE_PULL_POLICY
value: "IfNotPresent"
- name: RUNTIME_IMAGE_PULL_POLICY
value: "IfNotPresent"
- name: ADOPT_EXISTING_RESOURCES
value: "false"
- name: POD_READY_TIMEOUT
value: "300s"
- name: ENABLE_ISTIO
value: "false"
- name: FETCHER_MINCPU
value: "10m"
- name: FETCHER_MINMEM
value: "16Mi"
- name: FETCHER_MAXCPU
value: ""
- name: FETCHER_MAXMEM
value: ""
- name: DEBUG_ENV
value: "false"
- name: PPROF_ENABLED
value: "false"
- name: HELM_RELEASE_NAME
value: "fission-v1-17-0"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: ""
- name: OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: OTEL_TRACES_SAMPLER
value: "parentbased_traceidratio"
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.1"
- name: OTEL_PROPAGATORS
value: "tracecontext,baggage"
- name: MASTER_IP
value: "localhost"
- name: NODE_PORT
value: "32088"
resources:
{}
readinessProbe:
httpGet:
path: "/healthz"
port: 8888
initialDelaySeconds: 1
periodSeconds: 1
failureThreshold: 30
livenessProbe:
httpGet:
path: "/healthz"
port: 8888
initialDelaySeconds: 35
periodSeconds: 5
ports:
- containerPort: 8080
name: metrics
- containerPort: 8888
name: http
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
serviceAccountName: fission-svc
---
# Source: fission-all/templates/router/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: router
labels:
chart: "fission-all-v1.17.0"
svc: router
application: fission-router
spec:
replicas: 1
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: "amnesia1997/fission-bundle:v0.1.1"
imagePullPolicy: IfNotPresent
command: ["/fission-bundle"]
args: ["--routerPort", "8888", "--executorUrl", "http://executor.fission"]
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ROUTER_ROUND_TRIP_TIMEOUT
value: "50ms"
- name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT
value: "2"
- name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME
value: "30s"
- name: ROUTER_ROUND_TRIP_DISABLE_KEEP_ALIVE
value: "true"
- name: ROUTER_ROUND_TRIP_MAX_RETRIES
value: "10"
- name: ROUTER_SVC_ADDRESS_MAX_RETRIES
value: "5"
- name: ROUTER_SVC_ADDRESS_UPDATE_TIMEOUT
value: "30s"
- name: ROUTER_UNTAP_SERVICE_TIMEOUT
value: "3600s"
- name: USE_ENCODED_PATH
value: "false"
- name: DEBUG_ENV
value: "true"
- name: PPROF_ENABLED
value: "false"
- name: DISPLAY_ACCESS_LOG
value: "false"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: ""
- name: OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: OTEL_TRACES_SAMPLER
value: "parentbased_traceidratio"
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.1"
- name: OTEL_PROPAGATORS
value: "tracecontext,baggage"
resources:
{}
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
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
serviceAccountName: fission-svc
volumes:
- name: config-volume
configMap:
name: feature-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: timer
labels:
chart: "fission-all-v1.17.0"
svc: timer
spec:
replicas: 1
selector:
matchLabels:
svc: timer
template:
metadata:
labels:
svc: timer
spec:
containers:
- name: timer
image: "amnesia1997/fission-bundle:v0.1.1"
imagePullPolicy: IfNotPresent
command: ["/fission-bundle"]
args: ["--timer", "--routerUrl", "http://router.fission"]
env:
- name: DEBUG_ENV
value: "false"
- name: PPROF_ENABLED
value: "false"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: ""
- name: OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: OTEL_TRACES_SAMPLER
value: "parentbased_traceidratio"
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.1"
- name: OTEL_PROPAGATORS
value: "tracecontext,baggage"
resources:
{}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
serviceAccountName: fission-svc
---