common

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentityMetadataMutator added in v1.4.0

func IdentityMetadataMutator(required, current metav1.Object) error

IdentityMetadataMutator is called on an update and preserves identity information.

func ProjectNamespace added in v1.5.0

func ProjectNamespace(ctx context.Context, cli client.Client, organizationID, projectID string) (*corev1.Namespace, error)

ProjectNamespace is shared by higher order services.

func SetIdentityMetadata added in v1.4.0

func SetIdentityMetadata(ctx context.Context, meta *metav1.ObjectMeta) error

SetIdentityMetadata sets identity specific metadata on a resource during generation.

Types

type Client

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

Client wraps up control plane related management handling.

func New

func New(client client.Client) *Client

New returns a new client with required parameters.

func (*Client) CheckQuotaConsistency

func (c *Client) CheckQuotaConsistency(ctx context.Context, organizationID string, quota *unikornv1.Quota, allocation *unikornv1.Allocation) error

CheckQuotaConsistency by default loads up the organization's quota and all allocations and checks that the total of alloocations does not exceed the quota. If you pass in a quota argument, i.e. when updating the quotas, this will override the read from the organization. If you pass in an allocation, i.e. when creating or updating an allocation, this will be unioned with the organization's allocations, overriding an existing one if it exists.

func (*Client) GetAllocations

func (c *Client) GetAllocations(ctx context.Context, organizationID string) (*unikornv1.AllocationList, error)

func (*Client) GetQuota

func (c *Client) GetQuota(ctx context.Context, organizationID string) (*unikornv1.Quota, bool, error)

func (*Client) ProjectNamespace

func (c *Client) ProjectNamespace(ctx context.Context, organizationID, projectID string) (*corev1.Namespace, error)

type IssuerValue added in v1.11.0

type IssuerValue struct {
	// URL is the OAuth2/OIDC issuer URL (e.g., "https://identity.example.com")
	// This is used when minting tokens and populating subject records.
	URL string
	// Hostname is just the hostname part (e.g., "identity.example.com")
	// This is used for audience claims and other non-issuer uses.
	Hostname string
}

IssuerValue is a value that can be used with pflag.Var, so as to set an issuer URL and hostname with the same argument.

func (*IssuerValue) Set added in v1.11.0

func (v *IssuerValue) Set(value string) error

func (*IssuerValue) String added in v1.11.0

func (v *IssuerValue) String() string

func (*IssuerValue) Type added in v1.11.0

func (*IssuerValue) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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