kubernetes

package
v0.0.0-...-738d9da Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigLabel              = "serverless.kyma-project.io/config"
	RuntimeLabel             = "serverless.kyma-project.io/runtime"
	RbacLabel                = "serverless.kyma-project.io/rbac"
	CredentialsLabelValue    = "credentials"
	ServiceAccountLabelValue = "service-account"
	RuntimeLabelValue        = "runtime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseNamespace                 string        `envconfig:"default=kyma-system"`
	BaseDefaultSecretName         string        `envconfig:"default=serverless-registry-config-default"`
	ExcludedNamespaces            []string      `envconfig:"default=kyma-system"`
	ConfigMapRequeueDuration      time.Duration `envconfig:"default=1m"`
	SecretRequeueDuration         time.Duration `envconfig:"default=1m"`
	ServiceAccountRequeueDuration time.Duration `envconfig:"default=1m"`
}

type ConfigMapReconciler

type ConfigMapReconciler struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewConfigMap

func NewConfigMap(client client.Client, log *zap.SugaredLogger, config Config, service ConfigMapService) *ConfigMapReconciler

func (*ConfigMapReconciler) Reconcile

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

func (*ConfigMapReconciler) SetupWithManager

func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error

type ConfigMapService

type ConfigMapService interface {
	IsBase(configMap *corev1.ConfigMap) bool
	ListBase(ctx context.Context) ([]corev1.ConfigMap, error)
	UpdateNamespace(ctx context.Context, logger *zap.SugaredLogger, namespace string, baseInstance *corev1.ConfigMap) error
}

func NewConfigMapService

func NewConfigMapService(client resource.Client, config Config) ConfigMapService

type NamespaceReconciler

type NamespaceReconciler struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewNamespace

func NewNamespace(client client.Client, log *zap.SugaredLogger, config Config,
	configMapSvc ConfigMapService, secretSvc SecretService, serviceAccountSvc ServiceAccountService) *NamespaceReconciler

func (*NamespaceReconciler) Reconcile

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

func (*NamespaceReconciler) SetupWithManager

func (r *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error

type SecretReconciler

type SecretReconciler struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewSecret

func NewSecret(client client.Client, log *zap.SugaredLogger, config Config, secretSvc SecretService) *SecretReconciler

func (*SecretReconciler) Reconcile

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

func (*SecretReconciler) SetupWithManager

func (r *SecretReconciler) SetupWithManager(mgr ctrl.Manager) error

type SecretService

type SecretService interface {
	IsBase(secret *corev1.Secret) bool
	GetBase(ctx context.Context) (*corev1.Secret, error)
	UpdateNamespace(ctx context.Context, logger *zap.SugaredLogger, namespace string, baseInstance *corev1.Secret) error
	HandleFinalizer(ctx context.Context, logger *zap.SugaredLogger, secret *corev1.Secret, namespaces []string) error
}

func NewSecretService

func NewSecretService(client resource.Client, config Config) SecretService

type ServiceAccountReconciler

type ServiceAccountReconciler struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewServiceAccount

func NewServiceAccount(client client.Client, log *zap.SugaredLogger, config Config, serviceAccountSvc ServiceAccountService) *ServiceAccountReconciler

func (*ServiceAccountReconciler) Reconcile

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

func (*ServiceAccountReconciler) SetupWithManager

func (r *ServiceAccountReconciler) SetupWithManager(mgr ctrl.Manager) error

type ServiceAccountService

type ServiceAccountService interface {
	IsBase(serviceAccount *corev1.ServiceAccount) bool
	ListBase(ctx context.Context) ([]corev1.ServiceAccount, error)
	UpdateNamespace(ctx context.Context, logger *zap.SugaredLogger, namespace string, baseInstance *corev1.ServiceAccount) error
}

func NewServiceAccountService

func NewServiceAccountService(client resource.Client, config Config) ServiceAccountService

Jump to

Keyboard shortcuts

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