kubernetes

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespacesByIdentity = "namespacesByIdentity"
)

Variables

This section is empty.

Functions

func IndexNamespacesByIdentity

func IndexNamespacesByIdentity(obj client.Object) []string

Types

type ApplyToConsumerResult added in v0.8.0

type ApplyToConsumerResult struct {
	KonnectorDeployed bool   `json:"konnectorDeployed"`
	BundleCreated     bool   `json:"bundleCreated"`
	Message           string `json:"message"`
}

ApplyToConsumerResult contains the result of ApplyToConsumer operation.

type ConsumerStatus added in v0.8.0

type ConsumerStatus struct {
	// Connected is true if the consumer has an existing provider namespace.
	Connected bool `json:"connected"`
	// Namespace is the provider namespace for this consumer.
	Namespace string `json:"namespace,omitempty"`
	// Exports is the list of APIServiceExport names in the consumer's namespace.
	Exports []string `json:"exports,omitempty"`
}

ConsumerStatus describes the status of a consumer cluster relative to the provider.

type HandleResourcesResult added in v0.8.0

type HandleResourcesResult struct {
	// Kubeconfig is the kubeconfig data for accessing the service provider cluster.
	Kubeconfig []byte
	// Namespace is the namespace assigned to this binding on the service provider cluster.
	Namespace string
}

HandleResourcesResult contains the result of HandleResources operation.

type Manager

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

func NewKubernetesManager

func NewKubernetesManager(
	ctx context.Context,
	namespacePrefix, providerPrettyName string,
	externalAddressGenerator kuberesources.ExternalAddressGeneratorFunc,
	scope kubebindv1alpha2.InformerScope,
	externalCA []byte,
	externalTLSServerName string,
	manager mcmanager.Manager,
	embeddedOIDC bool,
	konnectorHostAliases []corev1.HostAlias,
) (*Manager, error)

func (*Manager) ApplyToConsumer added in v0.8.0

func (m *Manager) ApplyToConsumer(
	ctx context.Context,
	consumerKubeconfigData []byte,
	providerKubeconfigData []byte,
	bindingName string,
	konnectorImage string,
	overrideHostAliases []corev1.HostAlias,
) (*ApplyToConsumerResult, error)

ApplyToConsumer applies konnector manifests and binding bundle to a consumer cluster using the provided consumer kubeconfig.

func (*Manager) AuthorizeRequest added in v0.7.0

func (m *Manager) AuthorizeRequest(ctx context.Context, subject string, groups []string, cluster, method, path string) error

func (*Manager) CreateAPIServiceExportRequest added in v0.8.0

func (m *Manager) CreateAPIServiceExportRequest(
	ctx context.Context,
	cluster, namespace, name string,
	spec kubebindv1alpha2.APIServiceExportRequestSpec,
) (*kubebindv1alpha2.APIServiceExportRequest, error)

CreateAPIServiceExportRequest creates an APIServiceExportRequest in the given namespace on the provider cluster and waits for it to be reconciled (Succeeded or Failed).

func (*Manager) GetConsumerStatus added in v0.8.0

func (m *Manager) GetConsumerStatus(ctx context.Context, identity, cluster string) (*ConsumerStatus, error)

GetConsumerStatus checks if the given identity already has a provider namespace with existing APIServiceExports.

func (*Manager) GetKonnectorHostAliases added in v0.8.0

func (m *Manager) GetKonnectorHostAliases() []corev1.HostAlias

GetKonnectorHostAliases returns the configured default host aliases for konnector pods.

func (*Manager) GetTemplates added in v0.6.0

func (m *Manager) GetTemplates(ctx context.Context, cluster, name string) (*kubebindv1alpha2.APIServiceExportTemplate, error)

func (*Manager) HandleResources

func (m *Manager) HandleResources(
	ctx context.Context,
	author, identity, cluster string,
) (*HandleResourcesResult, error)

func (*Manager) ListCollections added in v0.6.0

func (m *Manager) ListCollections(ctx context.Context, cluster string) (*kubebindv1alpha2.CollectionList, error)

func (*Manager) ListCustomResourceDefinitions

func (m *Manager) ListCustomResourceDefinitions(ctx context.Context, cluster string, selector labels.Selector) (*apiextensionsv1.CustomResourceDefinitionList, error)

func (*Manager) ListDynamicResources

func (m *Manager) ListDynamicResources(ctx context.Context, cluster string, gvk schema.GroupVersionKind, selector labels.Selector) (*unstructured.UnstructuredList, error)

func (*Manager) ListTemplates added in v0.6.0

func (*Manager) SeedDefaultCluster added in v0.7.0

func (m *Manager) SeedDefaultCluster(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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