builtin

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltInAPIs = []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:   "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:   "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,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "validatingadmissionpolicies",
			Singular: "validatingadmissionpolicy",
			Kind:     "ValidatingAdmissionPolicy",
		},
		GroupVersion:  schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"},
		Instance:      &admissionregistrationv1alpha1.ValidatingAdmissionPolicy{},
		ResourceScope: apiextensionsv1.ClusterScoped,
		HasStatus:     true,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "validatingadmissionpolicies",
			Singular: "validatingadmissionpolicy",
			Kind:     "ValidatingAdmissionPolicy",
		},
		GroupVersion:  schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1"},
		Instance:      &admissionregistrationv1.ValidatingAdmissionPolicy{},
		ResourceScope: apiextensionsv1.ClusterScoped,
		HasStatus:     true,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "validatingadmissionpolicybindings",
			Singular: "validatingadmissionpolicybinding",
			Kind:     "ValidatingAdmissionPolicyBinding",
		},
		GroupVersion:  schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"},
		Instance:      &admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding{},
		ResourceScope: apiextensionsv1.ClusterScoped,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "validatingadmissionpolicybindings",
			Singular: "validatingadmissionpolicybinding",
			Kind:     "ValidatingAdmissionPolicyBinding",
		},
		GroupVersion:  schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1"},
		Instance:      &admissionregistrationv1.ValidatingAdmissionPolicyBinding{},
		ResourceScope: apiextensionsv1.ClusterScoped,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "customresourcedefinitions",
			Singular: "customresourcedefinition",
			Kind:     "CustomResourceDefinition",
		},
		GroupVersion:  schema.GroupVersion{Group: "apiextensions.k8s.io", Version: "v1"},
		Instance:      &apiextensionsv1.CustomResourceDefinition{},
		ResourceScope: apiextensionsv1.ClusterScoped,
		HasStatus:     true,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "logicalclusters",
			Singular: "logicalcluster",
			Kind:     "LogicalCluster",
		},
		GroupVersion:  schema.GroupVersion{Group: "core.kcp.io", Version: "v1alpha1"},
		Instance:      &corev1alpha1.LogicalCluster{},
		ResourceScope: apiextensionsv1.ClusterScoped,
		HasStatus:     true,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "subjectaccessreviews",
			Singular: "subjectaccessreview",
			Kind:     "SubjectAccessReview",
		},
		GroupVersion:  schema.GroupVersion{Group: "authorization.k8s.io", Version: "v1"},
		Instance:      &authorizationv1.SubjectAccessReview{},
		ResourceScope: apiextensionsv1.ClusterScoped,
	},
	{
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Plural:   "localsubjectaccessreviews",
			Singular: "localsubjectaccessreview",
			Kind:     "LocalSubjectAccessReview",
		},
		GroupVersion:  schema.GroupVersion{Group: "authorization.k8s.io", Version: "v1"},
		Instance:      &authorizationv1.LocalSubjectAccessReview{},
		ResourceScope: apiextensionsv1.NamespaceScoped,
	},
}

TODO(hasheddan): ideally this would not be public, but it is currently used in e2e tests. Consider refactoring to only allow immutable access.

Functions

func GetBuiltInAPISchema

GetBuiltInAPISchema retrieves the APIResourceSchema for a built-in API.

func IsBuiltInAPI

func IsBuiltInAPI(gr apisv1alpha1.GroupResource) bool

IsBuiltInAPI indicates whether the API identified by group and resource is built-in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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