Keda podspec (#2021)
* Add podspec to MQT Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Add preupgrade check Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Use zap logger Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
4ff204a0c4
commit
4e2632e100
@@ -490,6 +490,7 @@ type (
|
||||
// Function Reference by weight. this map contains function name as key and its weight
|
||||
// as the value. This is for canary upgrade purpose.
|
||||
// +nullable
|
||||
// +optional
|
||||
FunctionWeights map[string]int `json:"functionweights"`
|
||||
}
|
||||
|
||||
@@ -768,6 +769,16 @@ type (
|
||||
// Kind of Message Queue Trigger to be created, by default its fission
|
||||
// +optional
|
||||
MqtKind string `json:"mqtkind,omitempty"`
|
||||
|
||||
// (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec
|
||||
// The merging logic is briefly described below and detailed MergePodSpec function
|
||||
// - Volumes mounts and env variables for function and fetcher container are appended
|
||||
// - All additional containers and init containers are appended
|
||||
// - Volume definitions are appended
|
||||
// - Lists such as tolerations, ImagePullSecrets, HostAliases are appended
|
||||
// - Structs are merged and variables from pod spec take precedence
|
||||
// +optional
|
||||
PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
|
||||
}
|
||||
|
||||
// TimeTriggerSpec invokes the specific function at a time or
|
||||
|
||||
@@ -737,6 +737,11 @@ func (in *MessageQueueTriggerSpec) DeepCopyInto(out *MessageQueueTriggerSpec) {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.PodSpec != nil {
|
||||
in, out := &in.PodSpec, &out.PodSpec
|
||||
*out = new(corev1.PodSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user