Documentation ¶
Index ¶
Constants ¶
View Source
const (
ControllerName = "kcp-virtual-apiexport-api-reconciler"
)
Variables ¶
View Source
var InternalAPIs = []internalapis.InternalAPI{ { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "namespaces", Singular: "namespace", Kind: "Namespace", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.Namespace{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "configmaps", Singular: "configmap", Kind: "ConfigMap", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.ConfigMap{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "events", Singular: "event", Kind: "Event", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.Event{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "limitranges", Singular: "limitrange", Kind: "LimitRange", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.LimitRange{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "resourcequotas", Singular: "resourcequota", Kind: "ResourceQuota", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.ResourceQuota{}, ResourceScope: apiextensionsv1.NamespaceScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "secrets", Singular: "secret", Kind: "Secret", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.Secret{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "serviceaccounts", Singular: "serviceaccount", Kind: "ServiceAccount", }, GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, Instance: &corev1.ServiceAccount{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "clusterroles", Singular: "clusterrole", Kind: "ClusterRole", }, GroupVersion: schema.GroupVersion{Group: "rbac.authorization.k8s.io", Version: "v1"}, Instance: &rbacv1.ClusterRole{}, ResourceScope: apiextensionsv1.ClusterScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "clusterrolebindings", Singular: "clusterrolebinding", Kind: "ClusterRoleBinding", }, GroupVersion: schema.GroupVersion{Group: "rbac.authorization.k8s.io", Version: "v1"}, Instance: &rbacv1.ClusterRoleBinding{}, ResourceScope: apiextensionsv1.ClusterScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "roles", Singular: "role", Kind: "Role", }, GroupVersion: schema.GroupVersion{Group: "rbac.authorization.k8s.io", Version: "v1"}, Instance: &rbacv1.Role{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "rolebindings", Singular: "rolebinding", Kind: "RoleBinding", }, GroupVersion: schema.GroupVersion{Group: "rbac.authorization.k8s.io", Version: "v1"}, Instance: &rbacv1.RoleBinding{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "certificatesigningrequests", Singular: "certificatesigningrequest", Kind: "CertificateSigningRequest", }, GroupVersion: schema.GroupVersion{Group: "certificates.k8s.io", Version: "v1"}, Instance: &certificatesv1.CertificateSigningRequest{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "leases", Singular: "lease", Kind: "Lease", }, GroupVersion: schema.GroupVersion{Group: "coordination.k8s.io", Version: "v1"}, Instance: &coordinationv1.Lease{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "flowschemas", Singular: "flowschema", Kind: "FlowSchema", }, GroupVersion: schema.GroupVersion{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}, Instance: &flowcontrolv1beta1.FlowSchema{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "prioritylevelconfigurations", Singular: "prioritylevelconfiguration", Kind: "PriorityLevelConfiguration", }, GroupVersion: schema.GroupVersion{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}, Instance: &flowcontrolv1beta1.PriorityLevelConfiguration{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "flowschemas", Singular: "flowschema", Kind: "FlowSchema", }, GroupVersion: schema.GroupVersion{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2"}, Instance: &flowcontrolv1beta2.FlowSchema{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "prioritylevelconfigurations", Singular: "prioritylevelconfiguration", Kind: "PriorityLevelConfiguration", }, GroupVersion: schema.GroupVersion{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2"}, Instance: &flowcontrolv1beta2.PriorityLevelConfiguration{}, ResourceScope: apiextensionsv1.ClusterScoped, HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "mutatingwebhookconfigurations", Singular: "mutatingwebhookconfiguration", Kind: "MutatingWebhookConfiguration", }, GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1"}, Instance: &admissionregistrationv1.MutatingWebhookConfiguration{}, ResourceScope: apiextensionsv1.ClusterScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "validatingwebhookconfigurations", Singular: "validatingwebhookconfiguration", Kind: "ValidatingWebhookConfiguration", }, GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1"}, Instance: &admissionregistrationv1.ValidatingWebhookConfiguration{}, ResourceScope: apiextensionsv1.ClusterScoped, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "events", Singular: "event", Kind: "Event", }, GroupVersion: schema.GroupVersion{Group: "events.k8s.io", Version: "v1"}, Instance: &eventsv1.Event{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, }
Functions ¶
This section is empty.
Types ¶
type APIReconciler ¶
type APIReconciler struct {
// contains filtered or unexported fields
}
APIReconciler is a controller watching APIExports and APIResourceSchemas, and updates the API definitions driving the virtual workspace.
func NewAPIReconciler ¶
func NewAPIReconciler( kcpClusterClient kcpclient.ClusterInterface, apiResourceSchemaInformer apisinformer.APIResourceSchemaInformer, apiExportInformer apisinformer.APIExportInformer, createAPIDefinition CreateAPIDefinitionFunc, ) (*APIReconciler, error)
NewAPIReconciler returns a new controller which reconciles APIResourceImport resources and delegates the corresponding SyncTargetAPI management to the given SyncTargetAPIManager.
func (*APIReconciler) GetAPIDefinitionSet ¶
func (c *APIReconciler) GetAPIDefinitionSet(_ context.Context, key dynamiccontext.APIDomainKey) (apidefinition.APIDefinitionSet, bool, error)
func (*APIReconciler) ShutDown ¶
func (c *APIReconciler) ShutDown()
func (*APIReconciler) Start ¶
func (c *APIReconciler) Start(ctx context.Context)
type CreateAPIDefinitionFunc ¶
type CreateAPIDefinitionFunc func(apiResourceSchema *apisv1alpha1.APIResourceSchema, version string, identityHash string, additionalLabelRequirements labels.Requirements) (apidefinition.APIDefinition, error)
Click to show internal directories.
Click to hide internal directories.