operations

package
v0.33.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package operations provides higher level operations on cluster templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCluster

func DeleteCluster(ctx context.Context, clusterName string, out io.Writer, st state.State, syncOptions SyncOptions) error

DeleteCluster removes all cluster resources from Omni via template operations.

func DeleteTemplate

func DeleteTemplate(ctx context.Context, templateReader io.Reader, out io.Writer, st state.State, syncOptions SyncOptions) error

DeleteTemplate removes all template resources from Omni.

func DiffTemplate

func DiffTemplate(ctx context.Context, templateReader io.Reader, output io.Writer, st state.State) error

DiffTemplate outputs the diff between template resources and existing resources.

func ExportTemplate

func ExportTemplate(ctx context.Context, st state.State, clusterID string, writer io.Writer) (models.List, error)

ExportTemplate exports the cluster configuration as a template.

func RenderTemplate

func RenderTemplate(templateReader io.Reader, output io.Writer) error

RenderTemplate outputs the rendered template to the given output.

func StatusCluster

func StatusCluster(ctx context.Context, clusterName string, out io.Writer, st state.State, options StatusOptions) error

StatusCluster queries, renders and (optionally) waits for the cluster status (health).

func StatusTemplate

func StatusTemplate(ctx context.Context, templateReader io.Reader, out io.Writer, st state.State, options StatusOptions) error

StatusTemplate queries, renders and (optionally) waits for the cluster status (health).

func SyncTemplate

func SyncTemplate(ctx context.Context, templateReader io.Reader, out io.Writer, st state.State, syncOptions SyncOptions) error

SyncTemplate performs resource sync to Omni.

func ValidateTemplate

func ValidateTemplate(templateReader io.Reader) error

ValidateTemplate performs template validation.

Types

type StatusOptions

type StatusOptions struct {
	Wait  bool
	Quiet bool
}

StatusOptions configures the status operation.

type SyncOptions

type SyncOptions struct {
	// DryRun indicates that no changes should be made to the cluster.
	DryRun bool

	// Verbose indicates that diff for each resource should be printed.
	Verbose bool

	// DestroyMachines forcefully remove the disconnected nodes from Omni.
	DestroyMachines bool
}

SyncOptions contains options for SyncTemplate.

Directories

Path Synopsis
internal
statustree
Package statustree contains helpers to render cluster status to the terminal.
Package statustree contains helpers to render cluster status to the terminal.
utils
Package utils contains various utility functions for template operations.
Package utils contains various utility functions for template operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL