File tree 2 files changed +64
-1
lines changed
2 files changed +64
-1
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ definitions:
402
402
cpu :
403
403
type : string
404
404
example : " 0.01"
405
+ readOnlyRootFilesystem :
406
+ type : string
407
+ description : if true, removes write-access from the root filesystem
405
408
required :
406
409
- service
407
410
- image
@@ -444,6 +447,48 @@ definitions:
444
447
type : object
445
448
additionalProperties :
446
449
type : string
450
+ network :
451
+ type : string
452
+ description : Docker swarm network, usually func_functions
453
+ example : func_functions
454
+ envVars :
455
+ type : object
456
+ additionalProperties :
457
+ type : string
458
+ description : Overrides to environmental variables
459
+ constraints :
460
+ type : array
461
+ items :
462
+ type : string
463
+ description : Constraints are specific to OpenFaaS Provider
464
+ example : " node.platform.os == linux"
465
+ secrets :
466
+ type : array
467
+ items :
468
+ type : string
469
+ description : An array of names of secrets that are required to be loaded from the Docker Swarm.
470
+ example : " secret-name-1"
471
+ limits :
472
+ type : object
473
+ properties :
474
+ memory :
475
+ type : string
476
+ example : " 128M"
477
+ cpu :
478
+ type : string
479
+ example : " 0.01"
480
+ requests :
481
+ type : object
482
+ properties :
483
+ memory :
484
+ type : string
485
+ example : " 128M"
486
+ cpu :
487
+ type : string
488
+ example : " 0.01"
489
+ readOnlyRootFilesystem :
490
+ type : string
491
+ description : if true, removes write-access from the root filesystem
447
492
required :
448
493
- name
449
494
- image
Original file line number Diff line number Diff line change @@ -74,7 +74,25 @@ type Function struct {
74
74
75
75
// Annotations are metadata for functions which may be used by the
76
76
// back-end for management, orchestration, events and build tasks
77
- Annotations * map [string ]string `json:"annotations"`
77
+ Annotations * map [string ]string `json:"annotations,omitempty"`
78
+
79
+ // Network is specific to Docker Swarm - default overlay network is: func_functions
80
+ Network string `json:"network,omitempty"`
81
+
82
+ // EnvVars provides overrides for functions.
83
+ EnvVars map [string ]string `json:"envVars,omitempty"`
84
+
85
+ // Constraints are specific to back-end orchestration platform
86
+ Constraints []string `json:"constraints,omitempty"`
87
+
88
+ // Secrets list of secrets to be made available to function
89
+ Secrets []string `json:"secrets,omitempty"`
90
+
91
+ // Limits for function
92
+ Limits * FunctionResources `json:"limits"`
93
+
94
+ // Requests of resources requested by function
95
+ Requests * FunctionResources `json:"requests"`
78
96
}
79
97
80
98
// AsyncReport is the report from a function executed on a queue worker.
You can’t perform that action at this time.
0 commit comments