common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package common contains utilities shared between the opnictl commands and the CLI logic that is not tied to any specific command.

Index

Constants

View Source
const (
	DefaultOpniNamespace                  = "opni"
	DefaultOpniDemoName                   = "opni-demo"
	DefaultOpniDemoNamespace              = "opni-demo"
	DefaultOpniDemoMinioAccessKey         = "minioadmin"
	DefaultOpniDemoMinioSecretKey         = "minioadmin"
	DefaultOpniDemoMinioVersion           = "8.0.10"
	DefaultOpniDemoNatsVersion            = "2.2.1"
	DefaultOpniDemoNatsPassword           = "password"
	DefaultOpniDemoNatsReplicas           = 3
	DefaultOpniDemoNatsMaxPayload         = 10485760
	DefaultOpniDemoNvidiaVersion          = "1.0.0-beta6"
	DefaultOpniDemoElasticUser            = "admin"
	DefaultOpniDemoElasticPassword        = "admin"
	DefaultOpniDemoNulogServiceCPURequest = "1"
	DefaultOpniDemoQuickstart             = false
)

Variables

View Source
var (
	TimeoutFlagValue         time.Duration
	NamespaceFlagValue       string
	ContextOverrideFlagValue string
	ExplicitPathFlagValue    string
	K8sClient                client.Client
	RestConfig               *rest.Config
	APIConfig                *api.Config
)

Log is a shared logger that can be used in all opnictl commands.

Functions

func CreateDefaultDemoNamespace added in v0.2.0

func CreateDefaultDemoNamespace(ctx context.Context) error

CreateDefaultNamespace creates the default opni demo namespace if it does not already exist.

func CreateDefaultNamespace added in v0.2.0

func CreateDefaultNamespace(ctx context.Context) error

CreateDefaultNamespace creates the default opni namespace if it does not already exist.

func LoadDefaultClientConfig

func LoadDefaultClientConfig()

func MaybeContextOverride

func MaybeContextOverride() []cliutil.ClientOption

MaybeContextOverride will return 0 or 1 ClientOptions, depending on if the user provided a specific kubectl context or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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