Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/compute/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ type JavaRuntime struct {
ExtraDependenciesDir string `json:"extraDependenciesDir,omitempty"`
Log *RuntimeLogConfig `json:"log,omitempty"`
JavaOpts []string `json:"javaOpts,omitempty"`
InstancePath *string `json:"instancePath,omitempty"`
EntryClass *string `json:"entryClass,omitempty"`
}

// PythonRuntime contains the python runtime configs
Expand Down
44 changes: 43 additions & 1 deletion api/compute/v1alpha1/function_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ type FunctionSpec struct {
FilebeatImage string `json:"filebeatImage,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:pruning:PreserveUnknownFields
FuncConfig *Config `json:"funcConfig,omitempty"`
FuncConfig *Config `json:"funcConfig,omitempty"`
// +kubebuilder:validation:Optional
SourceConfig *SourceConnectorSpec `json:"sourceConfig,omitempty"`
// +kubebuilder:validation:Optional
SinkConfig *SinkConnectorSpec `json:"sinkConfig,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
SecretsMap map[string]SecretRef `json:"secretsMap,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
Expand Down Expand Up @@ -152,6 +156,44 @@ type FunctionList struct {
Items []Function `json:"items"`
}

// SourceConnectorSpec describes configurable fields when a function overrides its source implementation.
type SourceConnectorSpec struct {
// Archive points to a nar archive containing the connector. It can reference built-in connectors using the
// builtin:// scheme.
// +kubebuilder:validation:Optional
SourceType string `json:"sourceType,omitempty"` // refer to `--source-type` as builtin connector
// Builtin holds the resolved name of a built-in source connector.
// +kubebuilder:validation:Optional
BatchSourceConfig *BatchSourceConfig `json:"batchSourceConfig,omitempty"`
// ClassName is the fully qualified source implementation class.
// +kubebuilder:validation:Optional
ClassName string `json:"className,omitempty"`
// TypeClassName overrides the expected message type.
// +kubebuilder:validation:Optional
TypeClassName string `json:"typeClassName,omitempty"`
// Configs contains connector specific options.
// +kubebuilder:validation:Optional
// +kubebuilder:pruning:PreserveUnknownFields
Configs *Config `json:"configs,omitempty"`
}

// SinkConnectorSpec describes configurable fields when a function overrides its sink implementation.
type SinkConnectorSpec struct {
// SinkType refers to the built-in sink identifier when using connectors packaged with Pulsar.
// +kubebuilder:validation:Optional
SinkType string `json:"sinkType,omitempty"`
// ClassName is the fully qualified sink implementation class.
// +kubebuilder:validation:Optional
ClassName string `json:"className,omitempty"`
// TypeClassName overrides the message type for the sink.
// +kubebuilder:validation:Optional
TypeClassName string `json:"typeClassName,omitempty"`
// Configs contains connector specific options.
// +kubebuilder:validation:Optional
// +kubebuilder:pruning:PreserveUnknownFields
Configs *Config `json:"configs,omitempty"`
}

func init() {
SchemeBuilder.Register(&Function{}, &FunctionList{})
}
63 changes: 63 additions & 0 deletions api/compute/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7590,8 +7590,21 @@ spec:
showPreciseParallelism:
type: boolean
sinkConfig:
properties:
archive:
type: string
builtin:
type: string
className:
type: string
configs:
additionalProperties: {}
type: object
sinkType:
type: string
typeClassName:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
sinkType:
type: string
statefulConfig:
Expand Down Expand Up @@ -11246,8 +11259,19 @@ spec:
showPreciseParallelism:
type: boolean
sourceConfig:
properties:
archive:
type: string
builtin:
type: string
className:
type: string
configs:
additionalProperties: {}
type: object
typeClassName:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
sourceType:
type: string
statefulConfig:
Expand Down
46 changes: 46 additions & 0 deletions config/crd/bases/compute.functionmesh.io_functionmeshes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,12 @@ spec:
type: object
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down Expand Up @@ -3710,8 +3714,42 @@ spec:
type: object
showPreciseParallelism:
type: boolean
sinkConfig:
properties:
className:
type: string
configs:
type: object
x-kubernetes-preserve-unknown-fields: true
sinkType:
type: string
typeClassName:
type: string
type: object
skipToLatest:
type: boolean
sourceConfig:
properties:
batchSourceConfig:
properties:
discoveryTriggererClassName:
type: string
discoveryTriggererConfig:
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- discoveryTriggererClassName
type: object
className:
type: string
configs:
type: object
x-kubernetes-preserve-unknown-fields: true
sourceType:
type: string
typeClassName:
type: string
type: object
statefulConfig:
properties:
pulsar:
Expand Down Expand Up @@ -4151,8 +4189,12 @@ spec:
type: object
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down Expand Up @@ -7750,8 +7792,12 @@ spec:
type: string
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down
38 changes: 38 additions & 0 deletions config/crd/bases/compute.functionmesh.io_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,12 @@ spec:
type: object
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down Expand Up @@ -3707,8 +3711,42 @@ spec:
type: object
showPreciseParallelism:
type: boolean
sinkConfig:
properties:
className:
type: string
configs:
type: object
x-kubernetes-preserve-unknown-fields: true
sinkType:
type: string
typeClassName:
type: string
type: object
skipToLatest:
type: boolean
sourceConfig:
properties:
batchSourceConfig:
properties:
discoveryTriggererClassName:
type: string
discoveryTriggererConfig:
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- discoveryTriggererClassName
type: object
className:
type: string
configs:
type: object
x-kubernetes-preserve-unknown-fields: true
sourceType:
type: string
typeClassName:
type: string
type: object
statefulConfig:
properties:
pulsar:
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/compute.functionmesh.io_sinks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,12 @@ spec:
type: object
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/compute.functionmesh.io_sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ spec:
type: string
java:
properties:
entryClass:
type: string
extraDependenciesDir:
type: string
instancePath:
type: string
jar:
type: string
jarLocation:
Expand Down
Loading
Loading