Documentation ¶
Overview ¶
Package k8sutil is a generated GoMock package.
Index ¶
- func DeleteDeployment(ctx context.Context, k8sclientset kubernetes.Interface, ...)
- func GetDeployment(ctx context.Context, k8sclientset kubernetes.Interface, ...) (*appsv1.Deployment, error)
- func RestartDeployment(ctx context.Context, k8sclientset kubernetes.Interface, ...)
- func SetDeploymentScale(ctx context.Context, k8sclientset kubernetes.Interface, ...) error
- func UpdateConfigMap(ctx context.Context, k8sclientset kubernetes.Interface, ...)
- func WaitForPodToRun(ctx context.Context, k8sclientset kubernetes.Interface, ...) (corev1.Pod, error)
- type Clientsets
- func (c *Clientsets) CreateResourcesDynamically(ctx context.Context, group string, version string, resource string, ...) (*unstructured.Unstructured, error)
- func (c *Clientsets) DeleteResourcesDynamically(ctx context.Context, group string, version string, resource string, ...) error
- func (c *Clientsets) GetResourcesDynamically(ctx context.Context, group string, version string, resource string, ...) (*unstructured.Unstructured, error)
- func (c *Clientsets) ListResourcesDynamically(ctx context.Context, group string, version string, resource string, ...) ([]unstructured.Unstructured, error)
- func (c *Clientsets) PatchResourcesDynamically(ctx context.Context, group string, version string, resource string, ...) error
- type ClientsetsInterface
- type MockClientsetsInterface
- func (m *MockClientsetsInterface) CreateResourcesDynamically(arg0 context.Context, arg1, arg2, arg3 string, arg4 *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (m *MockClientsetsInterface) DeleteResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) error
- func (m *MockClientsetsInterface) EXPECT() *MockClientsetsInterfaceMockRecorder
- func (m *MockClientsetsInterface) GetResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) (*unstructured.Unstructured, error)
- func (m *MockClientsetsInterface) ListResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4 string) ([]unstructured.Unstructured, error)
- func (m *MockClientsetsInterface) PatchResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string, ...) error
- type MockClientsetsInterfaceMockRecorder
- func (mr *MockClientsetsInterfaceMockRecorder) CreateResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- func (mr *MockClientsetsInterfaceMockRecorder) DeleteResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- func (mr *MockClientsetsInterfaceMockRecorder) GetResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- func (mr *MockClientsetsInterfaceMockRecorder) ListResourcesDynamically(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
- func (mr *MockClientsetsInterfaceMockRecorder) PatchResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDeployment ¶ added in v0.7.0
func GetDeployment ¶ added in v0.6.0
func GetDeployment(ctx context.Context, k8sclientset kubernetes.Interface, clusterNamespace, deploymentName string) (*appsv1.Deployment, error)
func RestartDeployment ¶
func RestartDeployment(ctx context.Context, k8sclientset kubernetes.Interface, namespace, deploymentName string)
func SetDeploymentScale ¶ added in v0.6.0
func UpdateConfigMap ¶
func UpdateConfigMap(ctx context.Context, k8sclientset kubernetes.Interface, namespace, configMapName, key, value string)
func WaitForPodToRun ¶
Types ¶
type Clientsets ¶
type Clientsets struct { // The Kubernetes config used for these client sets KubeConfig *rest.Config // Kube is a connection to the core Kubernetes API Kube kubernetes.Interface // Rook is a typed connection to the rook API Rook rookclient.Interface // Dynamic is used for manage dynamic resources Dynamic dynamic.Interface }
func (*Clientsets) CreateResourcesDynamically ¶ added in v0.8.0
func (c *Clientsets) CreateResourcesDynamically( ctx context.Context, group string, version string, resource string, name *unstructured.Unstructured, namespace string, ) (*unstructured.Unstructured, error)
func (*Clientsets) DeleteResourcesDynamically ¶ added in v0.7.0
func (*Clientsets) GetResourcesDynamically ¶ added in v0.7.0
func (c *Clientsets) GetResourcesDynamically( ctx context.Context, group string, version string, resource string, name string, namespace string, ) (*unstructured.Unstructured, error)
func (*Clientsets) ListResourcesDynamically ¶ added in v0.7.0
func (c *Clientsets) ListResourcesDynamically( ctx context.Context, group string, version string, resource string, namespace string, ) ([]unstructured.Unstructured, error)
type ClientsetsInterface ¶ added in v0.7.0
type ClientsetsInterface interface { CreateResourcesDynamically(ctx context.Context, group string, version string, resource string, name *unstructured.Unstructured, namespace string) (*unstructured.Unstructured, error) ListResourcesDynamically(ctx context.Context, group string, version string, resource string, namespace string) ([]unstructured.Unstructured, error) GetResourcesDynamically(ctx context.Context, group string, version string, resource string, name string, namespace string) (*unstructured.Unstructured, error) DeleteResourcesDynamically(ctx context.Context, group string, version string, resource string, namespace string, resourceName string) error PatchResourcesDynamically(ctx context.Context, group string, version string, resource string, namespace string, resourceName string, pt types.PatchType, data []byte) error }
type MockClientsetsInterface ¶ added in v0.7.0
type MockClientsetsInterface struct {
// contains filtered or unexported fields
}
MockClientsetsInterface is a mock of ClientsetsInterface interface.
func NewMockClientsetsInterface ¶ added in v0.7.0
func NewMockClientsetsInterface(ctrl *gomock.Controller) *MockClientsetsInterface
NewMockClientsetsInterface creates a new mock instance.
func (*MockClientsetsInterface) CreateResourcesDynamically ¶ added in v0.8.0
func (m *MockClientsetsInterface) CreateResourcesDynamically(arg0 context.Context, arg1, arg2, arg3 string, arg4 *unstructured.Unstructured, arg5 string) (*unstructured.Unstructured, error)
CreateResourcesDynamically mocks base method.
func (*MockClientsetsInterface) DeleteResourcesDynamically ¶ added in v0.7.0
func (m *MockClientsetsInterface) DeleteResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) error
DeleteResourcesDynamically mocks base method.
func (*MockClientsetsInterface) EXPECT ¶ added in v0.7.0
func (m *MockClientsetsInterface) EXPECT() *MockClientsetsInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClientsetsInterface) GetResourcesDynamically ¶ added in v0.7.0
func (m *MockClientsetsInterface) GetResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) (*unstructured.Unstructured, error)
GetResourcesDynamically mocks base method.
func (*MockClientsetsInterface) ListResourcesDynamically ¶ added in v0.7.0
func (m *MockClientsetsInterface) ListResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4 string) ([]unstructured.Unstructured, error)
ListResourcesDynamically mocks base method.
func (*MockClientsetsInterface) PatchResourcesDynamically ¶ added in v0.7.0
func (m *MockClientsetsInterface) PatchResourcesDynamically(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string, arg6 types.PatchType, arg7 []byte) error
PatchResourcesDynamically mocks base method.
type MockClientsetsInterfaceMockRecorder ¶ added in v0.7.0
type MockClientsetsInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClientsetsInterfaceMockRecorder is the mock recorder for MockClientsetsInterface.
func (*MockClientsetsInterfaceMockRecorder) CreateResourcesDynamically ¶ added in v0.8.0
func (mr *MockClientsetsInterfaceMockRecorder) CreateResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
CreateResourcesDynamically indicates an expected call of CreateResourcesDynamically.
func (*MockClientsetsInterfaceMockRecorder) DeleteResourcesDynamically ¶ added in v0.7.0
func (mr *MockClientsetsInterfaceMockRecorder) DeleteResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
DeleteResourcesDynamically indicates an expected call of DeleteResourcesDynamically.
func (*MockClientsetsInterfaceMockRecorder) GetResourcesDynamically ¶ added in v0.7.0
func (mr *MockClientsetsInterfaceMockRecorder) GetResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
GetResourcesDynamically indicates an expected call of GetResourcesDynamically.
func (*MockClientsetsInterfaceMockRecorder) ListResourcesDynamically ¶ added in v0.7.0
func (mr *MockClientsetsInterfaceMockRecorder) ListResourcesDynamically(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
ListResourcesDynamically indicates an expected call of ListResourcesDynamically.
func (*MockClientsetsInterfaceMockRecorder) PatchResourcesDynamically ¶ added in v0.7.0
func (mr *MockClientsetsInterfaceMockRecorder) PatchResourcesDynamically(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call
PatchResourcesDynamically indicates an expected call of PatchResourcesDynamically.