Documentation ¶
Index ¶
- func NewClient(host string, tokenSrc oauth2.TokenSource) (kubernetes.Interface, error)
- func NewDynamicClient(host string, tokenSrc oauth2.TokenSource) (dynamic.Interface, error)
- func ParseTaint(taintSpec string) (*v1.Taint, error)
- type ClientsCollection
- func (c *ClientsCollection) Create(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (c *ClientsCollection) Delete(ctx context.Context, kind, namespace, name string, ...) error
- func (c *ClientsCollection) DeleteCollection(ctx context.Context, kind, namespace string, options metav1.DeleteOptions, ...) error
- func (c *ClientsCollection) DeleteResource(ctx context.Context, logger *logrus.Entry, deletion *Resource) error
- func (c *ClientsCollection) Exists(ctx context.Context, kind, namespace, name string, options metav1.GetOptions, ...) (bool, error)
- func (c *ClientsCollection) Get(ctx context.Context, kind, namespace, name string, options metav1.GetOptions, ...) (*unstructured.Unstructured, error)
- func (c *ClientsCollection) List(ctx context.Context, kind, namespace string, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
- func (c *ClientsCollection) ListResources(ctx context.Context, rsrc *Resource) ([]unstructured.Unstructured, error)
- func (c *ClientsCollection) Patch(ctx context.Context, kind, namespace, name string, pt types.PatchType, ...) (*unstructured.Unstructured, error)
- func (c *ClientsCollection) ResolveKind(kind string) (schema.GroupVersionResource, error)
- func (c *ClientsCollection) Update(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (c *ClientsCollection) UpdateStatus(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (c *ClientsCollection) Watch(ctx context.Context, kind, namespace string, opts metav1.ListOptions) (watch.Interface, error)
- type KubeCTLRunner
- type Labels
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(host string, tokenSrc oauth2.TokenSource) (kubernetes.Interface, error)
NewClient initializes a Kubernetes client with the specified token source.
func NewDynamicClient ¶
NewDynamicClient initializes a dynamic Kubernetes client with the specified token source.
Types ¶
type ClientsCollection ¶
type ClientsCollection struct { TypedClient kubernetes.Interface DynamicClient dynamic.Interface Mapper meta.RESTMapper }
func NewClientsCollection ¶
func NewClientsCollection(host string, tokenSrc oauth2.TokenSource) (*ClientsCollection, error)
func (*ClientsCollection) Create ¶
func (c *ClientsCollection) Create(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
func (*ClientsCollection) Delete ¶
func (c *ClientsCollection) Delete(ctx context.Context, kind, namespace, name string, options metav1.DeleteOptions, subresources ...string) error
func (*ClientsCollection) DeleteCollection ¶
func (c *ClientsCollection) DeleteCollection(ctx context.Context, kind, namespace string, options metav1.DeleteOptions, listOptions metav1.ListOptions) error
func (*ClientsCollection) DeleteResource ¶
func (*ClientsCollection) Exists ¶
func (c *ClientsCollection) Exists(ctx context.Context, kind, namespace, name string, options metav1.GetOptions, subresources ...string) (bool, error)
func (*ClientsCollection) Get ¶
func (c *ClientsCollection) Get(ctx context.Context, kind, namespace, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
func (*ClientsCollection) List ¶
func (c *ClientsCollection) List(ctx context.Context, kind, namespace string, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
func (*ClientsCollection) ListResources ¶
func (c *ClientsCollection) ListResources(ctx context.Context, rsrc *Resource) ([]unstructured.Unstructured, error)
func (*ClientsCollection) Patch ¶
func (c *ClientsCollection) Patch(ctx context.Context, kind, namespace, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error)
func (*ClientsCollection) ResolveKind ¶
func (c *ClientsCollection) ResolveKind(kind string) (schema.GroupVersionResource, error)
func (*ClientsCollection) Update ¶
func (c *ClientsCollection) Update(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
func (*ClientsCollection) UpdateStatus ¶
func (c *ClientsCollection) UpdateStatus(ctx context.Context, kind, namespace string, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
type KubeCTLRunner ¶
type KubeCTLRunner struct {
// contains filtered or unexported fields
}
func NewKubeCTLRunner ¶
func NewKubeCTLRunner(e *command.ExecManager, ts oauth2.TokenSource, l *logrus.Entry, k8sAPIURL string, maxRetries uint64) *KubeCTLRunner
func (*KubeCTLRunner) KubectlExecute ¶
type Resource ¶
type Resource struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` Kind string `yaml:"kind"` Selector string `yaml:"selector"` Labels Labels `yaml:"labels"` HasOwner *bool `yaml:"has_owner"` // See https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#DeleteOptions GracePeriodSeconds *int64 `yaml:"grace_period_seconds"` PropagationPolicy *metav1.DeletionPropagation `yaml:"propagation_policy"` }
Resource defines a minimal definition of a kubernetes Resource.
func (*Resource) LabelSelector ¶
func (*Resource) Options ¶
func (r *Resource) Options() metav1.DeleteOptions
Click to show internal directories.
Click to hide internal directories.