From f9cedaae8c54ed0c21a93a507c4a4d08542186d3 Mon Sep 17 00:00:00 2001 From: shunki-fujita Date: Tue, 29 Oct 2024 09:06:11 +0000 Subject: [PATCH] update precomputedIsNamespaceScoped --- kyaml/openapi/openapi.go | 151 ++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 82 deletions(-) diff --git a/kyaml/openapi/openapi.go b/kyaml/openapi/openapi.go index aa1c8d4a85..6724670867 100644 --- a/kyaml/openapi/openapi.go +++ b/kyaml/openapi/openapi.go @@ -92,88 +92,75 @@ const ( // The test output from TestIsNamespaceScopedPrecompute shows the expected map in go syntax,and can be copy and pasted // from the failure if it changes. var precomputedIsNamespaceScoped = map[yaml.TypeMeta]bool{ - {APIVersion: "admissionregistration.k8s.io/v1", Kind: "MutatingWebhookConfiguration"}: false, - {APIVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingWebhookConfiguration"}: false, - {APIVersion: "admissionregistration.k8s.io/v1beta1", Kind: "MutatingWebhookConfiguration"}: false, - {APIVersion: "admissionregistration.k8s.io/v1beta1", Kind: "ValidatingWebhookConfiguration"}: false, - {APIVersion: "apiextensions.k8s.io/v1", Kind: "CustomResourceDefinition"}: false, - {APIVersion: "apiextensions.k8s.io/v1beta1", Kind: "CustomResourceDefinition"}: false, - {APIVersion: "apiregistration.k8s.io/v1", Kind: "APIService"}: false, - {APIVersion: "apiregistration.k8s.io/v1beta1", Kind: "APIService"}: false, - {APIVersion: "apps/v1", Kind: "ControllerRevision"}: true, - {APIVersion: "apps/v1", Kind: "DaemonSet"}: true, - {APIVersion: "apps/v1", Kind: "Deployment"}: true, - {APIVersion: "apps/v1", Kind: "ReplicaSet"}: true, - {APIVersion: "apps/v1", Kind: "StatefulSet"}: true, - {APIVersion: "autoscaling/v1", Kind: "HorizontalPodAutoscaler"}: true, - {APIVersion: "autoscaling/v1", Kind: "Scale"}: true, - {APIVersion: "autoscaling/v2beta1", Kind: "HorizontalPodAutoscaler"}: true, - {APIVersion: "autoscaling/v2beta2", Kind: "HorizontalPodAutoscaler"}: true, - {APIVersion: "batch/v1", Kind: "CronJob"}: true, - {APIVersion: "batch/v1", Kind: "Job"}: true, - {APIVersion: "batch/v1beta1", Kind: "CronJob"}: true, - {APIVersion: "certificates.k8s.io/v1", Kind: "CertificateSigningRequest"}: false, - {APIVersion: "certificates.k8s.io/v1beta1", Kind: "CertificateSigningRequest"}: false, - {APIVersion: "coordination.k8s.io/v1", Kind: "Lease"}: true, - {APIVersion: "coordination.k8s.io/v1beta1", Kind: "Lease"}: true, - {APIVersion: "discovery.k8s.io/v1", Kind: "EndpointSlice"}: true, - {APIVersion: "discovery.k8s.io/v1beta1", Kind: "EndpointSlice"}: true, - {APIVersion: "events.k8s.io/v1", Kind: "Event"}: true, - {APIVersion: "events.k8s.io/v1beta1", Kind: "Event"}: true, - {APIVersion: "extensions/v1beta1", Kind: "Ingress"}: true, - {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta1", Kind: "FlowSchema"}: false, - {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta1", Kind: "PriorityLevelConfiguration"}: false, - {APIVersion: "networking.k8s.io/v1", Kind: "Ingress"}: true, - {APIVersion: "networking.k8s.io/v1", Kind: "IngressClass"}: false, - {APIVersion: "networking.k8s.io/v1", Kind: "NetworkPolicy"}: true, - {APIVersion: "networking.k8s.io/v1beta1", Kind: "Ingress"}: true, - {APIVersion: "networking.k8s.io/v1beta1", Kind: "IngressClass"}: false, - {APIVersion: "node.k8s.io/v1", Kind: "RuntimeClass"}: false, - {APIVersion: "node.k8s.io/v1beta1", Kind: "RuntimeClass"}: false, - {APIVersion: "policy/v1", Kind: "PodDisruptionBudget"}: true, - {APIVersion: "policy/v1beta1", Kind: "PodDisruptionBudget"}: true, - {APIVersion: "policy/v1beta1", Kind: "PodSecurityPolicy"}: false, // remove after openapi upgrades to v1.25. - {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRole"}: false, - {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRoleBinding"}: false, - {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "Role"}: true, - {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "RoleBinding"}: true, - {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "ClusterRole"}: false, - {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "ClusterRoleBinding"}: false, - {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "Role"}: true, - {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "RoleBinding"}: true, - {APIVersion: "scheduling.k8s.io/v1", Kind: "PriorityClass"}: false, - {APIVersion: "scheduling.k8s.io/v1beta1", Kind: "PriorityClass"}: false, - {APIVersion: "storage.k8s.io/v1", Kind: "CSIDriver"}: false, - {APIVersion: "storage.k8s.io/v1", Kind: "CSINode"}: false, - {APIVersion: "storage.k8s.io/v1", Kind: "StorageClass"}: false, - {APIVersion: "storage.k8s.io/v1", Kind: "VolumeAttachment"}: false, - {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSIDriver"}: false, - {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSINode"}: false, - {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSIStorageCapacity"}: true, - {APIVersion: "storage.k8s.io/v1beta1", Kind: "StorageClass"}: false, - {APIVersion: "storage.k8s.io/v1beta1", Kind: "VolumeAttachment"}: false, - {APIVersion: "v1", Kind: "ComponentStatus"}: false, - {APIVersion: "v1", Kind: "ConfigMap"}: true, - {APIVersion: "v1", Kind: "Endpoints"}: true, - {APIVersion: "v1", Kind: "Event"}: true, - {APIVersion: "v1", Kind: "LimitRange"}: true, - {APIVersion: "v1", Kind: "Namespace"}: false, - {APIVersion: "v1", Kind: "Node"}: false, - {APIVersion: "v1", Kind: "NodeProxyOptions"}: false, - {APIVersion: "v1", Kind: "PersistentVolume"}: false, - {APIVersion: "v1", Kind: "PersistentVolumeClaim"}: true, - {APIVersion: "v1", Kind: "Pod"}: true, - {APIVersion: "v1", Kind: "PodAttachOptions"}: true, - {APIVersion: "v1", Kind: "PodExecOptions"}: true, - {APIVersion: "v1", Kind: "PodPortForwardOptions"}: true, - {APIVersion: "v1", Kind: "PodProxyOptions"}: true, - {APIVersion: "v1", Kind: "PodTemplate"}: true, - {APIVersion: "v1", Kind: "ReplicationController"}: true, - {APIVersion: "v1", Kind: "ResourceQuota"}: true, - {APIVersion: "v1", Kind: "Secret"}: true, - {APIVersion: "v1", Kind: "Service"}: true, - {APIVersion: "v1", Kind: "ServiceAccount"}: true, - {APIVersion: "v1", Kind: "ServiceProxyOptions"}: true, + {APIVersion: "acme.cert-manager.io/v1", Kind: "Challenge"}: true, + {APIVersion: "acme.cert-manager.io/v1", Kind: "Order"}: true, + {APIVersion: "admissionregistration.k8s.io/v1", Kind: "MutatingWebhookConfiguration"}: false, + {APIVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingAdmissionPolicy"}: false, + {APIVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingAdmissionPolicyBinding"}: false, + {APIVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingWebhookConfiguration"}: false, + {APIVersion: "apiextensions.k8s.io/v1", Kind: "CustomResourceDefinition"}: false, + {APIVersion: "apiregistration.k8s.io/v1", Kind: "APIService"}: false, + {APIVersion: "apps/v1", Kind: "ControllerRevision"}: true, + {APIVersion: "apps/v1", Kind: "DaemonSet"}: true, + {APIVersion: "apps/v1", Kind: "Deployment"}: true, + {APIVersion: "apps/v1", Kind: "ReplicaSet"}: true, + {APIVersion: "apps/v1", Kind: "StatefulSet"}: true, + {APIVersion: "autoscaling/v1", Kind: "HorizontalPodAutoscaler"}: true, + {APIVersion: "autoscaling/v1", Kind: "Scale"}: true, + {APIVersion: "autoscaling/v2", Kind: "HorizontalPodAutoscaler"}: true, + {APIVersion: "batch/v1", Kind: "CronJob"}: true, + {APIVersion: "batch/v1", Kind: "Job"}: true, + {APIVersion: "cert-manager.io/v1", Kind: "Certificate"}: true, + {APIVersion: "cert-manager.io/v1", Kind: "CertificateRequest"}: true, + {APIVersion: "cert-manager.io/v1", Kind: "ClusterIssuer"}: false, + {APIVersion: "cert-manager.io/v1", Kind: "Issuer"}: true, + {APIVersion: "certificates.k8s.io/v1", Kind: "CertificateSigningRequest"}: false, + {APIVersion: "coordination.k8s.io/v1", Kind: "Lease"}: true, + {APIVersion: "discovery.k8s.io/v1", Kind: "EndpointSlice"}: true, + {APIVersion: "events.k8s.io/v1", Kind: "Event"}: true, + {APIVersion: "flowcontrol.apiserver.k8s.io/v1", Kind: "FlowSchema"}: false, + {APIVersion: "flowcontrol.apiserver.k8s.io/v1", Kind: "PriorityLevelConfiguration"}: false, + {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta3", Kind: "FlowSchema"}: false, + {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta3", Kind: "PriorityLevelConfiguration"}: false, + {APIVersion: "moco.cybozu.com/v1beta2", Kind: "BackupPolicy"}: true, + {APIVersion: "moco.cybozu.com/v1beta2", Kind: "MySQLCluster"}: true, + {APIVersion: "networking.k8s.io/v1", Kind: "Ingress"}: true, + {APIVersion: "networking.k8s.io/v1", Kind: "IngressClass"}: false, + {APIVersion: "networking.k8s.io/v1", Kind: "NetworkPolicy"}: true, + {APIVersion: "node.k8s.io/v1", Kind: "RuntimeClass"}: false, + {APIVersion: "policy/v1", Kind: "PodDisruptionBudget"}: true, + {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRole"}: false, + {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRoleBinding"}: false, + {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "Role"}: true, + {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "RoleBinding"}: true, + {APIVersion: "scheduling.k8s.io/v1", Kind: "PriorityClass"}: false, + {APIVersion: "storage.k8s.io/v1", Kind: "CSIDriver"}: false, + {APIVersion: "storage.k8s.io/v1", Kind: "CSINode"}: false, + {APIVersion: "storage.k8s.io/v1", Kind: "CSIStorageCapacity"}: true, + {APIVersion: "storage.k8s.io/v1", Kind: "StorageClass"}: false, + {APIVersion: "storage.k8s.io/v1", Kind: "VolumeAttachment"}: false, + {APIVersion: "v1", Kind: "ComponentStatus"}: false, + {APIVersion: "v1", Kind: "ConfigMap"}: true, + {APIVersion: "v1", Kind: "Endpoints"}: true, + {APIVersion: "v1", Kind: "Event"}: true, + {APIVersion: "v1", Kind: "LimitRange"}: true, + {APIVersion: "v1", Kind: "Namespace"}: false, + {APIVersion: "v1", Kind: "Node"}: false, + {APIVersion: "v1", Kind: "NodeProxyOptions"}: false, + {APIVersion: "v1", Kind: "PersistentVolume"}: false, + {APIVersion: "v1", Kind: "PersistentVolumeClaim"}: true, + {APIVersion: "v1", Kind: "Pod"}: true, + {APIVersion: "v1", Kind: "PodAttachOptions"}: true, + {APIVersion: "v1", Kind: "PodExecOptions"}: true, + {APIVersion: "v1", Kind: "PodPortForwardOptions"}: true, + {APIVersion: "v1", Kind: "PodProxyOptions"}: true, + {APIVersion: "v1", Kind: "PodTemplate"}: true, + {APIVersion: "v1", Kind: "ReplicationController"}: true, + {APIVersion: "v1", Kind: "ResourceQuota"}: true, + {APIVersion: "v1", Kind: "Secret"}: true, + {APIVersion: "v1", Kind: "Service"}: true, + {APIVersion: "v1", Kind: "ServiceAccount"}: true, + {APIVersion: "v1", Kind: "ServiceProxyOptions"}: true, } // ResourceSchema wraps the OpenAPI Schema.