feat(crd): update crd type
This commit is contained in:
@@ -7,16 +7,19 @@ import (
|
||||
//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen object paths=$GOFILE
|
||||
|
||||
type FlinkJobSpec struct {
|
||||
Name string `json:"name"`
|
||||
Parallelism int `json:"parallelism"`
|
||||
Key string `json:"key"`
|
||||
Name string `json:"name"`
|
||||
Parallelism int `json:"parallelism"`
|
||||
JarURI string `json:"jarUri"`
|
||||
SavepointInterval metaV1.Duration `json:"savepointInterval"`
|
||||
EntryClass string `json:"entryClass"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type FlinkJob struct {
|
||||
metaV1.TypeMeta `json:",inline"`
|
||||
metaV1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec FlinkJobSpec `json:"spec"`
|
||||
Spec FlinkJobSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
@@ -8,9 +8,17 @@ import (
|
||||
|
||||
const GroupName = "flink.logicamp.tech"
|
||||
const GroupVersion = "v1alpha1"
|
||||
const ResourceName = "flink-jobs"
|
||||
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}
|
||||
|
||||
// Define the FlinkJob resource GVR (Group, Version, Resource)
|
||||
var FlinkJobGVR = schema.GroupVersionResource{
|
||||
Group: GroupName,
|
||||
Version: GroupVersion,
|
||||
Resource: ResourceName,
|
||||
}
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
|
||||
Reference in New Issue
Block a user