kubernetes

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretKey       = "ucp_secret"
	RadiusNamespace = "radius-system"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	K8sClient controller_runtime.Client
}

Client implements secret storage for k8s.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name string) error

Delete validates the name argument and deletes the secret object from the Kubernetes cluster, returning an error if the secret object is not found or if any other error occurs.

func (*Client) Get

func (c *Client) Get(ctx context.Context, name string) ([]byte, error)

Get checks if the provided name is valid and if it exists in the RadiusNamespace, and returns the data associated with the secret if found, otherwise it returns an error.

func (*Client) Save

func (c *Client) Save(ctx context.Context, name string, value []byte) error

Save saves the secret as a k8s secret resource. It checks if the given name and value are valid, checks if the secret already exists, and creates or updates the secret accordingly, returning an error if one occurs.

Jump to

Keyboard shortcuts

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