Documentation
¶
Index ¶
- Constants
- func IndexNamespacesByIdentity(obj client.Object) []string
- type ApplyToConsumerResult
- type ConsumerStatus
- type HandleResourcesResult
- type Manager
- func (m *Manager) ApplyToConsumer(ctx context.Context, consumerKubeconfigData []byte, ...) (*ApplyToConsumerResult, error)
- func (m *Manager) AuthorizeRequest(ctx context.Context, subject string, groups []string, ...) error
- func (m *Manager) CreateAPIServiceExportRequest(ctx context.Context, cluster, namespace, name string, ...) (*kubebindv1alpha2.APIServiceExportRequest, error)
- func (m *Manager) GetConsumerStatus(ctx context.Context, identity, cluster string) (*ConsumerStatus, error)
- func (m *Manager) GetKonnectorHostAliases() []corev1.HostAlias
- func (m *Manager) GetTemplates(ctx context.Context, cluster, name string) (*kubebindv1alpha2.APIServiceExportTemplate, error)
- func (m *Manager) HandleResources(ctx context.Context, author, identity, cluster string) (*HandleResourcesResult, error)
- func (m *Manager) ListCollections(ctx context.Context, cluster string) (*kubebindv1alpha2.CollectionList, error)
- func (m *Manager) ListCustomResourceDefinitions(ctx context.Context, cluster string, selector labels.Selector) (*apiextensionsv1.CustomResourceDefinitionList, error)
- func (m *Manager) ListDynamicResources(ctx context.Context, cluster string, gvk schema.GroupVersionKind, ...) (*unstructured.UnstructuredList, error)
- func (m *Manager) ListTemplates(ctx context.Context, cluster string) (*kubebindv1alpha2.APIServiceExportTemplateList, error)
- func (m *Manager) SeedDefaultCluster(ctx context.Context) error
Constants ¶
const (
NamespacesByIdentity = "namespacesByIdentity"
)
Variables ¶
This section is empty.
Functions ¶
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 (*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
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 (*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 (m *Manager) ListTemplates(ctx context.Context, cluster string) (*kubebindv1alpha2.APIServiceExportTemplateList, error)