Documentation ¶
Index ¶
- Constants
- func Apply(ctx context.Context, c client.Client, obj client.Object, ...) error
- func BuildConfigFromFlags(masterURL, kubeConfigPath string, options ...func(c *rest.Config)) (*rest.Config, error)
- func BuildConfigFromKubeConfig(kubeconfig []byte, options ...func(c *rest.Config)) (*rest.Config, error)
- func SetQPS(qps float32, burst int) func(c *rest.Config)
- func WithDryRun(dryRun bool) func(*ApplyOptions)
- func WithFieldManager(fieldManager string) func(*ApplyOptions)
- func WithForce(force bool) func(*ApplyOptions)
- type ApplyOptions
Constants ¶
View Source
const ( // DefaultQPS is the default QPS value. DefaultQPS = 50 // DefaultBurst is the default Burst value. DefaultBurst = 100 )
Variables ¶
This section is empty.
Functions ¶
func Apply ¶ added in v0.5.1
func Apply(ctx context.Context, c client.Client, obj client.Object, options ...func(*ApplyOptions)) error
Apply creates the given object or updates the existing object to the given one using apply patch.
func BuildConfigFromFlags ¶
func BuildConfigFromFlags(masterURL, kubeConfigPath string, options ...func(c *rest.Config)) (*rest.Config, error)
BuildConfigFromFlags builds rest configs from a master url or a kube config filepath.
func BuildConfigFromKubeConfig ¶ added in v0.4.0
func BuildConfigFromKubeConfig(kubeconfig []byte, options ...func(c *rest.Config)) (*rest.Config, error)
BuildConfigFromKubeConfig builds rest configs from kube config data.
func WithDryRun ¶ added in v0.5.1
func WithDryRun(dryRun bool) func(*ApplyOptions)
WithDryRun sets the DryRun option when creating or patching the object. The default value is `false`.
func WithFieldManager ¶ added in v0.5.1
func WithFieldManager(fieldManager string) func(*ApplyOptions)
WithFieldManager sets the FieldManager option when creating or patching the object. The default value is `controller-runtime`.
func WithForce ¶ added in v0.5.1
func WithForce(force bool) func(*ApplyOptions)
WithForce sets the Force option when patching the object. The default value is `true`.
Types ¶
type ApplyOptions ¶ added in v0.5.1
type ApplyOptions struct {
// contains filtered or unexported fields
}
ApplyOptions defines options needed to create or patch an object.
Click to show internal directories.
Click to hide internal directories.