forge

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package forge contains utility functions to forge resources of the authentication module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControlPlaneIdentityName

func ControlPlaneIdentityName(remoteClusterID liqov1beta1.ClusterID) string

ControlPlaneIdentityName forges the name of a ControlPlane Identity resource given the remote cluster name.

func GenerateKubeconfigSecretName

func GenerateKubeconfigSecretName(identity *authv1beta1.Identity) string

GenerateKubeconfigSecretName generates the name of the kubeconfig secret associated to an identity.

func GenerateNonceSecretName

func GenerateNonceSecretName() string

GenerateNonceSecretName generates the name of the Secret object to store the nonce.

func GenerateSignedNonceSecretName

func GenerateSignedNonceSecretName() string

GenerateSignedNonceSecretName generates the name of the Secret object to store the signed nonce.

func Identity

func Identity(name, namespace string) *authv1beta1.Identity

Identity forges a Identity resource.

func IdentityForRemoteCluster

func IdentityForRemoteCluster(name, namespace string, localClusterID liqov1beta1.ClusterID,
	identityType authv1beta1.IdentityType, authParams *authv1beta1.AuthParams, defaultKubeConfigNs *string) *authv1beta1.Identity

IdentityForRemoteCluster forges a Identity resource to be applied on a remote cluster.

func KubeconfigSecret

func KubeconfigSecret(identity *authv1beta1.Identity) *corev1.Secret

KubeconfigSecret forges a new Secret object stroing the kubeconfig associated to the provided identity.

func MutateIdentity

func MutateIdentity(identity *authv1beta1.Identity, remoteClusterID liqov1beta1.ClusterID,
	identityType authv1beta1.IdentityType, authParams *authv1beta1.AuthParams, defaultKubeConfigNs *string)

MutateIdentity mutates a Identity resource.

func MutateKubeconfigSecret

func MutateKubeconfigSecret(secret *corev1.Secret, identity *authv1beta1.Identity, clientKey []byte, namespace *string) error

MutateKubeconfigSecret mutate a Secret object storing the kubeconfig associated to the provided identity.

func MutateNonce

func MutateNonce(nonce *corev1.Secret, remoteClusterID liqov1beta1.ClusterID) error

MutateNonce sets the nonce labels and data.

func MutateResourceSlice

func MutateResourceSlice(resourceSlice *authv1beta1.ResourceSlice, remoteClusterID liqov1beta1.ClusterID,
	opts *ResourceSliceOptions, createVirtualNode bool) error

MutateResourceSlice mutates a ResourceSlice resource.

func MutateTenant

func MutateTenant(tenant *authv1beta1.Tenant, remoteClusterID liqov1beta1.ClusterID,
	publicKey, csr, signature []byte, proxyURL *string)

MutateTenant mutates a Tenant resource.

func Nonce

func Nonce(tenantNamespace string) *corev1.Secret

Nonce creates a new Secret object to store the nonce.

func ResourceSlice

func ResourceSlice(name, namespace string) *authv1beta1.ResourceSlice

ResourceSlice forges a ResourceSlice resource.

func ResourceSliceIdentityName

func ResourceSliceIdentityName(resourceSlice *authv1beta1.ResourceSlice) string

ResourceSliceIdentityName forges the name of a ResourceSlice Identity.

func SignedNonce

func SignedNonce(remoteClusterID liqov1beta1.ClusterID, tenantNamespace, nonce string) *corev1.Secret

SignedNonce creates a new Secret object to store the nonce signed by the consumer cluster.

func Tenant

func Tenant(remoteClusterID liqov1beta1.ClusterID) *authv1beta1.Tenant

Tenant forges a Tenant resource.

func TenantForRemoteCluster

func TenantForRemoteCluster(localClusterID liqov1beta1.ClusterID,
	publicKey, csr, signature []byte, proxyURL *string) *authv1beta1.Tenant

TenantForRemoteCluster forges a Tenant resource to be applied on a remote cluster.

Types

type ResourceSliceOptions

type ResourceSliceOptions struct {
	Class     authv1beta1.ResourceSliceClass
	Resources map[corev1.ResourceName]string
}

ResourceSliceOptions contains the options to forge a ResourceSlice resource.

Jump to

Keyboard shortcuts

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