Documentation
¶
Index ¶
- Constants
- func GetClusterName(kubeConfig string) (string, error)
- func KubeConfig(input Params)
- type Client
- func (kt *Client) ApprovalK8sCSR(name string) error
- func (c *Client) ClientSet() kubernetes.Interface
- func (kt *Client) GenerateBinding(roleBindingType, saNameSpace, username string, clusterRoles []string, ...) error
- func (kt *Client) GetClusterRoleNames() []string
- func (kt *Client) GetServiceAccountNames(nameSpace string) []string
- func (kt *Client) ReCreateK8sCSR(cn, csrStr string) error
- func (kt *Client) WaitForK8sCsrReady(name string) (csr *certv1beta1.CertificateSigningRequest, err error)
- type Generator
- type Params
Constants ¶
View Source
const ( TokenType string = "token" ClientCertType string = "cert" ClusterScope string = "cluster" NamespaceScope string = "namespace" )
Variables ¶
This section is empty.
Functions ¶
func GetClusterName ¶
func KubeConfig ¶
func KubeConfig(input Params)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(client kubernetes.Interface) *Client
func (*Client) ApprovalK8sCSR ¶
func (*Client) ClientSet ¶
func (c *Client) ClientSet() kubernetes.Interface
func (*Client) GenerateBinding ¶
func (*Client) GetClusterRoleNames ¶
func (*Client) GetServiceAccountNames ¶
func (*Client) ReCreateK8sCSR ¶
func (*Client) WaitForK8sCsrReady ¶
func (kt *Client) WaitForK8sCsrReady(name string) (csr *certv1beta1.CertificateSigningRequest, err error)
type Params ¶
type Params struct { Type string ClusterEndpoint string ClusterName string ClusterCA string ClientCert string ClientKey string Token string SaveAs string Username string Scope string Namespaces string ClusterRoles []string ExistedSA bool ServiceAccountNamespace string }
func (Params) NamespaceSlice ¶
func (Params) SaveAsFile ¶
Click to show internal directories.
Click to hide internal directories.