pkg

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorInstallationMethodUnknown = errors.New("Cannot detect current installation method")

ErrorInstallationMethodUnknown indicates that can not detect current installation method

View Source
var ErrorOperatorModeNotSupport = errors.New("Knative managed by operator is not supported yet")

ErrorOperatorModeNotSupport indicates that knative is managed by operator and cannot handled by sub command

View Source
var LabelManagedBy = "app.kubernetes.io/managed-by"

LabelManagedBy is a label name to indicate who is managing this resource

Functions

This section is empty.

Types

type AdminParams

type AdminParams struct {
	KubeCfgPath         string
	ClientConfig        clientcmd.ClientConfig
	NewNetworkingClient func() (versioned.Interface, error)
	NewKubeClient       func() (kubernetes.Interface, error)
	InstallationMethod  InstallationMethod
}

AdminParams stores the configs for interacting with kube api

func (*AdminParams) EnsureInstallMethodStandalone

func (params *AdminParams) EnsureInstallMethodStandalone() error

EnsureInstallMethodStandalone return error if current installation method is not standalone

func (*AdminParams) GetClientConfig

func (params *AdminParams) GetClientConfig() (clientcmd.ClientConfig, error)

GetClientConfig gets ClientConfig from KubeCfgPath

func (*AdminParams) Initialize

func (params *AdminParams) Initialize() error

Initialize generate the clientset for params

func (*AdminParams) RestConfig

func (params *AdminParams) RestConfig() (*rest.Config, error)

RestConfig returns REST config, which can be to use to create specific clientset

type InstallationMethod

type InstallationMethod int

InstallationMethod identify how knative get installed

const (
	// InstallationMethodUnknown default value
	InstallationMethodUnknown InstallationMethod = iota
	// InstallationMethodStandalone default installation method using full yaml configurations
	InstallationMethodStandalone
	// InstallationMethodOperator installation method using Knative Operator
	InstallationMethodOperator
)

Directories

Path Synopsis
cdc

Jump to

Keyboard shortcuts

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