serviceaccount

package
v2.1.155 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL