Documentation
¶
Index ¶
- func Apply(filepath string) (string, error)
- func ApplyString(content string) (string, error)
- func CanIGetPods(namespace string) bool
- func CreateServiceAccount(namespace string, accountName string) error
- func Delete(filepath string) (string, error)
- func DeleteDeployment(deploymentName string, namespace string) error
- func DeleteString(content string) (string, error)
- func GetCurrentMasterPlaneFqdn() (string, error)
- func PrintAllCopsNamespaces() error
- func RemoveServiceAccount(namespace string, accountName string) error
- func UseContext(contextName string) error
- type Cluster
- type ConfigResponse
- type Context
- type CopsNamespaceResponse
- type CopsServiceAccount
- type ServiceAccount
- type ServiceAccountSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyString ¶
func CanIGetPods ¶
func CreateServiceAccount ¶
func DeleteDeployment ¶
func DeleteString ¶
func PrintAllCopsNamespaces ¶
func PrintAllCopsNamespaces() error
func RemoveServiceAccount ¶
func UseContext ¶
Types ¶
type ConfigResponse ¶
type ConfigResponse struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
Preferences struct {
} `json:"preferences"`
Clusters []Cluster `json:"clusters"`
Contexts []Context `json:"contexts"`
CurrentContext string `json:"current-context"`
}
func GetCurrentConfig ¶
func GetCurrentConfig() (*ConfigResponse, error)
type CopsNamespaceResponse ¶
type CopsNamespaceResponse struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata struct {
Name string `yaml:"name"`
} `yaml:"metadata"`
Spec struct {
NamespaceAdminUsers []string `yaml:"namespaceAdminUsers"`
NamespaceAdminServiceAccounts []CopsServiceAccount `yaml:"namespaceAdminServiceAccounts"`
} `yaml:"spec"`
}
func GetCopsNamespace ¶
func GetCopsNamespace(namespace string) (*CopsNamespaceResponse, error)
type CopsServiceAccount ¶
type ServiceAccount ¶
type ServiceAccount struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata struct {
CreationTimestamp struct {
} `yaml:"creationTimestamp"`
Name string `yaml:"name"`
Namespace string `yaml:"namespace"`
ResourceVersion string `yaml:"resourceVersion"`
SelfLink string `yaml:"selfLink"`
UID string `yaml:"uid"`
} `yaml:"metadata"`
Secrets []struct {
Name string `yaml:"name"`
} `yaml:"secrets"`
}
func GetServiceAccount ¶
func GetServiceAccount(namespace string, name string) ServiceAccount
type ServiceAccountSecret ¶
type ServiceAccountSecret struct {
APIVersion string `yaml:"apiVersion"`
Data struct {
CaCrt string `yaml:"ca.crt"`
Namespace string `yaml:"namespace"`
Token string `yaml:"token"`
} `yaml:"data"`
Kind string `yaml:"kind"`
Metadata struct {
Annotations struct {
KubernetesIoServiceAccountName string `yaml:"kubernetes.io/service-account.name"`
KubernetesIoServiceAccountUID string `yaml:"kubernetes.io/service-account.uid"`
} `yaml:"annotations"`
CreationTimestamp struct {
} `yaml:"creationTimestamp"`
Name string `yaml:"name"`
Namespace string `yaml:"namespace"`
ResourceVersion string `yaml:"resourceVersion"`
SelfLink string `yaml:"selfLink"`
UID string `yaml:"uid"`
} `yaml:"metadata"`
Type string `yaml:"type"`
}
func GetServiceAccountSecret ¶
func GetServiceAccountSecret(namespace string, name string) ServiceAccountSecret
Click to show internal directories.
Click to hide internal directories.