cmd

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const KubectlFbReleaseURL = "https://api.github.com/repos/FoundationDB/fdb-kubernetes-operator/releases/latest"

KubectlFbReleaseURL is the public GitHub URL we read the latest version from

View Source
const LocalTempVersionFileName = "kubectl-fdb-version.txt"

LocalTempVersionFileName is where we cache plugin version for 24 hours, so we don't call GitHub for every single command(also rate-limit issue on GitHub api calls)

Variables

This section is empty.

Functions

func NewRootCmd

func NewRootCmd(
	streams genericiooptions.IOStreams,
	pluginVersionChecker VersionChecker,
) *cobra.Command

NewRootCmd provides a cobra command wrapping FDB actions

func RecoverMultiRegionCluster

func RecoverMultiRegionCluster(ctx context.Context, opts RecoverMultiRegionClusterOpts) error

RecoverMultiRegionCluster will forcefully recover a multi-region cluster if a majority of coordinators are lost. Performing this action can result in data loss.

Types

type FaultDomainSummary added in v2.14.0

type FaultDomainSummary map[fdbv1beta2.ProcessClass]map[fdbv1beta2.FaultDomain]int

FaultDomainSummary represents the fault domain distribution by process class

type PluginVersionDetails

type PluginVersionDetails struct {
	ID      int64  `json:"id"`
	Version string `json:"tag_name"`
	Name    string `json:"name"`
}

PluginVersionDetails Contains [partial] plugin version details from GitHub

type RealVersionChecker

type RealVersionChecker struct{}

RealVersionChecker will do actual call to GitHub API to get version

type RecoverMultiRegionClusterOpts

type RecoverMultiRegionClusterOpts struct {
	// Client is the client.Client to interact with the Kubernetes API.
	Client client.Client
	// Config is the rest.Config to interact with the Kubernetes API
	Config *rest.Config
	// ClusterName represents the cluster name of the targeted cluster.
	ClusterName string
	// Namespace represents the namespace of the targeted cluster.
	Namespace string
	// Stdout to print commands stdout output.
	Stdout io.Writer
	// Stderr to print commands stderr output.
	Stderr io.Writer
}

RecoverMultiRegionClusterOpts struct to pass down all args to the actual runner.

type VersionChecker

type VersionChecker interface {
	// contains filtered or unexported methods
}

VersionChecker interface to help us mock test the version checker

Jump to

Keyboard shortcuts

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