Documentation ¶
Index ¶
- Variables
- func DoesCRDExist(cxt context.Context, c client.Client, crdName string) (bool, error)
- func DoesNamespaceExist(c client.Client, namespace string) (bool, error)
- func GenerateLeaderElectionID(name string, versionedDeploy bool) string
- func GetRuntimeNamespace() string
- func NewNamespace(c client.Client, namespace string) error
- func NewRestConfigGetter(namespace string) genericclioptions.RESTClientGetter
- func NewRestConfigGetterByConfig(config *rest.Config, namespace string) genericclioptions.RESTClientGetter
- type IOStreams
Constants ¶
This section is empty.
Variables ¶
var OAMLabel = map[string]string{"app.kubernetes.io/part-of": "kubevela"}
OAMLabel defines the label of namespace automatically created by kubevela
Functions ¶
func DoesCRDExist ¶
DoesCRDExist check CRD exist
func DoesNamespaceExist ¶
DoesNamespaceExist check namespace exist
func GenerateLeaderElectionID ¶ added in v1.2.4
GenerateLeaderElectionID returns the Leader Election ID.
func GetRuntimeNamespace ¶ added in v1.2.0
func GetRuntimeNamespace() string
GetRuntimeNamespace get namespace of the current running pod, fall back to default vela system
func NewNamespace ¶
NewNamespace create namespace
func NewRestConfigGetter ¶
func NewRestConfigGetter(namespace string) genericclioptions.RESTClientGetter
NewRestConfigGetter create config for helm client. The helm client never thought it could be used inside a cluster so it took a dependency on the kube cli, we have to create a cli client getter from the rest.Config
func NewRestConfigGetterByConfig ¶ added in v1.2.3
func NewRestConfigGetterByConfig(config *rest.Config, namespace string) genericclioptions.RESTClientGetter
NewRestConfigGetterByConfig new rest config getter
Types ¶
type IOStreams ¶
type IOStreams struct { // In think, os.Stdin In io.Reader // Out think, os.Stdout Out io.Writer // ErrOut think, os.Stderr ErrOut io.Writer }
IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing. Inconsistent and different names make it hard to read and review code
func NewDefaultIOStreams ¶ added in v1.4.0
func NewDefaultIOStreams() IOStreams
NewDefaultIOStreams return IOStreams with standard input/output/error
func NewTestIOStreams ¶ added in v1.4.0
NewTestIOStreams return IOStreams with empty input and combined buffered output