dextarget

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppTarget

type AppTarget struct {
	*v1alpha1.App
}

AppTarget wraps a Giant Swarm App CR to implement the DexTarget interface

func NewAppTarget

func NewAppTarget(app *v1alpha1.App) *AppTarget

NewAppTarget creates a new AppTarget wrapper

func (*AppTarget) AddSecretConfig

func (a *AppTarget) AddSecretConfig(secretName, secretNamespace string) error

func (*AppTarget) GetClusterLabel

func (a *AppTarget) GetClusterLabel() string

func (*AppTarget) GetClusterValuesConfigMapRef

func (a *AppTarget) GetClusterValuesConfigMapRef() (name, namespace string)

func (*AppTarget) GetNamespacedName

func (a *AppTarget) GetNamespacedName() types.NamespacedName

func (*AppTarget) GetObject

func (a *AppTarget) GetObject() client.Object

func (*AppTarget) GetOrganizationLabel

func (a *AppTarget) GetOrganizationLabel() string

func (*AppTarget) GetTargetType

func (a *AppTarget) GetTargetType() string

func (*AppTarget) HasClusterValuesConfig

func (a *AppTarget) HasClusterValuesConfig() bool

func (*AppTarget) HasSecretConfig

func (a *AppTarget) HasSecretConfig(secretName string) bool

func (*AppTarget) HasUserConfigWithConnectors

func (a *AppTarget) HasUserConfigWithConnectors(ctx context.Context, c client.Client) (bool, error)

func (*AppTarget) IsBeingDeleted

func (a *AppTarget) IsBeingDeleted() bool

func (*AppTarget) RemoveSecretConfig

func (a *AppTarget) RemoveSecretConfig(secretName, secretNamespace string) error

type DexTarget

type DexTarget interface {
	client.Object

	// GetNamespacedName returns the namespaced name of the target
	GetNamespacedName() types.NamespacedName

	// GetClusterLabel returns the cluster label value if present
	GetClusterLabel() string

	// GetOrganizationLabel returns the organization label value if present
	GetOrganizationLabel() string

	// HasUserConfigWithConnectors returns true if the target has user-defined connector config
	// that should prevent dex-operator from managing connectors
	HasUserConfigWithConnectors(ctx context.Context, client client.Client) (bool, error)

	// HasClusterValuesConfig returns true if the target has a cluster values configmap reference
	HasClusterValuesConfig() bool

	// GetClusterValuesConfigMapRef returns the name and namespace of the cluster values configmap
	GetClusterValuesConfigMapRef() (name, namespace string)

	// HasSecretConfig returns true if the dex secret config is already present
	HasSecretConfig(secretName string) bool

	// AddSecretConfig adds the dex secret config reference to the target
	// For App CR: adds to .spec.extraConfigs with priority
	// For HelmRelease: adds to .spec.valuesFrom
	AddSecretConfig(secretName, secretNamespace string) error

	// RemoveSecretConfig removes the dex secret config reference from the target
	RemoveSecretConfig(secretName, secretNamespace string) error

	// IsBeingDeleted returns true if the target is being deleted
	IsBeingDeleted() bool

	// GetTargetType returns the type of the target ("App" or "HelmRelease")
	GetTargetType() string

	// GetObject returns the underlying Kubernetes object for use with client.Update
	// This is needed because the wrapper types don't have GVK registered in the scheme
	GetObject() client.Object
}

DexTarget is an interface that abstracts the common functionality between Giant Swarm App CRs and Flux HelmReleases for dex-operator configuration injection.

type HelmReleaseTarget

type HelmReleaseTarget struct {
	*helmv2.HelmRelease
}

HelmReleaseTarget wraps a Flux HelmRelease to implement the DexTarget interface

func NewHelmReleaseTarget

func NewHelmReleaseTarget(hr *helmv2.HelmRelease) *HelmReleaseTarget

NewHelmReleaseTarget creates a new HelmReleaseTarget wrapper

func (*HelmReleaseTarget) AddSecretConfig

func (h *HelmReleaseTarget) AddSecretConfig(secretName, secretNamespace string) error

func (*HelmReleaseTarget) GetClusterLabel

func (h *HelmReleaseTarget) GetClusterLabel() string

func (*HelmReleaseTarget) GetClusterValuesConfigMapRef

func (h *HelmReleaseTarget) GetClusterValuesConfigMapRef() (name, namespace string)

func (*HelmReleaseTarget) GetNamespacedName

func (h *HelmReleaseTarget) GetNamespacedName() types.NamespacedName

func (*HelmReleaseTarget) GetObject

func (h *HelmReleaseTarget) GetObject() client.Object

func (*HelmReleaseTarget) GetOrganizationLabel

func (h *HelmReleaseTarget) GetOrganizationLabel() string

func (*HelmReleaseTarget) GetTargetType

func (h *HelmReleaseTarget) GetTargetType() string

func (*HelmReleaseTarget) HasClusterValuesConfig

func (h *HelmReleaseTarget) HasClusterValuesConfig() bool

func (*HelmReleaseTarget) HasSecretConfig

func (h *HelmReleaseTarget) HasSecretConfig(secretName string) bool

func (*HelmReleaseTarget) HasUserConfigWithConnectors

func (h *HelmReleaseTarget) HasUserConfigWithConnectors(ctx context.Context, c client.Client) (bool, error)

func (*HelmReleaseTarget) IsBeingDeleted

func (h *HelmReleaseTarget) IsBeingDeleted() bool

func (*HelmReleaseTarget) RemoveSecretConfig

func (h *HelmReleaseTarget) RemoveSecretConfig(secretName, secretNamespace string) error

Jump to

Keyboard shortcuts

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