Documentation
¶
Index ¶
- type AppTarget
- func (a *AppTarget) AddSecretConfig(secretName, secretNamespace string) error
- func (a *AppTarget) GetClusterLabel() string
- func (a *AppTarget) GetClusterValuesConfigMapRef() (name, namespace string)
- func (a *AppTarget) GetNamespacedName() types.NamespacedName
- func (a *AppTarget) GetObject() client.Object
- func (a *AppTarget) GetOrganizationLabel() string
- func (a *AppTarget) GetTargetType() string
- func (a *AppTarget) HasClusterValuesConfig() bool
- func (a *AppTarget) HasSecretConfig(secretName string) bool
- func (a *AppTarget) HasUserConfigWithConnectors(ctx context.Context, c client.Client) (bool, error)
- func (a *AppTarget) IsBeingDeleted() bool
- func (a *AppTarget) RemoveSecretConfig(secretName, secretNamespace string) error
- type DexTarget
- type HelmReleaseTarget
- func (h *HelmReleaseTarget) AddSecretConfig(secretName, secretNamespace string) error
- func (h *HelmReleaseTarget) GetClusterLabel() string
- func (h *HelmReleaseTarget) GetClusterValuesConfigMapRef() (name, namespace string)
- func (h *HelmReleaseTarget) GetNamespacedName() types.NamespacedName
- func (h *HelmReleaseTarget) GetObject() client.Object
- func (h *HelmReleaseTarget) GetOrganizationLabel() string
- func (h *HelmReleaseTarget) GetTargetType() string
- func (h *HelmReleaseTarget) HasClusterValuesConfig() bool
- func (h *HelmReleaseTarget) HasSecretConfig(secretName string) bool
- func (h *HelmReleaseTarget) HasUserConfigWithConnectors(ctx context.Context, c client.Client) (bool, error)
- func (h *HelmReleaseTarget) IsBeingDeleted() bool
- func (h *HelmReleaseTarget) RemoveSecretConfig(secretName, secretNamespace string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppTarget ¶
AppTarget wraps a Giant Swarm App CR to implement the DexTarget interface
func NewAppTarget ¶
NewAppTarget creates a new AppTarget wrapper
func (*AppTarget) AddSecretConfig ¶
func (*AppTarget) GetClusterLabel ¶
func (*AppTarget) GetClusterValuesConfigMapRef ¶
func (*AppTarget) GetNamespacedName ¶
func (a *AppTarget) GetNamespacedName() types.NamespacedName
func (*AppTarget) GetOrganizationLabel ¶
func (*AppTarget) GetTargetType ¶
func (*AppTarget) HasClusterValuesConfig ¶
func (*AppTarget) HasSecretConfig ¶
func (*AppTarget) HasUserConfigWithConnectors ¶
func (*AppTarget) IsBeingDeleted ¶
func (*AppTarget) RemoveSecretConfig ¶
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 (*HelmReleaseTarget) IsBeingDeleted ¶
func (h *HelmReleaseTarget) IsBeingDeleted() bool
func (*HelmReleaseTarget) RemoveSecretConfig ¶
func (h *HelmReleaseTarget) RemoveSecretConfig(secretName, secretNamespace string) error
Click to show internal directories.
Click to hide internal directories.