-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mariano Uvalle
committed
Jan 29, 2024
1 parent
a99974c
commit 5efbcbf
Showing
8 changed files
with
417 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// +k8s:deepcopy-gen=package | ||
|
||
package v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package v1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
) | ||
|
||
var SchemeGroupVersion = schema.GroupVersion{Group: "config.kubernetes.io", Version: "v1"} | ||
|
||
func (obj *ResourceList) GetObjectKind() schema.ObjectKind { return obj } | ||
func (obj *ResourceList) SetGroupVersionKind(gvk schema.GroupVersionKind) { | ||
obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() | ||
} | ||
func (obj *ResourceList) GroupVersionKind() schema.GroupVersionKind { | ||
return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package v1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime" | ||
) | ||
|
||
// ResourceList ResourceList is the input/output wire format for KRM functions. | ||
// | ||
// swagger:model ResourceList | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
type ResourceList struct { | ||
// apiVersion of ResourceList | ||
APIVersion string `json:"apiVersion"` | ||
|
||
// kind of ResourceList i.e. `ResourceList` | ||
Kind string `json:"kind"` | ||
|
||
// [input/output] | ||
// Items is a list of Kubernetes objects: | ||
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds). | ||
// | ||
// A function will read this field in the input ResourceList and populate | ||
// this field in the output ResourceList. | ||
Items []runtime.Object `json:"items"` | ||
|
||
// [input] | ||
// FunctionConfig is an optional Kubernetes object for passing arguments to a | ||
// function invocation. | ||
// +optional | ||
FunctionConfig runtime.Object `json:"functionConfig,omitempty"` | ||
|
||
// [output] | ||
// Results is an optional list that can be used by function to emit results | ||
// for observability and debugging purposes. | ||
// +optional | ||
Results []*Result `json:"results,omitempty"` | ||
} |
Oops, something went wrong.