Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrorInstallationMethodUnknown = errors.New("Cannot detect current installation method")
ErrorInstallationMethodUnknown indicates that can not detect current installation method
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
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 )