You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/buildless-serverless/api/v1alpha2/function_types.go
+47-3Lines changed: 47 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -50,21 +50,31 @@ type FunctionSpec struct {
50
50
// Specifies an array of key-value pairs to be used as environment variables for the Function.
51
51
// You can define values as static strings or reference values from ConfigMaps or Secrets.
52
52
// For configuration details, see the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/).
53
-
// +kubebuilder:validation:XValidation:message="Following envs are reserved and cannot be used: ['FUNC_RUNTIME','FUNC_HANDLER','FUNC_PORT','FUNC_HANDLER_SOURCE','FUNC_HANDLER_DEPENDENCIES','MOD_NAME','NODE_PATH','PYTHONPATH']",rule="(self.all(e, !(e.name in ['FUNC_RUNTIME','FUNC_HANDLER','FUNC_PORT','MOD_NAME','NODE_PATH','PYTHONPATH'])))"
53
+
// +kubebuilder:validation:XValidation:message="Following envs are reserved and cannot be used: ['FUNC_RUNTIME','FUNC_HANDLER','FUNC_PORT','FUNC_HANDLER_SOURCE','FUNC_HANDLER_DEPENDENCIES','MOD_NAME','NODE_PATH','PYTHONPATH']",rule="(self.all(e, !(e.name in ['FUNC_RUNTIME','FUNC_HANDLER','FUNC_PORT','FUNC_HANDLER_SOURCE','FUNC_HANDLER_DEPENDENCIES','MOD_NAME','NODE_PATH','PYTHONPATH'])))"
54
54
Env []corev1.EnvVar`json:"env,omitempty"`
55
55
56
56
// Specifies resources requested by the Function and the build Job.
// Defines the exact number of Function's Pods to run at a time.
61
-
// If the Function is targeted by an external scaler,
66
+
// If the Function is targeted by an external scaler,
62
67
// then the **Replicas** field is used by the relevant HorizontalPodAutoscaler to control the number of active replicas.
63
68
// +kubebuilder:validation:Minimum=0
64
69
// +kubebuilder:default:=1
65
70
// +optional
66
71
Replicas*int32`json:"replicas,omitempty"`
67
72
73
+
// Deprecated: Use **Labels** and **Annotations** to label and/or annotate Function's Pods.
74
+
// +optional
75
+
// +kubebuilder:validation:XValidation:message="Not supported: Use spec.labels and spec.annotations to label and/or annotate Function's Pods.",rule="!has(self.labels) && !has(self.annotations)"
76
+
Template*Template`json:"template,omitempty"`
77
+
68
78
// Specifies Secrets to mount into the Function's container filesystem.
// +kubebuilder:validation:XValidation:message="Invalid profile, please use one of: ['local-dev','slow','normal','fast']",rule="(!has(self.profile) || self.profile in ['local-dev','slow','normal','fast'])"
0 commit comments