resources

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelSecretType            = "nats.accounts.io/secret-type"
	LabelSecretTypeSeed        = "seed"
	LabelSecretTypeJWT         = "jwt"
	LabelSecretTypeCredentials = "credentials"

	LabelSecretJWTType  = "nats.accounts.io/jwt-type"
	LabelSecretSeedType = "nats.accounts.io/seed-type"

	LabelSecretTypeOperator   = "Operator"
	LabelSecretTypeSigningKey = "SigningKey"
	LabelSecretTypeAccount    = "Account"
	LabelSecretTypeUser       = "User"

	LabelSubject = "accounts.nats.io/subject"

	LabelOperatorName   = "accounts.nats.io/operator"
	LabelSigningKeyName = "accounts.nats.io/signing-key"
	LabelAccountName    = "accounts.nats.io/account"
	LabelUserName       = "accounts.nats.io/user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTSecretBuilder

type JWTSecretBuilder struct {
	// contains filtered or unexported fields
}

func NewJWTSecretBuilder

func NewJWTSecretBuilder(scheme *runtime.Scheme) *JWTSecretBuilder

func NewJWTSecretBuilderFromSecret

func NewJWTSecretBuilderFromSecret(s *v1.Secret, scheme *runtime.Scheme) *JWTSecretBuilder

func (*JWTSecretBuilder) Build

func (b *JWTSecretBuilder) Build(obj client.Object, jwt string, opts ...SecretOption) (*v1.Secret, error)

type KeyPairSecretBuilder

type KeyPairSecretBuilder struct {
	// contains filtered or unexported fields
}

func NewKeyPairSecretBuilder

func NewKeyPairSecretBuilder(scheme *runtime.Scheme) *KeyPairSecretBuilder

func NewKeyPairSecretBuilderFromSecret

func NewKeyPairSecretBuilderFromSecret(s *v1.Secret, scheme *runtime.Scheme) *KeyPairSecretBuilder

func (*KeyPairSecretBuilder) Build

func (b *KeyPairSecretBuilder) Build(obj client.Object, kp nkeys.KeyPair, opts ...SecretOption) (*v1.Secret, error)

type SecretOption

type SecretOption func(secret *v1.Secret) error

func Immutable

func Immutable() SecretOption

func WithDeletionPrevention added in v0.4.0

func WithDeletionPrevention() SecretOption

WithDeletionPrevention adds a finalizer to the secret which will never be removed by this controller. This is useful for Operator and Account seed secrets which can be very destructive if deleted accidentally. Users will still need to recreate the seed if they trigger a deletion since the deletionTimestamp will be set, but the finalizer will prevent Kubernetes from garbage collecting, giving them time to copy the secret in preparation for recreating.

type UserCredentialSecretBuilder

type UserCredentialSecretBuilder struct {
	// contains filtered or unexported fields
}

func NewUserCredentialSecretBuilder

func NewUserCredentialSecretBuilder(scheme *runtime.Scheme, ca []byte) *UserCredentialSecretBuilder

func NewUserCredentialSecretBuilderFromSecret

func NewUserCredentialSecretBuilderFromSecret(s *corev1.Secret, scheme *runtime.Scheme, ca []byte) *UserCredentialSecretBuilder

func (*UserCredentialSecretBuilder) Build

func (b *UserCredentialSecretBuilder) Build(usr *v1alpha1.User, ujwt string, seed []byte) (*corev1.Secret, error)

Jump to

Keyboard shortcuts

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