v1alpha1

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 implements the v1alpha1 apiVersion of kwokctl's action

Index

Constants

View Source
const (
	// ResourcePatchKind is the kind of the ResourcePatch.
	ResourcePatchKind = "ResourcePatch"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{
		Group:   "action.kwok.x-k8s.io",
		Version: "v1alpha1",
	}
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type GroupVersionResource

type GroupVersionResource struct {
	// Group represents the group of the resource.
	Group string `json:"group,omitempty"`
	// Version represents the version of the resource.
	Version string `json:"version"`
	// Resource represents the type of the resource.
	Resource string `json:"resource"`
}

GroupVersionResource is a struct that represents the group version resource.

func (*GroupVersionResource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource.

func (*GroupVersionResource) DeepCopyInto

func (in *GroupVersionResource) DeepCopyInto(out *GroupVersionResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PatchMethod

type PatchMethod string
const (
	// PatchMethodCreate means that the resource will be created by create.
	PatchMethodCreate PatchMethod = "create"
	// PatchMethodPatch means that the resource will be patched by patch.
	PatchMethodPatch PatchMethod = "patch"
	// PatchMethodDelete means that the resource will be deleted by delete.
	PatchMethodDelete PatchMethod = "delete"
)

type ResourcePatch

type ResourcePatch struct {
	//+k8s:conversion-gen=false
	metav1.TypeMeta `json:",inline"`

	// Resource represents the resource to be patched.
	Resource GroupVersionResource `json:"resource"`
	// Target represents the target of the ResourcePatch.
	Target Target `json:"target"`
	// DurationNanosecond represents the duration of the patch in nanoseconds.
	DurationNanosecond time.Duration `json:"durationNanosecond"`
	// Method represents the method of the patch.
	Method PatchMethod `json:"method"`
	// Template contains the patch data as a raw JSON message.
	Template json.RawMessage `json:"template,omitempty"`
}

ResourcePatch provides resource definition for kwokctl. this is a action of resource patch.

func (*ResourcePatch) DeepCopy

func (in *ResourcePatch) DeepCopy() *ResourcePatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePatch.

func (*ResourcePatch) DeepCopyInto

func (in *ResourcePatch) DeepCopyInto(out *ResourcePatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePatch) DeepCopyObject

func (in *ResourcePatch) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Target

type Target struct {
	// Name represents the name of the resource to be patched.
	Name string `json:"name"`
	// Namespace represents the namespace of the resource to be patched.
	Namespace string `json:"namespace,omitempty"`
}

Target is a struct that represents the target of the ResourcePatch.

func (*Target) DeepCopy

func (in *Target) DeepCopy() *Target

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.

func (*Target) DeepCopyInto

func (in *Target) DeepCopyInto(out *Target)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL