components

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CrossplaneNamespace     = "crossplane-system"
	ComponentNameCrossplane = "Crossplane"
)
View Source
const (
	ComponentNameBTPSO = "BTPServiceOperator"
)
View Source
const (
	ComponentNameCertManager = "CertManager"
)
View Source
const (
	ComponentNameESO = "ExternalSecretsOperator"
)
View Source
const (
	ComponentNameFlux = "Flux"
)
View Source
const (
	ComponentNameKyverno = "Kyverno"
)

Variables

View Source
var (
	VerbsAdmin  = []string{rbacv1.VerbAll}
	VerbsView   = []string{"get", "watch", "list"}
	VerbsModify = []string{"get", "watch", "list", "update", "patch"}
)
View Source
var (
	ErrSecretTargetNamespaceEmpty = errors.New("secret target namespace must not be empty")
)

Functions

This section is empty.

Types

type BTPServiceOperator

type BTPServiceOperator struct {
	Config *v1beta1.BTPServiceOperatorConfig
}

BTPServiceOperator is the add-on for https://github.com/SAP/sap-btp-service-operator.

func (*BTPServiceOperator) BuildManifesto

func (btp *BTPServiceOperator) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*BTPServiceOperator) BuildSourceRepository

func (btp *BTPServiceOperator) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*BTPServiceOperator) GetDependencies

func (btp *BTPServiceOperator) GetDependencies() []juggler.Component

GetDependencies implements Component.

func (*BTPServiceOperator) GetName

func (btp *BTPServiceOperator) GetName() string

GetName implements Component.

func (*BTPServiceOperator) GetNamespace

func (btp *BTPServiceOperator) GetNamespace() string

GetNamespace implements TargetComponent.

func (*BTPServiceOperator) GetPolicyRules

func (btp *BTPServiceOperator) GetPolicyRules() PolicyRules

GetPolicyRules implements PolicyRulesComponent.

func (*BTPServiceOperator) Hooks

Hooks implements Component.

func (*BTPServiceOperator) IsEnabled

func (btp *BTPServiceOperator) IsEnabled() bool

IsEnabled implements Component.

func (*BTPServiceOperator) IsInstallable

func (btp *BTPServiceOperator) IsInstallable(ctx context.Context) (bool, error)

type CertManager

type CertManager struct {
	Config *v1beta1.CertManagerConfig
}

func (*CertManager) BuildManifesto

func (c *CertManager) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*CertManager) BuildSourceRepository

func (c *CertManager) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*CertManager) GetDependencies

func (*CertManager) GetDependencies() []juggler.Component

GetDependencies implements Component.

func (*CertManager) GetName

func (*CertManager) GetName() string

GetName implements Component.

func (*CertManager) GetNamespace

func (c *CertManager) GetNamespace() string

GetNamespace implements TargetComponent.

func (*CertManager) Hooks

Hooks implements Component.

func (*CertManager) IsEnabled

func (c *CertManager) IsEnabled() bool

IsEnabled implements Component.

func (*CertManager) IsInstallable

func (c *CertManager) IsInstallable(ctx context.Context) (bool, error)

type ClusterRole

type ClusterRole struct {
	Name          string
	Rules         []rbacv1.PolicyRule
	Enabled       bool
	KeepInstalled bool
}

func (*ClusterRole) BuildObjectToReconcile

func (c *ClusterRole) BuildObjectToReconcile(ctx context.Context) (client.Object, types.NamespacedName, error)

BuildObjectToReconcile implements object.ObjectComponent.

func (*ClusterRole) GetDependencies

func (c *ClusterRole) GetDependencies() []juggler.Component

GetDependencies implements object.ObjectComponent.

func (*ClusterRole) GetName

func (c *ClusterRole) GetName() string

GetName implements object.ObjectComponent.

func (*ClusterRole) GetNamespace

func (c *ClusterRole) GetNamespace() string

GetNamespace implements TargetComponent.

func (*ClusterRole) Hooks

func (c *ClusterRole) Hooks() juggler.ComponentHooks

Hooks implements object.ObjectComponent.

func (*ClusterRole) IsEnabled

func (c *ClusterRole) IsEnabled() bool

IsEnabled implements object.ObjectComponent.

func (*ClusterRole) IsInstallable

func (c *ClusterRole) IsInstallable(_ context.Context) (bool, error)

func (*ClusterRole) IsObjectHealthy

func (c *ClusterRole) IsObjectHealthy(obj client.Object) juggler.ResourceHealthiness

IsObjectHealthy implements object.ObjectComponent.

func (*ClusterRole) IsStatusInternal

func (c *ClusterRole) IsStatusInternal() bool

IsStatusInternal implements StatusVisibility interface.

func (*ClusterRole) KeepOnUninstall

func (c *ClusterRole) KeepOnUninstall() bool

KeepOnUninstall implements juggler.KeepOnUninstall.

func (*ClusterRole) OrphanDetectorContext

func (*ClusterRole) OrphanDetectorContext() object.DetectorContext

OrphanDetectorContext implements object.OrphanedObjectsDetector.

func (*ClusterRole) ReconcileObject

func (c *ClusterRole) ReconcileObject(ctx context.Context, obj client.Object) error

ReconcileObject implements object.ObjectComponent.

type Crossplane

type Crossplane struct {
	Config *v1beta1.CrossplaneConfig
}

func (*Crossplane) BuildManifesto

func (c *Crossplane) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*Crossplane) BuildSourceRepository

func (c *Crossplane) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*Crossplane) GetDependencies

func (*Crossplane) GetDependencies() []juggler.Component

GetDependencies implements Component.

func (*Crossplane) GetName

func (*Crossplane) GetName() string

GetName implements Component.

func (*Crossplane) GetNamespace

func (c *Crossplane) GetNamespace() string

GetNamespace implements TargetComponent.

func (*Crossplane) GetPolicyRules

func (c *Crossplane) GetPolicyRules() PolicyRules

GetPolicyRules implements PolicyRulesComponent.

func (*Crossplane) Hooks

Hooks implements Component.

func (*Crossplane) IsEnabled

func (c *Crossplane) IsEnabled() bool

IsEnabled implements Component.

func (*Crossplane) IsInstallable

func (c *Crossplane) IsInstallable(ctx context.Context) (bool, error)

type CrossplaneDeploymentRuntimeConfig

type CrossplaneDeploymentRuntimeConfig struct {
	Name    string
	Enabled bool
}

func (*CrossplaneDeploymentRuntimeConfig) BuildObjectToReconcile

BuildObjectToReconcile implements object.ObjectComponent.

func (*CrossplaneDeploymentRuntimeConfig) GetDependencies

func (c *CrossplaneDeploymentRuntimeConfig) GetDependencies() []juggler.Component

GetDependencies implements Component.

func (*CrossplaneDeploymentRuntimeConfig) GetName

GetName implements Component.

func (*CrossplaneDeploymentRuntimeConfig) GetNamespace

func (c *CrossplaneDeploymentRuntimeConfig) GetNamespace() string

GetNamespace implements TargetComponent.

func (*CrossplaneDeploymentRuntimeConfig) Hooks

Hooks implements Component.

func (*CrossplaneDeploymentRuntimeConfig) IsEnabled

func (c *CrossplaneDeploymentRuntimeConfig) IsEnabled() bool

IsEnabled implements Component.

func (*CrossplaneDeploymentRuntimeConfig) IsInstallable

func (c *CrossplaneDeploymentRuntimeConfig) IsInstallable(ctx context.Context) (bool, error)

IsInstallable implements Component.

func (*CrossplaneDeploymentRuntimeConfig) IsObjectHealthy

IsObjectHealthy implements object.ObjectComponent.

func (*CrossplaneDeploymentRuntimeConfig) IsStatusInternal

func (c *CrossplaneDeploymentRuntimeConfig) IsStatusInternal() bool

IsStatusInternal implements juggler.StatusVisibility

func (*CrossplaneDeploymentRuntimeConfig) OrphanDetectorContext

func (c *CrossplaneDeploymentRuntimeConfig) OrphanDetectorContext() object.DetectorContext

OrphanDetectorContext implements object.OrphanedObjectsDetector.

func (*CrossplaneDeploymentRuntimeConfig) ReconcileObject

func (c *CrossplaneDeploymentRuntimeConfig) ReconcileObject(ctx context.Context, obj client.Object) error

ReconcileObject implements object.ObjectComponent.

type CrossplaneProvider

type CrossplaneProvider struct {
	Config      *v1beta1.CrossplaneProviderConfig
	Enabled     bool
	PullSecrets []corev1.LocalObjectReference
}

func (*CrossplaneProvider) BuildObjectToReconcile

func (c *CrossplaneProvider) BuildObjectToReconcile(ctx context.Context) (client.Object, types.NamespacedName, error)

BuildObjectToReconcile implements object.ObjectComponent.

func (*CrossplaneProvider) GetDependencies

func (c *CrossplaneProvider) GetDependencies() []juggler.Component

GetDependencies implements Component.

func (*CrossplaneProvider) GetName

func (c *CrossplaneProvider) GetName() string

GetName implements Component.

func (*CrossplaneProvider) GetNamespace

func (c *CrossplaneProvider) GetNamespace() string

GetNamespace implements TargetComponent.

func (*CrossplaneProvider) Hooks

Hooks implements Component.

func (*CrossplaneProvider) IsEnabled

func (c *CrossplaneProvider) IsEnabled() bool

IsEnabled implements Component.

func (*CrossplaneProvider) IsInstallable

func (c *CrossplaneProvider) IsInstallable(ctx context.Context) (bool, error)

IsInstallable implements Component.

func (*CrossplaneProvider) IsObjectHealthy

IsObjectHealthy implements object.ObjectComponent.

func (*CrossplaneProvider) OrphanDetectorContext

func (*CrossplaneProvider) OrphanDetectorContext() object.DetectorContext

OrphanDetectorContext implements object.OrphanedObjectsDetector.

func (*CrossplaneProvider) ReconcileObject

func (c *CrossplaneProvider) ReconcileObject(ctx context.Context, obj client.Object) error

ReconcileObject implements object.ObjectComponent.

type ExternalSecretsOperator

type ExternalSecretsOperator struct {
	Config *v1beta1.ExternalSecretsOperatorConfig
}

ExternalSecretsOperator is the add-on for https://github.com/external-secrets/external-secrets.

func (*ExternalSecretsOperator) BuildManifesto

func (e *ExternalSecretsOperator) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*ExternalSecretsOperator) BuildSourceRepository

func (e *ExternalSecretsOperator) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*ExternalSecretsOperator) GetDependencies

func (e *ExternalSecretsOperator) GetDependencies() []juggler.Component

func (*ExternalSecretsOperator) GetName

func (e *ExternalSecretsOperator) GetName() string

func (*ExternalSecretsOperator) GetNamespace

func (e *ExternalSecretsOperator) GetNamespace() string

GetNamespace implements TargetComponent.

func (*ExternalSecretsOperator) GetPolicyRules

func (e *ExternalSecretsOperator) GetPolicyRules() PolicyRules

GetPolicyRules implements PolicyRulesComponent.

func (*ExternalSecretsOperator) Hooks

Hooks implements Component.

func (*ExternalSecretsOperator) IsEnabled

func (e *ExternalSecretsOperator) IsEnabled() bool

func (*ExternalSecretsOperator) IsInstallable

func (e *ExternalSecretsOperator) IsInstallable(ctx context.Context) (bool, error)

type Flux

type Flux struct {
	Config *v1beta1.FluxConfig
}

func (*Flux) BuildManifesto

func (f *Flux) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*Flux) BuildSourceRepository

func (f *Flux) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*Flux) GetDependencies

func (f *Flux) GetDependencies() []juggler.Component

func (*Flux) GetName

func (f *Flux) GetName() string

func (*Flux) GetNamespace

func (f *Flux) GetNamespace() string

func (*Flux) GetPolicyRules

func (f *Flux) GetPolicyRules() PolicyRules

func (*Flux) Hooks

func (f *Flux) Hooks() juggler.ComponentHooks

func (*Flux) IsEnabled

func (f *Flux) IsEnabled() bool

func (*Flux) IsInstallable

func (f *Flux) IsInstallable(ctx context.Context) (bool, error)

type GenericObjectComponent

type GenericObjectComponent struct {
	types.NamespacedName

	NameOverride        string
	TypeNameOverride    string
	Enabled             bool
	Type                client.Object
	Dependencies        []juggler.Component
	IsObjectHealthyFunc func(obj client.Object) juggler.ResourceHealthiness
	ReconcileObjectFunc func(ctx context.Context, obj client.Object) error
	KeepInstalled       bool
}

func (*GenericObjectComponent) BuildObjectToReconcile

func (g *GenericObjectComponent) BuildObjectToReconcile(
	ctx context.Context,
) (client.Object, types.NamespacedName, error)

BuildObjectToReconcile implements object.ObjectComponent.

func (*GenericObjectComponent) GetDependencies

func (g *GenericObjectComponent) GetDependencies() []juggler.Component

GetDependencies implements object.ObjectComponent.

func (*GenericObjectComponent) GetName

func (g *GenericObjectComponent) GetName() string

GetName implements object.ObjectComponent.

func (*GenericObjectComponent) GetNamespace

func (g *GenericObjectComponent) GetNamespace() string

GetNamespace implements TargetComponent.

func (*GenericObjectComponent) Hooks

Hooks implements object.ObjectComponent.

func (*GenericObjectComponent) IsEnabled

func (g *GenericObjectComponent) IsEnabled() bool

IsEnabled implements object.ObjectComponent.

func (*GenericObjectComponent) IsInstallable

func (g *GenericObjectComponent) IsInstallable(ctx context.Context) (bool, error)

IsInstallable implements object.ObjectComponent.

func (*GenericObjectComponent) IsObjectHealthy

IsObjectHealthy implements object.ObjectComponent.

func (*GenericObjectComponent) IsStatusInternal

func (g *GenericObjectComponent) IsStatusInternal() bool

IsStatusInternal implements StatusVisibility interface.

func (*GenericObjectComponent) KeepOnUninstall

func (g *GenericObjectComponent) KeepOnUninstall() bool

KeepOnUninstall implements juggler.KeepOnUninstall.

func (*GenericObjectComponent) ReconcileObject

func (g *GenericObjectComponent) ReconcileObject(ctx context.Context, obj client.Object) error

ReconcileObject implements object.ObjectComponent.

type Kyverno

type Kyverno struct {
	Config *v1beta1.KyvernoConfig
}

func (*Kyverno) BuildManifesto

func (k *Kyverno) BuildManifesto(ctx context.Context) (fluxcd.Manifesto, error)

func (*Kyverno) BuildSourceRepository

func (k *Kyverno) BuildSourceRepository(ctx context.Context) (fluxcd.SourceAdapter, error)

func (*Kyverno) GetDependencies

func (k *Kyverno) GetDependencies() []juggler.Component

func (*Kyverno) GetName

func (k *Kyverno) GetName() string

func (*Kyverno) GetNamespace

func (k *Kyverno) GetNamespace() string

GetNamespace implements TargetComponent.

func (*Kyverno) GetPolicyRules

func (k *Kyverno) GetPolicyRules() PolicyRules

GetPolicyRules implements PolicyRulesComponent.

func (*Kyverno) Hooks

func (k *Kyverno) Hooks() juggler.ComponentHooks

func (*Kyverno) IsEnabled

func (k *Kyverno) IsEnabled() bool

func (*Kyverno) IsInstallable

func (k *Kyverno) IsInstallable(ctx context.Context) (bool, error)

type PolicyRules

type PolicyRules struct {
	Admin []rbacv1.PolicyRule
	View  []rbacv1.PolicyRule
}

func AggregatePolicyRules

func AggregatePolicyRules(components []juggler.Component) PolicyRules

type PolicyRulesComponent

type PolicyRulesComponent interface {
	GetPolicyRules() PolicyRules
}

PolicyRulesComponent is a component that provides rules which will be added to ClusterRoles.

type Secret

type Secret struct {
	SourceClient   client.Client
	Source, Target types.NamespacedName
	Enabled        bool
}

func (*Secret) BuildObjectToReconcile

func (s *Secret) BuildObjectToReconcile(ctx context.Context) (client.Object, types.NamespacedName, error)

BuildObjectToReconcile implements object.ObjectComponent.

func (*Secret) GetDependencies

func (s *Secret) GetDependencies() []juggler.Component

GetDependencies implements object.ObjectComponent.

func (*Secret) GetName

func (s *Secret) GetName() string

GetName implements object.ObjectComponent.

func (*Secret) GetNamespace

func (s *Secret) GetNamespace() string

GetNamespace implements TargetComponent.

func (*Secret) Hooks

func (s *Secret) Hooks() juggler.ComponentHooks

Hooks implements object.ObjectComponent.

func (*Secret) IsEnabled

func (s *Secret) IsEnabled() bool

IsEnabled implements object.ObjectComponent.

func (*Secret) IsInstallable

func (s *Secret) IsInstallable(_ context.Context) (bool, error)

func (*Secret) IsObjectHealthy

func (s *Secret) IsObjectHealthy(obj client.Object) juggler.ResourceHealthiness

IsObjectHealthy implements object.ObjectComponent.

func (*Secret) IsStatusInternal

func (s *Secret) IsStatusInternal() bool

IsStatusInternal implements StatusVisibility interface.

func (*Secret) OrphanDetectorContext

func (*Secret) OrphanDetectorContext() object.DetectorContext

OrphanDetectorContext implements object.OrphanedObjectsDetector.

func (*Secret) ReconcileObject

func (s *Secret) ReconcileObject(ctx context.Context, obj client.Object) error

ReconcileObject implements object.ObjectComponent.

type TargetComponent

type TargetComponent interface {
	GetNamespace() string
}

TargetComponent is a component that should be installed on the Target (remote/workload) cluster.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳