Documentation ¶
Index ¶
- func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, name string) (*v1.ServiceAccount, error)
- func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, name string) error
- func GetServiceAccountCert(kubeClient kubernetes.Interface, namespace string, serviceAccountName string) (string, error)
- func GetServiceAccountToken(kubeClient kubernetes.Interface, namespace string, serviceAccountName string) (string, error)
- func PatchImagePullSecrets(kubeClient kubernetes.Interface, ns string, sa string, ...) error
- type ImagePullSecret
- type JsonPatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServiceAccount ¶
func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, name string) (*v1.ServiceAccount, error)
CreateServiceAccount creates a new services account in the given namespace and returns the service account name
func DeleteServiceAccount ¶
func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, name string) error
DeleteServiceAccount deletes a service account
func GetServiceAccountCert ¶ added in v2.1.56
func GetServiceAccountCert(kubeClient kubernetes.Interface, namespace string, serviceAccountName string) (string, error)
GetServiceAccountCert returns the certificate data for the specified service account in the given namespace. Returns an error if an error occurs retrieving the certificate.
func GetServiceAccountToken ¶
func GetServiceAccountToken(kubeClient kubernetes.Interface, namespace string, serviceAccountName string) (string, error)
GetServiceAccountToken return the token of a service account
func PatchImagePullSecrets ¶
func PatchImagePullSecrets(kubeClient kubernetes.Interface, ns string, sa string, imagePullSecrets []string) error
PatchImagePullSecrets patches the specified ImagePullSecrets to the given service account
Types ¶
type ImagePullSecret ¶
type ImagePullSecret struct {
Name string `json:"name"`
}
type JsonPatch ¶
type JsonPatch struct {
ImagePullSecret *[]ImagePullSecret `json:"imagePullSecrets"`
}
Click to show internal directories.
Click to hide internal directories.