Add validate function to crd resource and do validate before creation/update (#580)

This commit is contained in:
Ta-Ching Chen
2018-04-08 00:56:13 +08:00
committed by GitHub
parent 12299df811
commit d01b309fc7
26 changed files with 718 additions and 118 deletions
+9 -1
View File
@@ -99,6 +99,7 @@ type (
// package update, making it possible to cache the function based on its metadata.
ResourceVersion string `json:"resourceversion,omitempty"`
}
FunctionPackageRef struct {
PackageRef PackageRef `json:"packageref"`
@@ -289,11 +290,13 @@ type (
FunctionReference FunctionReference `json:"functionref"`
}
MessageQueueType string
// MessageQueueTriggerSpec defines a binding from a topic in a
// message queue to a function.
MessageQueueTriggerSpec struct {
FunctionReference FunctionReference `json:"functionref"`
MessageQueueType string `json:"messageQueueType"`
MessageQueueType MessageQueueType `json:"messageQueueType"`
Topic string `json:"topic"`
ResponseTopic string `json:"respTopic,omitempty"`
ContentType string `json:"contentType"`
@@ -387,6 +390,11 @@ const (
SharedVolumeConfigmaps = "configmaps"
)
const (
MessageQueueTypeNats = "nats-streaming"
MessageQueueTypeASQ = "azure-storage-queue"
)
const (
// FunctionReferenceFunctionName means that the function
// reference is simply by function name.