Documentation ¶
Index ¶
- type Client
- type KubeClient
- func (c *KubeClient) DeleteDeployment(ctx context.Context, name, namespace string) error
- func (c *KubeClient) DeleteResource(ctx context.Context, object client.Object) error
- func (c *KubeClient) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error)
- func (c *KubeClient) GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
- func (c *KubeClient) GetSecret(ctx context.Context, name, namespace string) (*kcorev1.Secret, error)
- func (c *KubeClient) PatchApply(ctx context.Context, object client.Object) error
- func (c *KubeClient) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error DeleteDeployment(ctx context.Context, name, namespace string) error GetSecret(ctx context.Context, name, namespace string) (*kcorev1.Secret, error) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error) DeleteResource(ctx context.Context, object client.Object) error PatchApply(ctx context.Context, object client.Object) error }
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
func (*KubeClient) DeleteDeployment ¶
func (c *KubeClient) DeleteDeployment(ctx context.Context, name, namespace string) error
func (*KubeClient) DeleteResource ¶
func (*KubeClient) GetConfigMap ¶
func (c *KubeClient) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error)
GetConfigMap returns a ConfigMap based on the given name and namespace.
func (*KubeClient) GetDeployment ¶
func (c *KubeClient) GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
func (*KubeClient) GetSecret ¶
func (c *KubeClient) GetSecret(ctx context.Context, name, namespace string) (*kcorev1.Secret, error)
GetSecret returns the secret with the given name.
func (*KubeClient) PatchApply ¶
PatchApply uses the server-side apply to create/update the resource. The object must define `GVK` (i.e. object.TypeMeta).
func (*KubeClient) UpdateDeployment ¶
func (c *KubeClient) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error
Click to show internal directories.
Click to hide internal directories.