controlplane

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package controlplane contains code for setting up and running Primaza control plane

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteServiceBindingAndSecretFromNamespaces

func DeleteServiceBindingAndSecretFromNamespaces(ctx context.Context, cli client.Client, sc primazaiov1alpha1.ServiceClaim, namespaces []string) error

func DeleteServiceClassFromNamespaces

func DeleteServiceClassFromNamespaces(ctx context.Context, cli client.Client, sc primazaiov1alpha1.ServiceClass, namespaces []string) error

func PushServiceBinding

func PushServiceBinding(
	ctx context.Context,
	sc *primazaiov1alpha1.ServiceClaim,
	secret *corev1.Secret,
	scheme *runtime.Scheme,
	controllerruntimeClient client.Client,
	nspace *string,
	applicationNamespaces []string,
	cfg *rest.Config) error

func PushServiceCatalogToApplicationNamespaces

func PushServiceCatalogToApplicationNamespaces(ctx context.Context, sc primazaiov1alpha1.ServiceCatalog, scheme *runtime.Scheme, controllerruntimeClient client.Client, applicationNamespaces []string, cfg *rest.Config) error

func PushServiceClassToNamespaces

func PushServiceClassToNamespaces(ctx context.Context, cli client.Client, sc primazaiov1alpha1.ServiceClass, namespaces []string) error

Types

type AgentPermissionsCheckReport

type AgentPermissionsCheckReport map[string]authz.NamespacedPermissionsReport

type AgentPermissionsChecker

type AgentPermissionsChecker interface {
	TestPermissions(ctx context.Context, namespaces []string) (AgentPermissionsCheckReport, error)
}

func NewAgentAppPermissionsChecker

func NewAgentAppPermissionsChecker(cfg *rest.Config) AgentPermissionsChecker

func NewAgentSvcPermissionsChecker

func NewAgentSvcPermissionsChecker(cfg *rest.Config) AgentPermissionsChecker

type ClusterEnvironmentState

type ClusterEnvironmentState struct {
	Name          string
	Namespace     string
	ClusterConfig *rest.Config

	ApplicationNamespaces  []string
	ServiceNamespaces      []string
	AppAgentImage          string
	SvcAgentImage          string
	AppAgentManifest       string
	SvcAgentManifest       string
	AppAgentConfigManifest string
	SvcAgentConfigManifest string
	Strategy               primazaiov1alpha1.SynchronizationStrategy
}

type NamespaceType

type NamespaceType string
const (
	ServiceNamespaceType     NamespaceType = "service"
	ApplicationNamespaceType NamespaceType = "application"
)

func (NamespaceType) Short

func (t NamespaceType) Short() string

type NamespacesBinder

type NamespacesBinder interface {
	BindNamespaces(ctx context.Context, ceName string, ceNamespace string, namespaces []string) error
}

func NewApplicationNamespacesBinder

func NewApplicationNamespacesBinder(
	primazaClient client.Client,
	workerClient *kubernetes.Clientset,
	agentManifest string,
	agentImage string,
	agentConfig string,
	strategy primazaiov1alpha1.SynchronizationStrategy,
) NamespacesBinder

func NewServiceNamespacesBinder

func NewServiceNamespacesBinder(
	primazaClient client.Client,
	workerClient *kubernetes.Clientset,
	agentManifest string,
	agentImage string,
	agentConfig string,
	strategy primazaiov1alpha1.SynchronizationStrategy,
) NamespacesBinder

type NamespacesReconciler

type NamespacesReconciler interface {
	ReconcileNamespaces(ctx context.Context) error
}

type NamespacesUnbinder

type NamespacesUnbinder interface {
	UnbindNamespaces(context.Context, string, string, []string) error
}

func NewApplicationNamespacesUnbinder

func NewApplicationNamespacesUnbinder(primazaClient client.Client, workerClient *kubernetes.Clientset, deploymentManifest, configMapManifest string) NamespacesUnbinder

func NewServiceNamespacesUnbinder

func NewServiceNamespacesUnbinder(primazaClient client.Client, workerClient *kubernetes.Clientset, deploymentManifest, configMapManifest string) NamespacesUnbinder

Jump to

Keyboard shortcuts

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