Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
Credentials interface manages all cluster related tasks
type K8sClusterCreds ¶
type K8sClusterCreds struct {
K8sConfig *K8sConfig
}
K8sClusterCreds implements CredsManager interface
func NewK8sClusterCreds ¶
func NewK8sClusterCreds(k *K8sConfig) *K8sClusterCreds
NewK8sClusterCreds returns a K8sCredsManager
func (*K8sClusterCreds) ToRestConfig ¶
func (k *K8sClusterCreds) ToRestConfig() (*rest.Config, error)
ToRestConfig generates a k8s rest.Config that is used to instantiate k8s clients ie any client that is generated by client-go generators
type K8sConfig ¶
type K8sConfig struct { Cluster *clientcmdapiv1.Cluster `json:"cluster" yaml:"cluster"` AuthInfo *clientcmdapiv1.AuthInfo `json:"user" yaml:"user" mapstructure:"user"` Name string `json:"name" yaml:"name"` }
K8sConfig contains fields on how to connect to a k8s cluster
func (*K8sConfig) UnmarshalYAML ¶
UnmarshalYAML implements Unmarshal interface Since K8sConfig fields only have json tags, sigyaml.Unmarshal needs to be used to unmarshal all the fields. This method reads K8sConfig into a map[string]interface{}, marshals it into a byte for, before passing to sigyaml.Unmarshal
Click to show internal directories.
Click to hide internal directories.