plugin

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package plugin contains the common behaviors of the kubectl-cnpg subcommand

Index

Constants

View Source
const (
	// OutputFormatText means just use a human-readable output
	OutputFormatText = "text"

	// OutputFormatJSON means use machine-readable JSON output
	OutputFormatJSON = "json"

	// OutputFormatYAML means use machine-readable JSON output
	OutputFormatYAML = "yaml"
)

Variables

View Source
var (
	// Namespace to operate in
	Namespace string

	// NamespaceExplicitlyPassed indicates if the namespace was passed manually
	NamespaceExplicitlyPassed bool

	// Config is the Kubernetes configuration used
	Config *rest.Config

	// Client is the controller-runtime client
	Client client.Client

	// ClientInterface contains the interface used i the plugin
	ClientInterface kubernetes.Interface
)

Functions

func CreateAndGenerateObjects added in v1.18.1

func CreateAndGenerateObjects(ctx context.Context, k8sObject []client.Object, option bool) error

CreateAndGenerateObjects creates provided k8s object or generate manifest collectively

func GetPGControlData added in v1.21.0

func GetPGControlData(
	ctx context.Context,
	pod corev1.Pod,
) (string, error)

GetPGControlData obtains the PgControldata from the passed pod by doing an exec. This approach should be used only in the plugin commands.

func Print

func Print(o interface{}, format OutputFormat, writer io.Writer) error

Print output an object via an io.Writer in a machine-readable way

func SetupKubernetesClient added in v1.18.0

func SetupKubernetesClient(configFlags *genericclioptions.ConfigFlags) error

SetupKubernetesClient creates a k8s client to be used inside the kubectl-cnpg utility

Types

type OutputFormat

type OutputFormat string

OutputFormat represent the output format supported by this command

Directories

Path Synopsis
Package backup implements a command to request an on-demand backup for a PostgreSQL cluster
Package backup implements a command to request an on-demand backup for a PostgreSQL cluster
Package certificate implement the kubectl-cnpg certificate command
Package certificate implement the kubectl-cnpg certificate command
Package destroy implements a command to destroy an instances of a cluster and its associated PVC
Package destroy implements a command to destroy an instances of a cluster and its associated PVC
Package fence implements a command to fence instances in a cluster
Package fence implements a command to fence instances in a cluster
Package fio implements the fio job creation via deployment
Package fio implements the fio job creation via deployment
Package hibernate implements the hibernation feature
Package hibernate implements the hibernation feature
Package install implements the install plugin command
Package install implements the install plugin command
Package logs implements the kubectl-cnpg logs command
Package logs implements the kubectl-cnpg logs command
Package maintenance implements the kubectl-cnpg maintenance sub-command
Package maintenance implements the kubectl-cnpg maintenance sub-command
Package pgbench implements the pgbench job creation
Package pgbench implements the pgbench job creation
Package promote implement the kubectl-cnpg promote command
Package promote implement the kubectl-cnpg promote command
Package psql implements the `kubectl cnpg psql` command
Package psql implements the `kubectl cnpg psql` command
Package reload implements a command to trigger a reconciliation loop for a cluster
Package reload implements a command to trigger a reconciliation loop for a cluster
Package report implements the kubectl-cnpg report command
Package report implements the kubectl-cnpg report command
Package restart implements a command to rollout restart a cluster or restart a single instance
Package restart implements a command to rollout restart a cluster or restart a single instance
Package snapshot implements the snapshot feature
Package snapshot implements the snapshot feature
Package status implements the kubectl-cnpg status command
Package status implements the kubectl-cnpg status command

Jump to

Keyboard shortcuts

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