Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- type APIStatus
- type Apply
- type BuilderOptions
- type GetterFactory
- func (f *GetterFactory) ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)
- func (f *GetterFactory) DynamicClient() (dynamic.Interface, error)
- func (f *GetterFactory) KubernetesClientSet() (*kubernetes.Clientset, error)
- func (f *GetterFactory) NewBuilder() *resource.Builder
- func (f *GetterFactory) OpenAPISchema() (openapi.Resources, error)
- func (f *GetterFactory) OpenAPIV3Client() (openapi2.Client, error)
- func (f *GetterFactory) RESTClient() (*rest.RESTClient, error)
- func (f *GetterFactory) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (f *GetterFactory) ToRESTConfig() (*rest.Config, error)
- func (f *GetterFactory) ToRESTMapper() (meta.RESTMapper, error)
- func (f *GetterFactory) ToRawKubeConfigLoader() clientcmd.ClientConfig
- func (f *GetterFactory) UnstructuredClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)
- func (f *GetterFactory) Validator(validationDirective string) (validation.Schema, error)
- type Patcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
Types ¶
type BuilderOptions ¶
type BuilderOptions struct {
//Unstructured bool
Validate string
Namespace string
LabelSelector string
FieldSelector string
All bool
AllNamespaces bool
}
func NewBuilderOptions ¶
func NewBuilderOptions() *BuilderOptions
type GetterFactory ¶
type GetterFactory struct {
// contains filtered or unexported fields
}
func NewGetterFactory ¶
func NewGetterFactory(ctx context.Context, config *rest.Config) *GetterFactory
func (*GetterFactory) ClientForMapping ¶
func (f *GetterFactory) ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)
func (*GetterFactory) DynamicClient ¶
func (f *GetterFactory) DynamicClient() (dynamic.Interface, error)
func (*GetterFactory) KubernetesClientSet ¶
func (f *GetterFactory) KubernetesClientSet() (*kubernetes.Clientset, error)
func (*GetterFactory) NewBuilder ¶
func (f *GetterFactory) NewBuilder() *resource.Builder
func (*GetterFactory) OpenAPISchema ¶
func (f *GetterFactory) OpenAPISchema() (openapi.Resources, error)
OpenAPISchema 实现一次性初始化并缓存 openapi.Resources。
func (*GetterFactory) OpenAPIV3Client ¶
func (f *GetterFactory) OpenAPIV3Client() (openapi2.Client, error)
func (*GetterFactory) RESTClient ¶
func (f *GetterFactory) RESTClient() (*rest.RESTClient, error)
func (*GetterFactory) ToDiscoveryClient ¶
func (f *GetterFactory) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*GetterFactory) ToRESTConfig ¶
func (f *GetterFactory) ToRESTConfig() (*rest.Config, error)
func (*GetterFactory) ToRESTMapper ¶
func (f *GetterFactory) ToRESTMapper() (meta.RESTMapper, error)
func (*GetterFactory) ToRawKubeConfigLoader ¶
func (f *GetterFactory) ToRawKubeConfigLoader() clientcmd.ClientConfig
func (*GetterFactory) UnstructuredClientForMapping ¶
func (f *GetterFactory) UnstructuredClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)
func (*GetterFactory) Validator ¶
func (f *GetterFactory) Validator(validationDirective string) (validation.Schema, error)
Validator validationDirective "strict"/"warn"/"ignore"
type Patcher ¶
type Patcher struct {
Mapping *meta.RESTMapping
Helper *resource.Helper
Overwrite bool
BackOff clockwork.Clock
Force bool
CascadingStrategy metav1.DeletionPropagation
Timeout time.Duration
GracePeriod int
// If set, forces the patch against a specific resourceVersion
ResourceVersion *string
// Number of retries to make if the patch fails with conflict
Retries int
OpenAPIGetter openapi.OpenAPIResourcesGetter
OpenAPIV3Root openapi3.Root
}
Patcher defines options to patch OpenAPI objects.
func (*Patcher) Patch ¶
func (p *Patcher) Patch(current runtime.Object, modified []byte, source, namespace, name string, errOut io.Writer) ([]byte, runtime.Object, error)
Patch tries to patch an OpenAPI resource. On success, returns the merge patch as well the final patched object. On failure, returns an error.
Click to show internal directories.
Click to hide internal directories.