Documentation ¶
Index ¶
- func ApplyKustomization(ctx context.Context, kubeconfigPath string, opts *ApplyKustomizationOptions, ...) error
- func ApplyManifests(ctx context.Context, kubeconfigPath string, opts *ApplyManifestsOptions, ...) error
- func DeleteKustomization(ctx context.Context, kubeconfigPath string, filePaths ...string) error
- func DeleteManifests(ctx context.Context, kubeconfigPath string, filePaths ...string) error
- type ApplyKustomizationOptions
- type ApplyManifestsOptions
- type DryRunType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyKustomization ¶
func ApplyKustomization(ctx context.Context, kubeconfigPath string, opts *ApplyKustomizationOptions, filePaths ...string) error
ApplyKustomization applies the given files to the cluster that the kubeconfigPath points to with the given ApplyKustomizationOptions.
Example:
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() err := ApplyKustomization( ctx, "/path/to/kubeconfig", &ApplyKustomizationOptions{ }, []string{ "/path/to/kustomization", }, ) if err != nil { // Handle error }
func ApplyManifests ¶
func ApplyManifests(ctx context.Context, kubeconfigPath string, opts *ApplyManifestsOptions, filePaths ...string) error
ApplyManifests applies the given files to the cluster that the kubeconfigPath points to with the given ApplyManifestsOptions.
Example:
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() err := ApplyManifests( ctx, "/path/to/kubeconfig", &ApplyManifestsOptions{ }, []string{ "/path/to/manifest1.yaml", "/path/to/manifest2.yaml", }, ) if err != nil { // Handle error }
func DeleteKustomization ¶
DeleteKustomization deletes the resources created by the given kustomization files from the cluster that the kubeconfigPath points to.
Example:
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() err := DeleteKustomization( ctx, "/path/to/kubeconfig", []string{"path/to/kustomization1", "path/to/kustomization2"}... ) if err != nil { // Handle error }
func DeleteManifests ¶
DeleteManifests deletes the resource created by the given manifest files from the cluster that the kubeconfigPath points to.
Example:
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() err := DeleteManifests( ctx, "/path/to/kubeconfig", []string{"path/to/file1", "path/to/file2"}... ) if err != nil { // Handle error }
Types ¶
type ApplyKustomizationOptions ¶
type ApplyKustomizationOptions struct { // FIXME: When dry-run is working, we should add it here // DryRun DryRunType Recursive bool }
type ApplyManifestsOptions ¶
type ApplyManifestsOptions struct { // FIXME: When dry-run is working, we should add it here // DryRun DryRunType Recursive bool }
type DryRunType ¶
type DryRunType uint8
const ( DryRunNone DryRunType = iota DryRunClient DryRunServer )
func (DryRunType) String ¶
func (d DryRunType) String() string
Click to show internal directories.
Click to hide internal directories.