Documentation ¶
Index ¶
- func AmbassadorMappingGVR() schema.GroupVersionResource
- func CronJobGVR() schema.GroupVersionResource
- func DeploymentGVR() schema.GroupVersionResource
- func GroupVersionResource(mapper meta.RESTMapper, manifest *unstructured.Unstructured) (schema.GroupVersionResource, error)
- func KubeStructToManifest(kubeStruct any) (*unstructured.Unstructured, error)
- func PodGVR() schema.GroupVersionResource
- func SecretGVR() schema.GroupVersionResource
- func ServiceAccountGVR() schema.GroupVersionResource
- func ServiceGVR() schema.GroupVersionResource
- func ToJSONManifest(r Resource) ([]byte, error)
- func ToManifest(r Resource) (*unstructured.Unstructured, error)
- type Config
- type Option
- type Reaktor
- func (k *Reaktor) Apply(ctx context.Context, r Resource) (*unstructured.Unstructured, error)
- func (k *Reaktor) ApplyYaml(ctx context.Context, yaml []byte) (*unstructured.Unstructured, error)
- func (k *Reaktor) Delete(ctx context.Context, r Resource) error
- func (k *Reaktor) DeleteCollection(ctx context.Context, gvr schema.GroupVersionResource, ns string, ...) error
- func (k *Reaktor) Get(ctx context.Context, gvr schema.GroupVersionResource, name string, ns string) (*unstructured.Unstructured, error)
- func (k *Reaktor) GetByResource(ctx context.Context, r Resource) (*unstructured.Unstructured, error)
- func (k *Reaktor) List(ctx context.Context, gvr schema.GroupVersionResource, ns string, ...) (*unstructured.UnstructuredList, error)
- func (k *Reaktor) ToKubeResource(ctx context.Context, manifest *unstructured.Unstructured) (dynamic.ResourceInterface, error)
- func (k *Reaktor) WatchUntil(ctx context.Context, unstructuredObj *unstructured.Unstructured, ...) (*watch.Event, error)
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmbassadorMappingGVR ¶
func AmbassadorMappingGVR() schema.GroupVersionResource
func CronJobGVR ¶
func CronJobGVR() schema.GroupVersionResource
func DeploymentGVR ¶
func DeploymentGVR() schema.GroupVersionResource
func GroupVersionResource ¶
func GroupVersionResource(mapper meta.RESTMapper, manifest *unstructured.Unstructured) (schema.GroupVersionResource, error)
func KubeStructToManifest ¶
func KubeStructToManifest(kubeStruct any) (*unstructured.Unstructured, error)
Takes a typed structure from the kubernetes api (i.e. batchv1.Job, etc)
func PodGVR ¶
func PodGVR() schema.GroupVersionResource
func SecretGVR ¶
func SecretGVR() schema.GroupVersionResource
func ServiceAccountGVR ¶
func ServiceAccountGVR() schema.GroupVersionResource
func ServiceGVR ¶
func ServiceGVR() schema.GroupVersionResource
func ToJSONManifest ¶
ToJSONManifest is a convenience method that returns the JSON representation of the Resource's manifest.
func ToManifest ¶
func ToManifest(r Resource) (*unstructured.Unstructured, error)
Types ¶
type Reaktor ¶
type Reaktor struct {
// contains filtered or unexported fields
}
See constructors.go for how to create
func NewWithConfig ¶
func WithClientBuilder ¶
func WithClientBuilder(builder kubeconfig.ClientBuilder) (*Reaktor, error)
func (*Reaktor) Apply ¶
func (k *Reaktor) Apply(ctx context.Context, r Resource) (*unstructured.Unstructured, error)
func (*Reaktor) ApplyYaml ¶
func (k *Reaktor) ApplyYaml(ctx context.Context, yaml []byte) (*unstructured.Unstructured, error)
func (*Reaktor) DeleteCollection ¶
func (*Reaktor) Get ¶
func (k *Reaktor) Get( ctx context.Context, gvr schema.GroupVersionResource, name string, ns string, ) (*unstructured.Unstructured, error)
func (*Reaktor) GetByResource ¶
func (k *Reaktor) GetByResource(ctx context.Context, r Resource) (*unstructured.Unstructured, error)
func (*Reaktor) List ¶
func (k *Reaktor) List( ctx context.Context, gvr schema.GroupVersionResource, ns string, listOptions metav1.ListOptions, ) (*unstructured.UnstructuredList, error)
func (*Reaktor) ToKubeResource ¶
func (k *Reaktor) ToKubeResource( ctx context.Context, manifest *unstructured.Unstructured, ) (dynamic.ResourceInterface, error)
func (*Reaktor) WatchUntil ¶
type Resource ¶
type Resource interface { // TODO: // 1. I'd love to return a more specific type. Using any for now so we can // play with typed and untyped APIs, but ideally we choose one. ToManifest() (any, error) }
RFC: I was originally going to call this 'Component' (like in React), but ended with 'Resource' to more closely match the K8s terminology. Is that the right name?
Directories ¶
Path | Synopsis |
---|---|
package clustertest uses `kind` (https://kind.sigs.k8s.io/) to create an in-docker testing cluster.
|
package clustertest uses `kind` (https://kind.sigs.k8s.io/) to create an in-docker testing cluster. |
examples
|
|
kubejobs adds APIs specific to k8s jobs
|
kubejobs adds APIs specific to k8s jobs |
Click to show internal directories.
Click to hide internal directories.