toolchainconfig

package
v0.0.0-...-ea6e92e Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolchainStatusName = "toolchain-status"

	// NotificationDeliveryServiceMailgun is the notification delivery service to use during production
	NotificationDeliveryServiceMailgun = "mailgun"

	NotificationContextRegistrationURLKey = "RegistrationURL"
)
View Source
const RegistrationServiceImageEnvKey = "REGISTRATION_SERVICE_IMAGE"

Variables

View Source
var DefaultReconcile = reconcile.Result{RequeueAfter: 10 * time.Second}

DefaultReconcile requeue every 10 seconds by default to ensure the MemberOperatorConfig on each member remains synchronized with the ToolchainConfig

Functions

func MapSecretToToolchainConfig

func MapSecretToToolchainConfig() func(object runtimeclient.Object) []reconcile.Request

MapSecretToToolchainConfig maps secrets to the singular instance of ToolchainConfig named "config"

func SyncMemberConfig

func SyncMemberConfig(ctx context.Context, memberConfigSpec toolchainv1alpha1.MemberOperatorConfigSpec, memberCluster *cluster.CachedToolchainCluster) error

func ToRegServiceDeployComplete

func ToRegServiceDeployComplete() toolchainv1alpha1.Condition

ToRegServiceDeployComplete condition when deploying is completed

func ToRegServiceDeployFailure

func ToRegServiceDeployFailure(msg string) toolchainv1alpha1.Condition

ToRegServiceDeployFailure condition when an error occurred

func ToRegServiceDeploying

func ToRegServiceDeploying(msg string) toolchainv1alpha1.Condition

ToRegServiceDeploying condition when deploying is in progress

func ToSyncComplete

func ToSyncComplete() toolchainv1alpha1.Condition

ToSyncComplete condition when the sync completed with success

func ToSyncFailure

func ToSyncFailure() toolchainv1alpha1.Condition

ToSyncFailure condition when a sync error occurred while syncing

Types

type AnalyticsConfig

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

func (AnalyticsConfig) SegmentWriteKey

func (r AnalyticsConfig) SegmentWriteKey() string

type AutoApprovalConfig

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

func (AutoApprovalConfig) IsEnabled

func (a AutoApprovalConfig) IsEnabled() bool

type DeactivationConfig

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

func (DeactivationConfig) DeactivatingNotificationDays

func (d DeactivationConfig) DeactivatingNotificationDays() int

func (DeactivationConfig) DeactivationDomainsExcluded

func (d DeactivationConfig) DeactivationDomainsExcluded() []string

func (DeactivationConfig) UserSignupDeactivatedRetentionDays

func (d DeactivationConfig) UserSignupDeactivatedRetentionDays() int

func (DeactivationConfig) UserSignupUnverifiedRetentionDays

func (d DeactivationConfig) UserSignupUnverifiedRetentionDays() int

type DeliveryServiceFactoryConfig

type DeliveryServiceFactoryConfig struct {
	ToolchainConfig
}

func (DeliveryServiceFactoryConfig) GetMailgunAPIKey

func (d DeliveryServiceFactoryConfig) GetMailgunAPIKey() string

func (DeliveryServiceFactoryConfig) GetMailgunDomain

func (d DeliveryServiceFactoryConfig) GetMailgunDomain() string

func (DeliveryServiceFactoryConfig) GetMailgunReplyToEmail

func (d DeliveryServiceFactoryConfig) GetMailgunReplyToEmail() string

func (DeliveryServiceFactoryConfig) GetMailgunSenderEmail

func (d DeliveryServiceFactoryConfig) GetMailgunSenderEmail() string

func (DeliveryServiceFactoryConfig) GetNotificationDeliveryService

func (d DeliveryServiceFactoryConfig) GetNotificationDeliveryService() string

type GitHubSecret

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

func (GitHubSecret) AccessTokenKey

func (gh GitHubSecret) AccessTokenKey() string

type MetricsConfig

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

func (MetricsConfig) ForceSynchronization

func (d MetricsConfig) ForceSynchronization() bool

type NotificationsConfig

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

func (NotificationsConfig) AdminEmail

func (n NotificationsConfig) AdminEmail() string

func (NotificationsConfig) DurationBeforeNotificationDeletion

func (n NotificationsConfig) DurationBeforeNotificationDeletion() time.Duration

func (NotificationsConfig) MailgunAPIKey

func (n NotificationsConfig) MailgunAPIKey() string

func (NotificationsConfig) MailgunDomain

func (n NotificationsConfig) MailgunDomain() string

func (NotificationsConfig) MailgunReplyToEmail

func (n NotificationsConfig) MailgunReplyToEmail() string

func (NotificationsConfig) MailgunSenderEmail

func (n NotificationsConfig) MailgunSenderEmail() string

func (NotificationsConfig) NotificationDeliveryService

func (n NotificationsConfig) NotificationDeliveryService() string

func (NotificationsConfig) TemplateSetName

func (n NotificationsConfig) TemplateSetName() string

type Reconciler

type Reconciler struct {
	Client             runtimeclient.Client
	GetMembersFunc     cluster.GetMemberClustersFunc
	Scheme             *runtime.Scheme
	RegServiceTemplate *templatev1.Template
}

Reconciler reconciles a ToolchainConfig object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile reads that state of the cluster for a ToolchainConfig object and makes changes based on the state read and what is in the ToolchainConfig.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr manager.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*Reconciler) WrapErrorWithStatusUpdate

func (r *Reconciler) WrapErrorWithStatusUpdate(
	ctx context.Context,
	toolchainConfig *toolchainv1alpha1.ToolchainConfig,
	statusUpdater func(ctx context.Context, toolchainConfig *toolchainv1alpha1.ToolchainConfig, message string) error,
	providedError error,
	format string,
	args ...interface{},
) error

type RegistrationServiceConfig

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

func (RegistrationServiceConfig) Analytics

func (RegistrationServiceConfig) Environment

func (r RegistrationServiceConfig) Environment() string

func (RegistrationServiceConfig) RegistrationServiceURL

func (r RegistrationServiceConfig) RegistrationServiceURL() string

func (RegistrationServiceConfig) Replicas

func (r RegistrationServiceConfig) Replicas() int32

type SecretToToolchainConfigMapper

type SecretToToolchainConfigMapper struct{}

type SpaceConfig

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

func (SpaceConfig) SpaceBindingRequestIsEnabled

func (s SpaceConfig) SpaceBindingRequestIsEnabled() bool

func (SpaceConfig) SpaceRequestIsEnabled

func (s SpaceConfig) SpaceRequestIsEnabled() bool

type Synchronizer

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

func NewSynchronizer

func NewSynchronizer(logger logr.Logger, getMembersFunc cluster.GetMemberClustersFunc) Synchronizer

func (*Synchronizer) SyncMemberConfigs

func (s *Synchronizer) SyncMemberConfigs(ctx context.Context, sourceConfig *toolchainv1alpha1.ToolchainConfig) map[string]string

SyncMemberConfigs retrieves member operator configurations and syncs the appropriate configuration to each member cluster returns a map of any errors encountered indexed by cluster name

type TiersConfig

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

func (TiersConfig) DefaultSpaceTier

func (d TiersConfig) DefaultSpaceTier() string

func (TiersConfig) DefaultUserTier

func (d TiersConfig) DefaultUserTier() string

func (TiersConfig) DurationBeforeChangeTierRequestDeletion

func (d TiersConfig) DurationBeforeChangeTierRequestDeletion() time.Duration

type ToolchainConfig

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

func ForceLoadToolchainConfig

func ForceLoadToolchainConfig(cl runtimeclient.Client) (ToolchainConfig, error)

ForceLoadToolchainConfig updates the cache using the provided client and returns the latest ToolchainConfig

func GetCachedToolchainConfig

func GetCachedToolchainConfig() ToolchainConfig

GetCachedToolchainConfig returns a ToolchainConfig directly from the cache

func GetToolchainConfig

func GetToolchainConfig(cl runtimeclient.Client) (ToolchainConfig, error)

GetToolchainConfig returns a ToolchainConfig using the cache, or if the cache was not initialized then retrieves the latest config using the provided client and updates the cache

func (*ToolchainConfig) AutomaticApproval

func (c *ToolchainConfig) AutomaticApproval() AutoApprovalConfig

func (*ToolchainConfig) Deactivation

func (c *ToolchainConfig) Deactivation() DeactivationConfig

func (*ToolchainConfig) Environment

func (c *ToolchainConfig) Environment() string

func (*ToolchainConfig) GitHubSecret

func (c *ToolchainConfig) GitHubSecret() GitHubSecret

func (*ToolchainConfig) Metrics

func (c *ToolchainConfig) Metrics() MetricsConfig

func (*ToolchainConfig) Notifications

func (c *ToolchainConfig) Notifications() NotificationsConfig

func (*ToolchainConfig) Print

func (c *ToolchainConfig) Print()

func (*ToolchainConfig) RegistrationService

func (c *ToolchainConfig) RegistrationService() RegistrationServiceConfig

func (*ToolchainConfig) SpaceConfig

func (c *ToolchainConfig) SpaceConfig() SpaceConfig

func (*ToolchainConfig) Tiers

func (c *ToolchainConfig) Tiers() TiersConfig

func (*ToolchainConfig) ToolchainStatus

func (c *ToolchainConfig) ToolchainStatus() ToolchainStatusConfig

func (*ToolchainConfig) Users

func (c *ToolchainConfig) Users() UsersConfig

type ToolchainStatusConfig

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

func (ToolchainStatusConfig) ToolchainStatusRefreshTime

func (d ToolchainStatusConfig) ToolchainStatusRefreshTime() time.Duration

type UsersConfig

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

func (UsersConfig) ForbiddenUsernamePrefixes

func (d UsersConfig) ForbiddenUsernamePrefixes() []string

func (UsersConfig) ForbiddenUsernameSuffixes

func (d UsersConfig) ForbiddenUsernameSuffixes() []string

func (UsersConfig) MasterUserRecordUpdateFailureThreshold

func (d UsersConfig) MasterUserRecordUpdateFailureThreshold() int

Jump to

Keyboard shortcuts

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