Documentation ¶
Index ¶
- Constants
- func AddFieldManagerFlagVar(cmd *cobra.Command, p *string, defaultFieldManager string)
- func CheckErr(err error)
- func GetPodHotUpgradeInfoInAnnotations(pod *corev1.Pod) map[string]string
- func NewFactory(clientGetter genericclioptions.RESTClientGetter) *factoryImpl
- func PatchSubResource(RESTClient resource.RESTClient, resource, subResource, namespace, name string, ...) (runtime.Object, error)
- func Print(msg string)
- type Factory
- type IOStreams
Constants ¶
View Source
const (
DefaultErrorExitCode = 1
)
View Source
const (
// SidecarSetWorkingHotUpgradeContainer record which hot upgrade container is working currently
SidecarSetWorkingHotUpgradeContainer = "kruise.io/sidecarset-working-hotupgrade-container"
)
Variables ¶
This section is empty.
Functions ¶
func AddFieldManagerFlagVar ¶
func NewFactory ¶
func NewFactory(clientGetter genericclioptions.RESTClientGetter) *factoryImpl
func PatchSubResource ¶
Types ¶
type Factory ¶
type Factory interface { genericclioptions.RESTClientGetter // DynamicClient returns a dynamic client ready for use DynamicClient() (dynamic.Interface, error) // KubernetesClientSet gives you back an external clientset KubernetesClientSet() (*kubernetes.Clientset, error) // RESTClient Returns a RESTClient for accessing Kubernetes resources or an error. RESTClient() (*restclient.RESTClient, error) // NewBuilder returns an object that assists in loading objects from both disk and the server // and which implements the common patterns for CLI interactions with generic resources. NewBuilder() *resource.Builder // ClientForMapping Returns a RESTClient for working with the specified RESTMapping or an error. This is intended // for working with arbitrary resources and is not guaranteed to point to a Kubernetes APIServer. ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error) // UnstructuredClientForMapping Returns a RESTClient for working with Unstructured objects. UnstructuredClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error) // Validator Returns a schema that can validate objects stored on disk. Validator(validate bool) (validation.Schema, error) // OpenAPISchema returns the parsed openapi schema definition OpenAPISchema() (openapi.Resources, error) // OpenAPIGetter returns a getter for the openapi schema document OpenAPIGetter() discovery.OpenAPISchemaInterface }
type IOStreams ¶
type IOStreams struct { // In think, os.Stdin In io.Reader // Out think, os.Stdout Out io.Writer // ErrOut think, os.Stderr ErrOut io.Writer }
IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing. Inconsistent and different names make it hard to read and review code
Click to show internal directories.
Click to hide internal directories.