client

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Create
	CreateServiceAccount(ctx context.Context, name, namespace string) (*corev1.ServiceAccount, *corev1.Secret, error)
	CreateRole(ctx context.Context, roleName, namespace string) (*rbacv1.Role, error)
	CreateRoleBinding(ctx context.Context, serviceAccountName, roleName, roleBindingName, namespace string) (*rbacv1.RoleBinding, error)
	CreateClusterRole(ctx context.Context, roleName string) (*rbacv1.ClusterRole, error)
	CreateClusterRoleBinding(ctx context.Context, serviceAccountName, roleName, rbName, namespace string) (*rbacv1.ClusterRoleBinding, error)
	CreateKubeConfig(secret *corev1.Secret, username string) (*api.Config, error)

	// Get
	GetServiceAccount(ctx context.Context, name, namespace string) (*corev1.ServiceAccount, error)
	GetSecret(ctx context.Context, name, namespace string) (*corev1.Secret, error)
}

Client interface represents the API for the Kubernetes API cluster supported for spin-admin

func NewClient

func NewClient(ctx context.Context, opts ...ClientOption) (Client, error)

NewClient returns a Kubernetes API client that can be used outside the cluster

type ClientOption

type ClientOption func(*client)

ClientOption is for additional client configurations.

func WithDryRun

func WithDryRun() ClientOption

WithDryRun specifies the dry run operation.

Jump to

Keyboard shortcuts

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