{"_id":"q-en-kubernetes-0000ac51c1276b4740fb122d9b802bdadd2033eee75dec85386e4ab3896771a8","text":"} factory.CreateFromConfig(policy) hpa := factory.GetHardPodAffinitySymmetricWeight() if hpa != v1.DefaultHardPodAffinitySymmetricWeight { t.Errorf(\"Wrong hardPodAffinitySymmetricWeight, ecpected: %d, got: %d\", v1.DefaultHardPodAffinitySymmetricWeight, hpa) } } func TestCreateFromConfigWithHardPodAffinitySymmetricWeight(t *testing.T) { var configData []byte var policy schedulerapi.Policy handler := utiltesting.FakeHandler{ StatusCode: 500, ResponseBody: \"\", T: t, } server := httptest.NewServer(&handler) defer server.Close() client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) informerFactory := informers.NewSharedInformerFactory(client, 0) factory := NewConfigFactory( v1.DefaultSchedulerName, client, informerFactory.Core().V1().Nodes(), informerFactory.Core().V1().Pods(), informerFactory.Core().V1().PersistentVolumes(), informerFactory.Core().V1().PersistentVolumeClaims(), informerFactory.Core().V1().ReplicationControllers(), informerFactory.Extensions().V1beta1().ReplicaSets(), informerFactory.Apps().V1beta1().StatefulSets(), informerFactory.Core().V1().Services(), v1.DefaultHardPodAffinitySymmetricWeight, ) // Pre-register some predicate and priority functions RegisterFitPredicate(\"PredicateOne\", PredicateOne) RegisterFitPredicate(\"PredicateTwo\", PredicateTwo) RegisterPriorityFunction(\"PriorityOne\", PriorityOne, 1) RegisterPriorityFunction(\"PriorityTwo\", PriorityTwo, 1) configData = []byte(`{ \"kind\" : \"Policy\", \"apiVersion\" : \"v1\", \"predicates\" : [ {\"name\" : \"TestZoneAffinity\", \"argument\" : {\"serviceAffinity\" : {\"labels\" : [\"zone\"]}}}, {\"name\" : \"TestRequireZone\", \"argument\" : {\"labelsPresence\" : {\"labels\" : [\"zone\"], \"presence\" : true}}}, {\"name\" : \"PredicateOne\"}, {\"name\" : \"PredicateTwo\"} ], \"priorities\" : [ {\"name\" : \"RackSpread\", \"weight\" : 3, \"argument\" : {\"serviceAntiAffinity\" : {\"label\" : \"rack\"}}}, {\"name\" : \"PriorityOne\", \"weight\" : 2}, {\"name\" : \"PriorityTwo\", \"weight\" : 1} ], \"hardPodAffinitySymmetricWeight\" : 10 }`) if err := runtime.DecodeInto(latestschedulerapi.Codec, configData, &policy); err != nil { t.Errorf(\"Invalid configuration: %v\", err) } factory.CreateFromConfig(policy) hpa := factory.GetHardPodAffinitySymmetricWeight() if hpa != 10 { t.Errorf(\"Wrong hardPodAffinitySymmetricWeight, ecpected: %d, got: %d\", 10, hpa) } } func TestCreateFromEmptyConfig(t *testing.T) {"} {"_id":"q-en-kubernetes-002b4e03797943125ecc2bf5697fa0fc18e6137434144c1a6bbfcefbb129a789","text":"opName := op.Name return wait.Poll(operationPollInterval, operationPollTimeoutDuration, func() (bool, error) { start := time.Now() gce.operationPollRateLimiter.Accept() duration := time.Now().Sub(start) if duration > 5*time.Second { glog.Infof(\"pollOperation: waited %v for %v\", duration, opName)"} {"_id":"q-en-kubernetes-002bc89728cd2e5146319758d63519449dcadeb2768732643dcf899c0c6c6e58","text":"} if err := proxyHandler.ServeConn(conn); err != nil && !shoulderror { // If the connection request is closed before the channel is closed // the test will fail with a ServeConn error. Since the test only return // early if expects shouldError=true, the channel is closed at the end of // the test, just before all the deferred connections Close() are executed. if isClosed() { return }"} {"_id":"q-en-kubernetes-003aaec0b8629cfccb6fccb934b32f4853e3fab305e7dd1df0d2647bded7e072","text":"var podClient *framework.PodClient const ( podCheckInterval = 1 * time.Second podWaitTimeout = 3 * time.Minute postStartWaitTimeout = 2 * time.Minute preStopWaitTimeout = 30 * time.Second ) Context(\"when create a pod with lifecycle hook\", func() { var targetIP string podHandleHookRequest := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"pod-handle-http-request\", }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: \"pod-handle-http-request\", Image: \"gcr.io/google_containers/netexec:1.7\", Ports: []v1.ContainerPort{ { ContainerPort: 8080, Protocol: v1.ProtocolTCP, }, }, }, }, }, } BeforeEach(func() { podClient = f.PodClient() By(\"create the container to handle the HTTPGet hook request.\") newPod := podClient.CreateSync(podHandleHookRequest) targetIP = newPod.Status.PodIP }) Context(\"when it is exec hook\", func() { var file string testPodWithExecHook := func(podWithHook *v1.Pod) { podCheckHook := getExecHookTestPod(\"pod-check-hook\", // Wait until the file is created. []string{\"sh\", \"-c\", fmt.Sprintf(\"while [ ! -e %s ]; do sleep 1; done\", file)}, ) By(\"create the pod with lifecycle hook\") podClient.CreateSync(podWithHook) if podWithHook.Spec.Containers[0].Lifecycle.PostStart != nil { By(\"create the hook check pod\") podClient.Create(podCheckHook) By(\"wait for the hook check pod to success\") podClient.WaitForSuccess(podCheckHook.Name, postStartWaitTimeout) } By(\"delete the pod with lifecycle hook\") podClient.DeleteSync(podWithHook.Name, metav1.NewDeleteOptions(15), framework.DefaultPodDeletionTimeout) if podWithHook.Spec.Containers[0].Lifecycle.PreStop != nil { By(\"create the hook check pod\") podClient.Create(podCheckHook) By(\"wait for the prestop check pod to success\") podClient.WaitForSuccess(podCheckHook.Name, preStopWaitTimeout) } testPodWithHook := func(podWithHook *v1.Pod) { By(\"create the pod with lifecycle hook\") podClient.CreateSync(podWithHook) if podWithHook.Spec.Containers[0].Lifecycle.PostStart != nil { By(\"check poststart hook\") Eventually(func() error { return podClient.MatchContainerOutput(podHandleHookRequest.Name, podHandleHookRequest.Spec.Containers[0].Name, `GET /echo?msg=poststart`) }, postStartWaitTimeout, podCheckInterval).Should(BeNil()) } BeforeEach(func() { file = \"/tmp/test-\" + string(uuid.NewUUID()) }) AfterEach(func() { By(\"cleanup the temporary file created in the test.\") cleanupPod := getExecHookTestPod(\"pod-clean-up\", []string{\"rm\", file}) podClient.Create(cleanupPod) podClient.WaitForSuccess(cleanupPod.Name, podWaitTimeout) }) It(\"should execute poststart exec hook properly [Conformance]\", func() { podWithHook := getExecHookTestPod(\"pod-with-poststart-exec-hook\", // Block forever []string{\"tail\", \"-f\", \"/dev/null\"}, ) podWithHook.Spec.Containers[0].Lifecycle = &v1.Lifecycle{ PostStart: &v1.Handler{ Exec: &v1.ExecAction{Command: []string{\"touch\", file}}, }, } testPodWithExecHook(podWithHook) }) It(\"should execute prestop exec hook properly [Conformance]\", func() { podWithHook := getExecHookTestPod(\"pod-with-prestop-exec-hook\", // Block forever []string{\"tail\", \"-f\", \"/dev/null\"}, ) podWithHook.Spec.Containers[0].Lifecycle = &v1.Lifecycle{ PreStop: &v1.Handler{ Exec: &v1.ExecAction{Command: []string{\"touch\", file}}, By(\"delete the pod with lifecycle hook\") podClient.DeleteSync(podWithHook.Name, metav1.NewDeleteOptions(15), framework.DefaultPodDeletionTimeout) if podWithHook.Spec.Containers[0].Lifecycle.PreStop != nil { By(\"check prestop hook\") Eventually(func() error { return podClient.MatchContainerOutput(podHandleHookRequest.Name, podHandleHookRequest.Spec.Containers[0].Name, `GET /echo?msg=prestop`) }, preStopWaitTimeout, podCheckInterval).Should(BeNil()) } } It(\"should execute poststart exec hook properly [Conformance]\", func() { lifecycle := &v1.Lifecycle{ PostStart: &v1.Handler{ Exec: &v1.ExecAction{ Command: []string{\"sh\", \"-c\", \"curl http://\" + targetIP + \":8080/echo?msg=poststart\"}, }, } testPodWithExecHook(podWithHook) }) }) Context(\"when it is http hook\", func() { var targetIP string podHandleHookRequest := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"pod-handle-http-request\", }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: \"pod-handle-http-request\", Image: \"gcr.io/google_containers/netexec:1.7\", Ports: []v1.ContainerPort{ { ContainerPort: 8080, Protocol: v1.ProtocolTCP, }, }, }, } podWithHook := getPodWithHook(\"pod-with-poststart-exec-hook\", \"gcr.io/google_containers/hostexec:1.2\", lifecycle) testPodWithHook(podWithHook) }) It(\"should execute prestop exec hook properly [Conformance]\", func() { lifecycle := &v1.Lifecycle{ PreStop: &v1.Handler{ Exec: &v1.ExecAction{ Command: []string{\"sh\", \"-c\", \"curl http://\" + targetIP + \":8080/echo?msg=prestop\"}, }, }, } BeforeEach(func() { By(\"create the container to handle the HTTPGet hook request.\") newPod := podClient.CreateSync(podHandleHookRequest) targetIP = newPod.Status.PodIP }) testPodWithHttpHook := func(podWithHook *v1.Pod) { By(\"create the pod with lifecycle hook\") podClient.CreateSync(podWithHook) if podWithHook.Spec.Containers[0].Lifecycle.PostStart != nil { By(\"check poststart hook\") Eventually(func() error { return podClient.MatchContainerOutput(podHandleHookRequest.Name, podHandleHookRequest.Spec.Containers[0].Name, `GET /echo?msg=poststart`) }, postStartWaitTimeout, podCheckInterval).Should(BeNil()) } By(\"delete the pod with lifecycle hook\") podClient.DeleteSync(podWithHook.Name, metav1.NewDeleteOptions(15), framework.DefaultPodDeletionTimeout) if podWithHook.Spec.Containers[0].Lifecycle.PreStop != nil { By(\"check prestop hook\") Eventually(func() error { return podClient.MatchContainerOutput(podHandleHookRequest.Name, podHandleHookRequest.Spec.Containers[0].Name, `GET /echo?msg=prestop`) }, preStopWaitTimeout, podCheckInterval).Should(BeNil()) } } It(\"should execute poststart http hook properly [Conformance]\", func() { podWithHook := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"pod-with-poststart-http-hook\", }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: \"pod-with-poststart-http-hook\", Image: framework.GetPauseImageNameForHostArch(), Lifecycle: &v1.Lifecycle{ PostStart: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/echo?msg=poststart\", Host: targetIP, Port: intstr.FromInt(8080), }, }, }, }, }, }, } testPodWithHttpHook(podWithHook) }) It(\"should execute prestop http hook properly [Conformance]\", func() { podWithHook := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"pod-with-prestop-http-hook\", podWithHook := getPodWithHook(\"pod-with-prestop-exec-hook\", \"gcr.io/google_containers/hostexec:1.2\", lifecycle) testPodWithHook(podWithHook) }) It(\"should execute poststart http hook properly [Conformance]\", func() { lifecycle := &v1.Lifecycle{ PostStart: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/echo?msg=poststart\", Host: targetIP, Port: intstr.FromInt(8080), }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: \"pod-with-prestop-http-hook\", Image: framework.GetPauseImageNameForHostArch(), Lifecycle: &v1.Lifecycle{ PreStop: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/echo?msg=prestop\", Host: targetIP, Port: intstr.FromInt(8080), }, }, }, }, }, }, } podWithHook := getPodWithHook(\"pod-with-poststart-http-hook\", framework.GetPauseImageNameForHostArch(), lifecycle) testPodWithHook(podWithHook) }) It(\"should execute prestop http hook properly [Conformance]\", func() { lifecycle := &v1.Lifecycle{ PreStop: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/echo?msg=prestop\", Host: targetIP, Port: intstr.FromInt(8080), }, } testPodWithHttpHook(podWithHook) }) }, } podWithHook := getPodWithHook(\"pod-with-prestop-http-hook\", framework.GetPauseImageNameForHostArch(), lifecycle) testPodWithHook(podWithHook) }) }) }) func getExecHookTestPod(name string, cmd []string) *v1.Pod { func getPodWithHook(name string, image string, lifecycle *v1.Lifecycle) *v1.Pod { return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name,"} {"_id":"q-en-kubernetes-0065dda5385eb3b17e6502fa715d517455f15bfce77f0e78077e4ff98bdab5bf","text":"clusterAddonLabelKey = \"k8s-app\" kubeAPIServerLabelName = \"kube-apiserver\" clusterComponentKey = \"component\" svcReadyTimeout = 1 * time.Minute ) var ("} {"_id":"q-en-kubernetes-00694ccb77f15dae69cc5944b653bca5d74a24bcf871c525f6c314111af6a87d","text":"_, result.MissingAggregationRuleSelectors = aggregationRuleCovers(existing.GetAggregationRule(), expected.GetAggregationRule()) switch { case expected.GetAggregationRule() == nil && existing.GetAggregationRule() != nil: // we didn't expect this to be an aggregated role at all, remove the existing aggregation result.Role.SetAggregationRule(nil) result.Operation = ReconcileUpdate case !removeExtraPermissions && len(result.MissingAggregationRuleSelectors) > 0: // add missing rules in the union case aggregationRule := result.Role.GetAggregationRule()"} {"_id":"q-en-kubernetes-0073702efbb5981682ba3c908601a3ddb5372466bf4d5913e21b59c06db1e6e0","text":"{utiliptables.TableNAT, KubeNodePortChain}, {utiliptables.TableNAT, KubeLoadBalancerChain}, {utiliptables.TableNAT, KubeMarkMasqChain}, {utiliptables.TableNAT, KubeMarkDropChain}, {utiliptables.TableFilter, KubeForwardChain}, } var iptablesEnsureChains = []struct { table utiliptables.Table chain utiliptables.Chain }{ {utiliptables.TableNAT, KubeMarkDropChain}, } var iptablesCleanupChains = []struct { table utiliptables.Table chain utiliptables.Chain"} {"_id":"q-en-kubernetes-00d2dcce31529e985e50075d48baaedcbd37ac6b162b70c0e7d14a7db1ac568c","text":"continue } // Write the log line into the stream. if err := writer.write(msg); err != nil { if err := writer.write(msg, isNewLine); err != nil { if err == errMaximumWrite { klog.V(2).InfoS(\"Finished parsing log file, hit bytes limit\", \"path\", path, \"limit\", opts.bytes) return nil"} {"_id":"q-en-kubernetes-00f13634ae830a01925a78490b7d53a63396d51143ecd591255015150a3dbe2c","text":"recorder record.EventRecorder } func (irecorder *innerEventRecorder) shouldRecordEvent(object runtime.Object) (*clientv1.ObjectReference, bool) { func (irecorder *innerEventRecorder) shouldRecordEvent(object runtime.Object) (*v1.ObjectReference, bool) { if object == nil { return nil, false } if ref, ok := object.(*clientv1.ObjectReference); ok { if !strings.HasPrefix(ref.FieldPath, ImplicitContainerPrefix) { return ref, true } } // just in case we miss a spot, be sure that we still log something if ref, ok := object.(*v1.ObjectReference); ok { if !strings.HasPrefix(ref.FieldPath, ImplicitContainerPrefix) { return events.ToObjectReference(ref), true return ref, true } } return nil, false"} {"_id":"q-en-kubernetes-01088ddce912f218dcbcf091f77a80ddf0c6b0f8ae14ba3434a6bb7f818d5397","text":"Rules: kubeSchedulerRules, }) externalProvisionerRules := []rbacv1.PolicyRule{ rbacv1helpers.NewRule(\"create\", \"delete\", \"get\", \"list\", \"watch\").Groups(legacyGroup).Resources(\"persistentvolumes\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\", \"update\", \"patch\").Groups(legacyGroup).Resources(\"persistentvolumeclaims\").RuleOrDie(), rbacv1helpers.NewRule(\"list\", \"watch\").Groups(storageGroup).Resources(\"storageclasses\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\").Groups(legacyGroup).Resources(\"events\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\").Groups(legacyGroup).Resources(\"nodes\").RuleOrDie(), } if utilfeature.DefaultFeatureGate.Enabled(features.CSINodeInfo) { externalProvisionerRules = append(externalProvisionerRules, rbacv1helpers.NewRule(\"get\", \"watch\", \"list\").Groups(\"storage.k8s.io\").Resources(\"csinodes\").RuleOrDie()) } roles = append(roles, rbacv1.ClusterRole{ // a role for the csi external provisioner ObjectMeta: metav1.ObjectMeta{Name: \"system:csi-external-provisioner\"}, Rules: externalProvisionerRules, }) addClusterRoleLabel(roles) return roles }"} {"_id":"q-en-kubernetes-0132744d9d2e28d96bc6f1c64a6478043b0dd60ad6e5263b52be76874a3e48dc","text":"func restartKubelet() { kubeletServiceName := findRunningKubletServiceName() stdout, err := exec.Command(\"sudo\", \"systemctl\", \"restart\", kubeletServiceName).CombinedOutput() // reset the kubelet service start-limit-hit stdout, err := exec.Command(\"sudo\", \"systemctl\", \"reset-failed\", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, \"Failed to reset kubelet start-limit-hit with systemctl: %v, %v\", err, stdout) stdout, err = exec.Command(\"sudo\", \"systemctl\", \"restart\", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, \"Failed to restart kubelet with systemctl: %v, %v\", err, stdout) }"} {"_id":"q-en-kubernetes-01462297c67229b9e5224afcbd2d36e104fbbf4cdd1fbed121bf4baad81637cc","text":"// We could try a wget the service from the client pod. But services.sh e2e test covers that pretty well. }) It(\"should be restarted with a docker exec \"cat /tmp/health\" liveness probe\", func() { runLivenessTest(c, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"liveness-exec\", Labels: map[string]string{\"test\": \"liveness\"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"liveness\", Image: \"busybox\", Command: []string{\"/bin/sh\", \"-c\", \"echo ok >/tmp/health; sleep 10; echo fail >/tmp/health; sleep 600\"}, LivenessProbe: &api.Probe{ Handler: api.Handler{ Exec: &api.ExecAction{ Command: []string{\"cat\", \"/tmp/health\"}, }, }, InitialDelaySeconds: 15, }, }, }, }, }) }) It(\"should be restarted with a /healthz http liveness probe\", func() { runLivenessTest(c, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"liveness-http\", Labels: map[string]string{\"test\": \"liveness\"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"liveness\", Image: \"kubernetes/liveness\", Command: []string{\"/server\"}, LivenessProbe: &api.Probe{ Handler: api.Handler{ HTTPGet: &api.HTTPGetAction{ Path: \"/healthz\", Port: util.NewIntOrStringFromInt(8080), }, }, InitialDelaySeconds: 15, }, }, }, }, }) }) })"} {"_id":"q-en-kubernetes-0147f94634c67fafe3c076ebac216ce5ba6828db21c800f03675623f1b9e843c","text":"docs/yaml/kubectl/kubectl.yaml docs/yaml/kubectl/kubectl_alpha.yaml docs/yaml/kubectl/kubectl_annotate.yaml docs/yaml/kubectl/kubectl_api-resources.yaml docs/yaml/kubectl/kubectl_api-versions.yaml docs/yaml/kubectl/kubectl_apply.yaml docs/yaml/kubectl/kubectl_attach.yaml"} {"_id":"q-en-kubernetes-015129c3de70294f19753a1e9095a3d1fa7157ad8cdd220e35645be62976eb4d","text":"return nil } func (lb *LoadBalancer) DeleteTCPLoadBalancer(name, region string) error { glog.V(4).Infof(\"DeleteTCPLoadBalancer(%v, %v)\", name, region) vip, err := getVipByName(lb.network, name) if err != nil { return err } pool, err := pools.Get(lb.network, vip.PoolID).Extract() if err != nil { return err func (lb *LoadBalancer) EnsureTCPLoadBalancerDeleted(name, region string) error { glog.V(4).Infof(\"EnsureTCPLoadBalancerDeleted(%v, %v)\", name, region) // TODO(#8352): Because we look up the pool using the VIP object, if the VIP // is already gone we can't attempt to delete the pool. We should instead // continue even if the VIP doesn't exist and attempt to delete the pool by // name. vip, vipErr := getVipByName(lb.network, name) if vipErr == ErrNotFound { return nil } else if vipErr != nil { return vipErr } // It's ok if the pool doesn't exist, as we may still need to delete the vip // (although I don't believe the system should ever be in that state). pool, poolErr := pools.Get(lb.network, vip.PoolID).Extract() if poolErr != nil { detailedErr, ok := poolErr.(*gophercloud.UnexpectedResponseCodeError) if !ok || detailedErr.Actual != http.StatusNotFound { return poolErr } } poolExists := (poolErr == nil) // Have to delete VIP before pool can be deleted err = vips.Delete(lb.network, vip.ID).ExtractErr() if err != nil { // We have to delete the VIP before the pool can be deleted, so we can't // continue on if this fails. // TODO(#8352): Only do this if the VIP exists once we can delete pools by // name rather than by ID. err := vips.Delete(lb.network, vip.ID).ExtractErr() if err != nil && err != ErrNotFound { return err } // Ignore errors for everything following here for _, monId := range pool.MonitorIDs { pools.DisassociateMonitor(lb.network, pool.ID, monId) if poolExists { for _, monId := range pool.MonitorIDs { // TODO(#8352): Delete the monitor, don't just disassociate it. pools.DisassociateMonitor(lb.network, pool.ID, monId) } pools.Delete(lb.network, pool.ID) } pools.Delete(lb.network, pool.ID) return nil }"} {"_id":"q-en-kubernetes-018ecba037828f5f59349091e3f0f6427d58a2f18f64e7a933c38b6586b32e59","text":"cgroupRoots = append(cgroupRoots, cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver)) kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups) if err != nil { return fmt.Errorf(\"failed to get the kubelet's cgroup: %v\", err) } if kubeletCgroup != \"\" { klog.Warningf(\"failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.\", err) } else if kubeletCgroup != \"\" { cgroupRoots = append(cgroupRoots, kubeletCgroup) } runtimeCgroup, err := cm.GetRuntimeContainer(s.ContainerRuntime, s.RuntimeCgroups) if err != nil { return fmt.Errorf(\"failed to get the container runtime's cgroup: %v\", err) } if runtimeCgroup != \"\" { klog.Warningf(\"failed to get the container runtime's cgroup: %v. Runtime system container metrics may be missing.\", err) } else if runtimeCgroup != \"\" { // RuntimeCgroups is optional, so ignore if it isn't specified cgroupRoots = append(cgroupRoots, runtimeCgroup) }"} {"_id":"q-en-kubernetes-01b5e93136c029e7016d91bdfac2407e8944d0ee4f8d7f228a65e64e5b94c62d","text":"// CreateAdapter creates Custom Metrics - Stackdriver adapter // adapterDeploymentFile should be a filename for adapter deployment located in StagingDeploymentLocation func CreateAdapter(namespace, adapterDeploymentFile string) error { func CreateAdapter(adapterDeploymentFile string) error { // A workaround to make the work on GKE. GKE doesn't normally allow to create cluster roles, // which the adapter deployment does. The solution is to create cluster role binding for // cluster-admin role and currently used service account. err := createClusterAdminBinding(namespace) err := createClusterAdminBinding() if err != nil { return err }"} {"_id":"q-en-kubernetes-021f53738c2b4ca56970222e0a3c72d68689504e7dbac9188a359ffba5b32a2b","text":"} t.Run(fmt.Sprintf(\"feature enabled=%v, old pod %v, new pod %v\", enabled, oldPodInfo.description, newPodInfo.description), func(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeSubpathEnvExpansion, enabled)() var oldPodSpec *api.PodSpec if oldPod != nil {"} {"_id":"q-en-kubernetes-023082f579d724dd4f119f8fec2a16b46b30dc5eba6bf7fc3318010d37d1c220","text":"defer featuregatetesting.SetFeatureGateDuringTest(b, utilfeature.DefaultFeatureGate, feature, flag)() } dataItems.DataItems = append(dataItems.DataItems, runWorkload(b, tc, w)...) // Reset metrics to prevent metrics generated in current workload gets // carried over to the next workload. legacyregistry.Reset() }) } })"} {"_id":"q-en-kubernetes-02369f5455d315618e0fe3a5d64d150795609f5590ddf5c6cca8520c03a0b991","text":"\"k8s.io/apimachinery/pkg/util/wait\" utilfeature \"k8s.io/apiserver/pkg/util/feature\" \"k8s.io/client-go/dynamic\" \"k8s.io/client-go/informers\" clientset \"k8s.io/client-go/kubernetes\" restclient \"k8s.io/client-go/rest\" featuregatetesting \"k8s.io/component-base/featuregate/testing\" apiservertesting \"k8s.io/kubernetes/cmd/kube-apiserver/app/testing\" podutil \"k8s.io/kubernetes/pkg/api/v1/pod\" \"k8s.io/kubernetes/pkg/controller/statefulset\" \"k8s.io/kubernetes/pkg/features\" \"k8s.io/kubernetes/test/integration/framework\" )"} {"_id":"q-en-kubernetes-025ea28fea33d5cfe8b370def88157996e58408a512ecee36a6bf0848e622c0d","text":"type NodeClient interface { // NodePrepareResources prepares several ResourceClaims // for use on the node. If an error is returned, the // response is ignored. Failures for individidual claims // response is ignored. Failures for individual claims // can be reported inside NodePrepareResourcesResponse. NodePrepareResources(ctx context.Context, in *NodePrepareResourcesRequest, opts ...grpc.CallOption) (*NodePrepareResourcesResponse, error) // NodeUnprepareResources is the opposite of NodePrepareResources."} {"_id":"q-en-kubernetes-02825031b6134f7b312b9f4eff9efb9653395814d9bb43e29bbaf3a50c7566ef","text":"priorityPairs = append(priorityPairs, priorityPair{name: priorityName, value: priorityVal}) _, err := cs.SchedulingV1().PriorityClasses().Create(context.TODO(), &schedulingv1.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: priorityName}, Value: priorityVal}, metav1.CreateOptions{}) if err != nil { framework.Logf(\"Failed to create priority '%v/%v': %v\", priorityName, priorityVal, err) framework.Logf(\"Reason: %v. Msg: %v\", apierrors.ReasonForError(err), err) framework.Logf(\"Failed to create priority '%v/%v'. Reason: %v. Msg: %v\", priorityName, priorityVal, apierrors.ReasonForError(err), err) } framework.ExpectEqual(err == nil || apierrors.IsAlreadyExists(err), true) }"} {"_id":"q-en-kubernetes-02a41c9a107426f683a4fa1f4e8bde09e41433d97adbefe6d307c5b958254cd3","text":"}) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. var _ = SIGDescribe(\"ESIPP [Slow] [DisabledForLargeClusters]\", func() { var _ = SIGDescribe(\"ESIPP [Slow]\", func() { f := framework.NewDefaultFramework(\"esipp\") var loadBalancerCreateTimeout time.Duration"} {"_id":"q-en-kubernetes-02e194168c141f899b758863577dd7012f38c2b46ede0453977acdcca44ae845","text":"proxy_cpu=${KUBEMARK_HOLLOW_PROXY_MILLICPU:-$proxy_cpu} proxy_mem_per_node=${KUBEMARK_HOLLOW_PROXY_MEM_PER_NODE_KB:-50} proxy_mem=$((100 * 1024 + proxy_mem_per_node*NUM_NODES)) hollow_kubelet_params=$(eval \"for param in ${HOLLOW_KUBELET_TEST_ARGS:-}; do echo -n \"$param\",; done\") hollow_kubelet_params=${hollow_kubelet_params%?} hollow_proxy_params=$(eval \"for param in ${HOLLOW_PROXY_TEST_ARGS:-}; do echo -n \"$param\",; done\") hollow_proxy_params=${hollow_proxy_params%?} sed -i'' -e \"s@{{hollow_kubelet_millicpu}}@${KUBEMARK_HOLLOW_KUBELET_MILLICPU:-40}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{hollow_kubelet_mem_Ki}}@${KUBEMARK_HOLLOW_KUBELET_MEM_KB:-$((100*1024))}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\""} {"_id":"q-en-kubernetes-02ec77d18505e4bc131b02e15b0a3694e5580f01d74e11d8db1e42d4a27f85eb","text":"if len(o.FilenameOptions.Filenames) != 1 { return cmdutil.UsageErrorf(cmd, \"--raw can only use a single local file or stdin\") } if strings.HasPrefix(o.FilenameOptions.Filenames[0], \"http\") { if strings.Index(o.FilenameOptions.Filenames[0], \"http://\") == 0 || strings.Index(o.FilenameOptions.Filenames[0], \"https://\") == 0 { return cmdutil.UsageErrorf(cmd, \"--raw cannot read from a url\") } if o.FilenameOptions.Recursive {"} {"_id":"q-en-kubernetes-031eb3039d12727a047ed13abc100a83b2cc0c7f3e83a572ed84365e2588afc5","text":"_, err = client.CoreV1().Nodes().Patch(context.TODO(), old.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, \"status\") return err } func patchPriorityClass(cs clientset.Interface, old, new *schedulingv1.PriorityClass) error { oldData, err := json.Marshal(old) if err != nil { return err } newData, err := json.Marshal(new) if err != nil { return err } patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, &schedulingv1.PriorityClass{}) if err != nil { return fmt.Errorf(\"failed to create merge patch for PriorityClass %q: %v\", old.Name, err) } _, err = cs.SchedulingV1().PriorityClasses().Patch(context.TODO(), old.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) return err } "} {"_id":"q-en-kubernetes-037b11db681326842ad5c6371325d0baeef1820779da3b42d10e2286957408f6","text":"if p.isPodBackingOff(pod) { if err := p.podBackoffQ.Add(pInfo); err != nil { klog.Errorf(\"Error adding pod %v to the backoff queue: %v\", pod.Name, err) } else { p.unschedulableQ.delete(pod) } } else { if err := p.activeQ.Add(pInfo); err != nil { klog.Errorf(\"Error adding pod %v to the scheduling queue: %v\", pod.Name, err) } else { p.unschedulableQ.delete(pod) } } p.unschedulableQ.delete(pod) } p.moveRequestCycle = p.schedulingCycle p.cond.Broadcast()"} {"_id":"q-en-kubernetes-03893711550b910023fb896859b81e1ea918738eec7af48edb2e99e3a32f4294","text":"DescribeEvents(events, w) } printPodsMultiline(w, \"Mounted By\", mountPods) return nil }) }"} {"_id":"q-en-kubernetes-042f1da61c6a2a685fc274cff1043abc97db694df02f325fae44e4ccdb5b9765","text":"} } } func TestMinionListConversionToNew(t *testing.T) { oldMinion := func(id string) v1beta1.Minion { return v1beta1.Minion{JSONBase: v1beta1.JSONBase{ID: id}} } newMinion := func(id string) Minion { return Minion{JSONBase: JSONBase{ID: id}} } oldMinions := []v1beta1.Minion{ oldMinion(\"foo\"), oldMinion(\"bar\"), } newMinions := []Minion{ newMinion(\"foo\"), newMinion(\"bar\"), } table := []struct { oldML *v1beta1.MinionList newML *MinionList }{ { oldML: &v1beta1.MinionList{Items: oldMinions}, newML: &MinionList{Items: newMinions}, }, { oldML: &v1beta1.MinionList{Minions: oldMinions}, newML: &MinionList{Items: newMinions}, }, { oldML: &v1beta1.MinionList{ Items: oldMinions, Minions: []v1beta1.Minion{oldMinion(\"baz\")}, }, newML: &MinionList{Items: newMinions}, }, } for _, item := range table { got := &MinionList{} err := Convert(item.oldML, got) if err != nil { t.Errorf(\"Unexpected error: %v\", err) } if e, a := item.newML, got; !reflect.DeepEqual(e, a) { t.Errorf(\"Expected: %#v, got %#v\", e, a) } } } func TestMinionListConversionToOld(t *testing.T) { oldMinion := func(id string) v1beta1.Minion { return v1beta1.Minion{JSONBase: v1beta1.JSONBase{ID: id}} } newMinion := func(id string) Minion { return Minion{JSONBase: JSONBase{ID: id}} } oldMinions := []v1beta1.Minion{ oldMinion(\"foo\"), oldMinion(\"bar\"), } newMinions := []Minion{ newMinion(\"foo\"), newMinion(\"bar\"), } newML := &MinionList{Items: newMinions} oldML := &v1beta1.MinionList{ Items: oldMinions, Minions: oldMinions, } got := &v1beta1.MinionList{} err := Convert(newML, got) if err != nil { t.Errorf(\"Unexpected error: %v\", err) } if e, a := oldML, got; !reflect.DeepEqual(e, a) { t.Errorf(\"Expected: %#v, got %#v\", e, a) } } "} {"_id":"q-en-kubernetes-0468a7a443e8b8de6d0479dce53518bc4efaf4853bf25bf1534b857eeafb5f97","text":"const ConfigSourceAnnotationKey = \"kubernetes.io/config.source\" const ConfigMirrorAnnotationKey = \"kubernetes.io/config.mirror\" const ConfigFirstSeenAnnotationKey = \"kubernetes.io/config.seen\" const ConfigHashAnnotationKey = \"kubernetes.io/config.hash\" // PodOperation defines what changes will be made on a pod configuration. type PodOperation int"} {"_id":"q-en-kubernetes-047c471c80eb1acc728dc378bd9f21b8835537ab80436da88be9cb942c953b51","text":"decoder := legacyscheme.Codecs.DecoderToVersion( legacyscheme.Codecs.UniversalDeserializer(), runtime.NewMultiGroupVersioner( *defaultGroup.GroupVersion(), schema.GroupKind{Group: defaultGroup.GroupVersion().Group}, schema.GroupKind{Group: extGroup.GroupVersion().Group}, defaultGroup, schema.GroupKind{Group: defaultGroup.Group}, schema.GroupKind{Group: extGroup.Group}, ), )"} {"_id":"q-en-kubernetes-048218f9b2febaa5797d8c6a7c882302dc10af29adf6b29ae337e8b3c7796040","text":"} func getPatchedJS(contentType string, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { // Remove \"; charset=\" if included in header. if idx := strings.Index(contentType, \";\"); idx > 0 { contentType = contentType[:idx] } patchType := api.PatchType(contentType) switch patchType { case api.JSONPatchType:"} {"_id":"q-en-kubernetes-0488c1df890f349769f24b41eadc6e66660b4f690ea2e35ede119638386b533f","text":"dockercontainer \"github.com/docker/docker/api/types/container\" dockerfilters \"github.com/docker/docker/api/types/filters\" \"github.com/golang/glog\" \"k8s.io/api/core/v1\" runtimeapi \"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime\" )"} {"_id":"q-en-kubernetes-048eb8a50e79825fdf4336ca626219a8b4c182e0a184827a71287bb2b7d5a97c","text":"glog.Errorf(\"Failed to get hostname. err: %+v\", err) return nil, err } vs.vmUUID, err = getVMUUID() if err != nil { glog.Errorf(\"Failed to get uuid. err: %+v\", err) return nil, err if cfg.Global.VMUUID != \"\" { vs.vmUUID = cfg.Global.VMUUID } else { vs.vmUUID, err = getVMUUID() if err != nil { glog.Errorf(\"Failed to get uuid. err: %+v\", err) return nil, err } } runtime.SetFinalizer(vs, logout) return vs, nil"} {"_id":"q-en-kubernetes-0490097e924a6ce39172052a8988d33087f97c2e86c6905af339ccdc31fe303f","text":" apiVersion: v1 kind: ReplicationController metadata: name: es-client labels: component: elasticsearch role: client spec: replicas: 1 template: metadata: labels: component: elasticsearch role: client spec: serviceAccount: elasticsearch containers: - name: es-client securityContext: capabilities: add: - IPC_LOCK image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4 env: - name: KUBERNETES_CA_CERTIFICATE_FILE value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: \"CLUSTER_NAME\" value: \"myesdb\" - name: NODE_MASTER value: \"false\" - name: NODE_DATA value: \"false\" - name: HTTP_ENABLE value: \"true\" ports: - containerPort: 9200 name: http protocol: TCP - containerPort: 9300 name: transport protocol: TCP volumeMounts: - mountPath: /data name: storage volumes: - name: storage emptyDir: {} "} {"_id":"q-en-kubernetes-04b7a64a68b1bf1979a36364d72568d5346788def3ea278216866715619708b2","text":"return res, nil } // doCmdWithoutAttr a simple wrapper of netlink socket execute command func (i *Handle) doCmdWithoutAttr(cmd uint8) ([][]byte, error) { req := newIPVSRequest(cmd) req.Seq = atomic.AddUint32(&i.seq, 1) return execute(i.sock, req, 0) } func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error) { var d Destination"} {"_id":"q-en-kubernetes-04bdb3d2bb63267cc2d28461f18221496da6ec0095e36e4d303c9ec939a231a7","text":"} return false, nil } // stripComments will transform a YAML file into JSON, thus dropping any comments // in it. Note that if the given file has a syntax error, the transformation will // fail and we will manually drop all comments from the file. func stripComments(file []byte) []byte { stripped, err := yaml.ToJSON(file) if err != nil { stripped = manualStrip(file) } return stripped } // manualStrip is used for dropping comments from a YAML file func manualStrip(file []byte) []byte { stripped := []byte{} for _, line := range bytes.Split(file, []byte(\"n\")) { if bytes.HasPrefix(bytes.TrimSpace(line), []byte(\"#\")) { continue } stripped = append(stripped, line...) stripped = append(stripped, 'n') } return stripped } "} {"_id":"q-en-kubernetes-04ca28e209619b51de2fc00ab3155bf930e55991a0c8a1b712ecaf344bf00a5a","text":"t.Errorf(\"unexpected portallocator state: %d free\", free) } } func TestCollectServiceNodePorts(t *testing.T) { tests := []struct { name string serviceSpec corev1.ServiceSpec expected []int }{ { name: \"no duplicated nodePorts\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolTCP}, {NodePort: 112, Protocol: corev1.ProtocolUDP}, {NodePort: 113, Protocol: corev1.ProtocolUDP}, }, }, expected: []int{111, 112, 113}, }, { name: \"duplicated nodePort with TCP protocol\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolTCP}, {NodePort: 111, Protocol: corev1.ProtocolTCP}, {NodePort: 112, Protocol: corev1.ProtocolUDP}, }, }, expected: []int{111, 111, 112}, }, { name: \"duplicated nodePort with UDP protocol\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolUDP}, {NodePort: 111, Protocol: corev1.ProtocolUDP}, {NodePort: 112, Protocol: corev1.ProtocolTCP}, }, }, expected: []int{111, 111, 112}, }, { name: \"duplicated nodePort with different protocol\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolTCP}, {NodePort: 112, Protocol: corev1.ProtocolTCP}, {NodePort: 111, Protocol: corev1.ProtocolUDP}, }, }, expected: []int{111, 112}, }, { name: \"no duplicated port(with health check port)\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolTCP}, {NodePort: 112, Protocol: corev1.ProtocolUDP}, }, HealthCheckNodePort: 113, }, expected: []int{111, 112, 113}, }, { name: \"nodePort has different protocol with duplicated health check port\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolUDP}, {NodePort: 112, Protocol: corev1.ProtocolTCP}, }, HealthCheckNodePort: 111, }, expected: []int{111, 112}, }, { name: \"nodePort has same protocol as duplicated health check port\", serviceSpec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ {NodePort: 111, Protocol: corev1.ProtocolUDP}, {NodePort: 112, Protocol: corev1.ProtocolTCP}, }, HealthCheckNodePort: 112, }, expected: []int{111, 112, 112}, }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { ports := collectServiceNodePorts(&corev1.Service{ ObjectMeta: metav1.ObjectMeta{Namespace: \"one\", Name: \"one\"}, Spec: tc.serviceSpec, }) sort.Ints(ports) if !reflect.DeepEqual(tc.expected, ports) { t.Fatalf(\"Invalid resultnexpected: %vngot: %v\", tc.expected, ports) } }) } } "} {"_id":"q-en-kubernetes-04db253b97c90cd8e841c3d62b63604327cd4a68b99ff8c949e2b145c733c6c7","text":"dir := cacheDir if len(dir) > 0 { version, err := clientset.Discovery().ServerVersion() if err != nil { return nil, err if err == nil { dir = path.Join(cacheDir, version.String()) } else { dir = \"\" // disable caching as a fallback } dir = path.Join(cacheDir, version.String()) } fedClient, err := clients.FederationClientForVersion(nil) if err != nil {"} {"_id":"q-en-kubernetes-04def097fbcc25d785370bcc4246ec8670516b4ed1fc7f2bb7e66fb620c942c7","text":"} } // createCustomResourceDefinition removes potentially stale storage so it gets re-created func (r *crdHandler) createCustomResourceDefinition(obj interface{}) { crd := obj.(*apiextensions.CustomResourceDefinition) r.customStorageLock.Lock() defer r.customStorageLock.Unlock() // this could happen if the create event is merged from create-update events r.removeStorage_locked(crd.UID) } // updateCustomResourceDefinition removes potentially stale storage so it gets re-created func (r *crdHandler) updateCustomResourceDefinition(oldObj, newObj interface{}) { oldCRD := oldObj.(*apiextensions.CustomResourceDefinition) newCRD := newObj.(*apiextensions.CustomResourceDefinition)"} {"_id":"q-en-kubernetes-04f6efb8bcb4aec413d39ba2091672c3b22dfbbeb4999e9a75a7904a4970f1d6","text":"} func (tc *patchTestCase) runner(t *testing.T) { scheme := NewTestScheme() metav1.AddMetaToScheme(scheme) client := NewSimpleMetadataClient(scheme, tc.object) resourceInterface := client.Resource(schema.GroupVersionResource{Group: testGroup, Version: testVersion, Resource: testResource}).Namespace(testNamespace)"} {"_id":"q-en-kubernetes-04f9f923d5cede3fd1a8a91bb5c038893421e978953a1b06f2df3c5cc25de6e4","text":"SchedulingAlgorithmPremptionEvaluationDuration, PreemptionVictims, PreemptionAttempts, equivalenceCacheLookups, EquivalenceCacheWrites, } )"} {"_id":"q-en-kubernetes-051f02595cd7d529a3bd93f350b832bfe02a46f84a8639f92fae7f920de0051a","text":"t.Fatalf(\"fail to enumerate network interface, %s\", err) } if !ipv6 { t.Fatalf(\"no ipv6 loopback interface\") t.Skip(\"no ipv6 loopback interface\") } host, port, err := LoopbackHostPort(\"[ff06:0:0:0:0:0:0:c3]:443\")"} {"_id":"q-en-kubernetes-053eff727a21b343aa7d5f278bf254d95ee89937d98c2e7ddbb6e298e3604d02","text":"} patchedJS, retErr = jsonpatch.MergePatch(versionedJS, p.patchBytes) if retErr == jsonpatch.ErrBadJSONPatch { return nil, nil, errors.NewBadRequest(retErr.Error()) } return patchedJS, strictErrors, retErr default: // only here as a safety net - go-restful filters content-type"} {"_id":"q-en-kubernetes-0572b682d3f6d59213034439da9e9372bff033c3ad358dde5090be089c9ed473","text":"http_archive( name = \"io_bazel_rules_go\", sha256 = \"a4ea00b71a6fc3bd381cbbf6eb83ec91fe8b32b1c622c048f1e6f0d965bb1a2d\", strip_prefix = \"rules_go-a280fbac1a0a4c67b0eee660b4fd1b3db7c9f058\", urls = [\"https://github.com/bazelbuild/rules_go/archive/a280fbac1a0a4c67b0eee660b4fd1b3db7c9f058.tar.gz\"], sha256 = \"441e560e947d8011f064bd7348d86940d6b6131ae7d7c4425a538e8d9f884274\", strip_prefix = \"rules_go-c72631a220406c4fae276861ee286aaec82c5af2\", urls = [\"https://github.com/bazelbuild/rules_go/archive/c72631a220406c4fae276861ee286aaec82c5af2.tar.gz\"], ) http_archive("} {"_id":"q-en-kubernetes-057d19e40eb2ef70e7cd79e96c68c5c796108fe4f4f1000a13c95c10e04ff230","text":" /* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package features import ( utilfeature \"k8s.io/apiserver/pkg/util/feature\" \"testing\" ) func TestKubeFeatures(t *testing.T) { features := utilfeature.DefaultFeatureGate.DeepCopy().GetAll() for i := range features { featureName := string(i) if featureName == \"AllAlpha\" || featureName == \"AllBeta\" { continue } if _, ok := defaultKubernetesFeatureGates[i]; !ok { t.Errorf(\"The feature gate %q is not registered\", featureName) } } } "} {"_id":"q-en-kubernetes-05b22e6e790c935a7450ef969b1696b117363d9778fe8c17baf78c6c21c72df2","text":"\"os/exec\" \"strings\" v1 \"k8s.io/api/core/v1\" \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/uuid\" utilfeature \"k8s.io/apiserver/pkg/util/feature\" \"k8s.io/kubernetes/pkg/features\""} {"_id":"q-en-kubernetes-05c4205e1ef110a852b4e4be43bf1cd4993924044da9990a9f98c9030550d785","text":"Namespace: api.NamespaceDefault, }, Spec: api.ReplicationControllerSpec{ Replicas: 0, Replicas: replicas, Template: &d.Spec.Template, }, }"} {"_id":"q-en-kubernetes-05c4e6878112ce64375041da94bbd0932ff7432bb56daa057f00523a0683a935","text":"\"description\": \"EndpointPort represents a Port used by an EndpointSlice\", \"properties\": { \"appProtocol\": { \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"type\": \"string\" }, \"name\": {"} {"_id":"q-en-kubernetes-05cbbb1130d078f0cdb84100ef880fca820725df0ad18718541203fea4a908fe","text":"}, []string{\"runtime_handler\"}, ) // RunningPodCount is a gauge that tracks the number of Pods currently running RunningPodCount = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, Name: \"running_pod_count\", Help: \"Number of pods currently running\", StabilityLevel: metrics.ALPHA, }, ) // RunningContainerCount is a gauge that tracks the number of containers currently running RunningContainerCount = metrics.NewGaugeVec( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, Name: \"running_container_count\", Help: \"Number of containers currently running\", StabilityLevel: metrics.ALPHA, }, []string{\"container_state\"}, ) ) var registerMetrics sync.Once"} {"_id":"q-en-kubernetes-05d2c7b88b249ee53353f127bb06f7f34ad4fe97c45b5ae5654d00741e51f5ac","text":"if class.DriverName != ctrl.name { return nil, nil } // Check parameters. claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class) // Check parameters. Record event to claim and pod if parameters are invalid. claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class, true) if err != nil { ctrl.eventRecorder.Event(pod, v1.EventTypeWarning, \"Failed\", fmt.Sprintf(\"claim %v: %v\", claim.Name, err.Error())) return nil, err } return &ClaimAllocation{"} {"_id":"q-en-kubernetes-0607ef810afbbc2b53a979427c675cb70fb854773d13dcc159c5e3d054970e19","text":"// try set ip families (for missing ip families) // we do it here, since we want this to be visible // even when dryRun == true if err := rs.tryDefaultValidateServiceClusterIPFields(service); err != nil { if err := rs.tryDefaultValidateServiceClusterIPFields(nil, service); err != nil { return nil, err }"} {"_id":"q-en-kubernetes-062853fc57e3975866d88f5aca17fbd98ff71683df91d9b50d148fd841a4f32b","text":"JessieDnsutils = ImageConfig{e2eRegistry, \"jessie-dnsutils\", \"1.0\", true} Kitten = ImageConfig{e2eRegistry, \"kitten\", \"1.0\", true} Liveness = ImageConfig{e2eRegistry, \"liveness\", \"1.0\", true} LogsGenerator = ImageConfig{gcRegistry, \"logs-generator\", \"v0.1.0\", false} LogsGenerator = ImageConfig{e2eRegistry, \"logs-generator\", \"1.0\", true} Mounttest = ImageConfig{e2eRegistry, \"mounttest\", \"1.0\", true} MounttestUser = ImageConfig{e2eRegistry, \"mounttest-user\", \"1.0\", true} Nautilus = ImageConfig{e2eRegistry, \"nautilus\", \"1.0\", true}"} {"_id":"q-en-kubernetes-0637a2ada9a56a4f9caa078d934299294f513ead878dc68450f51d5d3421a0a1","text":"execAffinityTestForLBServiceWithTransition(f, cs, svc) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. // [LinuxOnly]: Windows does not support session affinity. ginkgo.It(\"should have session affinity work for LoadBalancer service with ESIPP off [Slow] [DisabledForLargeClusters] [LinuxOnly]\", func() { ginkgo.It(\"should have session affinity work for LoadBalancer service with ESIPP off [Slow] [LinuxOnly]\", func() { // L4 load balancer affinity `ClientIP` is not supported on AWS ELB. e2eskipper.SkipIfProviderIs(\"aws\")"} {"_id":"q-en-kubernetes-06472af30c5c1fe6cbe371bcaf6f07ceb18fd8e2ee5de8002e8a453e7313b8a7","text":"return fmt.Errorf(\"timed out waiting for apiserver to be restarted\") } func GetApiserverRestartCount(c clientset.Interface) (int32, error) { func getApiserverRestartCount(c clientset.Interface) (int32, error) { label := labels.SelectorFromSet(labels.Set(map[string]string{\"component\": \"kube-apiserver\"})) listOpts := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.CoreV1().Pods(metav1.NamespaceSystem).List(listOpts)"} {"_id":"q-en-kubernetes-06e04410d88676f82467fb75190a4d59d2566d0fb09de9f1838bded94e855242","text":"\"//staging/src/k8s.io/client-go/kubernetes:go_default_library\", \"//staging/src/k8s.io/component-base/config:go_default_library\", \"//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library\", \"//staging/src/k8s.io/component-base/metrics/prometheus/workqueue:go_default_library\", \"//vendor/k8s.io/klog:go_default_library\", ], )"} {"_id":"q-en-kubernetes-06edcd9ebe6a3b3b4cef80d21288804a7b8de12d17dcbaca2d5789a6048d8c65","text":" /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( \"io\" \"io/ioutil\" \"log\" \"os\" \"os/signal\" \"path/filepath\" \"github.com/pkg/errors\" ) func main() { env := envWithDefaults(map[string]string{ resultsDirEnvKey: defaultResultsDir, skipEnvKey: defaultSkip, focusEnvKey: defaultFocus, providerEnvKey: defaultProvider, parallelEnvKey: defaultParallel, ginkgoEnvKey: defaultGinkgoBinary, testBinEnvKey: defaultTestBinary, }) if err := configureAndRunWithEnv(env); err != nil { log.Fatal(err) } } // configureAndRunWithEnv uses the given environment to configure and then start the test run. // It will handle TERM signals gracefully and kill the test process and will // save the logs/results to the location specified via the RESULTS_DIR environment // variable. func configureAndRunWithEnv(env Getenver) error { // Ensure we save results regardless of other errors. This helps any // consumer who may be polling for the results. resultsDir := env.Getenv(resultsDirEnvKey) defer saveResults(resultsDir) // Print the output to stdout and a logfile which will be returned // as part of the results tarball. logFilePath := filepath.Join(resultsDir, logFileName) logFile, err := os.Create(logFilePath) if err != nil { return errors.Wrapf(err, \"failed to create log file %v\", logFilePath) } mw := io.MultiWriter(os.Stdout, logFile) cmd := getCmd(env, mw) log.Printf(\"Running command:n%vn\", cmdInfo(cmd)) err = cmd.Start() if err != nil { return errors.Wrap(err, \"starting command\") } // Handle signals and shutdown process gracefully. go setupSigHandler(cmd.Process.Pid) return errors.Wrap(cmd.Wait(), \"running command\") } // setupSigHandler will kill the process identified by the given PID if it // gets a TERM signal. func setupSigHandler(pid int) { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) // Block until a signal is received. log.Println(\"Now listening for interrupts\") s := <-c log.Printf(\"Got signal: %v. Shutting down test process (PID: %v)n\", s, pid) p, err := os.FindProcess(pid) if err != nil { log.Printf(\"Could not find process %v to shut down.n\", pid) return } if err := p.Signal(s); err != nil { log.Printf(\"Failed to signal test process to terminate: %vn\", err) return } log.Printf(\"Signalled process %v to terminate successfully.n\", pid) } // saveResults will tar the results directory and write the resulting tarball path // into the donefile. func saveResults(resultsDir string) error { log.Printf(\"Saving results at %vn\", resultsDir) err := tarDir(resultsDir, filepath.Join(resultsDir, resultsTarballName)) if err != nil { return errors.Wrapf(err, \"tar directory %v\", resultsDir) } doneFile := filepath.Join(resultsDir, doneFileName) resultsTarball := filepath.Join(resultsDir, resultsTarballName) resultsTarball, err = filepath.Abs(resultsTarball) if err != nil { return errors.Wrapf(err, \"failed to find absolute path for %v\", resultsTarball) } return errors.Wrap( ioutil.WriteFile(doneFile, []byte(resultsTarball), os.FileMode(0777)), \"writing donefile\", ) } "} {"_id":"q-en-kubernetes-06f98db6afeb9a986b3023d01755ead5e1bbaff37b19367b7174ee8bd9dab63e","text":"const connectionTimeout = 1 * time.Second type connection interface { serverReachable(address string) bool parseServerList(serverList []string) error CheckEtcdServers() (bool, error) } // EtcdConnection holds the Etcd server list type EtcdConnection struct { ServerList []string"} {"_id":"q-en-kubernetes-073868281bf741180f8b32c38ca693a7a0561efba0a8ddf9d0d49edaf6089961","text":"} missingIPs := desiredIPs.Difference(currentIPs) if len(missingIPs) > 0 { glog.V(2).Infof(\"Current certificate is missing requested IP addresses %v, rotating now\", missingIPs.List()) return time.Now() glog.V(2).Infof(\"Current certificate is missing requested IP addresses %v\", missingIPs.List()) return false } currentOrgs := sets.NewString(m.cert.Leaf.Subject.Organization...) desiredOrgs := sets.NewString(template.Subject.Organization...) missingOrgs := desiredOrgs.Difference(currentOrgs) if len(missingOrgs) > 0 { glog.V(2).Infof(\"Current certificate is missing requested orgs %v\", missingOrgs.List()) return false } } return true } func (m *manager) certSatisfiesTemplate() bool { m.certAccessLock.RLock() defer m.certAccessLock.RUnlock() return m.certSatisfiesTemplateLocked() } // nextRotationDeadline returns a value for the threshold at which the // current certificate should be rotated, 80%+/-10% of the expiration of the // certificate. func (m *manager) nextRotationDeadline() time.Time { // forceRotation is not protected by locks if m.forceRotation { m.forceRotation = false return time.Now() } m.certAccessLock.RLock() defer m.certAccessLock.RUnlock() if !m.certSatisfiesTemplateLocked() { return time.Now() } notAfter := m.cert.Leaf.NotAfter"} {"_id":"q-en-kubernetes-073ac03f31d14a32ee40e9ef502f5157fd20287f4ebe002365a552415fe84bf5","text":"if longRunningRequestCheck(req) { return nil, \"\" } return time.After(time.Minute), \"\" return time.After(globalTimeout), \"\" } if secureLocation != \"\" {"} {"_id":"q-en-kubernetes-073cdf4b4fa530261142a6b8c641d500b181f89ff097be0c02a05d336ae84dbf","text":"return volumeToMount.GenerateError(\"MapVolume failed\", fmt.Errorf(\"Device path of the volume is empty\")) } // When kubelet is containerized, devicePath may be a symlink at a place unavailable to // kubelet, so evaluate it on the host and expect that it links to a device in /dev, // which will be available to containerized kubelet. If still it does not exist, // AttachFileDevice will fail. If kubelet is not containerized, eval it anyway. mounter := og.GetVolumePluginMgr().Host.GetMounter(blockVolumePlugin.GetPluginName()) devicePath, err = mounter.EvalHostSymlinks(devicePath) if err != nil { return volumeToMount.GenerateError(\"MapVolume.EvalHostSymlinks failed\", err) } // Map device to global and pod device map path volumeMapPath, volName := blockVolumeMapper.GetPodDeviceMapPath() mapErr = blockVolumeMapper.MapDevice(devicePath, globalMapPath, volumeMapPath, volName, volumeToMount.Pod.UID)"} {"_id":"q-en-kubernetes-0798345d8b65ec0563895e13843885977ba4797bc7b103f7f13d14611e84e319","text":"// singleCallTimeout is how long to try single API calls (like 'get' or 'list'). Used to prevent // transient failures from failing tests. singleCallTimeout = 5 * time.Minute // sshBastionEnvKey is the environment variable key for running SSH commands via bastion. sshBastionEnvKey = \"KUBE_SSH_BASTION\" ) // GetSigner returns an ssh.Signer for the provider (\"gce\", etc.) that can be"} {"_id":"q-en-kubernetes-07caf30dc2b6535d580fe04eb9a95d9a009b5ca8be700f09117be34953b5f771","text":"} else if hours < 24*365*2 { return fmt.Sprintf(\"%dd\", hours/24) } else if hours < 24*365*8 { return fmt.Sprintf(\"%dy%dd\", hours/24/365, (hours/24)%365) dy := int(hours/24) % 365 if dy == 0 { return fmt.Sprintf(\"%dy\", hours/24/365) } return fmt.Sprintf(\"%dy%dd\", hours/24/365, dy) } return fmt.Sprintf(\"%dy\", int(hours/24/365)) }"} {"_id":"q-en-kubernetes-0803131c5f0120628deab42665abd4e36e55e345aca0173db3f46c410d11b9b3","text":"package jsonpatch import ( \"bytes\" \"encoding/json\" \"fmt\" \"reflect\""} {"_id":"q-en-kubernetes-08079a1a3b9c6995ad34ad1086db607120a55d908c66f497eaa08ce57604a009","text":"}, } podWithHook := getPodWithHook(\"pod-with-poststart-https-hook\", imageutils.GetPauseImageName(), lifecycle) // make sure we spawn the test pod on the same node as the webserver. nodeSelection := e2epod.NodeSelection{} e2epod.SetAffinity(&nodeSelection, targetNode) e2epod.SetNodeSelection(&podWithHook.Spec, nodeSelection) testPodWithHook(podWithHook) }) /*"} {"_id":"q-en-kubernetes-0809b7205d791058efeec91cfdf48c3e3dc9409006c232df7b4355fad893b1ac","text":"# github.com/opencontainers/go-digest v1.0.0 ## explicit; go 1.13 github.com/opencontainers/go-digest # github.com/opencontainers/runc v1.1.4 # github.com/opencontainers/runc v1.1.5 ## explicit; go 1.16 github.com/opencontainers/runc/libcontainer github.com/opencontainers/runc/libcontainer/apparmor"} {"_id":"q-en-kubernetes-081f42ec839fa3bf52a339b10ab883b555a0e0aebf1023aed51d215b4c421118","text":"// WriteStaticPodManifests builds manifest objects based on user provided configuration and then dumps it to disk // where kubelet will pick and schedule them. func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error { volumes := []api.Volume{k8sVolume(cfg)} volumeMounts := []api.VolumeMount{k8sVolumeMount()} if isCertsVolumeMountNeeded() { volumes = append(volumes, certsVolume(cfg)) volumeMounts = append(volumeMounts, certsVolumeMount()) } if isPkiVolumeMountNeeded() { volumes = append(volumes, pkiVolume(cfg)) volumeMounts = append(volumeMounts, pkiVolumeMount()) } // Prepare static pod specs staticPodSpecs := map[string]api.Pod{ kubeAPIServer: componentPod(api.Container{ Name: kubeAPIServer, Image: images.GetCoreImage(images.KubeAPIServerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), Command: getAPIServerCommand(cfg), VolumeMounts: []api.VolumeMount{certsVolumeMount(), k8sVolumeMount()}, VolumeMounts: volumeMounts, LivenessProbe: componentProbe(8080, \"/healthz\"), Resources: componentResources(\"250m\"), }, certsVolume(cfg), k8sVolume(cfg)), }, volumes...), kubeControllerManager: componentPod(api.Container{ Name: kubeControllerManager, Image: images.GetCoreImage(images.KubeControllerManagerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), Command: getControllerManagerCommand(cfg), VolumeMounts: []api.VolumeMount{certsVolumeMount(), k8sVolumeMount()}, VolumeMounts: volumeMounts, LivenessProbe: componentProbe(10252, \"/healthz\"), Resources: componentResources(\"200m\"), }, certsVolume(cfg), k8sVolume(cfg)), }, volumes...), kubeScheduler: componentPod(api.Container{ Name: kubeScheduler, Image: images.GetCoreImage(images.KubeSchedulerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage),"} {"_id":"q-en-kubernetes-082e7d35941be3e789d491496de3cc2d3041fad7b5e8ac402cd9dd1071c07661","text":"## Protocols for Collaborative Development Please read [this doc](docs/collab.md) for information on how we're running development for the project. Please read [this doc](docs/devel/collab.md) for information on how we're running development for the project. ## Adding dependencies"} {"_id":"q-en-kubernetes-0847533c8e9f496eea43d1ad9e11d3121fc423c5c3fd581d7d7f1d0aaa4da72b","text":"} configurer = NewConfigurer(recorder, nodeRef, nil, testClusterDNS, testClusterDNSDomain, defaultResolvConf) configurer.getHostDNSConfig = fakeGetHostDNSConfigCustom for i, pod := range pods { var err error dnsConfig, err := configurer.GetPodDNS(pod)"} {"_id":"q-en-kubernetes-0869e4b2e3bd87e88bd1b86e3f1ee2747488120dc4d6dc5f8ca320365f919b42","text":"CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-\"docker\"} CONTAINER_RUNTIME_ENDPOINT=${CONTAINER_RUNTIME_ENDPOINT:-\"\"} IMAGE_SERVICE_ENDPOINT=${IMAGE_SERVICE_ENDPOINT:-\"\"} ENABLE_CRI=${ENABLE_CRI:-\"true\"} RKT_PATH=${RKT_PATH:-\"\"} RKT_STAGE1_IMAGE=${RKT_STAGE1_IMAGE:-\"\"} CHAOS_CHANCE=${CHAOS_CHANCE:-0.0}"} {"_id":"q-en-kubernetes-086eef9604a2614cb1940562ab07df053b6265e68437ee83fa88c287bd8f437c","text":"} type gcepdSource struct { diskName string pvc *v1.PersistentVolumeClaim } func initGCEPD() volSource {"} {"_id":"q-en-kubernetes-089634bdc5e4420857951709f9da55da61312b8541e0fb7f4926475d766f2c01","text":"rolebindingetcd \"k8s.io/kubernetes/pkg/registry/rbac/rolebinding/etcd\" rolebindingpolicybased \"k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased\" utilruntime \"k8s.io/kubernetes/pkg/util/runtime\" \"k8s.io/kubernetes/pkg/util/wait\" \"k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy\" )"} {"_id":"q-en-kubernetes-0896a3070e8de53a45ffa287160719e393a8f5c4c33f0f4bf49025daca55100f","text":"// ListRegisteredFitPredicates returns the registered fit predicates. func ListRegisteredFitPredicates() []string { schedulerFactoryMutex.Lock() defer schedulerFactoryMutex.Unlock() schedulerFactoryMutex.RLock() defer schedulerFactoryMutex.RUnlock() var names []string for name := range fitPredicateMap {"} {"_id":"q-en-kubernetes-089efce9d7c45a7b2ae456a5c542e9fa4df3a112e669470939142aed9d1ab15f","text":"ctx.init(null, trustAll, new SecureRandom()); URL url = new URL(host + path + serviceName); logger.info(\"Getting endpoints from \" + url); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection(); // TODO: Remove this once the CA cert is propogated everywhere, and replace"} {"_id":"q-en-kubernetes-08bab1e2c4e0889c10f13d756d1dd7951235cf61bea19e23283cb54484dc02b3","text":"ENV RESULTS_DIR=\"/tmp/results\" ENV KUBECONFIG=\"\" CMD [ \"/bin/bash\", \"-c\", \"/run_e2e.sh\" ] ENTRYPOINT [ \"kubeconformance\" ] "} {"_id":"q-en-kubernetes-091c843d6d413128b565c23d62793a09670622f6c02b95b84b4bf06e34be2682","text":"}, { \"ImportPath\": \"github.com/json-iterator/go\", \"Rev\": \"f2b4162afba35581b6d4a50d3b8f34e33c144682\" \"Rev\": \"ab8a2e0c74be9d3be70b3184d9acc634935ded82\" }, { \"ImportPath\": \"github.com/modern-go/concurrent\","} {"_id":"q-en-kubernetes-091f5be6409cc88a58cd3be145c19d9e108e4522746270ed889860b62f315c06","text":" apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: multiple-certs"} {"_id":"q-en-kubernetes-09367ee2d9d6d91720a1f6fc123177b28691d6b051ee3bd4c5af5bf1bebd93ae","text":"return pullSecrets } // Returns true if pod is in the terminated state (\"Failed\" or \"Succeeded\"). // podIsTerminated returns true if pod is in the terminated state (\"Failed\" or \"Succeeded\"). func (kl *Kubelet) podIsTerminated(pod *v1.Pod) bool { var status v1.PodStatus // Check the cached pod status which was set after the last sync. status, ok := kl.statusManager.GetPodStatus(pod.UID) if !ok {"} {"_id":"q-en-kubernetes-094870966e6e1a2c88b39e37a663eb50014231283c09f81d5d847e2d3a5b94b2","text":"} } func isCertsVolumeMountNeeded() bool { // Always return true for now. We may add conditional logic here for images which do not require host mounting /etc/ssl // hyperkube for example already has valid ca-certificates installed return true } // certsVolume exposes host SSL certificates to pod containers. func certsVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume { return api.Volume{"} {"_id":"q-en-kubernetes-094973dee423cb76c8061c047828274e4cac927c51cf1ecbec0afbe115997599","text":"package azure import ( \"context\" \"fmt\" \"reflect\" \"testing\""} {"_id":"q-en-kubernetes-0971a11db3f66d48166a682d294bb90ea5174409a7b4d2964447b99d1ce2b1b9","text":" apiVersion: v1 kind: Service metadata: name: elasticsearch labels: component: elasticsearch spec: type: LoadBalancer selector: component: elasticsearch ports: - name: http port: 9200 protocol: TCP - name: transport port: 9300 protocol: TCP "} {"_id":"q-en-kubernetes-098aafb978b6878440d52bf74e3ca793f76de8a5ebc4a75ee820c0af0b0c487d","text":"// If selectedNode is set, the driver must attempt to allocate for that // node. If that is not possible, it must return an error. The // controller will call UnsuitableNodes and pass the new information to // the scheduler, which then will lead to selecting a diffent node // the scheduler, which then will lead to selecting a different node // if the current one is not suitable. // // The Claim, ClaimParameters, Class, ClassParameters fields of \"claims\" parameter"} {"_id":"q-en-kubernetes-0995d2b6be9e7d82400e300ca29385e5b3acbbbb999c83d1291bf25b7d2532a7","text":"} } func TestMatchImageTagOrSHA(t *testing.T) { for _, testCase := range []struct { Inspected dockertypes.ImageInspect Image string Output bool }{ { Inspected: dockertypes.ImageInspect{RepoTags: []string{\"ubuntu:latest\"}}, Image: \"ubuntu\", Output: true, }, { Inspected: dockertypes.ImageInspect{RepoTags: []string{\"ubuntu:14.04\"}}, Image: \"ubuntu:latest\", Output: false, }, { Inspected: dockertypes.ImageInspect{ ID: \"sha256:2208f7a29005d226d1ee33a63e33af1f47af6156c740d7d23c7948e8d282d53d\", }, Image: \"myimage@sha256:2208f7a29005d226d1ee33a63e33af1f47af6156c740d7d23c7948e8d282d53d\", Output: true, }, { Inspected: dockertypes.ImageInspect{ ID: \"sha256:2208f7a29005d226d1ee33a63e33af1f47af6156c740d7d23c7948e8d282d53d\", }, Image: \"myimage@sha256:2208f7a29005\", Output: false, }, { Inspected: dockertypes.ImageInspect{ ID: \"sha256:2208f7a29005d226d1ee33a63e33af1f47af6156c740d7d23c7948e8d282d53d\", }, Image: \"myimage@sha256:2208\", Output: false, }, } { match := matchImageTagOrSHA(testCase.Inspected, testCase.Image) assert.Equal(t, testCase.Output, match, testCase.Image+\" is not a match\") } } func TestApplyDefaultImageTag(t *testing.T) { for _, testCase := range []struct { Input string"} {"_id":"q-en-kubernetes-0996a78a87754a5bece303db7fe6ef873f30836fad9a65fe7d36370dc25c38de","text":"// Volume is added to asw, volume should be reported as attached to the node. waitForVolumeAddedToNode(t, generatedVolumeName, nodeName1, asw) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) // Delete the pod dsw.DeletePod(types.UniquePodName(podName1), generatedVolumeName, nodeName1)"} {"_id":"q-en-kubernetes-09a2b5d80feff9e0ef019e5da82c93b3af86cc7ac320eeac89002a821d137c74","text":"By(\"verifying service-disabled is still not up\") framework.ExpectNoError(framework.VerifyServeHostnameServiceDown(cs, host, svcDisabledIP, servicePort)) }) It(\"should be rejected when no endpoints exist\", func() { namespace := f.Namespace.Name serviceName := \"no-pods\" jig := framework.NewServiceTestJig(cs, serviceName) nodes := jig.GetNodes(framework.MaxNodesForEndpointsTests) labels := map[string]string{ \"nopods\": \"nopods\", } port := 80 ports := []v1.ServicePort{{ Port: int32(port), TargetPort: intstr.FromInt(80), }} By(\"creating a service with no endpoints\") _, err := jig.CreateServiceWithServicePort(labels, namespace, ports) if err != nil { framework.Failf(\"Failed to create service: %v\", err) } nodeName := nodes.Items[0].Name podName := \"execpod-noendpoints\" By(fmt.Sprintf(\"creating %v on node %v\", podName, nodeName)) execPodName := framework.CreateExecPodOrFail(f.ClientSet, namespace, podName, func(pod *v1.Pod) { pod.Spec.NodeName = nodeName }) execPod, err := f.ClientSet.CoreV1().Pods(namespace).Get(execPodName, metav1.GetOptions{}) framework.ExpectNoError(err) serviceAddress := net.JoinHostPort(serviceName, strconv.Itoa(port)) framework.Logf(\"waiting up to %v wget %v\", framework.KubeProxyEndpointLagTimeout, serviceAddress) cmd := fmt.Sprintf(`wget -T 3 -qO- %v`, serviceAddress) By(fmt.Sprintf(\"hitting service %v from pod %v on node %v\", serviceAddress, podName, nodeName)) expectedErr := \"connection refused\" if pollErr := wait.PollImmediate(framework.Poll, framework.KubeProxyEndpointLagTimeout, func() (bool, error) { _, err := framework.RunHostCmd(execPod.Namespace, execPod.Name, cmd) if err != nil { if strings.Contains(strings.ToLower(err.Error()), expectedErr) { framework.Logf(\"error contained '%s', as expected: %s\", expectedErr, err.Error()) return true, nil } else { framework.Logf(\"error didn't contain '%s', keep trying: %s\", expectedErr, err.Error()) return false, nil } } else { return true, errors.New(\"expected wget call to fail\") } }); pollErr != nil { Expect(pollErr).NotTo(HaveOccurred()) } }) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed."} {"_id":"q-en-kubernetes-09a30bfeac2759a1502479a9ab062396c2a37f8cd14fd6d03ce1c5c463c30908","text":"} klog.Errorf(\"Failed to GetNodeNameByIPConfigurationID(%s): %v\", ipConfigurationID, err) errors = append(errors, err) allErrs = append(allErrs, err) continue } nodeResourceGroup, nodeVMSS, nodeInstanceID, nodeVMSSVM, err := ss.ensureBackendPoolDeletedFromNode(nodeName, backendPoolID) if err != nil { klog.Errorf(\"EnsureBackendPoolDeleted(%s): backendPoolID(%s) - failed with error %v\", getServiceName(service), backendPoolID, err) errors = append(errors, err) if !errors.Is(err, ErrorNotVmssInstance) { // Do nothing for the VMAS nodes. klog.Errorf(\"EnsureBackendPoolDeleted(%s): backendPoolID(%s) - failed with error %v\", getServiceName(service), backendPoolID, err) allErrs = append(allErrs, err) } continue }"} {"_id":"q-en-kubernetes-09f55eea4acb93558518e82e86888b5d51a02329e1f53f0f6f8d89efab01f261","text":"optf(dm) } // initialize versionCache with a updater dm.versionCache = cache.NewVersionCache(func() (kubecontainer.Version, kubecontainer.Version, error) { return dm.getVersionInfo() }) // update version cache periodically. if dm.machineInfo != nil { dm.versionCache.UpdateCachePeriodly(dm.machineInfo.MachineID) } return dm }"} {"_id":"q-en-kubernetes-09f8e3880067931ab288ea524667b11a98827bb2a26a831cf4cde403ec0cc924","text":"# Get the compute project project=$(gcloud info --format='value(config.project)') project=${project// /} if [[ ${project} == \"\" ]]; then echo \"Could not find gcloud project when running: `gcloud info --format='value(config.project)'`\" exit 1"} {"_id":"q-en-kubernetes-0a30ba01cf05db9619fa44fe18171fac1440747ab02490903c69f0d8e3e24adc","text":"return &Result{visitor: VisitorList(visitors), sources: visitors} } // visit single item specified by name if len(b.name) != 0 { // visit items specified by name if len(b.names) != 0 { isSingular := len(b.names) == 1 if len(b.paths) != 0 { return &Result{singular: true, err: fmt.Errorf(\"when paths, URLs, or stdin is provided as input, you may not specify a resource by arguments as well\")} return &Result{singular: isSingular, err: fmt.Errorf(\"when paths, URLs, or stdin is provided as input, you may not specify a resource by arguments as well\")} } if len(b.resources) == 0 { return &Result{singular: true, err: fmt.Errorf(\"you must provide a resource and a resource name together\")} return &Result{singular: isSingular, err: fmt.Errorf(\"you must provide a resource and a resource name together\")} } if len(b.resources) > 1 { return &Result{singular: true, err: fmt.Errorf(\"you must specify only one resource\")} return &Result{singular: isSingular, err: fmt.Errorf(\"you must specify only one resource\")} } mappings, err := b.resourceMappings() if err != nil { return &Result{singular: true, err: err} return &Result{singular: isSingular, err: err} } mapping := mappings[0] client, err := b.mapper.ClientForMapping(mapping) if err != nil { return &Result{err: err} } selectorNamespace := b.namespace if mapping.Scope.Name() != meta.RESTScopeNameNamespace { b.namespace = \"\" selectorNamespace = \"\" } else { if len(b.namespace) == 0 { return &Result{singular: true, err: fmt.Errorf(\"namespace may not be empty when retrieving a resource by name\")} return &Result{singular: isSingular, err: fmt.Errorf(\"namespace may not be empty when retrieving a resource by name\")} } } client, err := b.mapper.ClientForMapping(mapping) if err != nil { return &Result{singular: true, err: err} } info := NewInfo(client, mappings[0], b.namespace, b.name) if err := info.Get(); err != nil { return &Result{singular: true, err: err} visitors := []Visitor{} for _, name := range b.names { info := NewInfo(client, mapping, selectorNamespace, name) if err := info.Get(); err != nil { return &Result{singular: isSingular, err: err} } visitors = append(visitors, info) } return &Result{singular: true, visitor: info, sources: []Visitor{info}} return &Result{singular: isSingular, visitor: VisitorList(visitors), sources: visitors} } // visit items specified by paths"} {"_id":"q-en-kubernetes-0a352af816a32a2c80d4209d9be04de73012cbc63c9d2c41388b6f4f9d33e893","text":"defer func() { framework.DeletePodWithWait(f, f.ClientSet, pod) }() err = framework.WaitForPodRunningInNamespace(f.ClientSet, pod) Expect(err).To(HaveOccurred(), \"while waiting for pod to be running\") By(\"Checking for subpath error event\") selector := fields.Set{"} {"_id":"q-en-kubernetes-0a57b5175a21436409a798156431592f09424685affe76488902cd2526eba3c6","text":"case \"${KUBE_OS_DISTRIBUTION}\" in ubuntu|coreos) echo \"Starting cluster using os distro: ${KUBE_OS_DISTRIBUTION}\" >&2 source \"${KUBE_ROOT}/cluster/aws/${KUBE_OS_DISTRIBUTION}/util.sh\" ;; *)"} {"_id":"q-en-kubernetes-0a667653e503c8d9b1cfb88c03df59ff3d611179d14fabbe29603ede72734012","text":"func (r *LogREST) NewGetOptions() (runtime.Object, bool, string) { return &api.PodLogOptions{}, false, \"\" } // OverrideMetricsVerb override the GET verb to CONNECT for pod log resource func (r *LogREST) OverrideMetricsVerb(oldVerb string) (newVerb string) { newVerb = oldVerb if oldVerb == \"GET\" { newVerb = \"CONNECT\" } return } "} {"_id":"q-en-kubernetes-0a90a4d932f845be1743a10b11735e1b1d80866e3e65ecc931a59240d66d7f9e","text":") const ( // When these values are updated, also update cmd/kubelet/app/options/options.go // A copy of these values exist in e2e/framework/util.go. // When these values are updated, also update cmd/kubelet/app/options/container_runtime.go // A copy of these values exist in test/utils/image/manifest.go currentPodInfraContainerImageName = \"gcr.io/google_containers/pause\" currentPodInfraContainerImageVersion = \"3.0\" currentPodInfraContainerImageVersion = \"3.1\" ) // GetServerArchitecture fetches the architecture of the cluster's apiserver."} {"_id":"q-en-kubernetes-0add3ab52da07373382c08191a9be6f440603d7147db0ac32bea34055c83d973","text":"} idx = len(ary) - idx } if idx < 0 || idx >= len(ary) || idx > len(cur) { return fmt.Errorf(\"Unable to access invalid index: %d\", idx) } copy(ary[0:idx], cur[0:idx]) ary[idx] = val copy(ary[idx+1:], cur[idx:])"} {"_id":"q-en-kubernetes-0b04581b03e953347c12b885b5907d300595c2b3f322103fb508958c23888de4","text":"return m.wrappedMounter.ExistsPath(pathname) } func (m *execMounter) EvalHostSymlinks(pathname string) (string, error) { return m.wrappedMounter.EvalHostSymlinks(pathname) } func (m *execMounter) PrepareSafeSubpath(subPath Subpath) (newHostPath string, cleanupAction func(), err error) { return m.wrappedMounter.PrepareSafeSubpath(subPath) }"} {"_id":"q-en-kubernetes-0b0b8eb1c8f9de75456d29b0326b5e2c2eda1365c41e0056e7667162aca5097d","text":"cp kubernetes/server/kubernetes/server/bin/kubelet kubernetes/server/kubernetes/server/bin/kube-proxy binaries/minion cp kubernetes/server/kubernetes/server/bin/kubectl binaries/ rm -rf flannel* kubernetes* etcd* echo \"Done! All your commands locate in ./binaries dir\""} {"_id":"q-en-kubernetes-0b84423e75d46b0cba7f4fd94e0c646e11690484942523ca223f4465f892e9ce","text":"targetNamePath := sessionPath + \"/iscsi_session/\" + sessionName + \"/targetname\" targetName, err := io.ReadFile(targetNamePath) if err != nil { return nil, err klog.Infof(\"Failed to process session %s, assuming this session is unavailable: %s\", sessionName, err) continue } // Ignore hosts that don't matchthe target we were looking for."} {"_id":"q-en-kubernetes-0b94534a6252ca41597cdabdae2ca17f357f5b9acbc855283b5c28d84f98c021","text":"framework.ExpectNoError(err, \"failed to count the required APIServices\") framework.Logf(\"APIService %s has been deleted.\", apiServiceName) ginkgo.By(\"Confirm that the group path of \" + apiServiceName + \" was removed from root paths\") groupPath := \"/apis/\" + apiServiceGroupName err = wait.PollUntilContextTimeout(ctx, apiServiceRetryPeriod, apiServiceRetryTimeout, true, func(ctx context.Context) (done bool, err error) { rootPaths := metav1.RootPaths{} statusContent, err = restClient.Get(). AbsPath(\"/\"). SetHeader(\"Accept\", \"application/json\").DoRaw(ctx) if err != nil { return false, err } err = json.Unmarshal(statusContent, &rootPaths) if err != nil { return false, err } return !slices.Contains(rootPaths.Paths, groupPath), nil }) framework.ExpectNoError(err, \"Expected to not find %s from root paths\", groupPath) cleanupSampleAPIServer(ctx, client, aggrclient, n, apiServiceName) }"} {"_id":"q-en-kubernetes-0ba71479220eaf6606c5c272d460494a746e284fe0f9feb512a99b298efe5721","text":"return true, errors.New(\"not implemented\") } func (*NsenterMounter) EvalHostSymlinks(pathname string) (string, error) { return \"\", errors.New(\"not implemented\") } func (*NsenterMounter) SafeMakeDir(pathname string, base string, perm os.FileMode) error { return nil }"} {"_id":"q-en-kubernetes-0c0f57001ac47b4d64cd25032ca4707bf223f809ff02491ee627a586c2278ddb","text":"set -o pipefail ### Hardcoded constants DEFAULT_CNI_VERSION='v0.8.7' DEFAULT_CNI_HASH='8f2cbee3b5f94d59f919054dccfe99a8e3db5473b553d91da8af4763e811138533e05df4dbeab16b3f774852b4184a7994968f5e036a3f531ad1ac4620d10ede' DEFAULT_CNI_VERSION='v0.9.1' DEFAULT_CNI_HASH='b5a59660053a5f1a33b5dd5624d9ed61864482d9dc8e5b79c9b3afc3d6f62c9830e1c30f9ccba6ee76f5fb1ff0504e58984420cc0680b26cb643f1cb07afbd1c' DEFAULT_NPD_VERSION='v0.8.7' DEFAULT_NPD_HASH='853576423077bf72e7bd8e96cd782cf272f7391379f8121650c1448531c0d3a0991dfbd0784a1157423976026806ceb14ca8fb35bac1249127dbf00af45b7eea' DEFAULT_CRICTL_VERSION='v1.21.0'"} {"_id":"q-en-kubernetes-0c27dc9269463d68be33f02fb16abc2a50d57f28e79ff20b73b070221e6ffb90","text":"addKnownTypes(scheme) addConversionFuncs(scheme) addDefaultingFuncs(scheme) addDeepCopyFuncs(scheme) } // Adds the list of known types to api.Scheme."} {"_id":"q-en-kubernetes-0c9ca3587e96b1c07d244c5c3cb19c0f04bc880c3d17e99c64514eb40c496eb2","text":"} }) // TODO: move this under volumeType loop Context(\"when one pod requests one prebound PVC\", func() { var testVol *localTestVolume"} {"_id":"q-en-kubernetes-0cb1482370150c55f35e6881c825d53a47cdc1ec5403c3c525c342c28d627a38","text":"EOF } function create-kubecontrollermanager-kubeconfig { echo \"Creating kube-controller-manager kubeconfig file\" mkdir -p /etc/srv/kubernetes/kube-controller-manager cat </etc/srv/kubernetes/kube-controller-manager/kubeconfig apiVersion: v1 kind: Config users: - name: kube-controller-manager user: token: ${KUBE_CONTROLLER_MANAGER_TOKEN} clusters: - name: local cluster: insecure-skip-tls-verify: true server: https://localhost:443 contexts: - context: cluster: local user: kube-controller-manager name: service-account-context current-context: service-account-context EOF } function create-master-etcd-auth { if [[ -n \"${ETCD_CA_CERT:-}\" && -n \"${ETCD_PEER_KEY:-}\" && -n \"${ETCD_PEER_CERT:-}\" ]]; then local -r auth_dir=\"/etc/srv/kubernetes\""} {"_id":"q-en-kubernetes-0cb174e0b09b2124daa4d822b63b47427072e66fb1c268e8deec64b5df144a1e","text":"\"path\" \"strings\" \"k8s.io/api/core/v1\" v1 \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/types\" utilerrors \"k8s.io/apimachinery/pkg/util/errors\" utilfeature \"k8s.io/apiserver/pkg/util/feature\""} {"_id":"q-en-kubernetes-0cb2123cd1884514f4e53169459fe8a19c2868ddbd05cf5b5c7ea8b2a4b6d920","text":"expectContinue(t, w, w.doProbe(ctx), msg) expectResult(t, w, results.Success, msg) } func TestGetPodLabelName(t *testing.T) { testCases := []struct { name string pod *v1.Pod result string }{ { name: \"Static pod\", pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-controller-manager-k8s-master-21385161-0\", }, }, result: \"kube-controller-manager-k8s-master-21385161-0\", }, { name: \"Deployment pod\", pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"coredns-845757d86-ccqpf\", GenerateName: \"coredns-845757d86-\", Labels: map[string]string{ apps.DefaultDeploymentUniqueLabelKey: \"845757d86\", }, }, }, result: \"coredns\", }, { name: \"ReplicaSet pod\", pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-proxy-2gmqn\", GenerateName: \"kube-proxy-\", }, }, result: \"kube-proxy\", }, } for _, test := range testCases { ret := getPodLabelName(test.pod) if ret != test.result { t.Errorf(\"Expected %s, got %s\", test.result, ret) } } } "} {"_id":"q-en-kubernetes-0cb4a75b0e11431bdc7eb22b5a7acb8073c63df27c61a3fdc4d824b127194287","text":"return allErrs } func validateIPVSTimeout(config kubeproxyconfig.KubeProxyIPVSConfiguration, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if config.TCPTimeout.Duration < 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child(\"TCPTimeout\"), config.TCPTimeout, \"must be greater than or equal to 0\")) } if config.TCPFinTimeout.Duration < 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child(\"TCPFinTimeout\"), config.TCPFinTimeout, \"must be greater than or equal to 0\")) } if config.UDPTimeout.Duration < 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child(\"UDPTimeout\"), config.UDPTimeout, \"must be greater than or equal to 0\")) } return allErrs } func validateIPVSExcludeCIDRs(excludeCIDRs []string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{}"} {"_id":"q-en-kubernetes-0cb7d3d532775a546f890a7704e763c6c3dbf66b22d1a382f0bcf8c474d0fed6","text":"func k8sVolumeMount() api.VolumeMount { return api.VolumeMount{ Name: \"pki\", Name: \"k8s\", MountPath: \"/etc/kubernetes/\", ReadOnly: true, }"} {"_id":"q-en-kubernetes-0cf53afab6e1a371f73fb452be09998504ce88f67a645fb7c88619dbe17126bb","text":"// ErrorNotVmssInstance indicates an instance is not belongint to any vmss. ErrorNotVmssInstance = errors.New(\"not a vmss instance\") scaleSetNameRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines(?:.*)`) resourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?:.*)/virtualMachines(?:.*)`) vmssMachineIDTemplate = \"/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s\" vmssIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces(?:.*)`) scaleSetNameRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines(?:.*)`) resourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?:.*)/virtualMachines(?:.*)`) vmssMachineIDTemplate = \"/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s\" vmssIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces(?:.*)`) vmssPIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces/(.+)/ipConfigurations/(.+)/publicIPAddresses/(.+)`) ) // scaleSet implements VMSet interface for Azure scale set."} {"_id":"q-en-kubernetes-0d64135ab0b00b4058fb4103e07c20c3bc5a9861f187b52f4de338e7a1f6d2ee","text":"// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible. func (config *DirectClientConfig) ConfirmUsable() error { validationErrors := make([]error, 0) var contextName string if len(config.contextName) != 0 { contextName = config.contextName } else { contextName = config.config.CurrentContext } if len(contextName) > 0 { _, exists := config.config.Contexts[contextName] if !exists { validationErrors = append(validationErrors, &errContextNotFound{contextName}) } } validationErrors = append(validationErrors, validateAuthInfo(config.getAuthInfoName(), config.getAuthInfo())...) validationErrors = append(validationErrors, validateClusterInfo(config.getClusterName(), config.getCluster())...) // when direct client config is specified, and our only error is that no server is defined, we should"} {"_id":"q-en-kubernetes-0d75b449290453dfd7051e96e9b1641e79b051242d5d16979b0694c5a1106bde","text":"exit 1 fi APIROOT=\"${KUBE_ROOT}/pkg/api\" TMP_APIROOT=\"${KUBE_ROOT}/_tmp/api\" DIFFROOT=\"${KUBE_ROOT}/pkg\" TMP_DIFFROOT=\"${KUBE_ROOT}/_tmp/pkg\" _tmp=\"${KUBE_ROOT}/_tmp\" mkdir -p \"${_tmp}\" cp -a \"${APIROOT}\" \"${TMP_APIROOT}\" cp -a \"${DIFFROOT}\" \"${TMP_DIFFROOT}\" \"${KUBE_ROOT}/hack/update-generated-swagger-docs.sh\" echo \"diffing ${APIROOT} against freshly generated swagger type documentation\" echo \"diffing ${DIFFROOT} against freshly generated swagger type documentation\" ret=0 diff -Naupr -I 'Auto generated by' \"${APIROOT}\" \"${TMP_APIROOT}\" || ret=$? cp -a \"${TMP_APIROOT}\" \"${KUBE_ROOT}/pkg\" diff -Naupr -I 'Auto generated by' \"${DIFFROOT}\" \"${TMP_DIFFROOT}\" || ret=$? cp -a \"${TMP_DIFFROOT}/\" \"${KUBE_ROOT}/\" rm -rf \"${_tmp}\" if [[ $ret -eq 0 ]] then echo \"${APIROOT} up to date.\" echo \"${DIFFROOT} up to date.\" else echo \"${APIROOT} is out of date. Please run hack/update-generated-swagger-docs.sh\" echo \"${DIFFROOT} is out of date. Please run hack/update-generated-swagger-docs.sh\" exit 1 fi"} {"_id":"q-en-kubernetes-0d91aaa73e9c2d41966a9abb3b6625d2c0cdc68fc1727caa047339c6e694f459","text":"\"${DOCKER[@]}\" rmi \"${release_docker_image_tag}\" 2>/dev/null || true \"${DOCKER[@]}\" tag \"${docker_image_tag}\" \"${release_docker_image_tag}\" 2>/dev/null fi else kube::log::status \"Not a release, so deleting docker image ${docker_image_tag}\" \"${DOCKER[@]}\" rmi ${docker_image_tag} 2>/dev/null || true fi kube::log::status \"Deleting docker image ${docker_image_tag}\" \"${DOCKER[@]}\" rmi ${docker_image_tag} 2>/dev/null || true ) & done"} {"_id":"q-en-kubernetes-0db40b513370e57d388c7494a635485273972f456cd6fb992474ad69c8193304","text":"defer cancel() vsi, err := vs.getVSphereInstance(nodeName) if err != nil { return false, err return false, volPath, err } // Ensure client is logged in and session is valid err = vs.nodeManager.vcConnect(ctx, vsi) if err != nil { return false, err return false, volPath, err } vm, err := vs.getVMFromNodeName(ctx, nodeName) if err != nil { if err == vclib.ErrNoVMFound { klog.Warningf(\"Node %q does not exist, vsphere CP will assume disk %v is not attached to it.\", nodeName, volPath) // make the disk as detached and return false without error. return false, nil return false, volPath, nil } klog.Errorf(\"Failed to get VM object for node: %q. err: +%v\", vSphereInstance, err) return false, err return false, volPath, err } volPath = vclib.RemoveStorageClusterORFolderNameFromVDiskPath(volPath) canonicalPath, pathFetchErr := getcanonicalVolumePath(ctx, vm.Datacenter, volPath) // if canonicalPath is not empty string and pathFetchErr is nil then we can use canonical path to perform detach if canonicalPath != \"\" && pathFetchErr == nil { volPath = canonicalPath } attached, err := vm.IsDiskAttached(ctx, volPath) if err != nil { klog.Errorf(\"DiskIsAttached failed to determine whether disk %q is still attached on node %q\","} {"_id":"q-en-kubernetes-0db8b9a9963fe172f8c526f5dbad63325026a59f82106da42a11e780e7146730","text":"// claimOwnerMatchesSetAndPod returns false if the ownerRefs of the claim are not set consistently with the // PVC deletion policy for the StatefulSet. func claimOwnerMatchesSetAndPod(claim *v1.PersistentVolumeClaim, set *apps.StatefulSet, pod *v1.Pod) bool { policy := set.Spec.PersistentVolumeClaimRetentionPolicy policy := getPersistentVolumeClaimRetentionPolicy(set) const retain = apps.RetainPersistentVolumeClaimRetentionPolicyType const delete = apps.DeletePersistentVolumeClaimRetentionPolicyType switch {"} {"_id":"q-en-kubernetes-0dd1aeb1f9045b954d321ac7cf8e31b292653024daaf39046e6fc0ad1d462bed","text":"} } else { rawMgr := mngr.(*manager) rawScope := rawMgr.scope.(*containerScope) if rawScope.policy.Name() != tc.expectedPolicy { t.Errorf(\"Unexpected policy name. Have: %q wants %q\", rawScope.policy.Name(), tc.expectedPolicy) var policyName string if rawScope, ok := rawMgr.scope.(*containerScope); ok { policyName = rawScope.policy.Name() } else if rawScope, ok := rawMgr.scope.(*noneScope); ok { policyName = rawScope.policy.Name() } if policyName != tc.expectedPolicy { t.Errorf(\"Unexpected policy name. Have: %q wants %q\", policyName, tc.expectedPolicy) } } }"} {"_id":"q-en-kubernetes-0e0ee27d3740aa5cd317375f73e37dc0e8bb8ddd5e65afe004f45a31dfbea499","text":"cidr.IP.To4()[3] += 1 json := fmt.Sprintf(NET_CONFIG_TEMPLATE, BridgeName, plugin.MTU, network.DefaultInterfaceName, podCIDR, cidr.IP.String()) glog.V(2).Infof(\"CNI network config set to %v\", json) plugin.netConfig, err = libcni.ConfFromBytes([]byte(json)) if err == nil { glog.V(5).Infof(\"CNI network config:n%s\", json)"} {"_id":"q-en-kubernetes-0e1fea483f385fcc51ddfcd134fe4d99e06504b0a77ba026d173740a02202eb3","text":"framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, webserverPod0.Name, f.Namespace.Name, framework.PodStartTimeout)) validateEndpointsPortsOrFail(cs, ns, serviceName, portsByPodName{webserverPod0.Name: {servicePort}}) validateEndpointsPortsOrFail(cs, ns, serviceName, portsByPodName{webserverPod0.Name: {endpointPort}}) ginkgo.By(\"Creating 2 pause pods that will try to connect to the webservers\") ginkgo.By(\"Creating 2 pause pods that will try to connect to the webserver\") pausePod0 := e2epod.NewAgnhostPod(ns, \"pause-pod-0\", nil, nil, nil) e2epod.SetNodeSelection(&pausePod0.Spec, e2epod.NodeSelection{Name: node0.Name})"} {"_id":"q-en-kubernetes-0e22b66c887d330bf3531be45430d4734782b5fc7925f66e2e718a152ceca17f","text":"result := make(chan T, 1) // non-blocking c.inFlight[key] = result go func() { // Make potentially slow call // Make potentially slow call. // While this call is in flight, fillOrWait will // presumably exit. data := timeCacheEntry{ item: c.fillFunc(key), lastUpdate: c.clock.Now(),"} {"_id":"q-en-kubernetes-0e4e1829efc8af46d9d3be100e8488cf6ab7addf293e8a6c4e935d3c43ed0ed1","text":"} // exampleCert was generated from crypto/tls/generate_cert.go with the following command: // go run generate_cert.go --rsa-bits 512 --host example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h // go run generate_cert.go --rsa-bits 1024 --host example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h var exampleCert = []byte(`-----BEGIN CERTIFICATE----- MIIBdzCCASGgAwIBAgIRAOVTAdPnfbS5V85mfS90TfIwDQYJKoZIhvcNAQELBQAw EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC QQCoVSqeu8TBvF+70T7Jm4340YQNhds6IxjRoifenYodAO1dnKGrcbF266DJGunh nIjQH7B12tduhl0fLK4Ezf7/AgMBAAGjUDBOMA4GA1UdDwEB/wQEAwICpDATBgNV HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MBYGA1UdEQQPMA2CC2V4 YW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA0EAk1kVa5uZ/AzwYDVcS9bpM/czwjjV xq3VeSCfmNa2uNjbFvodmCRwZOHUvipAMGCUCV6j5vMrJ8eMj8tCQ36W9A== MIIB+zCCAWSgAwIBAgIQArqTHmCaW6G843kgXgy12DANBgkqhkiG9w0BAQsFADAS MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB iQKBgQDSt6+lUEp2Fk8OcLuPz3Z9lrPSDFnfLz30RrA3DaZlVgeNVzyrOsxQuRp+ 9wgljadxVEDMY69x8NDJnC0mem7kYaIt+gyEtxAPqo7wrsqT17g9MGBQbthtpFeZ jEPrL9aqAhY9O8kFN2iWkEf8kU2+MGwsaoK/icQH+eyFQ+/VuQIDAQABo1AwTjAO BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw AwEB/zAWBgNVHREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOBgQAy fpch5gzwsQucZ1pIAj4qZ3wku3mJiXzUtjHBiTkYpwcCMvH2JxNZWTzGQKSO7eJH hbmHPOfUbr6UazRiVqJuRJ6oI1iHnTFJxELuIx/mM+YThzdZjlq9Dn8VxkZwMpOI ru5O2VXdMHW/wpK4kCy+FI+VazpHHyPUSMHFVr0Wjw== -----END CERTIFICATE-----`) var exampleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- MIIBOgIBAAJBAKhVKp67xMG8X7vRPsmbjfjRhA2F2zojGNGiJ96dih0A7V2coatx sXbroMka6eGciNAfsHXa126GXR8srgTN/v8CAwEAAQJASdzdD7vKsUwMIejGCUb1 fAnLTPfAY3lFCa+CmR89nE22dAoRDv+5RbnBsZ58BazPNJHrsVPRlfXB3OQmSQr0 SQIhANoJhs+xOJE/i8nJv0uAbzKyiD1YkvRkta0GpUOULyAVAiEAxaQus3E/SuqD P7y5NeJnE7X6XkyC35zrsJRkz7orE8MCIHdDjsI8pjyNDeGqwUCDWE/a6DrmIDwe emHSqMN2YvChAiEAnxLCM9NWaenOsaIoP+J1rDuvw+4499nJKVqGuVrSCRkCIEqK 4KSchPMc3x8M/uhw9oWTtKFmjA/PPh0FsWCdKrEy MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANK3r6VQSnYWTw5w u4/Pdn2Ws9IMWd8vPfRGsDcNpmVWB41XPKs6zFC5Gn73CCWNp3FUQMxjr3Hw0Mmc LSZ6buRhoi36DIS3EA+qjvCuypPXuD0wYFBu2G2kV5mMQ+sv1qoCFj07yQU3aJaQ R/yRTb4wbCxqgr+JxAf57IVD79W5AgMBAAECgYEAuOSGUZbnD0C586DFYwWWIdK3 TCqcPTJ1uT7BZj0q8SYQkFuol1KLbpVNA3T9B/6Imu9jwDQEAQVeHllUYLvzSggt n8C3bytUfKYNQbj0729EapygQ0Xda5ZTZYIjz312mfwdIIs8A5/taBQU5j3ku9Lg PPinOXZqiYAMNpTHswECQQDoaIXHTdzPGB9KSMc2Htg2xbRptJ5aYAYic1VXiXDO XB2XzVYiUrQ/+Bs2gyjtoJyfOWjoN1qlDdN4V7ETSnAhAkEA6Bt/GQoPjb3BE/CQ ZU6c9+VaY2RWoFemiE+rxRt78Av5F+0c5KufYpJNUktd/1NJUsiyNJHkYFnpOU7R OICSmQJBAOB3443l9DjJcZ9Lv6zUCbyNI31dB/z99a7cejb79ko5yhNOLb0k6BdI yO/TqnoowF1BE8QFgrUcL31yJQMeyEECQCJM9fJoVzYWJbNhqKUgAfhsb3giut6F NXoNdA/z6NPnoQ8VHmD4r9wsTLrtol16HGrcd+Fm8f3/K4Upjaew8HkCQEQLBYeI VR3mybfS4TQE+4jX/PrgOAXGhKjdmtPqqaqk5KAfZUwR86kFXtVFH/TwKGQAwL1T awwC4qga/9zIa6U= -----END RSA PRIVATE KEY-----`) // localhostCert was generated from crypto/tls/generate_cert.go with the following command: // go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h // go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h var localhostCert = []byte(`-----BEGIN CERTIFICATE----- MIIBjzCCATmgAwIBAgIRAKpi2WmTcFrVjxrl5n5YDUEwDQYJKoZIhvcNAQELBQAw EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC QQC9fEbRszP3t14Gr4oahV7zFObBI4TfA5i7YnlMXeLinb7MnvT4bkfOJzE6zktn 59zP7UiHs3l4YOuqrjiwM413AgMBAAGjaDBmMA4GA1UdDwEB/wQEAwICpDATBgNV HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MC4GA1UdEQQnMCWCC2V4 YW1wbGUuY29thwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUA A0EAUsVE6KMnza/ZbodLlyeMzdo7EM/5nb5ywyOxgIOCf0OOLHsPS9ueGLQX9HEG //yjTXuhNcUugExIjM/AIwAZPQ== MIICEzCCAXygAwIBAgIQZYovfgbbbhbli5vN0HAfKzANBgkqhkiG9w0BAQsFADAS MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB iQKBgQDm4Srs2LoP4+Yotx7M+itbWen7IbdHVPmIfguzzzFEzXJlc/ipeQ8uze15 gWFwBbY2Cvdy1LU3oItO8X1/75Cx/66B+tdhENExe6w5gZPqNPXhf9ei2vJ0jdEu MedteXu9AqAKJBU23H5HBlaTr2irNCBGc77K2pQt0a9DLSdMCQIDAQABo2gwZjAO BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw AwEB/zAuBgNVHREEJzAlggtleGFtcGxlLmNvbYcEfwAAAYcQAAAAAAAAAAAAAAAA AAAAATANBgkqhkiG9w0BAQsFAAOBgQDDG08vFeL8353MsLbRwqUZ6uwa+w1SnMFu +gjgJhVcPhS7n4H8J8wanAjzikomOZVfUdkz5n2PE6ShQyXeu7LAN63abvWVcfyl g7RVq3/Pryhah21lyOxVr11EjsCaEeiGO1WuzOEdIOFD9BXJEhg+HRN9gxv/HrRg fHSFpMgCwA== -----END CERTIFICATE-----`) // localhostKey is the private key for localhostCert. var localhostKey = []byte(`-----BEGIN RSA PRIVATE KEY----- MIIBOwIBAAJBAL18RtGzM/e3XgavihqFXvMU5sEjhN8DmLtieUxd4uKdvsye9Phu R84nMTrOS2fn3M/tSIezeXhg66quOLAzjXcCAwEAAQJBAKcRxH9wuglYLBdI/0OT BLzfWPZCEw1vZmMR2FF1Fm8nkNOVDPleeVGTWoOEcYYlQbpTmkGSxJ6ya+hqRi6x goECIQDx3+X49fwpL6B5qpJIJMyZBSCuMhH4B7JevhGGFENi3wIhAMiNJN5Q3UkL IuSvv03kaPR5XVQ99/UeEetUgGvBcABpAiBJSBzVITIVCGkGc7d+RCf49KTCIklv bGWObufAR8Ni4QIgWpILjW8dkGg8GOUZ0zaNA6Nvt6TIv2UWGJ4v5PoV98kCIQDx rIiZs5QbKdycsv9gQJzwQAogC8o04X3Zz3dsoX+h4A== MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAObhKuzYug/j5ii3 Hsz6K1tZ6fsht0dU+Yh+C7PPMUTNcmVz+Kl5Dy7N7XmBYXAFtjYK93LUtTegi07x fX/vkLH/roH612EQ0TF7rDmBk+o09eF/16La8nSN0S4x5215e70CoAokFTbcfkcG VpOvaKs0IEZzvsralC3Rr0MtJ0wJAgMBAAECgYBN4IG0Jl6MYZkO/sW66l+Zjrin 5vWFcBpDehDEdAzwYkRGCFpF//mpFfkWVRfiy2pszEIvT6RYwSR8WmS0tMAfRkE/ apJ7w9v7ghhIMXKuO/ohLyHi5hgPWy1L4+gje4YB+TsZftcDxEVklIplUv8eC9cU NBP49S/tKLaLg+baCQJBAOuEFAfglYZKlXZ9d8mSPAOTCEvV7e/RFDI8w8OUdcyE zSB5kx0lS3DFY5AirmpPswB1lupdxec1B9FWSE/CoU8CQQD69duGx5DM7oSCw8Wo x5KljuMxs4mbfcXEGS+oP++khEWoa5evW+m3EzrxLVHDgYG+pMdy3UROXIzmHARm 63cnAkBWSHs2L5dYLbb4RBtAo+yMuq9NaUDUnVqy1QQ7gQZvOTAVd7Tn9qPe2tIR GkOf+zbvMiVqE5TPkeQdU2kGn52NAkEAtzRyTSM1BxX8sIWAr2T6HliAbREXHOcl T7HfQ6FhLaXOQFRDSKX9qUOlnNkrvmC1udoLLERxkA8qYPYFFKlCswJBANQJf9j5 mhgfW8Z7iyQboufgSUq4UYJPpevEfLWAg6809sWHhzeg8AHOH8rap1Z97PUjeeWf XbCRvoe8v2wSoo0= -----END RSA PRIVATE KEY-----`)"} {"_id":"q-en-kubernetes-0e5a4474c58195a3b8859ef50ca44aa752bc0e238c33df258ac70f4dd45cd73e","text":"} // Fail if there are other errors. if len(errors) > 0 { return utilerrors.Flatten(utilerrors.NewAggregate(errors)) if len(allErrs) > 0 { return utilerrors.Flatten(utilerrors.NewAggregate(allErrs)) } // Ensure the backendPoolID is also deleted on VMSS itself."} {"_id":"q-en-kubernetes-0e8c4ed2343887927a45c8688462896c312c6677d6aaaaf21fa2acdbd2e67498","text":"// the cluster is restored to health. ginkgo.By(\"waiting for system pods to successfully restart\") err := e2epod.WaitForPodsRunningReady(c, metav1.NamespaceSystem, systemPodsNo, 0, framework.PodReadyBeforeTimeout, map[string]string{}) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) }) ginkgo.It(\"node lease should be deleted when corresponding node is deleted\", func() { leaseClient := c.CoordinationV1().Leases(v1.NamespaceNodeLease) err := e2enode.WaitForReadyNodes(c, framework.TestContext.CloudConfig.NumNodes, 10*time.Minute) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) ginkgo.By(\"verify node lease exists for every nodes\") originalNodes, err := e2enode.GetReadySchedulableNodes(c)"} {"_id":"q-en-kubernetes-0eb33793590f16ee7ffb6327842a883f5bc8a89dc94cb4eecb24870e18b007fa","text":"SCHEDULER_TEST_ARGS=\"${SCHEDULER_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}\" KUBEPROXY_TEST_ARGS=\"${KUBEPROXY_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}\" # Historically fluentd was a manifest pod and then was migrated to DaemonSet. # To avoid situation during cluster upgrade when there are two instances # of fluentd running on a node, kubelet need to mark node on which # fluentd is not running as a manifest pod with appropriate label. # TODO(piosz): remove this in 1.8 NODE_LABELS=\"${KUBE_NODE_LABELS:-alpha.kubernetes.io/fluentd-ds-ready=true}\" # Optional: Enable node logging. ENABLE_NODE_LOGGING=\"${KUBE_ENABLE_NODE_LOGGING:-true}\" LOGGING_DESTINATION=\"${KUBE_LOGGING_DESTINATION:-gcp}\" # options: elasticsearch, gcp"} {"_id":"q-en-kubernetes-0edb3e6dcf1709154b9a5029060dc17a89db1541663fbb056ee79d93f5e3110f","text":"return s.converter.Convert(src, dest, flags, s.meta) } // DefaultConvert continues a conversion, performing a default conversion (no conversion func) // for the current stack frame. func (s *scope) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error { return s.converter.DefaultConvert(src, dest, flags, s.meta) } // SrcTag returns the tag of the struct containing the current source item, if any. func (s *scope) SrcTag() reflect.StructTag { return s.srcStack.top().tag"} {"_id":"q-en-kubernetes-0ee0fa0252d544b835406a3956fb0b808f275127294f689d9f80d60f7b1133b9","text":" ./build/build-image/rsyncd.sh ./build/common.sh ./build/copy-output.sh ./build/lib/release.sh ./build/make-build-image.sh ./build/make-clean.sh ./build/package-tarballs.sh ./build/release-images.sh ./build/release-in-a-container.sh ./build/release.sh ./build/run.sh ./build/shell.sh ./build/util.sh ./cluster/addons/addon-manager/kube-addons.sh ./cluster/addons/fluentd-elasticsearch/es-image/run.sh ./cluster/addons/fluentd-elasticsearch/fluentd-es-image/run.sh ./cluster/centos/build.sh ./cluster/centos/config-build.sh ./cluster/centos/config-default.sh ./cluster/centos/config-test.sh ./cluster/centos/deployAddons.sh ./cluster/centos/make-ca-cert.sh ./cluster/centos/master/scripts/flannel.sh ./cluster/centos/node/bin/mk-docker-opts.sh ./cluster/centos/node/scripts/flannel.sh ./cluster/centos/util.sh ./cluster/clientbin.sh ./cluster/common.sh ./cluster/gce/config-common.sh ./cluster/gce/config-default.sh ./cluster/gce/config-test.sh ./cluster/gce/delete-stranded-load-balancers.sh ./cluster/gce/gci/configure-helper.sh ./cluster/gce/gci/configure.sh ./cluster/gce/gci/flexvolume_node_setup.sh ./cluster/gce/gci/health-monitor.sh ./cluster/gce/gci/master-helper.sh ./cluster/gce/gci/mounter/stage-upload.sh ./cluster/gce/gci/node-helper.sh ./cluster/gce/gci/shutdown.sh ./cluster/gce/list-resources.sh ./cluster/gce/upgrade-aliases.sh ./cluster/gce/upgrade.sh ./cluster/gce/util.sh ./cluster/get-kube-binaries.sh ./cluster/get-kube-local.sh ./cluster/get-kube.sh ./cluster/images/conformance/run_e2e.sh ./cluster/images/etcd-empty-dir-cleanup/etcd-empty-dir-cleanup.sh ./cluster/juju/prereqs/ubuntu-juju.sh ./cluster/juju/util.sh ./cluster/kube-down.sh ./cluster/kube-up.sh ./cluster/kube-util.sh ./cluster/kubeadm.sh ./cluster/kubectl.sh ./cluster/kubemark/gce/config-default.sh ./cluster/kubemark/iks/config-default.sh ./cluster/kubemark/util.sh ./cluster/local/util.sh ./cluster/log-dump/log-dump.sh ./cluster/pre-existing/util.sh ./cluster/restore-from-backup.sh ./cluster/test-e2e.sh ./cluster/test-network.sh ./cluster/test-smoke.sh ./cluster/update-storage-objects.sh ./cluster/validate-cluster.sh ./hack/benchmark-go.sh ./hack/build-cross.sh ./hack/build-go.sh ./hack/build-ui.sh ./hack/cherry_pick_pull.sh ./hack/dev-build-and-push.sh ./hack/dev-build-and-up.sh ./hack/dev-push-conformance.sh ./hack/dev-push-hyperkube.sh ./hack/e2e-internal/e2e-cluster-size.sh ./hack/e2e-internal/e2e-down.sh ./hack/e2e-internal/e2e-grow-cluster.sh ./hack/e2e-internal/e2e-shrink-cluster.sh ./hack/e2e-internal/e2e-status.sh ./hack/e2e-internal/e2e-up.sh ./hack/e2e-node-test.sh ./hack/generate-bindata.sh ./hack/generate-docs.sh ./hack/get-build.sh ./hack/ginkgo-e2e.sh ./hack/godep-restore.sh ./hack/godep-save.sh ./hack/grab-profiles.sh ./hack/install-etcd.sh ./hack/jenkins/benchmark-dockerized.sh ./hack/jenkins/build.sh ./hack/jenkins/test-dockerized.sh ./hack/jenkins/upload-to-gcs.sh ./hack/jenkins/verify-dockerized.sh ./hack/lib/etcd.sh ./hack/lib/golang.sh ./hack/lib/init.sh ./hack/lib/logging.sh ./hack/lib/protoc.sh ./hack/lib/swagger.sh ./hack/lib/test.sh ./hack/lib/util.sh ./hack/lib/version.sh ./hack/list-feature-tests.sh ./hack/local-up-cluster.sh ./hack/make-rules/build.sh ./hack/make-rules/clean.sh ./hack/make-rules/cross.sh ./hack/make-rules/helpers/cache_go_dirs.sh ./hack/make-rules/make-help.sh ./hack/make-rules/test-cmd.sh ./hack/make-rules/test-e2e-node.sh ./hack/make-rules/test-integration.sh ./hack/make-rules/test-kubeadm-cmd.sh ./hack/make-rules/test.sh ./hack/make-rules/update.sh ./hack/make-rules/verify.sh ./hack/make-rules/vet.sh ./hack/print-workspace-status.sh ./hack/run-in-gopath.sh ./hack/test-go.sh ./hack/test-integration.sh ./hack/test-update-storage-objects.sh ./hack/update-all.sh ./hack/update-api-reference-docs.sh ./hack/update-bazel.sh ./hack/update-codegen.sh ./hack/update-generated-device-plugin-dockerized.sh ./hack/update-generated-device-plugin.sh ./hack/update-generated-docs.sh ./hack/update-generated-kms-dockerized.sh ./hack/update-generated-kms.sh ./hack/update-generated-kubelet-plugin-registration-dockerized.sh ./hack/update-generated-kubelet-plugin-registration.sh ./hack/update-generated-pod-resources-dockerized.sh ./hack/update-generated-pod-resources.sh ./hack/update-generated-protobuf-dockerized.sh ./hack/update-generated-protobuf.sh ./hack/update-generated-runtime-dockerized.sh ./hack/update-generated-runtime.sh ./hack/update-generated-swagger-docs.sh ./hack/update-godep-licenses.sh ./hack/update-gofmt.sh ./hack/update-openapi-spec.sh ./hack/update-staging-godeps-dockerized.sh ./hack/update-staging-godeps.sh ./hack/update-swagger-spec.sh ./hack/update-translations.sh ./hack/update-workspace-mirror.sh ./hack/verify-all.sh ./hack/verify-api-groups.sh ./hack/verify-api-reference-docs.sh ./hack/verify-bazel.sh ./hack/verify-boilerplate.sh ./hack/verify-cli-conventions.sh ./hack/verify-codegen.sh ./hack/verify-description.sh ./hack/verify-generated-device-plugin.sh ./hack/verify-generated-docs.sh ./hack/verify-generated-files-remake.sh ./hack/verify-generated-files.sh ./hack/verify-generated-kms.sh ./hack/verify-generated-kubelet-plugin-registration.sh ./hack/verify-generated-pod-resources.sh ./hack/verify-generated-protobuf.sh ./hack/verify-generated-runtime.sh ./hack/verify-generated-swagger-docs.sh ./hack/verify-godep-licenses.sh ./hack/verify-godeps.sh ./hack/verify-gofmt.sh ./hack/verify-golint.sh ./hack/verify-govet.sh ./hack/verify-import-boss.sh ./hack/verify-imports.sh ./hack/verify-linkcheck.sh ./hack/verify-no-vendor-cycles.sh ./hack/verify-openapi-spec.sh ./hack/verify-pkg-names.sh ./hack/verify-readonly-packages.sh ./hack/verify-spelling.sh ./hack/verify-staging-godeps.sh ./hack/verify-staging-meta-files.sh ./hack/verify-swagger-spec.sh ./hack/verify-symbols.sh ./hack/verify-test-featuregates.sh ./hack/verify-test-images.sh ./hack/verify-test-owners.sh ./hack/verify-typecheck.sh ./pkg/kubectl/cmd/edit/testdata/record_testcase.sh ./pkg/util/verify-util-pkg.sh ./plugin/pkg/admission/imagepolicy/gencerts.sh ./staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh ./staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh ./staging/src/k8s.io/apiextensions-apiserver/hack/build-image.sh ./staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh ./staging/src/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh ./staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts/gencerts.sh ./staging/src/k8s.io/apiserver/pkg/util/webhook/gencerts.sh ./staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/testdata/gen.sh ./staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/gencerts.sh ./staging/src/k8s.io/code-generator/generate-groups.sh ./staging/src/k8s.io/code-generator/generate-internal-groups.sh ./staging/src/k8s.io/code-generator/hack/update-codegen.sh ./staging/src/k8s.io/code-generator/hack/verify-codegen.sh ./staging/src/k8s.io/csi-api/hack/update-codegen.sh ./staging/src/k8s.io/csi-api/hack/verify-codegen.sh ./staging/src/k8s.io/kube-aggregator/hack/build-image.sh ./staging/src/k8s.io/kube-aggregator/hack/local-up-kube-aggregator.sh ./staging/src/k8s.io/kube-aggregator/hack/register-all-apis-from.sh ./staging/src/k8s.io/kube-aggregator/hack/update-codegen.sh ./staging/src/k8s.io/kube-aggregator/hack/verify-codegen.sh ./staging/src/k8s.io/metrics/hack/update-codegen.sh ./staging/src/k8s.io/metrics/hack/verify-codegen.sh ./staging/src/k8s.io/node-api/hack/update-codegen.sh ./staging/src/k8s.io/node-api/hack/verify-codegen.sh ./staging/src/k8s.io/sample-apiserver/hack/build-image.sh ./staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh ./staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh ./staging/src/k8s.io/sample-controller/hack/update-codegen.sh ./staging/src/k8s.io/sample-controller/hack/verify-codegen.sh ./test/cmd/apply.sh ./test/cmd/apps.sh ./test/cmd/authorization.sh ./test/cmd/batch.sh ./test/cmd/certificate.sh ./test/cmd/core.sh ./test/cmd/crd.sh ./test/cmd/create.sh ./test/cmd/diff.sh ./test/cmd/discovery.sh ./test/cmd/generic-resources.sh ./test/cmd/get.sh ./test/cmd/initializers.sh ./test/cmd/legacy-script.sh ./test/cmd/node-management.sh ./test/cmd/old-print.sh ./test/cmd/proxy.sh ./test/cmd/rbac.sh ./test/cmd/request-timeout.sh ./test/cmd/run.sh ./test/cmd/save-config.sh ./test/cmd/storage.sh ./test/cmd/template-output.sh ./test/cmd/version.sh ./test/e2e_node/conformance/run_test.sh ./test/e2e_node/environment/setup_host.sh ./test/e2e_node/gubernator.sh ./test/e2e_node/jenkins/conformance/conformance-jenkins.sh ./test/e2e_node/jenkins/copy-e2e-image.sh ./test/e2e_node/jenkins/e2e-node-jenkins.sh ./test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh ./test/images/image-util.sh ./test/images/pets/redis-installer/on-start.sh ./test/images/pets/zookeeper-installer/install.sh ./test/images/pets/zookeeper-installer/on-start.sh ./test/images/volume/gluster/run_gluster.sh ./test/images/volume/iscsi/create_block.sh ./test/images/volume/nfs/run_nfs.sh ./test/images/volume/rbd/bootstrap.sh ./test/images/volume/rbd/create_block.sh ./test/images/volume/rbd/mon.sh ./test/images/volume/rbd/osd.sh ./test/integration/ipamperf/test-performance.sh ./test/integration/scheduler_perf/test-performance.sh ./test/kubemark/common/util.sh ./test/kubemark/configure-kubectl.sh ./test/kubemark/gce/util.sh ./test/kubemark/iks/shutdown.sh ./test/kubemark/iks/startup.sh ./test/kubemark/iks/util.sh ./test/kubemark/master-log-dump.sh ./test/kubemark/pre-existing/util.sh ./test/kubemark/resources/start-kubemark-master.sh ./test/kubemark/run-e2e-tests.sh ./test/kubemark/start-kubemark.sh ./test/kubemark/stop-kubemark.sh ./third_party/forked/shell2junit/sh2ju.sh ./third_party/intemp/intemp.sh ./third_party/multiarch/qemu-user-static/register/qemu-binfmt-conf.sh ./third_party/multiarch/qemu-user-static/register/register.sh "} {"_id":"q-en-kubernetes-0ee1b9f701fba62bd62aad7b806f4f58c6a19c524d3f76384ca90ef4ff0adeb9","text":"} func (c *defaultAuthenticationInfoResolver) ClientConfigFor(server string) (*rest.Config, error) { return c.clientConfig(server) } func (c *defaultAuthenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) { return c.clientConfig(serviceName + \".\" + serviceNamespace + \".svc\") } func (c *defaultAuthenticationInfoResolver) clientConfig(target string) (*rest.Config, error) { // exact match if authConfig, ok := c.kubeconfig.AuthInfos[server]; ok { if authConfig, ok := c.kubeconfig.AuthInfos[target]; ok { return restConfigFromKubeconfig(authConfig) } // star prefixed match serverSteps := strings.Split(server, \".\") serverSteps := strings.Split(target, \".\") for i := 1; i < len(serverSteps); i++ { nickName := \"*.\" + strings.Join(serverSteps[i:], \".\") if authConfig, ok := c.kubeconfig.AuthInfos[nickName]; ok {"} {"_id":"q-en-kubernetes-0f1e3403e35e8fa545cda0b153f1dd2c25c9d1ce66305d9e58aafea6c90d4b5f","text":"utilpointer \"k8s.io/utils/pointer\" \"github.com/onsi/ginkgo/v2\" \"github.com/onsi/gomega\" imageutils \"k8s.io/kubernetes/test/utils/image\" )"} {"_id":"q-en-kubernetes-0f3dc5e6f38ff6334211019f6e75716bab58a113bc4f2fa35c566ea0c270297f","text":"} waitSTSStable(t, c, sts) } var _ admission.ValidationInterface = &fakePodFailAdmission{} type fakePodFailAdmission struct { limitedPodNumber int succeedPodsCount int } func (f *fakePodFailAdmission) Handles(operation admission.Operation) bool { return operation == admission.Create } func (f *fakePodFailAdmission) Validate(ctx context.Context, attr admission.Attributes, o admission.ObjectInterfaces) (err error) { if attr.GetKind().GroupKind() != api.Kind(\"Pod\") { return nil } if f.succeedPodsCount >= f.limitedPodNumber { return fmt.Errorf(\"fakePodFailAdmission error\") } f.succeedPodsCount++ return nil } "} {"_id":"q-en-kubernetes-0f8ac6c6ad189a4e71a5effc72a78d6681f7463d280e2e45d5b58e1aee6aee39","text":"return stringOrDefaultValue(strings.Join(volumes, \",\"), \"\") } func sysctlsToString(sysctls []string) string { return stringOrNone(strings.Join(sysctls, \",\")) } func hostPortRangeToString(ranges []policy.HostPortRange) string { formattedString := \"\" if ranges != nil {"} {"_id":"q-en-kubernetes-0fb987d86186121faa0e23db0fe744567a9963c5cf0beb0f724137e8c09ac012","text":"if err != nil { return nil, err } volumePath = strings.Replace(volumePath, \"040\", \" \", -1) glog.V(5).Infof(\"vSphere volume path is %q\", volumePath) vsphereVolume := &v1.Volume{ Name: volumeName,"} {"_id":"q-en-kubernetes-0fc85c246ff6a6e9eb42b87b795776235afea8df637aa2ce6479a7ac408a3090","text":"import ( \"context\" \"encoding/json\" \"fmt\" \"strconv\" \"time\""} {"_id":"q-en-kubernetes-0fea181f6260b7fe537170aff5b21e560ad57282d8c5165169fe965e578344db","text":"} // validateCSINodeDriver tests if CSINodeDriver has valid entries func validateCSINodeDriver(driver storage.CSINodeDriver, driverNamesInSpecs sets.String, fldPath *field.Path, func validateCSINodeDriver(driver storage.CSINodeDriver, driverNamesInSpecs sets.Set[string], fldPath *field.Path, validationOpts CSINodeValidationOptions) field.ErrorList { allErrs := field.ErrorList{}"} {"_id":"q-en-kubernetes-10187efb51f6155c79cf38dfde0508802a82ace79d84abdf2e03a0ea2848accb","text":"return nil, nil, nil, err } leaderElectionClient, err := clientset.NewForConfig(restclient.AddUserAgent(kubeConfig, \"leader-election\")) // shallow copy, do not modify the kubeConfig.Timeout. restConfig := *kubeConfig restConfig.Timeout = timeout leaderElectionClient, err := clientset.NewForConfig(restclient.AddUserAgent(&restConfig, \"leader-election\")) if err != nil { return nil, nil, nil, err }"} {"_id":"q-en-kubernetes-104ad197bf735db95d76b4e9163b3ba6d65fa4c2e264e4b237c1add4979cf977","text":"fieldPath: metadata.namespace # END_PROMETHEUS_TO_SD nodeSelector: # TODO(liggitt): switch to cloud.google.com/metadata-proxy-ready=true in v1.16 beta.kubernetes.io/metadata-proxy-ready: \"true\" cloud.google.com/metadata-proxy-ready: \"true\" beta.kubernetes.io/os: linux terminationGracePeriodSeconds: 30"} {"_id":"q-en-kubernetes-105f5b742976b63369331fb97c69c060e0115aa70674bd42603555ef4ead905f","text":"Logf(\"Getting external IP address for %s\", node.Name) host := \"\" for _, a := range node.Status.Addresses { if a.Type == v1.NodeExternalIP { if a.Type == v1.NodeExternalIP && a.Address != \"\" { host = net.JoinHostPort(a.Address, sshPort) break }"} {"_id":"q-en-kubernetes-106f397c7d6060fb74318da6c04a7b47c3317049601c7174116a3273b58295fa","text":"// GCECloud is an implementation of Interface, LoadBalancer and Instances for Google Compute Engine. type GCECloud struct { service *compute.Service containerService *container.Service projectID string region string localZone string // The zone in which we are running managedZones []string // List of zones we are spanning (for Ubernetes-Lite, primarily when running on master) networkURL string nodeTags []string // List of tags to use on firewall rules for load balancers useMetadataServer bool operationPollRateLimiter flowcontrol.RateLimiter service *compute.Service containerService *container.Service projectID string region string localZone string // The zone in which we are running managedZones []string // List of zones we are spanning (for Ubernetes-Lite, primarily when running on master) networkURL string nodeTags []string // List of tags to use on firewall rules for load balancers useMetadataServer bool } type Config struct {"} {"_id":"q-en-kubernetes-109f66fad3e761a2c8e6fa7b819a5941619b0ac0e532c8c7da0fc2536c201e49","text":"ConsumeMemAddress = \"/ConsumeMem\" BumpMetricAddress = \"/BumpMetric\" GetCurrentStatusAddress = \"/GetCurrentStatus\" MetricsAddress = \"/Metrics\" MetricsAddress = \"/metrics\" MillicoresQuery = \"millicores\" MegabytesQuery = \"megabytes\""} {"_id":"q-en-kubernetes-10abaf67cb7c330032311b8f35245826c7cec33eea327aee85a271caf60b5a55","text":" /* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cmd import ( \"fmt\" \"io\" \"sort\" \"strings\" \"github.com/spf13/cobra\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/kubernetes/pkg/kubectl/cmd/templates\" cmdutil \"k8s.io/kubernetes/pkg/kubectl/cmd/util\" \"k8s.io/kubernetes/pkg/printers\" ) var ( apiresources_example = templates.Examples(` # Print the supported API Resources kubectl api-resources # Print the supported API Resources with more information kubectl api-resources -o wide # Print the supported namespaced resources kubectl api-resources --namespaced=true # Print the supported non-namespaced resources kubectl api-resources --namespaced=false # Print the supported API Resources with specific APIGroup kubectl api-resources --api-group=extensions`) ) // ApiResourcesOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of // referencing the cmd.Flags() type ApiResourcesOptions struct { out io.Writer Output string APIGroup string Namespaced bool NoHeaders bool } // groupResource contains the APIGroup and APIResource type groupResource struct { APIGroup string APIResource metav1.APIResource } func NewCmdApiResources(f cmdutil.Factory, out io.Writer) *cobra.Command { options := &ApiResourcesOptions{ out: out, } cmd := &cobra.Command{ Use: \"api-resources\", Short: \"Print the supported API resources on the server\", Long: \"Print the supported API resources on the server\", Example: apiresources_example, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(options.Complete(cmd)) cmdutil.CheckErr(options.Validate(cmd)) cmdutil.CheckErr(options.RunApiResources(cmd, f)) }, } cmdutil.AddOutputFlags(cmd) cmdutil.AddNoHeadersFlags(cmd) cmd.Flags().StringVar(&options.APIGroup, \"api-group\", \"\", \"The API group to use when talking to the server.\") cmd.Flags().BoolVar(&options.Namespaced, \"namespaced\", true, \"Namespaced indicates if a resource is namespaced or not.\") return cmd } func (o *ApiResourcesOptions) Complete(cmd *cobra.Command) error { o.Output = cmdutil.GetFlagString(cmd, \"output\") o.NoHeaders = cmdutil.GetFlagBool(cmd, \"no-headers\") return nil } func (o *ApiResourcesOptions) Validate(cmd *cobra.Command) error { validOutputTypes := sets.NewString(\"\", \"json\", \"yaml\", \"wide\", \"name\", \"custom-columns\", \"custom-columns-file\", \"go-template\", \"go-template-file\", \"jsonpath\", \"jsonpath-file\") supportedOutputTypes := sets.NewString(\"\", \"wide\") outputFormat := cmdutil.GetFlagString(cmd, \"output\") if !validOutputTypes.Has(outputFormat) { return fmt.Errorf(\"output must be one of '' or 'wide': %v\", outputFormat) } if !supportedOutputTypes.Has(outputFormat) { return fmt.Errorf(\"--output %v is not available in kubectl api-resources\", outputFormat) } return nil } func (o *ApiResourcesOptions) RunApiResources(cmd *cobra.Command, f cmdutil.Factory) error { w := printers.GetNewTabWriter(o.out) defer w.Flush() discoveryclient, err := f.DiscoveryClient() if err != nil { return err } // Always request fresh data from the server discoveryclient.Invalidate() lists, err := discoveryclient.ServerPreferredResources() if err != nil { return err } resources := []groupResource{} groupChanged := cmd.Flags().Changed(\"api-group\") nsChanged := cmd.Flags().Changed(\"namespaced\") for _, list := range lists { if len(list.APIResources) == 0 { continue } gv, err := schema.ParseGroupVersion(list.GroupVersion) if err != nil { continue } for _, resource := range list.APIResources { if len(resource.Verbs) == 0 { continue } // filter apiGroup if groupChanged && o.APIGroup != gv.Group { continue } // filter namespaced if nsChanged && o.Namespaced != resource.Namespaced { continue } resources = append(resources, groupResource{ APIGroup: gv.Group, APIResource: resource, }) } } if o.NoHeaders == false { if err = printContextHeaders(w, o.Output); err != nil { return err } } sort.Stable(sortableGroupResource(resources)) for _, r := range resources { if o.Output == \"wide\" { if _, err := fmt.Fprintf(w, \"%st%st%st%vt%st%vn\", r.APIResource.Name, strings.Join(r.APIResource.ShortNames, \",\"), r.APIGroup, r.APIResource.Namespaced, r.APIResource.Kind, r.APIResource.Verbs); err != nil { return err } } else { if _, err := fmt.Fprintf(w, \"%st%st%st%vt%sn\", r.APIResource.Name, strings.Join(r.APIResource.ShortNames, \",\"), r.APIGroup, r.APIResource.Namespaced, r.APIResource.Kind); err != nil { return err } } } return nil } func printContextHeaders(out io.Writer, output string) error { columnNames := []string{\"NAME\", \"SHORTNAMES\", \"APIGROUP\", \"NAMESPACED\", \"KIND\"} if output == \"wide\" { columnNames = append(columnNames, \"VERBS\") } _, err := fmt.Fprintf(out, \"%sn\", strings.Join(columnNames, \"t\")) return err } type sortableGroupResource []groupResource func (s sortableGroupResource) Len() int { return len(s) } func (s sortableGroupResource) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s sortableGroupResource) Less(i, j int) bool { ret := strings.Compare(s[i].APIGroup, s[j].APIGroup) if ret > 0 { return false } else if ret == 0 { return strings.Compare(s[i].APIResource.Name, s[j].APIResource.Name) < 0 } return true } "} {"_id":"q-en-kubernetes-10d365c208452025a8f46777893f83dec640340c6d47a893cdec65b77c121550","text":"// have a place they can schedule. testRootDir = makeTempDirOrDie(\"kubelet_integ_2.\", \"\") glog.Infof(\"Using %s as root dir for kubelet #2\", testRootDir) kcfg = kubeletapp.SimpleKubelet(cl, &fakeDocker2, machineList[1], testRootDir, \"\", \"127.0.0.1\", 10251, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, \"\") kcfg = kubeletapp.SimpleKubelet(cl, &fakeDocker2, machineList[1], testRootDir, secondManifestURL, \"127.0.0.1\", 10251, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, \"\") kcfg.PodStatusUpdateFrequency = 1 * time.Second kubeletapp.RunKubelet(kcfg) return apiServer.URL, configFilePath"} {"_id":"q-en-kubernetes-10f033261a772529f226fae74f3d221671b9839ee7a71e22778960ca5b6b7121","text":"kind: Pod metadata: name: b namespace: nsb labels: prune-group: \"true\" spec:"} {"_id":"q-en-kubernetes-113aeead39e8af4504fecb1c2529c94203bfbe9d643650eedefa712e4e83d1f5","text":"return nil, cleanupAction, fmt.Errorf(\"volume subpaths are disabled\") } if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion) { return nil, cleanupAction, fmt.Errorf(\"volume subpath expansion is disabled\") } subPath, err = kubecontainer.ExpandContainerVolumeMounts(mount, expandEnvs) if err != nil {"} {"_id":"q-en-kubernetes-11418ab700b0e88cf5bcf7563597032e7bd44b4ec5881c6b5a3dc2b33abe94c4","text":"func CheckAffinity(execPod *v1.Pod, serviceIP string, servicePort int, shouldHold bool) bool { serviceIPPort := net.JoinHostPort(serviceIP, strconv.Itoa(servicePort)) cmd := fmt.Sprintf(`curl -q -s --connect-timeout 2 http://%s/`, serviceIPPort) timeout := TestTimeout timeout := AffinityTimeout if execPod == nil { timeout = LoadBalancerPollTimeout }"} {"_id":"q-en-kubernetes-1164aec3e1c35848a8f471a980369a40628f3a3744ba906a5426f3c88f297fc6","text":"return json.Marshal(doc) } // CreateMergePatch creates a merge patch as specified in http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 // // 'a' is original, 'b' is the modified document. Both are to be given as json encoded content. // The function will return a mergeable json document with differences from a to b. // // An error will be returned if any of the two documents are invalid. func CreateMergePatch(a, b []byte) ([]byte, error) { aI := map[string]interface{}{} bI := map[string]interface{}{} err := json.Unmarshal(a, &aI) // resemblesJSONArray indicates whether the byte-slice \"appears\" to be // a JSON array or not. // False-positives are possible, as this function does not check the internal // structure of the array. It only checks that the outer syntax is present and // correct. func resemblesJSONArray(input []byte) bool { input = bytes.TrimSpace(input) hasPrefix := bytes.HasPrefix(input, []byte(\"[\")) hasSuffix := bytes.HasSuffix(input, []byte(\"]\")) return hasPrefix && hasSuffix } // CreateMergePatch will return a merge patch document capable of converting // the original document(s) to the modified document(s). // The parameters can be bytes of either two JSON Documents, or two arrays of // JSON documents. // The merge patch returned follows the specification defined at http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 func CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { originalResemblesArray := resemblesJSONArray(originalJSON) modifiedResemblesArray := resemblesJSONArray(modifiedJSON) // Do both byte-slices seem like JSON arrays? if originalResemblesArray && modifiedResemblesArray { return createArrayMergePatch(originalJSON, modifiedJSON) } // Are both byte-slices are not arrays? Then they are likely JSON objects... if !originalResemblesArray && !modifiedResemblesArray { return createObjectMergePatch(originalJSON, modifiedJSON) } // None of the above? Then return an error because of mismatched types. return nil, errBadMergeTypes } // createObjectMergePatch will return a merge-patch document capable of // converting the original document to the modified document. func createObjectMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { originalDoc := map[string]interface{}{} modifiedDoc := map[string]interface{}{} err := json.Unmarshal(originalJSON, &originalDoc) if err != nil { return nil, errBadJSONDoc } err = json.Unmarshal(b, &bI) err = json.Unmarshal(modifiedJSON, &modifiedDoc) if err != nil { return nil, errBadJSONDoc } dest, err := getDiff(aI, bI) dest, err := getDiff(originalDoc, modifiedDoc) if err != nil { return nil, err } return json.Marshal(dest) } // createArrayMergePatch will return an array of merge-patch documents capable // of converting the original document to the modified document for each // pair of JSON documents provided in the arrays. // Arrays of mismatched sizes will result in an error. func createArrayMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { originalDocs := []json.RawMessage{} modifiedDocs := []json.RawMessage{} err := json.Unmarshal(originalJSON, &originalDocs) if err != nil { return nil, errBadJSONDoc } err = json.Unmarshal(modifiedJSON, &modifiedDocs) if err != nil { return nil, errBadJSONDoc } total := len(originalDocs) if len(modifiedDocs) != total { return nil, errBadJSONDoc } result := []json.RawMessage{} for i := 0; i < len(originalDocs); i++ { original := originalDocs[i] modified := modifiedDocs[i] patch, err := createObjectMergePatch(original, modified) if err != nil { return nil, err } result = append(result, json.RawMessage(patch)) } return json.Marshal(result) } // Returns true if the array matches (must be json types). // As is idiomatic for go, an empty array is not the same as a nil array. func matchesArray(a, b []interface{}) bool {"} {"_id":"q-en-kubernetes-1177e9826c6c9069e28f549a8ef25809476c85dfc767bd0a36fb48bd3648af96","text":"} type Zones interface { // List returns the managed Zones, or an error if the list operation failed. // List returns the (possibly empty) list of managed Zones, or an error if the list operation failed. List() ([]Zone, error) // Add creates and returns a new managed zone, or an error if the operation failed Add(Zone) (Zone, error)"} {"_id":"q-en-kubernetes-11a83aa1e5d8f1260a04c38d4fe0063dcfd2ac28dfd855a0edc20be7e938fb82","text":"\"net/http/httptest\" \"os\" \"reflect\" \"strconv\" \"strings\" \"sync\" \"testing\""} {"_id":"q-en-kubernetes-11cd9e1833e3221ff458f4a96dea12982572262cbf5339ddc7779ed15160a934","text":" // +build cgo,linux // +build linux /* Copyright 2015 The Kubernetes Authors."} {"_id":"q-en-kubernetes-11eddce6fd2f02cab044be77bfdbb2b592b786dd676f9b4ccaf5b143b7dc4e77","text":"}, { \"ImportPath\": \"github.com/evanphx/json-patch\", \"Rev\": \"ed7cfbae1fffc071f71e068df27bf4f0521402d8\" \"Rev\": \"94e38aa1586e8a6c8a75770bddf5ff84c48a106b\" }, { \"ImportPath\": \"github.com/ghodss/yaml\","} {"_id":"q-en-kubernetes-11ff3993a3e4a332754968c4fc0424287ee890091a3f94641701da10f31b45ea","text":"if cleanupInfo != nil { // we don't perform the clean up just yet at that could destroy information // needed for the container to start (e.g. Windows credentials stored in // registry keys); instead, we'll clean up after the container successfully // starts or gets removed // registry keys); instead, we'll clean up when the container gets removed ds.containerCleanupInfos[containerID] = cleanupInfo } return &runtimeapi.CreateContainerResponse{ContainerId: containerID}, nil } // the creation failed, let's clean up right away // the creation failed, let's clean up right away - we ignore any errors though, // this is best effort ds.performPlatformSpecificContainerCleanupAndLogErrors(containerName, cleanupInfo) return nil, createErr"} {"_id":"q-en-kubernetes-122f3a456d031012e73f8f653f5f4942a6e68ef89472e98845e2953eb1ee494b","text":"// 1. Add a volume to DSW and wait until it's mounted volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]} // copy before reconciler runs to avoid data race. volumeSpecCopy := &volume.Spec{Volume: &pod.Spec.Volumes[0]} podName := util.GetUniquePodName(pod) generatedVolumeName, err := dsw.AddPodToVolume( podName, pod, volumeSpec, volumeSpec.Name(), \"\" /* volumeGidValue */)"} {"_id":"q-en-kubernetes-122f7e43074f9549496e5cadcd5a57fdff10b887a6fe1d9fd73966fd11f33bce","text":"func (f *Framework) BeforeEach() { f.beforeEachStarted = true // The fact that we need this feels like a bug in ginkgo. // https://github.com/onsi/ginkgo/v2/issues/222 f.cleanupHandle = AddCleanupAction(f.AfterEach) if f.ClientSet == nil { ginkgo.By(\"Creating a kubernetes client\") config, err := LoadConfig()"} {"_id":"q-en-kubernetes-1298e6eba39cee5750bb216fb06030dca2ab935a6e66bcf00a767193d85f5231","text":"for n, pods := range nodeToDaemonPods { if !isNodeRunning[n] { for _, pod := range pods { results = append(results, pod.Name) if len(pod.Spec.NodeName) == 0 { results = append(results, pod.Name) } } } }"} {"_id":"q-en-kubernetes-12b950a98e4e777957e7251e5866d0712d89a02691520b19b4d3f443a74e3f43","text":" // +build linux /* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package e2enode import ( \"time\" \"golang.org/x/sys/unix\" \"github.com/onsi/ginkgo\" \"github.com/onsi/gomega\" \"k8s.io/kubernetes/test/e2e/framework\" ) const contentionLockFile = \"/var/run/kubelet.lock\" var _ = SIGDescribe(\"Lock contention [Slow] [Disruptive] [NodeFeature:LockContention]\", func() { ginkgo.It(\"Kubelet should stop when the test acquires the lock on lock file and restart once the lock is released\", func() { ginkgo.By(\"perform kubelet health check to check if kubelet is healthy and running.\") // Precautionary check that kubelet is healthy before running the test. gomega.Expect(kubeletHealthCheck(kubeletHealthCheckURL)).To(gomega.BeTrue()) ginkgo.By(\"acquiring the lock on lock file i.e /var/run/kubelet.lock\") // Open the file with the intention to acquire the lock, this would imitate the behaviour // of the another kubelet(self-hosted) trying to start. When this lock contention happens // it is expected that the running kubelet must terminate and wait until the lock on the // lock file is released. // Kubelet uses the same approach to acquire the lock on lock file as shown here: // https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/server.go#L530-#L546 // and the function definition of Acquire is here: // https://github.com/kubernetes/kubernetes/blob/master/pkg/util/flock/flock_unix.go#L25 fd, err := unix.Open(contentionLockFile, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0600) framework.ExpectNoError(err) // Defer the lock release in case test fails and we don't reach the step of the release // lock. This ensures that we release the lock for sure. defer func() { err = unix.Flock(fd, unix.LOCK_UN) framework.ExpectNoError(err) }() // Acquire lock. err = unix.Flock(fd, unix.LOCK_EX) framework.ExpectNoError(err) ginkgo.By(\"verifying the kubelet is not healthy as there was a lock contention.\") // Once the lock is acquired, check if the kubelet is in healthy state or not. // It should not be. gomega.Eventually(func() bool { return kubeletHealthCheck(kubeletHealthCheckURL) }, 10*time.Second, time.Second).Should(gomega.BeFalse()) ginkgo.By(\"releasing the lock on lock file i.e /var/run/kubelet.lock\") // Release the lock. err = unix.Flock(fd, unix.LOCK_UN) framework.ExpectNoError(err) ginkgo.By(\"verifying the kubelet is healthy again after the lock was released.\") // Releasing the lock triggers kubelet to re-acquire the lock and restart. // Hence the kubelet should report healthy state. gomega.Eventually(func() bool { return kubeletHealthCheck(kubeletHealthCheckURL) }, 10*time.Second, time.Second).Should(gomega.BeTrue()) }) }) "} {"_id":"q-en-kubernetes-12d6b3a159aea8eee5a9683154182fec6523a0a9f7eb98bda08221c6a26c638a","text":"\"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library\", \"//staging/src/k8s.io/client-go/dynamic:go_default_library\", \"//test/integration/framework:go_default_library\", \"//vendor/github.com/coreos/etcd/clientv3:go_default_library\","} {"_id":"q-en-kubernetes-13262b63f105cecc57709e4f388363bf13ef887663e116026e6ba258ba4d6c48","text":"if err != nil { t.Fatal(err) } ss1Rev1.Namespace = ss1.Namespace ss1Rev2, err := NewControllerRevision(ss1, parentKind, ss1.Spec.Template.Labels, rawTemplate(&ss1.Spec.Template), 2, ss1.Status.CollisionCount) if err != nil { t.Fatal(err) } ss1Rev2.Namespace = ss1.Namespace ss1Rev3, err := NewControllerRevision(ss1, parentKind, ss1.Spec.Template.Labels, rawTemplate(&ss1.Spec.Template), 3, ss1.Status.CollisionCount) if err != nil { t.Fatal(err) } ss1Rev3.Namespace = ss1.Namespace ss1Rev3Time2, err := NewControllerRevision(ss1, parentKind, ss1.Spec.Template.Labels, rawTemplate(&ss1.Spec.Template), 3, ss1.Status.CollisionCount) if err != nil { t.Fatal(err) } ss1Rev3Time2.Namespace = ss1.Namespace ss1Rev3Time2.CreationTimestamp = metav1.Time{Time: ss1Rev3.CreationTimestamp.Add(time.Second)} ss1Rev3Time2Name2, err := NewControllerRevision(ss1, parentKind, ss1.Spec.Template.Labels, rawTemplate(&ss1.Spec.Template), 3, ss1.Status.CollisionCount) if err != nil { t.Fatal(err) } ss1Rev3Time2Name2.Namespace = ss1.Namespace ss1Rev3Time2Name2.CreationTimestamp = metav1.Time{Time: ss1Rev3.CreationTimestamp.Add(time.Second)} tests := []testcase{ {"} {"_id":"q-en-kubernetes-1340f62342e0311a88dd481dd63ad49a82761b8b3b77022c3fa4db1c26897fff","text":"} framework.ExpectEqual(successes, largeCompletions, \"expected %d successful job pods, but got %d\", largeCompletions, successes) }) ginkgo.It(\"should apply changes to a job status\", func() { ns := f.Namespace.Name jClient := f.ClientSet.BatchV1().Jobs(ns) ginkgo.By(\"Creating a job\") job := e2ejob.NewTestJob(\"notTerminate\", \"suspend-false-to-true\", v1.RestartPolicyNever, parallelism, completions, nil, backoffLimit) job, err := e2ejob.CreateJob(f.ClientSet, f.Namespace.Name, job) framework.ExpectNoError(err, \"failed to create job in namespace: %s\", f.Namespace.Name) ginkgo.By(\"Ensure pods equal to paralellism count is attached to the job\") err = e2ejob.WaitForAllJobPodsRunning(f.ClientSet, f.Namespace.Name, job.Name, parallelism) framework.ExpectNoError(err, \"failed to ensure number of pods associated with job %s is equal to parallelism count in namespace: %s\", job.Name, f.Namespace.Name) // /status subresource operations ginkgo.By(\"patching /status\") // we need to use RFC3339 version since conversion over the wire cuts nanoseconds now1 := metav1.Now().Rfc3339Copy() jStatus := batchv1.JobStatus{ StartTime: &now1, } jStatusJSON, err := json.Marshal(jStatus) framework.ExpectNoError(err) patchedStatus, err := jClient.Patch(context.TODO(), job.Name, types.MergePatchType, []byte(`{\"metadata\":{\"annotations\":{\"patchedstatus\":\"true\"}},\"status\":`+string(jStatusJSON)+`}`), metav1.PatchOptions{}, \"status\") framework.ExpectNoError(err) framework.ExpectEqual(patchedStatus.Status.StartTime.Equal(&now1), true, \"patched object should have the applied StartTime status\") framework.ExpectEqual(patchedStatus.Annotations[\"patchedstatus\"], \"true\", \"patched object should have the applied annotation\") ginkgo.By(\"updating /status\") // we need to use RFC3339 version since conversion over the wire cuts nanoseconds now2 := metav1.Now().Rfc3339Copy() var statusToUpdate, updatedStatus *batchv1.Job err = retry.RetryOnConflict(retry.DefaultRetry, func() error { statusToUpdate, err = jClient.Get(context.TODO(), job.Name, metav1.GetOptions{}) if err != nil { return err } statusToUpdate.Status.StartTime = &now2 updatedStatus, err = jClient.UpdateStatus(context.TODO(), statusToUpdate, metav1.UpdateOptions{}) return err }) framework.ExpectNoError(err) framework.ExpectEqual(updatedStatus.Status.StartTime.Equal(&now2), true, fmt.Sprintf(\"updated object status expected to have updated StartTime %#v, got %#v\", statusToUpdate.Status.StartTime, updatedStatus.Status.StartTime)) ginkgo.By(\"get /status\") jResource := schema.GroupVersionResource{Group: \"batch\", Version: \"v1\", Resource: \"jobs\"} gottenStatus, err := f.DynamicClient.Resource(jResource).Namespace(ns).Get(context.TODO(), job.Name, metav1.GetOptions{}, \"status\") framework.ExpectNoError(err) statusUID, _, err := unstructured.NestedFieldCopy(gottenStatus.Object, \"metadata\", \"uid\") framework.ExpectNoError(err) framework.ExpectEqual(string(job.UID), statusUID, fmt.Sprintf(\"job.UID: %v expected to match statusUID: %v \", job.UID, statusUID)) }) }) // waitForJobFailure uses c to wait for up to timeout for the Job named jobName in namespace ns to fail."} {"_id":"q-en-kubernetes-13985989fa01b84b01950a7af482c10d3dac2d6fd981d7263434ac78b0ce5f58","text":"publicIP := \"\" if ipConfig.PublicIPAddress != nil && ipConfig.PublicIPAddress.ID != nil { pipID := *ipConfig.PublicIPAddress.ID pipName, err := getLastSegment(pipID) if err != nil { return \"\", \"\", fmt.Errorf(\"failed to get publicIP name for node %q with pipID %q\", nodeName, pipID) matches := vmssPIPConfigurationRE.FindStringSubmatch(pipID) if len(matches) == 7 { resourceGroupName := matches[1] virtualMachineScaleSetName := matches[2] virtualmachineIndex := matches[3] networkInterfaceName := matches[4] IPConfigurationName := matches[5] publicIPAddressName := matches[6] pip, existsPip, err := ss.getVMSSPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName) if err != nil { klog.Errorf(\"ss.getVMSSPublicIPAddress() failed with error: %v\", err) return \"\", \"\", err } if existsPip && pip.IPAddress != nil { publicIP = *pip.IPAddress } } else { klog.Warningf(\"Failed to get VMSS Public IP with ID %s\", pipID) } } resourceGroup, err := ss.GetNodeResourceGroup(nodeName) if err != nil { return \"\", \"\", err } return internalIP, publicIP, nil } pip, existsPip, err := ss.getPublicIPAddress(resourceGroup, pipName) if err != nil { return \"\", \"\", err } if existsPip { publicIP = *pip.IPAddress } func (ss *scaleSet) getVMSSPublicIPAddress(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string) (pip network.PublicIPAddress, exists bool, err error) { var realErr error var message string ctx, cancel := getContextWithCancel() defer cancel() pip, err = ss.PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, \"\") exists, message, realErr = checkResourceExistsFromError(err) if realErr != nil { return pip, false, realErr } return internalIP, publicIP, nil if !exists { klog.V(2).Infof(\"Public IP %q not found with message: %q\", publicIPAddressName, message) return pip, false, nil } return pip, exists, err } // returns a list of private ips assigned to node"} {"_id":"q-en-kubernetes-13a8369d752d7971f28e19cabf90e848d340a7d88ea3e5354decc1888631ab30","text":"return g.service } type rateLimitedRoundTripper struct { rt http.RoundTripper limiter flowcontrol.RateLimiter } func (rl *rateLimitedRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { rl.limiter.Accept() return rl.rt.RoundTrip(req) } func getProjectAndZone() (string, string, error) { result, err := metadata.Get(\"instance/zone\") if err != nil {"} {"_id":"q-en-kubernetes-13cb3089998420c019d6232f14ee687d776c016c8b9d35a9031a6531b9228e82","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package service import \"context\" /* Copied from: k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2 */ // Service allows encrypting and decrypting data using an external Key Management Service. type Service interface { // Decrypt a given bytearray to obtain the original data as bytes. Decrypt(ctx context.Context, uid string, req *DecryptRequest) ([]byte, error) // Encrypt bytes to a ciphertext. Encrypt(ctx context.Context, uid string, data []byte) (*EncryptResponse, error) // Status returns the status of the KMS. Status(ctx context.Context) (*StatusResponse, error) } // EncryptResponse is the response from the Envelope service when encrypting data. type EncryptResponse struct { Ciphertext []byte KeyID string Annotations map[string][]byte } // DecryptRequest is the request to the Envelope service when decrypting data. type DecryptRequest struct { Ciphertext []byte KeyID string Annotations map[string][]byte } // StatusResponse is the response from the Envelope service when getting the status of the service. type StatusResponse struct { Version string Healthz string KeyID string } "} {"_id":"q-en-kubernetes-1433c3a5d98c016afeece42862a47cbf2459d69f20aae71c9968851e19945c79","text":"apps \"k8s.io/api/apps/v1\" \"k8s.io/api/core/v1\" apiequality \"k8s.io/apimachinery/pkg/api/equality\" \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\""} {"_id":"q-en-kubernetes-143abc9f10f3a4e58d6b55563595a05b8eefd676d1b1d179c58a7380dee60f22","text":" # Releasing Kubernetes This document explains how to create a Kubernetes release (as in version) and how the version information gets embedded into the built binaries. ## Origin of the Sources Kubernetes may be built from either a git tree (using `hack/build-go.sh`) or from a tarball (using either `hack/build-go.sh` or `go install`) or directly by the Go native build system (using `go get`). When building from git, we want to be able to insert specific information about the build tree at build time. In particular, we want to use the output of `git describe` to generate the version of Kubernetes and the status of the build tree (add a `-dirty` prefix if the tree was modified.) When building from a tarball or using the Go build system, we will not have access to the information about the git tree, but we still want to be able to tell whether this build corresponds to an exact release (e.g. v0.3) or is between releases (e.g. at some point in development between v0.3 and v0.4). ## Version Number Format In order to account for these use cases, there are some specific formats that may end up representing the Kubernetes version. Here are a few examples: - **v0.5**: This is official version 0.5 and this version will only be used when building from a clean git tree at the v0.5 git tag, or from a tree extracted from the tarball corresponding to that specific release. - **v0.5-15-g0123abcd4567**: This is the `git describe` output and it indicates that we are 15 commits past the v0.5 release and that the SHA1 of the commit where the binaries were built was `0123abcd4567`. It is only possible to have this level of detail in the version information when building from git, not when building from a tarball. - **v0.5-15-g0123abcd4567-dirty** or **v0.5-dirty**: The extra `-dirty` prefix means that the tree had local modifications or untracked files at the time of the build, so there's no guarantee that the source code matches exactly the state of the tree at the `0123abcd4567` commit or at the `v0.5` git tag (resp.) - **v0.5-dev**: This means we are building from a tarball or using `go get` or, if we have a git tree, we are using `go install` directly, so it is not possible to inject the git version into the build information. Additionally, this is not an official release, so the `-dev` prefix indicates that the version we are building is after `v0.5` but before `v0.6`. (There is actually an exception where a commit with `v0.5-dev` is not present on `v0.6`, see later for details.) ## Injecting Version into Binaries In order to cover the different build cases, we start by providing information that can be used when using only Go build tools or when we do not have the git version information available. To be able to provide a meaningful version in those cases, we set the contents of variables in a Go source file that will be used when no overrides are present. We are using `pkg/version/base.go` as the source of versioning in absence of information from git. Here is a sample of that file's contents: ``` var ( gitVersion string = \"v0.4-dev\" // version from git, output of $(git describe) gitCommit string = \"\" // sha1 from git, output of $(git rev-parse HEAD) ) ``` This means a build with `go install` or `go get` or a build from a tarball will yield binaries that will identify themselves as `v0.4-dev` and will not be able to provide you with a SHA1. To add the extra versioning information when building from git, the `hack/build-go.sh` script will gather that information (using `git describe` and `git rev-parse`) and then create a `-ldflags` string to pass to `go install` and tell the Go linker to override the contents of those variables at build time. It can, for instance, tell it to override `gitVersion` and set it to `v0.4-13-g4567bcdef6789-dirty` and set `gitCommit` to `4567bcdef6789...` which is the complete SHA1 of the (dirty) tree used at build time. ## Handling Official Versions Handling official versions from git is easy, as long as there is an annotated git tag pointing to a specific version then `git describe` will return that tag exactly which will match the idea of an official version (e.g. `v0.5`). Handling it on tarballs is a bit harder since the exact version string must be present in `pkg/version/base.go` for it to get embedded into the binaries. But simply creating a commit with `v0.5` on its own would mean that the commits coming after it would also get the `v0.5` version when built from tarball or `go get` while in fact they do not match `v0.5` (the one that was tagged) exactly. To handle that case, creating a new release should involve creating two adjacent commits where the first of them will set the version to `v0.5` and the second will set it to `v0.5-dev`. In that case, even in the presence of merges, there will be a single comit where the exact `v0.5` version will be used and all others around it will either have `v0.4-dev` or `v0.5-dev`. The diagram below illustrates it. ![Diagram of git commits involved in the release](./releasing.png) After working on `v0.4-dev` and merging PR 99 we decide it is time to release `v0.5`. So we start a new branch, create one commit to update `pkg/version/base.go` to include `gitVersion = \"v0.5\"` and `git commit` it. We test it and make sure everything is working as expected. Before sending a PR for it, we create a second commit on that same branch, updating `pkg/version/base.go` to include `gitVersion = \"v0.5-dev\"`. That will ensure that further builds (from tarball or `go install`) on that tree will always include the `-dev` prefix and will not have a `v0.5` version (since they do not match the official `v0.5` exactly.) We then send PR 100 with both commits in it. Once the PR is accepted, we can use `git tag -a` to create an annotated tag *pointing to the one commit* that has `v0.5` in `pkg/version/base.go` and push it to GitHub. (Unfortunately GitHub tags/releases are not annotated tags, so this needs to be done from a git client and pushed to GitHub using SSH.) ## Parallel Commits While we are working on releasing `v0.5`, other development takes place and other PRs get merged. For instance, in the example above, PRs 101 and 102 get merged to the master branch before the versioning PR gets merged. This is not a problem, it is only slightly inaccurate that checking out the tree at commit `012abc` or commit `345cde` or at the commit of the merges of PR 101 or 102 will yield a version of `v0.4-dev` *but* those commits are not present in `v0.5`. In that sense, there is a small window in which commits will get a `v0.4-dev` or `v0.4-N-gXXX` label and while they're indeed later than `v0.4` but they are not really before `v0.5` in that `v0.5` does not contain those commits. Unfortunately, there is not much we can do about it. On the other hand, other projects seem to live with that and it does not really become a large problem. As an example, Docker commit a327d9b91edf has a `v1.1.1-N-gXXX` label but it is not present in Docker `v1.2.0`: ``` $ git describe a327d9b91edf v1.1.1-822-ga327d9b91edf $ git log --oneline v1.2.0..a327d9b91edf a327d9b91edf Fix data space reporting from Kb/Mb to KB/MB (Non-empty output here means the commit is not present on v1.2.0.) ``` "} {"_id":"q-en-kubernetes-14c37d942ca329d6b44ffa891b7f5448ddb283e93ca32102c6b2309b956060d6","text":"cmds.AddCommand(NewCmdPlugin(f, in, out, err)) cmds.AddCommand(NewCmdVersion(f, out)) cmds.AddCommand(NewCmdApiVersions(f, out)) cmds.AddCommand(NewCmdApiResources(f, out)) cmds.AddCommand(NewCmdOptions(out)) return cmds"} {"_id":"q-en-kubernetes-1561c89861f88e3512e0ac02cbf05e2c56544709cf4b8534770797416e727199","text":"name: \"TestPlugin1\", inj: injectedResult{FilterStatus: int(framework.Error)}, }, { name: \"TestPlugin2\", inj: injectedResult{FilterStatus: int(framework.Error)},"} {"_id":"q-en-kubernetes-1569220cdd6645154e4e59ada26c2ee9510c3a953d16557a170bc8354fd53dd0","text":"Subsets: []corev1.EndpointSubset{subset}, }, epSlice } func TestEndpointsAdapterEnsureEndpointSliceFromEndpoints(t *testing.T) { endpoints1, epSlice1 := generateEndpointsAndSlice(\"foo\", \"testing\", []int{80, 443}, []string{\"10.1.2.3\", \"10.1.2.4\"}) endpoints2, epSlice2 := generateEndpointsAndSlice(\"foo\", \"testing\", []int{80, 443}, []string{\"10.1.2.3\", \"10.1.2.4\", \"10.1.2.5\"}) testCases := map[string]struct { endpointSlicesEnabled bool expectedError error expectedEndpointSlice *discovery.EndpointSlice endpointSlices []*discovery.EndpointSlice namespaceParam string endpointsParam *corev1.Endpoints }{ \"existing-endpointslice-no-change\": { endpointSlicesEnabled: true, expectedError: nil, expectedEndpointSlice: epSlice1, endpointSlices: []*discovery.EndpointSlice{epSlice1}, namespaceParam: \"testing\", endpointsParam: endpoints1, }, \"existing-endpointslice-change\": { endpointSlicesEnabled: true, expectedError: nil, expectedEndpointSlice: epSlice2, endpointSlices: []*discovery.EndpointSlice{epSlice1}, namespaceParam: \"testing\", endpointsParam: endpoints2, }, \"missing-endpointslice\": { endpointSlicesEnabled: true, expectedError: nil, expectedEndpointSlice: epSlice1, endpointSlices: []*discovery.EndpointSlice{}, namespaceParam: \"testing\", endpointsParam: endpoints1, }, \"endpointslices-disabled\": { endpointSlicesEnabled: false, expectedError: nil, expectedEndpointSlice: nil, endpointSlices: []*discovery.EndpointSlice{}, namespaceParam: \"testing\", endpointsParam: endpoints1, }, } for name, testCase := range testCases { t.Run(name, func(t *testing.T) { client := fake.NewSimpleClientset() epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()} if testCase.endpointSlicesEnabled { epAdapter.endpointSliceClient = client.DiscoveryV1alpha1() } for _, endpointSlice := range testCase.endpointSlices { _, err := client.DiscoveryV1alpha1().EndpointSlices(endpointSlice.Namespace).Create(endpointSlice) if err != nil { t.Fatalf(\"Error creating EndpointSlice: %v\", err) } } err := epAdapter.EnsureEndpointSliceFromEndpoints(testCase.namespaceParam, testCase.endpointsParam) if !apiequality.Semantic.DeepEqual(testCase.expectedError, err) { t.Errorf(\"Expected error: %v, got: %v\", testCase.expectedError, err) } endpointSlice, err := client.DiscoveryV1alpha1().EndpointSlices(testCase.namespaceParam).Get(testCase.endpointsParam.Name, metav1.GetOptions{}) if err != nil && !errors.IsNotFound(err) { t.Fatalf(\"Error getting Endpoint Slice: %v\", err) } if !apiequality.Semantic.DeepEqual(endpointSlice, testCase.expectedEndpointSlice) { t.Errorf(\"Expected Endpoint Slice: %v, got: %v\", testCase.expectedEndpointSlice, endpointSlice) } }) } } "} {"_id":"q-en-kubernetes-157482496461231dbde9c145573688ba466ab3c2cda143416d21c7e4e6bed3e3","text":"config.CloudProviderBackoffDuration = backoffDurationDefault } // Do not add master nodes to standard LB by default. if config.ExcludeMasterFromStandardLB == nil { config.ExcludeMasterFromStandardLB = &defaultExcludeMasterFromStandardLB if strings.EqualFold(config.LoadBalancerSku, loadBalancerSkuStandard) { // Do not add master nodes to standard LB by default. if config.ExcludeMasterFromStandardLB == nil { config.ExcludeMasterFromStandardLB = &defaultExcludeMasterFromStandardLB } // Enable outbound SNAT by default. if config.DisableOutboundSNAT == nil { config.DisableOutboundSNAT = &defaultDisableOutboundSNAT } } else { if config.DisableOutboundSNAT != nil && *config.DisableOutboundSNAT { return nil, fmt.Errorf(\"disableOutboundSNAT should only set when loadBalancerSku is standard\") } } azClientConfig := &azClientConfig{"} {"_id":"q-en-kubernetes-1589ddf4b71c85d1946eb2f83f74b3601802b189c3e3ade57e069d71c4e61724","text":"} } func TestValidateCustomResource(t *testing.T) { type args struct { schema apiextensions.JSONSchemaProps object interface{} func stripIntOrStringType(x interface{}) interface{} { switch x := x.(type) { case map[string]interface{}: if t, found := x[\"type\"]; found { switch t := t.(type) { case []interface{}: if len(t) == 2 && t[0] == \"integer\" && t[1] == \"string\" && x[\"x-kubernetes-int-or-string\"] == true { delete(x, \"type\") } } } for k := range x { x[k] = stripIntOrStringType(x[k]) } return x case []interface{}: for i := range x { x[i] = stripIntOrStringType(x[i]) } return x default: return x } } func TestValidateCustomResource(t *testing.T) { tests := []struct { name string args args wantErr bool name string schema apiextensions.JSONSchemaProps objects []interface{} failingObjects []interface{} }{ // TODO: make more complete {\"!nullable against non-null\", args{ apiextensions.JSONSchemaProps{ {name: \"!nullable\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\","} {"_id":"q-en-kubernetes-158c8d7e6cb42cdd012f531cc85d44007eca034e605ad73690e686b4a4edd627","text":"{d: 8 * 24 * time.Hour, want: \"8d\"}, {d: 8*24*time.Hour + 23*time.Hour, want: \"8d\"}, {d: 2*365*24*time.Hour - time.Millisecond, want: \"729d\"}, {d: 2 * 365 * 24 * time.Hour, want: \"2y0d\"}, {d: 2*365*24*time.Hour + 23*time.Hour, want: \"2y0d\"}, {d: 3 * 365 * 24 * time.Hour, want: \"3y0d\"}, {d: 2 * 365 * 24 * time.Hour, want: \"2y\"}, {d: 2*365*24*time.Hour + 23*time.Hour, want: \"2y\"}, {d: 2*365*24*time.Hour + 23*time.Hour + 59*time.Minute, want: \"2y\"}, {d: 2*365*24*time.Hour + 24*time.Hour - time.Millisecond, want: \"2y\"}, {d: 2*365*24*time.Hour + 24*time.Hour, want: \"2y1d\"}, {d: 3 * 365 * 24 * time.Hour, want: \"3y\"}, {d: 4 * 365 * 24 * time.Hour, want: \"4y\"}, {d: 5 * 365 * 24 * time.Hour, want: \"5y\"}, {d: 6 * 365 * 24 * time.Hour, want: \"6y\"}, {d: 7 * 365 * 24 * time.Hour, want: \"7y\"}, {d: 8*365*24*time.Hour - time.Millisecond, want: \"7y364d\"}, {d: 8 * 365 * 24 * time.Hour, want: \"8y\"}, {d: 8*365*24*time.Hour + 364*24*time.Hour, want: \"8y\"},"} {"_id":"q-en-kubernetes-159a322885435d6f98172a3b8f6e9f8bda38012e8e4d69750d0f676946b7548a","text":"# Wait for last batch of jobs kube::util::wait-for-jobs || { echo -e \"${color_red}Some commands failed.${color_norm}\" >&2 code=$? echo -e \"${color_red}Failed to create firewall rule.${color_norm}\" >&2 exit $code } }"} {"_id":"q-en-kubernetes-159ce8c52fd64953ea98f6015041ff31bd4cdcaf10ab19accf8a63b63a21ec31","text":"framework.SkipUnlessProviderIs(\"gke\") nsFlag := fmt.Sprintf(\"--namespace=%v\", ns) podJson := readTestFileOrDie(kubectlInPodFilename) // Replace the host path to kubectl in json podString := strings.Replace(string(podJson), \"$KUBECTL_PATH\", framework.TestContext.KubectlPath, 1) By(\"validating api verions\") framework.RunKubectlOrDieInput(string(podJson), \"create\", \"-f\", \"-\", nsFlag) framework.RunKubectlOrDieInput(podString, \"create\", \"-f\", \"-\", nsFlag) err := wait.PollImmediate(time.Second, time.Minute, func() (bool, error) { output := framework.RunKubectlOrDie(\"get\", \"pods/kubectl-in-pod\", nsFlag) if strings.Contains(output, \"Running\") {"} {"_id":"q-en-kubernetes-159f96c3ff81f0439d45ec73ab19ef535fb69031517310f1d60f4284b3119732","text":"podLabels := map[string]string{\"name\": \"nginx\"} replicas := 1 Logf(\"Creating simple deployment %s\", deploymentName) _, err := c.Deployments(ns).Create(newDeployment(deploymentName, replicas, podLabels, \"nginx\", \"nginx\")) _, err := c.Deployments(ns).Create(newDeployment(deploymentName, replicas, podLabels, \"nginx\", \"nginx\", extensions.RollingUpdateDeploymentStrategyType)) Expect(err).NotTo(HaveOccurred()) defer func() { deployment, err := c.Deployments(ns).Get(deploymentName)"} {"_id":"q-en-kubernetes-15a36e4cb37f3774b4e5d6f4bc30cfbb91fdbf3f9ce9f18f9691211baad69c33","text":"} return parameters, nil default: sort.Slice(objs, func(i, j int) bool { obj1, obj2 := objs[i].(*resourcev1alpha2.ResourceClassParameters), objs[j].(*resourcev1alpha2.ResourceClassParameters) if obj1 == nil || obj2 == nil { return false } return obj1.Name < obj2.Name }) return nil, statusError(logger, fmt.Errorf(\"multiple generated class parameters for %s.%s %s found: %s\", class.ParametersRef.Kind, class.ParametersRef.APIGroup, klog.KRef(class.Namespace, class.ParametersRef.Name), klog.KObjSlice(objs))) } }"} {"_id":"q-en-kubernetes-15ac2e60d16b760309acde7248e001022ec7de4fc074d451a056ce642f5c6c9a","text":"ExitCode: 5, }, }, map[string]error{\"with-reason\": testErrorReason, \"succeed\": testErrorReason}, []api.ContainerStatus{}, map[string]api.ContainerState{ reasons: map[string]error{\"with-reason\": testErrorReason, \"succeed\": testErrorReason}, oldStatuses: []api.ContainerStatus{}, expectedState: map[string]api.ContainerState{ \"without-reason\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID,"} {"_id":"q-en-kubernetes-15d193f9cafcd1662b769adeb174e242dbbba2375b19a57041adfd40c9159ada","text":"// be sure to unset environment variable https_proxy (if exported) before testing, otherwise the testing will fail unexpectedly. func TestRoundTripSocks5AndNewConnection(t *testing.T) { t.Skip(\"Flake https://issues.k8s.io/107708\") localhostPool := localhostCertPool(t) for _, redirect := range []bool{false, true} {"} {"_id":"q-en-kubernetes-15d36c83b20b960cab6624bab196ab42b7da2fb7c638168f08ad95a8e476b005","text":"input *v1.Node want bool }{ {want: false, input: &v1.Node{}}, {want: true, input: &v1.Node{Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}}, {want: false, input: &v1.Node{Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}}}}}, {want: true, input: &v1.Node{Spec: v1.NodeSpec{Unschedulable: true}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}}, {want: true, input: &v1.Node{Status: validNodeStatus, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{}}}}, {want: true, input: &v1.Node{Status: validNodeStatus, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{labelNodeRoleMaster: \"\"}}}}, {want: true, input: &v1.Node{Status: validNodeStatus, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{labelNodeRoleExcludeBalancer: \"\"}}}},"} {"_id":"q-en-kubernetes-15dae06ea01e80b6ea1ffe6de547e9a0febc892f491f07dc6ef87a7dfb5d1503","text":"hasPVC = true pvc, err := pl.PVCLister.PersistentVolumeClaims(pod.Namespace).Get(pvcName) if err != nil { // The error has already enough context (\"persistentvolumeclaim \"myclaim\" not found\") // The error usually has already enough context (\"persistentvolumeclaim \"myclaim\" not found\"), // but we can do better for generic ephemeral inline volumes where that situation // is normal directly after creating a pod. if ephemeral && apierrors.IsNotFound(err) { err = fmt.Errorf(\"waiting for ephemeral volume controller to create the persistentvolumeclaim %q\", pvcName) } return hasPVC, err }"} {"_id":"q-en-kubernetes-15dcd39f83fd264bc1d2a7e2310be602c712240373efaf9b5bf052fd04ad2176","text":"Name: \"foo\", }, Data: map[string][]byte{ v1.DockerConfigKey: secretDataNoEmail, v1.DockerConfigJsonKey: secretDataNoEmail, }, Type: v1.SecretTypeDockercfg, Type: v1.SecretTypeDockerConfigJson, }, expectErr: false, },"} {"_id":"q-en-kubernetes-164ff27d1ff29eacca5fe5c286baccfff808bc9d8c5fc190c67cd4f5c67bc182","text":") func (c *FakeEvictions) Evict(eviction *policy.Eviction) error { action := core.GetActionImpl{} action.Verb = \"post\" action := core.CreateActionImpl{} action.Verb = \"create\" action.Namespace = c.ns action.Resource = schema.GroupVersionResource{Group: \"\", Version: \"\", Resource: \"pods\"} action.Subresource = \"eviction\" action.Object = eviction _, err := c.Fake.Invokes(action, eviction) return err }"} {"_id":"q-en-kubernetes-165d6b7fbdcc3b204497cd802bb5674798ae1a56d7e689c3e6344fc9282f7772","text":"export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH} go get github.com/tools/godep && godep version go get github.com/jstemmer/go-junit-report retry go get github.com/tools/godep && godep version retry go get github.com/jstemmer/go-junit-report # Enable the Go race detector. export KUBE_RACE=-race"} {"_id":"q-en-kubernetes-16919705cc83937feb1476042ad63ad575007eeab24ab8cd89c82a6941db7463","text":"// it is not used by Convert() other than storing it in the scope. // Not safe for objects with cyclic references! func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { return c.doConversion(src, dest, flags, meta, c.convert) } // DefaultConvert will translate src to dest if it knows how. Both must be pointers. // No conversion func is used. If the default copying mechanism // doesn't work on this type pair, an error will be returned. // Read the comments on the various FieldMatchingFlags constants to understand // what the 'flags' parameter does. // 'meta' is given to allow you to pass information to conversion functions, // it is not used by DefaultConvert() other than storing it in the scope. // Not safe for objects with cyclic references! func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { return c.doConversion(src, dest, flags, meta, c.defaultConvert) } type conversionFunc func(sv, dv reflect.Value, scope *scope) error func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error { dv, err := EnforcePtr(dest) if err != nil { return err"} {"_id":"q-en-kubernetes-1692f3879767da1c316d04a949b5dbb5e65d53d19d8a2524bb8823905a97dc32","text":"FindBoundSatsified: false, }, eventReason: \"FailedScheduling\", expectError: makePredicateError(\"1 VolumeBindingNoMatch, 1 VolumeNodeAffinityConflict\"), expectError: makePredicateError(\"1 node(s) didn't find available persistent volumes to bind, 1 node(s) had volume node affinity conflict\"), }, \"unbound,found-matches\": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{"} {"_id":"q-en-kubernetes-16a60bdd0ab6ada6bbe9a26d79c3fcd68ab36716a4aa2aec0b0bd67d4f9c1221","text":"} // localhostCert was generated from crypto/tls/generate_cert.go with the following command: // go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h // go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h var localhostCert = []byte(`-----BEGIN CERTIFICATE----- MIIBjzCCATmgAwIBAgIRAKpi2WmTcFrVjxrl5n5YDUEwDQYJKoZIhvcNAQELBQAw EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC QQC9fEbRszP3t14Gr4oahV7zFObBI4TfA5i7YnlMXeLinb7MnvT4bkfOJzE6zktn 59zP7UiHs3l4YOuqrjiwM413AgMBAAGjaDBmMA4GA1UdDwEB/wQEAwICpDATBgNV HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MC4GA1UdEQQnMCWCC2V4 YW1wbGUuY29thwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUA A0EAUsVE6KMnza/ZbodLlyeMzdo7EM/5nb5ywyOxgIOCf0OOLHsPS9ueGLQX9HEG //yjTXuhNcUugExIjM/AIwAZPQ== MIICEzCCAXygAwIBAgIQRWyrLzhq/urpj7m6uPiMgjANBgkqhkiG9w0BAQsFADAS MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB iQKBgQDjSYON17r13esbCFoS9l4xTBjqCqw7O4QWuTi7jBJHhU7wJ2TxCHuMO/3L s8PE700nz5ryfnIu/5P/8wGVYOj27ixAWTNFgAyHW62q5i4uCD2VlOQrCZoEOsw6 a0hiDsnam63yW1nc/UK96Y3Yvmb7B6t34tAQ2MigoUeYwoKsPwIDAQABo2gwZjAO BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw AwEB/zAuBgNVHREEJzAlggtleGFtcGxlLmNvbYcEfwAAAYcQAAAAAAAAAAAAAAAA AAAAATANBgkqhkiG9w0BAQsFAAOBgQAyyXwM2Up1i7/pLB+crSnH/TJnwhfwSVMZ vAlDgYkGEb8YLc2K+sYqRRiwLuKivDck1xRH6vx3ENxmoX+SOIWVG8amXmqqFifh G+i1AqOdHggw/UCu0uog8OZablbKxnbkBYlnnaOpNC492nnniIqm1ztVygKprMu3 7YCl3ybB5Q== -----END CERTIFICATE-----`) // localhostKey is the private key for localhostCert. var localhostKey = []byte(`-----BEGIN RSA PRIVATE KEY----- MIIBOwIBAAJBAL18RtGzM/e3XgavihqFXvMU5sEjhN8DmLtieUxd4uKdvsye9Phu R84nMTrOS2fn3M/tSIezeXhg66quOLAzjXcCAwEAAQJBAKcRxH9wuglYLBdI/0OT BLzfWPZCEw1vZmMR2FF1Fm8nkNOVDPleeVGTWoOEcYYlQbpTmkGSxJ6ya+hqRi6x goECIQDx3+X49fwpL6B5qpJIJMyZBSCuMhH4B7JevhGGFENi3wIhAMiNJN5Q3UkL IuSvv03kaPR5XVQ99/UeEetUgGvBcABpAiBJSBzVITIVCGkGc7d+RCf49KTCIklv bGWObufAR8Ni4QIgWpILjW8dkGg8GOUZ0zaNA6Nvt6TIv2UWGJ4v5PoV98kCIQDx rIiZs5QbKdycsv9gQJzwQAogC8o04X3Zz3dsoX+h4A== MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAONJg43XuvXd6xsI WhL2XjFMGOoKrDs7hBa5OLuMEkeFTvAnZPEIe4w7/cuzw8TvTSfPmvJ+ci7/k//z AZVg6PbuLEBZM0WADIdbrarmLi4IPZWU5CsJmgQ6zDprSGIOydqbrfJbWdz9Qr3p jdi+ZvsHq3fi0BDYyKChR5jCgqw/AgMBAAECgYEA1qHVWV0fcI7gNebtKHr++A6k eF8bxdOuKMdAi9r6aA+7O434BKW+Be+g+3wGozJX6gBikhxWN4uid1FDbYzWcJFB i6RHGnHkxm7DifKIXF+cHUAiQhE1W5nwy5aays8B5Kc9eC+a/m9bpxWGRY00tq6x +WhWEUF3fPbGOqnktgECQQD3RmqraDbhvMo3CcghB63TQncafTIiNPmJPXK1uZcy CtGRdb1cF2TJXPO+ukUYQEltG2MP+m7Ds0XL1SsPtGd1AkEA606M/BPdaAs0MZIt u0eH+9Q3Pxp0UqX7Ro2Q4NDWmj6wcqY1E0zeWR4V8XSwbLoiw7GJdqRrL0GSgHQT wPjCYwJAbtCV2T8Y6U0r6kJt969zTOvKaIqWvxGyiriJAbuscHa8uE1lkTHCryMC 8QSVFmso/MZ7PJvkq7tZmiFr7NvSSQJATEwCBtJiHhRT7ibZ0TnWa99ZsopfYVUU bsIEUgElNIpTKDmgSAvKpNbOgqY1dmu8TfvI+MFDR+VZHXGF3jJKxQJAOoMB6VH/ SDNYVyHKU57OA5F8qgnIr+4OWPLtK3khbplpc4kkdBE5OJTDRKXJr+oSZDDe2elI wsDf21paAlthnA== -----END RSA PRIVATE KEY-----`)"} {"_id":"q-en-kubernetes-16b5d66e99ca662616cef7bcb96f1ab6f214d1f1bdabfb8f5000c6ada3737d57","text":" /* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package plugin import ( \"context\" \"errors\" \"fmt\" \"net\" \"sync\" \"time\" \"google.golang.org/grpc\" \"google.golang.org/grpc/connectivity\" \"google.golang.org/grpc/credentials/insecure\" utilversion \"k8s.io/apimachinery/pkg/util/version\" \"k8s.io/klog/v2\" drapb \"k8s.io/kubelet/pkg/apis/dra/v1alpha4\" ) // NewDRAPluginClient returns a wrapper around those gRPC methods of a DRA // driver kubelet plugin which need to be called by kubelet. The wrapper // handles gRPC connection management and logging. Connections are reused // across different NewDRAPluginClient calls. func NewDRAPluginClient(pluginName string) (*Plugin, error) { if pluginName == \"\" { return nil, fmt.Errorf(\"plugin name is empty\") } existingPlugin := draPlugins.get(pluginName) if existingPlugin == nil { return nil, fmt.Errorf(\"plugin name %s not found in the list of registered DRA plugins\", pluginName) } return existingPlugin, nil } type Plugin struct { backgroundCtx context.Context cancel func(cause error) mutex sync.Mutex conn *grpc.ClientConn endpoint string highestSupportedVersion *utilversion.Version clientCallTimeout time.Duration } func (p *Plugin) getOrCreateGRPCConn() (*grpc.ClientConn, error) { p.mutex.Lock() defer p.mutex.Unlock() if p.conn != nil { return p.conn, nil } ctx := p.backgroundCtx logger := klog.FromContext(ctx) network := \"unix\" logger.V(4).Info(\"Creating new gRPC connection\", \"protocol\", network, \"endpoint\", p.endpoint) // grpc.Dial is deprecated. grpc.NewClient should be used instead. // For now this gets ignored because this function is meant to establish // the connection, with the one second timeout below. Perhaps that // approach should be reconsidered? //nolint:staticcheck conn, err := grpc.Dial( p.endpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(ctx context.Context, target string) (net.Conn, error) { return (&net.Dialer{}).DialContext(ctx, network, target) }), ) if err != nil { return nil, err } ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() if ok := conn.WaitForStateChange(ctx, connectivity.Connecting); !ok { return nil, errors.New(\"timed out waiting for gRPC connection to be ready\") } p.conn = conn return p.conn, nil } func (p *Plugin) NodePrepareResources( ctx context.Context, req *drapb.NodePrepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodePrepareResourcesResponse, error) { logger := klog.FromContext(ctx) logger.V(4).Info(\"Calling NodePrepareResources rpc\", \"request\", req) conn, err := p.getOrCreateGRPCConn() if err != nil { return nil, err } ctx, cancel := context.WithTimeout(ctx, p.clientCallTimeout) defer cancel() nodeClient := drapb.NewNodeClient(conn) response, err := nodeClient.NodePrepareResources(ctx, req) logger.V(4).Info(\"Done calling NodePrepareResources rpc\", \"response\", response, \"err\", err) return response, err } func (p *Plugin) NodeUnprepareResources( ctx context.Context, req *drapb.NodeUnprepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodeUnprepareResourcesResponse, error) { logger := klog.FromContext(ctx) logger.V(4).Info(\"Calling NodeUnprepareResource rpc\", \"request\", req) conn, err := p.getOrCreateGRPCConn() if err != nil { return nil, err } ctx, cancel := context.WithTimeout(ctx, p.clientCallTimeout) defer cancel() nodeClient := drapb.NewNodeClient(conn) response, err := nodeClient.NodeUnprepareResources(ctx, req) logger.V(4).Info(\"Done calling NodeUnprepareResources rpc\", \"response\", response, \"err\", err) return response, err } "} {"_id":"q-en-kubernetes-16b9ae08fdff462dca80a1c40ef51684e3a57f3ed002b1d02cd060fb634eb957","text":"// EnvVarSource represents a source for the value of an EnvVar. message EnvVarSource { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional optional ObjectFieldSelector fieldRef = 1;"} {"_id":"q-en-kubernetes-16c817bdff953306cd5855fc41716c7ad58048ba0611fde9ff1d46fa2c7b1a7d","text":"allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&obj.ObjectMeta, false, ValidateThirdPartyResourceName, field.NewPath(\"metadata\"))...) versions := sets.String{} if len(obj.Versions) == 0 { allErrs = append(allErrs, field.Required(field.NewPath(\"versions\"), \"must specify at least one version\")) } for ix := range obj.Versions { version := &obj.Versions[ix] if len(version.Name) == 0 {"} {"_id":"q-en-kubernetes-16f547a4a38d8449d7bfab91d54e990c2a34ecc57f1bbc1e4b39ad5d6f7a4d4d","text":"} else if exists { glog.Infof(\"Deleting old LB for previously uncached service %s whose endpoint %s doesn't match the service's desired IPs %v\", namespacedName, endpoint, service.Spec.PublicIPs) if err := s.ensureLBDeleted(service); err != nil { if err := s.balancer.EnsureTCPLoadBalancerDeleted(s.loadBalancerName(service), s.zone.Region); err != nil { return err, retryable } }"} {"_id":"q-en-kubernetes-170a01e8c577f683cdc2b1f9936d1c1d45a7c50e75b3a1a2e8cbd891f28c87d3","text":"}, \"../examples/openshift-origin\": { \"openshift-origin-namespace\": &api.Namespace{}, \"openshift-controller\": &api.ReplicationController{}, \"openshift-controller\": &extensions.Deployment{}, \"openshift-service\": &api.Service{}, \"etcd-controller\": &api.ReplicationController{}, \"etcd-controller\": &extensions.Deployment{}, \"etcd-service\": &api.Service{}, \"etcd-discovery-controller\": &api.ReplicationController{}, \"etcd-discovery-controller\": &extensions.Deployment{}, \"etcd-discovery-service\": &api.Service{}, \"secret\": nil, },"} {"_id":"q-en-kubernetes-1719f8b5484dfc629f70b6ffffdab030df7896d0598f7417cff1da05b6362a47","text":"return time.Since(start).Seconds() } func newPodAndContainerCollector(containerCache kubecontainer.RuntimeCache) *podAndContainerCollector { return &podAndContainerCollector{ containerCache: containerCache, } } // Custom collector for current pod and container counts. type podAndContainerCollector struct { // Cache for accessing information about running containers. containerCache kubecontainer.RuntimeCache } // TODO(vmarmol): Split by source? var ( runningPodCountDesc = prometheus.NewDesc( prometheus.BuildFQName(\"\", KubeletSubsystem, \"running_pod_count\"), \"Number of pods currently running\", nil, nil) runningContainerCountDesc = prometheus.NewDesc( prometheus.BuildFQName(\"\", KubeletSubsystem, \"running_container_count\"), \"Number of containers currently running\", nil, nil) ) // Describe implements Prometheus' Describe method from the Collector interface. It sends all // available descriptions to the provided channel and retunrs once the last description has been sent. func (pc *podAndContainerCollector) Describe(ch chan<- *prometheus.Desc) { ch <- runningPodCountDesc ch <- runningContainerCountDesc } // Collect implements Prometheus' Collect method from the Collector interface. It's called by the Prometheus // registry when collecting metrics. func (pc *podAndContainerCollector) Collect(ch chan<- prometheus.Metric) { runningPods, err := pc.containerCache.GetPods() if err != nil { klog.Warningf(\"Failed to get running container information while collecting metrics: %v\", err) return } runningContainers := 0 for _, p := range runningPods { runningContainers += len(p.Containers) } ch <- prometheus.MustNewConstMetric( runningPodCountDesc, prometheus.GaugeValue, float64(len(runningPods))) ch <- prometheus.MustNewConstMetric( runningContainerCountDesc, prometheus.GaugeValue, float64(runningContainers)) } const configMapAPIPathFmt = \"/api/v1/namespaces/%s/configmaps/%s\" func configLabels(source *corev1.NodeConfigSource) (map[string]string, error) {"} {"_id":"q-en-kubernetes-173e530b12bfad8383a781f77920c7e34b4f696c4579484cbb87ceb517989970","text":"} for n := range visitedNamespaces { if len(o.Namespace) != 0 && n != o.Namespace { continue } for _, m := range namespacedRESTMappings { if err := p.prune(n, m); err != nil { return fmt.Errorf(\"error pruning namespaced object %v: %v\", m.GroupVersionKind, err)"} {"_id":"q-en-kubernetes-175a72f7779ce771517cdda80a1df996c7f7b24a80fee8e95ce6259e52892489","text":"}, { \"ImportPath\": \"github.com/evanphx/json-patch\", \"Rev\": \"ed7cfbae1fffc071f71e068df27bf4f0521402d8\" \"Rev\": \"94e38aa1586e8a6c8a75770bddf5ff84c48a106b\" }, { \"ImportPath\": \"github.com/exponent-io/jsonpath\","} {"_id":"q-en-kubernetes-178839fbadd70ae05e0be8a1e599c78cff07dba5aaca0ebf34ca0e9d34509b8b","text":"if (endpoints.subsets != null && !endpoints.subsets.isEmpty()){ for (Subset subset : endpoints.subsets) { for (Address address : subset.addresses) { list.add(InetAddress.getByName(address.IP)); list.add(InetAddress.getByName(address.ip)); } } } } logger.info(\"Available endpoints: \" + list); } else { logger.warn(\"Endpoints are not available\"); } } catch (IOException | NoSuchAlgorithmException | KeyManagementException ex) { logger.warn(\"Request to kubernetes apiserver failed\", ex); }"} {"_id":"q-en-kubernetes-1793ee6282fb7d20c2b74d733976a9cd25f5ad5281bc45ff811888068801da6e","text":"// +k8s:deepcopy-gen=package package testing package testing // import \"k8s.io/apimachinery/pkg/runtime/serializer/testing\" "} {"_id":"q-en-kubernetes-17aac51bd5d3ca94cbd65c689c1358ccf2de4272d82c027b2ed62744eedf1ffa","text":"\"k8s.io/api/core/v1\" settings \"k8s.io/api/settings/v1alpha1\" \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/watch\""} {"_id":"q-en-kubernetes-17cdb26d723ca314f52fe4a75a9df95812af1228ee59b2991bfe724cbc6d079c","text":"testCase.modifyRest(storage) } err := storage.tryDefaultValidateServiceClusterIPFields(&testCase.svc) err := storage.tryDefaultValidateServiceClusterIPFields(testCase.oldSvc, &testCase.svc) if err != nil && !testCase.expectError { t.Fatalf(\"error %v was not expected\", err) }"} {"_id":"q-en-kubernetes-17d43853462c9a2dedc13b51674f18e4e3f50161ebc610133cd070a23a4ad051","text":"type multiGroupVersioner struct { target schema.GroupVersion acceptedGroupKinds []schema.GroupKind coerce bool } // NewMultiGroupVersioner returns the provided group version for any kind that matches one of the provided group kinds."} {"_id":"q-en-kubernetes-17dfa8b63183135c62429b65a3ff62c93a116978ac68f015b9192b8735715001","text":"// while making decisions. BalanceAttachedNodeVolumes featuregate.Feature = \"BalanceAttachedNodeVolumes\" // owner: @kevtaylor // alpha: v1.14 // beta: v1.15 // ga: v1.17 // // Allow subpath environment variable substitution // Only applicable if the VolumeSubpath feature is also enabled VolumeSubpathEnvExpansion featuregate.Feature = \"VolumeSubpathEnvExpansion\" // owner: @vladimirvivien // alpha: v1.11 // beta: v1.14"} {"_id":"q-en-kubernetes-17ff7a75a9db9e4ca6bc70a7ec1d793ea1974b069ef8822fa0a7e286df6efebc","text":"legacyregistry.MustRegister(CgroupManagerDuration) legacyregistry.MustRegister(PodWorkerStartDuration) legacyregistry.MustRegister(ContainersPerPodCount) legacyregistry.RawMustRegister(newPodAndContainerCollector(containerCache)) legacyregistry.MustRegister(PLEGRelistDuration) legacyregistry.MustRegister(PLEGDiscardEvents) legacyregistry.MustRegister(PLEGRelistInterval)"} {"_id":"q-en-kubernetes-182e647ca66ce6caa006ed411b395cb25d5be03667e62db9fd654f71dd0eb9a1","text":"}, } podWithHook := getPodWithHook(\"pod-with-prestop-https-hook\", imageutils.GetPauseImageName(), lifecycle) // make sure we spawn the test pod on the same node as the webserver. nodeSelection := e2epod.NodeSelection{} e2epod.SetAffinity(&nodeSelection, targetNode) e2epod.SetNodeSelection(&podWithHook.Spec, nodeSelection) testPodWithHook(podWithHook) }) })"} {"_id":"q-en-kubernetes-1891bcb12c59dcdbb4f92661962a4302ef94bfa3a994f5b20a2032dc03217495","text":"func main() { klog.InitFlags(nil) if err := app.Run(); err != nil { fmt.Fprintf(os.Stderr, \"error: %vn\", err) os.Exit(1) } os.Exit(0) }"} {"_id":"q-en-kubernetes-18a6bc79f92c14618ddad561f179eb9622f81a9d935449e666c0ea2a1b866867","text":"glog.V(4).Infof(\"Pod %s deleted.\", pod.Name) if d := dc.getDeploymentForPod(pod); d != nil && d.Spec.Strategy.Type == extensions.RecreateDeploymentStrategyType { // Sync if this Deployment now has no more Pods. rsList, err := dc.getReplicaSetsForDeployment(d) rsList, err := util.ListReplicaSets(d, util.RsListFromClient(dc.client)) if err != nil { return }"} {"_id":"q-en-kubernetes-18bb6e3dc3203f351dbdc9bcd95190486b4cd69262f5530f27a34e45ef25a378","text":"namespace := nsObj.(*api.Namespace) // upon first request to delete, we switch the phase to start namespace termination if namespace.DeletionTimestamp == nil { if namespace.DeletionTimestamp.IsZero() { now := util.Now() namespace.DeletionTimestamp = &now namespace.Status.Phase = api.NamespaceTerminating"} {"_id":"q-en-kubernetes-18ce2dae1dc166c8cc8aa1fe4d00f804dab2b1ade07771ee9bd92ca63f48c5bc","text":" 2.50 2.51 "} {"_id":"q-en-kubernetes-18d494f48c94c862bad39168282ce62f3aa6063a22fa606b2e67fd37a40c28c8","text":"} output, err := json.Marshal(agg) require.NoError(t, err) // Content-type is \"aggregated\" discovery format. w.Header().Set(\"Content-Type\", AcceptV2Beta1) // Content-Type is \"aggregated\" discovery format. Add extra parameter // to ensure we are resilient to these extra parameters. w.Header().Set(\"Content-Type\", AcceptV2Beta1+\"; charset=utf-8\") w.WriteHeader(http.StatusOK) w.Write(output) }))"} {"_id":"q-en-kubernetes-18dad9d8c15f9d18fa999f23cf91d4e1a49c247d6cab2f6e7abefdc33cc34b22","text":"expectedErrMsg: fmt.Errorf(\"getError\"), }, { name: \"NodeAddresses should report error if VMSS instanceID is invalid\", nodeName: \"vm123456\", metadataName: \"vmss_$123\", vmType: vmTypeVMSS, useInstanceMetadata: true, expectedErrMsg: fmt.Errorf(\"failed to parse VMSS instanceID %q: strconv.ParseInt: parsing %q: invalid syntax\", \"$123\", \"$123\"), }, { name: \"NodeAddresses should report error if cloud.vmSet is nil\", nodeName: \"vm1\", vmType: vmTypeStandard,"} {"_id":"q-en-kubernetes-18f9618c778150d76aafd3c190c22bfce615c10766290f1e2040cf7e11c798b1","text":"// GetOldReplicaSets returns the old replica sets targeted by the given Deployment; get PodList and ReplicaSetList from client interface. // Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets. func GetOldReplicaSets(deployment *extensions.Deployment, c clientset.Interface) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, error) { rsList, err := ListReplicaSets(deployment, rsListFromClient(c)) rsList, err := ListReplicaSets(deployment, RsListFromClient(c)) if err != nil { return nil, nil, err }"} {"_id":"q-en-kubernetes-191b1c6e240deecdaef2959cae94cea9cd35b084c1c95b38d84ba2293a7377ad","text":"klog.V(3).Infof(\"Pod %q is terminated, but some containers have not been cleaned up: %s\", format.Pod(pod), statusStr) return false } // pod's sandboxes should be deleted if len(runtimeStatus.SandboxStatuses) > 0 { var sandboxStr string for _, sandbox := range runtimeStatus.SandboxStatuses { sandboxStr += fmt.Sprintf(\"%+v \", *sandbox) } klog.V(3).Infof(\"Pod %q is terminated, but some pod sandboxes have not been cleaned up: %s\", format.Pod(pod), sandboxStr) return false } if kl.podVolumesExist(pod.UID) && !kl.keepTerminatedPodVolumes { // We shouldn't delete pods whose volumes have not been cleaned up if we are not keeping terminated pod volumes klog.V(3).Infof(\"Pod %q is terminated, but some volumes have not been cleaned up\", format.Pod(pod))"} {"_id":"q-en-kubernetes-1969e7b0ed97b7dc9507e59561ea2c05aa055a68861018da48e6b8a139c6112e","text":"} for key, cluster := range config.Clusters { if len(cluster.CertificateAuthorityData) > 0 { cluster.CertificateAuthorityData = redactedBytes cluster.CertificateAuthorityData = dataOmittedBytes } config.Clusters[key] = cluster }"} {"_id":"q-en-kubernetes-197132e8ca758b376e4c8ad202116a2717dba5c6fa7530881349fe5b48d82385","text":"} return result, autorest.DetailedError{ StatusCode: http.StatusNotFound, Message: \"Not such PIP\", Message: \"No such PIP\", } } func (fAPC *fakeAzurePIPClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) { fAPC.mutex.Lock() defer fAPC.mutex.Unlock() if _, ok := fAPC.FakeStore[resourceGroupName]; ok { if entity, ok := fAPC.FakeStore[resourceGroupName][publicIPAddressName]; ok { return entity, nil } } return result, autorest.DetailedError{ StatusCode: http.StatusNotFound, Message: \"No such PIP\", } }"} {"_id":"q-en-kubernetes-199b3fc25acc1ed338c0af7da4af87e80e87ca5992cde2d772a033f524a0375f","text":"oldPVC.Status.Conditions = nil newPVC.Status.Conditions = nil // TODO(apelisse): We don't have a good mechanism to // verify that only the things that should have changed // have changed. Ignore it for now. oldPVC.ObjectMeta.ManagedFields = nil newPVC.ObjectMeta.ManagedFields = nil // ensure no metadata changed. nodes should not be able to relabel, add finalizers/owners, etc if !apiequality.Semantic.DeepEqual(oldPVC, newPVC) { return admission.NewForbidden(a, fmt.Errorf(\"node %q is not allowed to update fields other than status.capacity and status.conditions: %v\", nodeName, diff.ObjectReflectDiff(oldPVC, newPVC)))"} {"_id":"q-en-kubernetes-19a64adcee875b6494337655c8a92b74091f56e65df9654ffebb6260adf18134","text":"//FilenameParam(enforceNamespace, o.Filenames...). FilenameParam(enforceNamespace, &o.FilenameOptions). Flatten() if !o.Local { if !cmdutil.GetDryRunFlag(cmd) { builder = builder. SelectorParam(o.Selector). ResourceTypeOrNameArgs(o.All, args...)."} {"_id":"q-en-kubernetes-19c714a61b96a695ee1b6c0f20f47202bd5ea5a7d6f762b3c72f7d312148b918","text":"// pod setup jobKeyForget bool restartCounts []int32 podPhase v1.PodPhase // expectations expectedActive int32"} {"_id":"q-en-kubernetes-19e8b18121bb34cf9dcde34fdec7c6dc05eb61fa35dad516f3a0db662d54e059","text":"roleRef: kind: Role name: external-attacher-cfg apiGroup: rbac.authorization.k8s.io "} {"_id":"q-en-kubernetes-1a0624d2331d698504311bc0b090d891ce95a0426f78de843135ce16cf8ccb04","text":"// Create the controller and run it until we close stop. stop := make(chan struct{}) defer close(stop) go framework.New(cfg).Run(stop) // Let's add a few objects to the source. for _, name := range []string{\"a-hello\", \"b-controller\", \"c-framework\"} { testIDs := []string{\"a-hello\", \"b-controller\", \"c-framework\"} for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. source.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. time.Sleep(500 * time.Millisecond) close(stop) outputSet := util.StringSet{} for i := 0; i < len(testIDs); i++ { outputSet.Insert(<-deletionCounter) } outputSetLock.Lock() for _, key := range outputSet.List() { fmt.Println(key) }"} {"_id":"q-en-kubernetes-1a15a652466800ee3347160a78f7acf512eaa8f66472e096167a5f1b47de4541","text":"\"bytes\" \"fmt\" \"reflect\" \"regexp\" \"strings\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-1a2885d47956bc0f91ec0053e8b599a14db5dc957b6080196efa2da95f2398df","text":"// ValidateCSIDriverUpdate validates a CSIDriver. func ValidateCSIDriverUpdate(new, old *storage.CSIDriver) field.ErrorList { allErrs := apivalidation.ValidateObjectMetaUpdate(&new.ObjectMeta, &old.ObjectMeta, field.NewPath(\"metadata\")) allErrs = append(allErrs, validateCSIDriverSpec(&new.Spec, field.NewPath(\"spec\"))...) // immutable fields should not be mutated. allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(new.Spec.AttachRequired, old.Spec.AttachRequired, field.NewPath(\"spec\", \"attachedRequired\"))...) allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(new.Spec.FSGroupPolicy, old.Spec.FSGroupPolicy, field.NewPath(\"spec\", \"fsGroupPolicy\"))...) allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(new.Spec.PodInfoOnMount, old.Spec.PodInfoOnMount, field.NewPath(\"spec\", \"podInfoOnMount\"))...) allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(new.Spec.VolumeLifecycleModes, old.Spec.VolumeLifecycleModes, field.NewPath(\"spec\", \"volumeLifecycleModes\"))...) allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(new.Spec.StorageCapacity, old.Spec.StorageCapacity, field.NewPath(\"spec\", \"storageCapacity\"))...) allErrs = append(allErrs, validateTokenRequests(new.Spec.TokenRequests, field.NewPath(\"spec\", \"tokenRequests\"))...) return allErrs"} {"_id":"q-en-kubernetes-1a97b2803ed1429a86cdec69a9bf9abd3cca1bb46931bb32284d42bce3bfea77","text":" apiVersion: v1beta3 kind: LimitRange metadata: name: limits spec: limits: - default: cpu: 100m memory: 512Mi type: Container "} {"_id":"q-en-kubernetes-1aaa73658753c8d693f1cf0a432d9b92398d7c84e2f9925dbb24e91f889347a2","text":"\"github.com/google/gofuzz\" ) func TestConverter_DefaultConvert(t *testing.T) { type A struct { Foo string Baz int } type B struct { Bar string Baz int } c := NewConverter() c.Debug = t c.NameFunc = func(t reflect.Type) string { return \"MyType\" } // Ensure conversion funcs can call DefaultConvert to get default behavior, // then fixup remaining fields manually err := c.Register(func(in *A, out *B, s Scope) error { if err := s.DefaultConvert(in, out, IgnoreMissingFields); err != nil { return err } out.Bar = in.Foo return nil }) if err != nil { t.Fatalf(\"unexpected error %v\", err) } x := A{\"hello, intrepid test reader!\", 3} y := B{} err = c.Convert(&x, &y, 0, nil) if err != nil { t.Fatalf(\"unexpected error %v\", err) } if e, a := x.Foo, y.Bar; e != a { t.Errorf(\"expected %v, got %v\", e, a) } if e, a := x.Baz, y.Baz; e != a { t.Errorf(\"expected %v, got %v\", e, a) } } func TestConverter_CallsRegisteredFunctions(t *testing.T) { type A struct { Foo string"} {"_id":"q-en-kubernetes-1ae44cfc5ed424c1af5afdee0b4ac7b8f0492f87a6bdb3e86356c0432a97d5b8","text":"package remote import ( \"os\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-1b33fed19f7ef15b640606726c76c5869145649cdb356928e732a50e9f6cfb9c","text":"\"testing\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/util\" ) func TestNamespaceStrategy(t *testing.T) {"} {"_id":"q-en-kubernetes-1b35d6083434fc17e65853be19d37f2c51553ed9f09eb75daac77301bfae7638","text":"\"\": \"ServicePort contains information on service's port.\", \"name\": \"The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.\", \"protocol\": \"The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"port\": \"The port that will be exposed by this service.\", \"targetPort\": \"Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service\", \"nodePort\": \"The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport\","} {"_id":"q-en-kubernetes-1b997de440c7ec0b7adc683ade11ea5d89693371a6688f05854b6261e5ba8a59","text":"errCh.SendErrorWithCancel(err, cancel) return } klog.V(2).InfoS(\"Preemptor Pod preempted victim Pod\", \"preemptor\", klog.KObj(pod), \"victim\", klog.KObj(victim), \"node\", c.Name()) } fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, \"Preempted\", \"Preempting\", \"Preempted by a pod on node %v\", c.Name()) }"} {"_id":"q-en-kubernetes-1bb34495b1d041d5d95e073f59088059ce3d68f35de964beecd12f72511b1d16","text":"} interval := time.NewTicker(time.Millisecond * 500) defer interval.Stop() done := make(chan bool, 1) done := make(chan bool) go func() { time.Sleep(time.Minute * 2) done <- true close(done) }() for { select {"} {"_id":"q-en-kubernetes-1bde64669f769ed37fafcf1b23f4ffbddd943dbca215a117669f3a8962fbefc9","text":"CLUSTER_DIR?=$(shell pwd)/../../../cluster/ BASEIMAGE=debian:stable-slim TEMP_DIR:=$(shell mktemp -d -t conformanceXXXXXX) # This is defined in root Makefile, but some build contexts do not refer to them KUBE_BASE_IMAGE_REGISTRY?=k8s.gcr.io ifeq ($(ARCH),amd64) BASEIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base:v2.1.3 else BASEIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base-${ARCH}:v2.1.3 endif RUNNERIMAGE?=gcr.io/distroless/base:latest TEMP_DIR:=$(shell mktemp -d -t conformance-XXXXXX) all: build"} {"_id":"q-en-kubernetes-1bf0b4f5bc66df537127c15c02c298e9b0d17b745ad0fc2b6f28c1dbac707eae","text":"\"command\": \"Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", \"args\": \"Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", \"workingDir\": \"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.\", \"ports\": \"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.\", \"ports\": \"List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.\", \"envFrom\": \"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.\", \"env\": \"List of environment variables to set in the container. Cannot be updated.\", \"resources\": \"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\","} {"_id":"q-en-kubernetes-1c067fcda6fb2f7494ed129125533874bd7515489bb612cfc69c0e71aa58ae40","text":"} } } // Providing HardPodAffinitySymmetricWeight in the policy config is the new and preferred way of providing the value. // Give it higher precedence than scheduler CLI configuration when it is provided. if policy.HardPodAffinitySymmetricWeight != 0 { f.hardPodAffinitySymmetricWeight = policy.HardPodAffinitySymmetricWeight } return f.CreateFromKeys(predicateKeys, priorityKeys, extenders) }"} {"_id":"q-en-kubernetes-1c159164c2ff532cc41aab424f5fd9a6af30cb8a8dc554b65bd3cf0bb14253bf","text":"\"time\" \"github.com/golang/glog\" \"github.com/golang/protobuf/proto\" cadvisorfs \"github.com/google/cadvisor/fs\" cadvisorapiv2 \"github.com/google/cadvisor/info/v2\""} {"_id":"q-en-kubernetes-1c332197dbbae7092624413e87e895876b29a4fe86c7bf95439de2607966e476","text":"runtimeapi \"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\" \"k8s.io/kubernetes/pkg/kubelet/dockertools\" \"k8s.io/kubernetes/pkg/kubelet/qos\" \"k8s.io/kubernetes/pkg/kubelet/types\" )"} {"_id":"q-en-kubernetes-1c68c99716640fff1a696b455aa1a2dc954c3b2f61e9da749b79f37697f7f166","text":"capabilities.Setup(kcfg.AllowPrivileged, privilegedSources, 0) credentialprovider.SetPreferredDockercfgPath(kcfg.RootDirectory) glog.V(2).Infof(\"Using root directory: %v\", kcfg.RootDirectory) builder := kcfg.Builder if builder == nil {"} {"_id":"q-en-kubernetes-1c6fb4877dd0b569c39092e2e5718983b07eecf78ea1fb646e27c85166341a49","text":"cluster/addons/fluentd-elasticsearch/es-image cluster/images/etcd/attachlease cluster/images/etcd/rollback cmd/gendocs cmd/genkubedocs cmd/genman"} {"_id":"q-en-kubernetes-1c7888aa19ca6dcfdc2e964f6ff52b119f3e198434841b1758af69fff91af64f","text":"return \"\" } func podID(element interface{}) string { el := element.(*model.Sample) return fmt.Sprintf(\"%s::%s\", el.Metric[\"namespace\"], el.Metric[\"pod\"]) } func containerID(element interface{}) string { el := element.(*model.Sample) return fmt.Sprintf(\"%s::%s::%s\", el.Metric[\"namespace\"], el.Metric[\"pod\"], el.Metric[\"container\"])"} {"_id":"q-en-kubernetes-1cfa3d6b74b9d2949fafb341be3cd4ddbd4a201f56a7d3e48667e2a1e328622a","text":"if err != nil { return err } stat, err := framework.RunKubectl(namespace, \"create\", \"-f\", adapterURL) stat, err := framework.RunKubectl(\"\", \"create\", \"-f\", adapterURL) framework.Logf(stat) return err } func createClusterAdminBinding(namespace string) error { func createClusterAdminBinding() error { stdout, stderr, err := framework.RunCmd(\"gcloud\", \"config\", \"get-value\", \"core/account\") if err != nil { framework.Logf(stderr)"} {"_id":"q-en-kubernetes-1d0272a813f80cbbe866b4bb182bf1453b5079823f357fc3f392bb7655e2003c","text":"nominatedPodToNode: make(map[ktypes.UID]string), } } // MakeNextPodFunc returns a function to retrieve the next pod from a given // scheduling queue func MakeNextPodFunc(queue SchedulingQueue) func() *v1.Pod { return func() *v1.Pod { pod, err := queue.Pop() if err == nil { klog.V(4).Infof(\"About to try and schedule pod %v/%v\", pod.Namespace, pod.Name) return pod } klog.Errorf(\"Error while retrieving next pod from scheduling queue: %v\", err) return nil } } "} {"_id":"q-en-kubernetes-1d2ba0de50b30199d2062fed9979b7dcb51a8580c218f38d5a6e01b4fd1ced60","text":"} t.Logf(\"rs._internal.apps -> rs.v1.apps\") data, err := runtime.Encode(extGroup.Codec(), rs) data, err := runtime.Encode(extCodec, rs) if err != nil { t.Fatalf(\"unexpected encoding error: %v\", err) }"} {"_id":"q-en-kubernetes-1d4069f6348660f69f505c91a1e0245996afe7bb5eb07851958562ec8ccc3160","text":"return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } klog.Infof(deviceToDetach.GenerateMsgDetailed(\"UnmountDevice succeeded\", \"\")) klog.Info(deviceToDetach.GenerateMsgDetailed(\"UnmountDevice succeeded\", \"\")) // Update actual state of world markDeviceUnmountedErr := actualStateOfWorld.MarkDeviceAsUnmounted("} {"_id":"q-en-kubernetes-1d80e0084ac27b8e3026e8bead0f21c8acfa62f02e04b37d09577a28e0e1dc6e","text":"return types.NewErr(\"composited variable %q fails to compile: %v\", a.name, a.result.Error) } v, details, err := a.result.Program.Eval(a.activation) v, details, err := a.result.Program.ContextEval(a.context, a.activation) if details == nil { return types.NewErr(\"unable to get evaluation details of variable %q\", a.name) }"} {"_id":"q-en-kubernetes-1d865256c98a5104a154aef1c2519977c97a0b9d5a125274c7d6801698316579","text":"}, }, Command: []string{\"/bin/sh\"}, Args: []string{\"-c\", \"python ./data_download.py && time -p python ./wide_deep.py --model_type=wide_deep --train_epochs=300 --epochs_between_evals=300 --batch_size=32561\"}, Args: []string{\"-c\", \"time -p python ./wide_deep.py --model_type=wide_deep --train_epochs=300 --epochs_between_evals=300 --batch_size=32561\"}, } containers = append(containers, ctn)"} {"_id":"q-en-kubernetes-1da11707c3bb8173d40db4538de19d1a01374e5306926e5e5b75402d110818f9","text":"serviceLister: serviceLister, serviceHasSynced: serviceHasSynced, nodeLister: nodeLister, nodeHasSynced: nodeHasSynced, masterServiceNamespace: masterServiceNamespace, streamingConnectionIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, recorder: kubeDeps.Recorder,"} {"_id":"q-en-kubernetes-1db90df26f4e08311e9dfb3902a264434011d2b86cde9a8874d6f3dc6629f041","text":"# Post-condition: Only the default kubernetes services exist kube::test::get_object_assert services \"{{range.items}}{{$id_field}}:{{end}}\" 'kubernetes:' ### Create deployent and service # Pre-condition: no deployment exists kube::test::wait_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" '' # Command kubectl run testmetadata --image=nginx --replicas=2 --port=80 --expose --service-overrides='{ \"metadata\": { \"annotations\": { \"zone-context\": \"home\" } } } ' # Check result kube::test::get_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" 'testmetadata:' kube::test::get_object_assert 'service testmetadata' \"{{.metadata.annotations}}\" \"map[zone-context:home]\" ### Expose deployment as a new service # Command kubectl expose deployment testmetadata --port=1000 --target-port=80 --type=NodePort --name=exposemetadata --overrides='{ \"metadata\": { \"annotations\": { \"zone-context\": \"work\" } } } ' # Check result kube::test::get_object_assert 'service exposemetadata' \"{{.metadata.annotations}}\" \"map[zone-context:work]\" # Clean-Up # Command kubectl delete service exposemetadata testmetadata \"${kube_flags[@]}\" if [[ \"${WAIT_FOR_DELETION:-}\" == \"true\" ]]; then kube::test::wait_object_assert services \"{{range.items}}{{$id_field}}:{{end}}\" 'kubernetes:' fi kubectl delete deployment testmetadata \"${kube_flags[@]}\" if [[ \"${WAIT_FOR_DELETION:-}\" == \"true\" ]]; then kube::test::wait_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" '' fi set +o nounset set +o errexit }"} {"_id":"q-en-kubernetes-1dddf422da740eba1d7aa20c0df6a2c62a8914a379c5e46dae5d1943affde45a","text":"} output, err := json.Marshal(agg) require.NoError(t, err) // Content-type is \"aggregated\" discovery format. w.Header().Set(\"Content-Type\", AcceptV2Beta1) // Content-type is \"aggregated\" discovery format. Add extra parameter // to ensure we are resilient to these extra parameters. w.Header().Set(\"Content-Type\", AcceptV2Beta1+\"; charset=utf-8\") w.WriteHeader(status) w.Write(output) }))"} {"_id":"q-en-kubernetes-1e30e61f1a18654df6781dcc87bfef6e847bb3275d7d5406ead10770bf25b592","text":"if kl.kubeClient == nil { return kl.initialNode(context.TODO()) } // if we have a valid kube client, we wait for initial lister to sync if !kl.nodeHasSynced() { err := wait.PollImmediate(time.Second, maxWaitForAPIServerSync, func() (bool, error) { return kl.nodeHasSynced(), nil }) if err != nil { return nil, fmt.Errorf(\"nodes have not yet been read at least once, cannot construct node object\") } } return kl.nodeLister.Get(string(kl.nodeName)) }"} {"_id":"q-en-kubernetes-1e96f6415f93c0ed3c0a9c99b7733df5fb68ee8764bd8a1ec67fe5a615232fce","text":"for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.LoadBalancerIPMode, tc.ipModeEnabled)() s := core.LoadBalancerStatus{} tc.tweakLBStatus(&s) errs := ValidateLoadBalancerStatus(&s, field.NewPath(\"status\")) defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AllowServiceLBStatusOnNonLB, tc.nonLBAllowed)() status := core.LoadBalancerStatus{} tc.tweakLBStatus(&status) spec := core.ServiceSpec{Type: core.ServiceTypeLoadBalancer} if tc.tweakSvcSpec != nil { tc.tweakSvcSpec(&spec) } errs := ValidateLoadBalancerStatus(&status, field.NewPath(\"status\"), &spec) if len(errs) != tc.numErrs { t.Errorf(\"Unexpected error list for case %q(expected:%v got %v) - Errors:n %v\", tc.name, tc.numErrs, len(errs), errs.ToAggregate()) }"} {"_id":"q-en-kubernetes-1ea5aa727a07988def3af37d5a6ff9d572aab4bd85221f1483d6a1587f3ab3d5","text":"expectError: false, }, { name: \"subpath-mounting-unix-socket\", name: \"mount-unix-socket\", prepare: func(base string) ([]string, string, string, error) { volpath, subpathMount := getTestPaths(base) mounts := []string{subpathMount}"} {"_id":"q-en-kubernetes-1ea9ba6d97db8b82c4fe5bbe0060c77e678be6271f8a4fce3563b429cdea8b60","text":" # Rollback workflow Build it in this directory. Make sure you have etcd dependency ready. Last time we use etcd v3.0.7. ``` $ go build . ``` Run it: ``` $ ./rollback2 --data-dir $ETCD_DATA_DIR --ttl 1h ``` This will rollback KV pairs from v3 into v2. If a key was attached to a lease before, it will be created with given TTL (default to 1h). On success, it will print at the end: ``` Finished successfully ``` Repeat this on all etcd members. You can do simple check on keys (if any exists): ``` etcdctl ls / ``` Important Note ------ This tool isn't recommended to use if any problem comes up in etcd3 backend. Please report bugs and we will fix it soon. If it's still preferred to run this tool, please backup all your data beforehand. This tool will also back up datadir to same path with \".rollback.backup\" suffix. Caveats: - The tool doesn't preserve versions of keys. - If any v2 data exists before rollback, they will be wiped out. - v3 data only exists in the backup after successful rollback. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/images/etcd/rollback/README.md?pixel)]() No newline at end of file"} {"_id":"q-en-kubernetes-1ecf1608a2f660b88bf044a5ed4a368c473fb9e56256ef196e584eea7e456bcd","text":"return nil case watch.Error: watcher.Stop() watcherClosed = true // start another cycle return c.waitForVolumeDetachmentInternal(volumeHandle, attachID, timer, timeout) klog.Warningf(\"waitForVolumeDetachmentInternal received watch error: %v\", event) } case <-timer.C:"} {"_id":"q-en-kubernetes-1f11128a15e96669c49a4c5d0d1e8a28cb35d187992e96a556ad7e9808926b11","text":"return utilfile.FileExists(pathname) } func (mounter *Mounter) EvalHostSymlinks(pathname string) (string, error) { return filepath.EvalSymlinks(pathname) } // formatAndMount uses unix utils to format and mount the given disk func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error { readOnly := false"} {"_id":"q-en-kubernetes-1f292eff4a150c8153ee5d17ebd30896f89d8e50b11bc52ecf291fa996879900","text":"`, inhibitDelayMax.Seconds()) logindOverridePath := filepath.Join(logindConfigDirectory, kubeletLogindConf) if err := ioutil.WriteFile(logindOverridePath, []byte(inhibitOverride), 0755); err != nil { if err := ioutil.WriteFile(logindOverridePath, []byte(inhibitOverride), 0644); err != nil { return fmt.Errorf(\"failed writing logind shutdown inhibit override file %v: %v\", logindOverridePath, err) }"} {"_id":"q-en-kubernetes-1f66b900d4836acf4845c5eb7520e75092722b43e27815c2ab4633011906053a","text":"kubectl get services \"${kube_flags[@]}\" kubectl get services \"service-${version}-test\" \"${kube_flags[@]}\" kubectl delete service frontend \"${kube_flags[@]}\" servicesbefore=\"$(kubectl get services -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" kubectl create -f examples/guestbook/frontend-service.json \"${kube_flags[@]}\" kubectl create -f examples/guestbook/redis-slave-service.json \"${kube_flags[@]}\" kubectl delete services frontend redisslave # delete multiple services at once servicesafter=\"$(kubectl get services -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" [ \"$((${servicesafter} - ${servicesbefore}))\" -eq 0 ] kube::log::status \"Testing kubectl(${version}:replicationcontrollers)\" kubectl get replicationcontrollers \"${kube_flags[@]}\""} {"_id":"q-en-kubernetes-1fa9035e638ede560050d8a5da83c627e14919b83eb0ca785495a4786d63d9c0","text":"} func getFitPredicateFunctions(names sets.String, args PluginFactoryArgs) (map[string]predicates.FitPredicate, error) { schedulerFactoryMutex.Lock() defer schedulerFactoryMutex.Unlock() schedulerFactoryMutex.RLock() defer schedulerFactoryMutex.RUnlock() fitPredicates := map[string]predicates.FitPredicate{} for _, name := range names.List() {"} {"_id":"q-en-kubernetes-1fafec356b8a617bf803f8cff69fb8a4a2c05e182ec873c373f2af5a8895bdee","text":"func (b *Builder) ResourceTypeAndNameArgs(args ...string) *Builder { switch len(args) { case 2: b.name = args[1] b.names = append(b.names, args[1]) b.ResourceTypes(SplitResourceArgument(args[0])...) case 0: default:"} {"_id":"q-en-kubernetes-1ffef005e47295e4d1295d17e44e0ce43d8f2b77e746e865716d9e6bd5b4c900","text":"$ make get ../../../kubectl.sh get pods Running: ../../../../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get pods POD CONTAINER(S) IMAGE(S) HOST LABELS STATUS 7e1c7ce6-9764-11e4-898c-42010af03582 kibana-logging kubernetes/kibana kubernetes-minion-3.c.kubernetes-elk.internal/130.211.129.169 name=kibana-logging Running synthetic-logger-0.25lps-pod synth-lgr ubuntu:14.04 kubernetes-minion-2.c.kubernetes-elk.internal/146.148.41.87 name=synth-logging-source Running synthetic-logger-10lps-pod synth-lgr ubuntu:14.04 kubernetes-minion-1.c.kubernetes-elk.internal/146.148.42.44 name=synth-logging-source Running influx-grafana influxdb kubernetes/heapster_influxdb kubernetes-minion-3.c.kubernetes-elk.internal/130.211.129.169 name=influxdb Running grafana kubernetes/heapster_grafana elasticsearch elasticsearch heapster heapster kubernetes/heapster kubernetes-minion-2.c.kubernetes-elk.internal/146.148.41.87 name=heapster Running 67cfcb1f-9764-11e4-898c-42010af03582 etcd quay.io/coreos/etcd:latest kubernetes-minion-3.c.kubernetes-elk.internal/130.211.129.169 k8s-app=skydns Running kube2sky kubernetes/kube2sky:1.0 skydns kubernetes/skydns:2014-12-23-001 6ba20338-9764-11e4-898c-42010af03582 elasticsearch-logging elasticsearch kubernetes-minion-3.c.kubernetes-elk.internal/130.211.129.169 name=elasticsearch-logging Running ../../../cluster/kubectl.sh get replicationControllers Running: ../../../cluster/../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get replicationControllers CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS skydns etcd quay.io/coreos/etcd:latest k8s-app=skydns 1 kube2sky kubernetes/kube2sky:1.0 skydns kubernetes/skydns:2014-12-23-001 elasticsearch-logging-controller elasticsearch-logging elasticsearch name=elasticsearch-logging 1 kibana-logging-controller kibana-logging kubernetes/kibana name=kibana-logging 1 ../../.../kubectl.sh get services Running: ../../../cluster/../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get services NAME LABELS SELECTOR IP PORT kubernetes-ro component=apiserver,provider=kubernetes 10.0.83.3 80 kubernetes component=apiserver,provider=kubernetes 10.0.79.4 443 influx-master name=influxdb 10.0.232.223 8085 skydns k8s-app=skydns k8s-app=skydns 10.0.0.10 53 elasticsearch-logging name=elasticsearch-logging 10.0.25.103 9200 kibana-logging name=kibana-logging 10.0.208.114 5601 POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE elasticsearch-logging-f0smz 10.244.2.3 kubernetes-minion-ilqx/104.197.8.214 kubernetes.io/cluster-service=true,name=elasticsearch-logging Running 5 hours elasticsearch-logging gcr.io/google_containers/elasticsearch:1.0 Running 5 hours etcd-server-kubernetes-master kubernetes-master/ Running 5 hours etcd-container gcr.io/google_containers/etcd:2.0.9 Running 5 hours fluentd-elasticsearch-kubernetes-minion-7s1y 10.244.0.2 kubernetes-minion-7s1y/23.236.54.97 Running 5 hours fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5 Running 5 hours fluentd-elasticsearch-kubernetes-minion-cfs6 10.244.1.2 kubernetes-minion-cfs6/104.154.61.231 Running 5 hours fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5 Running 5 hours fluentd-elasticsearch-kubernetes-minion-ilqx 10.244.2.2 kubernetes-minion-ilqx/104.197.8.214 Running 5 hours fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5 Running 5 hours fluentd-elasticsearch-kubernetes-minion-x8gx 10.244.3.2 kubernetes-minion-x8gx/104.154.47.83 Running 5 hours fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5 Running 5 hours kibana-logging-cwe0b 10.244.1.3 kubernetes-minion-cfs6/104.154.61.231 kubernetes.io/cluster-service=true,name=kibana-logging Running 5 hours kibana-logging gcr.io/google_containers/kibana:1.2 Running 5 hours kube-apiserver-kubernetes-master kubernetes-master/ Running 5 hours kube-apiserver gcr.io/google_containers/kube-apiserver:f0c332fc2582927ec27d24965572d4b0 Running 5 hours kube-controller-manager-kubernetes-master kubernetes-master/ Running 5 hours kube-controller-manager gcr.io/google_containers/kube-controller-manager:6729154dfd4e2a19752bdf9ceff8464c Running 5 hours kube-dns-swd4n 10.244.3.5 kubernetes-minion-x8gx/104.154.47.83 k8s-app=kube-dns,kubernetes.io/cluster-service=true,name=kube-dns Running 5 hours kube2sky gcr.io/google_containers/kube2sky:1.2 Running 5 hours etcd quay.io/coreos/etcd:v2.0.3 Running 5 hours skydns gcr.io/google_containers/skydns:2015-03-11-001 Running 5 hours kube-scheduler-kubernetes-master kubernetes-master/ Running 5 hours kube-scheduler gcr.io/google_containers/kube-scheduler:ec9d2092f754211cc5ab3a5162c05fc1 Running 5 hours monitoring-heapster-controller-zpjj1 10.244.3.3 kubernetes-minion-x8gx/104.154.47.83 kubernetes.io/cluster-service=true,name=heapster Running 5 hours heapster gcr.io/google_containers/heapster:v0.10.0 Running 5 hours monitoring-influx-grafana-controller-dqan4 10.244.3.4 kubernetes-minion-x8gx/104.154.47.83 kubernetes.io/cluster-service=true,name=influxGrafana Running 5 hours grafana gcr.io/google_containers/heapster_grafana:v0.6 Running 5 hours influxdb gcr.io/google_containers/heapster_influxdb:v0.3 Running 5 hours synthetic-logger-0.25lps-pod 10.244.0.7 kubernetes-minion-7s1y/23.236.54.97 name=synth-logging-source Running 19 minutes synth-lgr ubuntu:14.04 Running 19 minutes synthetic-logger-10lps-pod 10.244.3.14 kubernetes-minion-x8gx/104.154.47.83 name=synth-logging-source Running 19 minutes synth-lgr ubuntu:14.04 Running 19 minutes ../../_output/local/bin/linux/amd64/kubectl get replicationControllers CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS elasticsearch-logging elasticsearch-logging gcr.io/google_containers/elasticsearch:1.0 name=elasticsearch-logging 1 kibana-logging kibana-logging gcr.io/google_containers/kibana:1.2 name=kibana-logging 1 kube-dns etcd quay.io/coreos/etcd:v2.0.3 k8s-app=kube-dns 1 kube2sky gcr.io/google_containers/kube2sky:1.2 skydns gcr.io/google_containers/skydns:2015-03-11-001 monitoring-heapster-controller heapster gcr.io/google_containers/heapster:v0.10.0 name=heapster 1 monitoring-influx-grafana-controller influxdb gcr.io/google_containers/heapster_influxdb:v0.3 name=influxGrafana 1 grafana gcr.io/google_containers/heapster_grafana:v0.6 ../../_output/local/bin/linux/amd64/kubectl get services NAME LABELS SELECTOR IP(S) PORT(S) elasticsearch-logging kubernetes.io/cluster-service=true,name=elasticsearch-logging name=elasticsearch-logging 10.0.251.221 9200/TCP kibana-logging kubernetes.io/cluster-service=true,name=kibana-logging name=kibana-logging 10.0.188.118 5601/TCP kube-dns k8s-app=kube-dns,kubernetes.io/cluster-service=true,name=kube-dns k8s-app=kube-dns 10.0.0.10 53/UDP kubernetes component=apiserver,provider=kubernetes 10.0.0.2 443/TCP kubernetes-ro component=apiserver,provider=kubernetes 10.0.0.1 80/TCP monitoring-grafana kubernetes.io/cluster-service=true,name=grafana name=influxGrafana 10.0.254.202 80/TCP monitoring-heapster kubernetes.io/cluster-service=true,name=heapster name=heapster 10.0.19.214 80/TCP monitoring-influxdb name=influxGrafana name=influxGrafana 10.0.198.71 80/TCP monitoring-influxdb-ui name=influxGrafana name=influxGrafana 10.0.109.66 80/TCP ``` The `net` rule in the Makefile will report information about the Elasticsearch and Kibana services including the public IP addresses of each service. ``` $ make net ../../../kubectl.sh get services elasticsearch-logging -o json current-context: \"kubernetes-satnam_kubernetes\" Running: ../../../../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get services elasticsearch-logging -o json current-context: \"lithe-cocoa-92103_kubernetes\" Running: ../../_output/local/bin/linux/amd64/kubectl get services elasticsearch-logging -o json { \"kind\": \"Service\", \"id\": \"elasticsearch-logging\", \"uid\": \"e5bf0a51-b87f-11e4-bd62-42010af01267\", \"creationTimestamp\": \"2015-02-19T21:40:18Z\", \"selfLink\": \"/api/v1beta1/services/elasticsearch-logging?namespace=default\", \"resourceVersion\": 68, \"apiVersion\": \"v1beta1\", \"namespace\": \"default\", \"port\": 9200, \"protocol\": \"TCP\", \"labels\": { \"name\": \"elasticsearch-logging\" \"apiVersion\": \"v1beta3\", \"metadata\": { \"name\": \"elasticsearch-logging\", \"namespace\": \"default\", \"selfLink\": \"/api/v1beta3/namespaces/default/services/elasticsearch-logging\", \"uid\": \"9dc7290f-f358-11e4-a58e-42010af09a93\", \"resourceVersion\": \"28\", \"creationTimestamp\": \"2015-05-05T18:57:45Z\", \"labels\": { \"kubernetes.io/cluster-service\": \"true\", \"name\": \"elasticsearch-logging\" } }, \"selector\": { \"name\": \"elasticsearch-logging\" \"spec\": { \"ports\": [ { \"name\": \"\", \"protocol\": \"TCP\", \"port\": 9200, \"targetPort\": \"es-port\" } ], \"selector\": { \"name\": \"elasticsearch-logging\" }, \"portalIP\": \"10.0.251.221\", \"sessionAffinity\": \"None\" }, \"createExternalLoadBalancer\": true, \"publicIPs\": [ \"104.154.81.135\" ], \"containerPort\": 9200, \"portalIP\": \"10.0.58.62\", \"sessionAffinity\": \"None\" \"status\": {} } ../../../kubectl.sh get services kibana-logging -o json current-context: \"kubernetes-satnam_kubernetes\" Running: ../../../../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get services kibana-logging -o json current-context: \"lithe-cocoa-92103_kubernetes\" Running: ../../_output/local/bin/linux/amd64/kubectl get services kibana-logging -o json { \"kind\": \"Service\", \"id\": \"kibana-logging\", \"uid\": \"e5bd4617-b87f-11e4-bd62-42010af01267\", \"creationTimestamp\": \"2015-02-19T21:40:18Z\", \"selfLink\": \"/api/v1beta1/services/kibana-logging?namespace=default\", \"resourceVersion\": 67, \"apiVersion\": \"v1beta1\", \"namespace\": \"default\", \"port\": 5601, \"protocol\": \"TCP\", \"labels\": { \"name\": \"kibana-logging\" \"apiVersion\": \"v1beta3\", \"metadata\": { \"name\": \"kibana-logging\", \"namespace\": \"default\", \"selfLink\": \"/api/v1beta3/namespaces/default/services/kibana-logging\", \"uid\": \"9dc6f856-f358-11e4-a58e-42010af09a93\", \"resourceVersion\": \"31\", \"creationTimestamp\": \"2015-05-05T18:57:45Z\", \"labels\": { \"kubernetes.io/cluster-service\": \"true\", \"name\": \"kibana-logging\" } }, \"selector\": { \"name\": \"kibana-logging\" \"spec\": { \"ports\": [ { \"name\": \"\", \"protocol\": \"TCP\", \"port\": 5601, \"targetPort\": \"kibana-port\" } ], \"selector\": { \"name\": \"kibana-logging\" }, \"portalIP\": \"10.0.188.118\", \"sessionAffinity\": \"None\" }, \"createExternalLoadBalancer\": true, \"publicIPs\": [ \"104.154.91.224\" ], \"containerPort\": 80, \"portalIP\": \"10.0.124.153\", \"sessionAffinity\": \"None\" \"status\": {} } ``` For this example the Elasticsearch service is running at `http://104.154.81.135:9200`. To find the URLs to access the Elasticsearch and Kibana viewer, ``` $ kubectl cluster-info Kubernetes master is running at https://130.211.122.180 elasticsearch-logging is running at https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/elasticsearch-logging kibana-logging is running at https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/kibana-logging kube-dns is running at https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/kube-dns grafana is running at https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/monitoring-grafana heapster is running at https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/monitoring-heapster ``` To find the user name and password to access the URLs, ``` $ kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: REDACTED server: https://130.211.122.180 name: lithe-cocoa-92103_kubernetes contexts: - context: cluster: lithe-cocoa-92103_kubernetes user: lithe-cocoa-92103_kubernetes name: lithe-cocoa-92103_kubernetes current-context: lithe-cocoa-92103_kubernetes kind: Config preferences: {} users: - name: lithe-cocoa-92103_kubernetes user: client-certificate-data: REDACTED client-key-data: REDACTED token: 65rZW78y8HxmXXtSXuUw9DbP4FLjHi4b - name: lithe-cocoa-92103_kubernetes-basic-auth user: password: h5M0FtVXXflBSdI7 username: admin ``` Access the Elasticsearch service at URL `https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/elasticsearch-logging`, use the user name 'admin' and password 'h5M0FtVXXflBSdI7', ``` $ curl http://104.154.81.135:9200 { \"status\" : 200, \"name\" : \"Wombat\", \"cluster_name\" : \"elasticsearch\", \"name\" : \"Major Mapleleaf\", \"cluster_name\" : \"kubernetes_logging\", \"version\" : { \"number\" : \"1.4.4\", \"build_hash\" : \"c88f77ffc81301dfa9dfd81ca2232f09588bd512\","} {"_id":"q-en-kubernetes-2001ed9cebd868a45b35804b626f643da85b11a5a8a1c9ebfaa9bd104d7937b7","text":"pod := makeLocalPodFunc(config, testVol, nodeName) pod, err := config.client.CoreV1().Pods(config.ns).Create(pod) Expect(err).NotTo(HaveOccurred()) err = framework.WaitForPodRunningInNamespace(config.client, pod) Expect(err).To(HaveOccurred()) checkPodEvents(config, pod.Name, ep) err = framework.WaitForPodNameUnschedulableInNamespace(config.client, pod.Name, pod.Namespace) Expect(err).NotTo(HaveOccurred()) cleanupLocalVolumes(config, []*localTestVolume{testVol}) }"} {"_id":"q-en-kubernetes-2021b3a19299fbb79856088736edcf5a90bd608fd007709cb79a0eaedf0cd23b","text":"// Checks whether stores for all clusters form the lists (and only these) are there and // are synced. func (fs *federatedStoreImpl) ClustersSynced(clusters []*federation_api.Cluster) bool { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() if len(fs.federatedInformer.targetInformers) != len(clusters) { // Get the list of informers to check under a lock and check it outside. okSoFar, informersToCheck := func() (bool, []informer) { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() if len(fs.federatedInformer.targetInformers) != len(clusters) { return false, []informer{} } informersToCheck := make([]informer, 0, len(clusters)) for _, cluster := range clusters { if targetInformer, found := fs.federatedInformer.targetInformers[cluster.Name]; found { informersToCheck = append(informersToCheck, targetInformer) } else { return false, []informer{} } } return true, informersToCheck }() if !okSoFar { return false } for _, cluster := range clusters { if targetInformer, found := fs.federatedInformer.targetInformers[cluster.Name]; found { if !targetInformer.controller.HasSynced() { return false } } else { for _, informerToCheck := range informersToCheck { if !informerToCheck.controller.HasSynced() { return false } }"} {"_id":"q-en-kubernetes-20449776cd7fb5b6a76b89f0f014a2fa25fa328d5c6de83a015c4fcf2a781c58","text":"package dns import ( \"fmt\" \"os\" \"testing\" ) var ( defaultResolvConf = \"/etc/resolv.conf\" // configurer.getHostDNSConfig is faked on Windows, while it is not faked on Linux. fakeGetHostDNSConfigCustom = getHostDNSConfig ) // getResolvConf returns a temporary resolv.conf file containing the testHostNameserver nameserver and // testHostDomain search field, and a cleanup function for the temporary file. func getResolvConf(t *testing.T) (string, func()) { resolvConfContent := []byte(fmt.Sprintf(\"nameserver %snsearch %sn\", testHostNameserver, testHostDomain)) tmpfile, err := os.CreateTemp(\"\", \"tmpResolvConf\") if err != nil { t.Fatal(err) } cleanup := func() { os.Remove(tmpfile.Name()) } if _, err := tmpfile.Write(resolvConfContent); err != nil { cleanup() t.Fatal(err) } if err := tmpfile.Close(); err != nil { cleanup() t.Fatal(err) } return tmpfile.Name(), cleanup } "} {"_id":"q-en-kubernetes-20644f7f031ef6c8714dc2df2cab74c03aea4af1b81f26171d757f8b2fc3c201","text":"return nil } // collectServiceNodePorts returns nodePorts specified in the Service. // Please note that: // 1. same nodePort with *same* protocol will be duplicated as it is // 2. same nodePort with *different* protocol will be deduplicated func collectServiceNodePorts(service *corev1.Service) []int { servicePorts := []int{} for i := range service.Spec.Ports { servicePort := &service.Spec.Ports[i] if servicePort.NodePort != 0 { servicePorts = append(servicePorts, int(servicePort.NodePort)) var servicePorts []int // map from nodePort to set of protocols seen := make(map[int]sets.String) for _, port := range service.Spec.Ports { nodePort := int(port.NodePort) if nodePort == 0 { continue } proto := string(port.Protocol) s := seen[nodePort] if s == nil { // have not seen this nodePort before s = sets.NewString(proto) servicePorts = append(servicePorts, nodePort) } else if s.Has(proto) { // same nodePort with same protocol servicePorts = append(servicePorts, nodePort) } else { // same nodePort with different protocol s.Insert(proto) } seen[nodePort] = s } if service.Spec.HealthCheckNodePort != 0 { servicePorts = append(servicePorts, int(service.Spec.HealthCheckNodePort)) healthPort := int(service.Spec.HealthCheckNodePort) if healthPort != 0 { s := seen[healthPort] // TODO: is it safe to assume the protocol is always TCP? if s == nil || s.Has(string(corev1.ProtocolTCP)) { servicePorts = append(servicePorts, healthPort) } } return servicePorts"} {"_id":"q-en-kubernetes-2067bd7357eed4575c725412c6b550bb8971334bfbddd59e1c36142533433575","text":"if [[ ${ENABLE_METADATA_CONCEALMENT:-} == \"true\" ]]; then # Put the necessary label on the node so the daemonset gets scheduled. NODE_LABELS=\"${NODE_LABELS},cloud.google.com/metadata-proxy-ready=true\" # TODO(liggitt): remove this in v1.16 NODE_LABELS=\"${NODE_LABELS},beta.kubernetes.io/metadata-proxy-ready=true\" # Add to the provider custom variables. PROVIDER_VARS=\"${PROVIDER_VARS:-} ENABLE_METADATA_CONCEALMENT METADATA_CONCEALMENT_NO_FIREWALL\" fi"} {"_id":"q-en-kubernetes-20755b820b118943e8b6c0684954dd80a58967530b05fce7fe84efc68f2288dc","text":"} } // TODO: remove when storage.k8s.io/v1beta1 is removed. func newBetaStorageClass(t testsuites.StorageClassTest, suffix string) *storagev1beta1.StorageClass { pluginName := t.Provisioner if pluginName == \"\" { pluginName = getDefaultPluginName() } if suffix == \"\" { suffix = \"default\" } return &storagev1beta1.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: \"StorageClass\", }, ObjectMeta: metav1.ObjectMeta{ GenerateName: suffix + \"-\", }, Provisioner: pluginName, Parameters: t.Parameters, } } func startGlusterDpServerPod(c clientset.Interface, ns string) *v1.Pod { podClient := c.CoreV1().Pods(ns)"} {"_id":"q-en-kubernetes-207d42c5ead8381ec2fd086dd06c787fee7e6106138653455528c48dc87e51a4","text":" /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package etcd import ( \"context\" \"encoding/json\" \"testing\" \"time\" \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/api/meta\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/watch\" \"k8s.io/client-go/dynamic\" \"k8s.io/kubernetes/cmd/kube-apiserver/app/options\" ) // TestCrossGroupStorage tests to make sure that all objects stored in an expected location in etcd can be converted/read. func TestCrossGroupStorage(t *testing.T) { master := StartRealMasterOrDie(t, func(opts *options.ServerRunOptions) { // force enable all resources so we can check storage. // TODO: drop these once we stop allowing them to be served. opts.APIEnablement.RuntimeConfig[\"extensions/v1beta1/deployments\"] = \"true\" opts.APIEnablement.RuntimeConfig[\"extensions/v1beta1/daemonsets\"] = \"true\" opts.APIEnablement.RuntimeConfig[\"extensions/v1beta1/replicasets\"] = \"true\" opts.APIEnablement.RuntimeConfig[\"extensions/v1beta1/podsecuritypolicies\"] = \"true\" opts.APIEnablement.RuntimeConfig[\"extensions/v1beta1/networkpolicies\"] = \"true\" }) defer master.Cleanup() etcdStorageData := GetEtcdStorageData() crossGroupResources := map[schema.GroupVersionKind][]Resource{} master.Client.CoreV1().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: testNamespace}}) // Group by persisted GVK for _, resourceToPersist := range master.Resources { gvk := resourceToPersist.Mapping.GroupVersionKind data, exists := etcdStorageData[resourceToPersist.Mapping.Resource] if !exists { continue } storageGVK := gvk if data.ExpectedGVK != nil { storageGVK = *data.ExpectedGVK } crossGroupResources[storageGVK] = append(crossGroupResources[storageGVK], resourceToPersist) } // Clear any without cross-group sources for gvk, resources := range crossGroupResources { groups := sets.NewString() for _, resource := range resources { groups.Insert(resource.Mapping.GroupVersionKind.Group) } if len(groups) < 2 { delete(crossGroupResources, gvk) } } if len(crossGroupResources) == 0 { // Sanity check t.Fatal(\"no cross-group resources found\") } // Test all potential cross-group sources can be watched and fetched from all other sources for gvk, resources := range crossGroupResources { t.Run(gvk.String(), func(t *testing.T) { // use the first one to create the initial object resource := resources[0] // compute namespace ns := \"\" if resource.Mapping.Scope.Name() == meta.RESTScopeNameNamespace { ns = testNamespace } data := etcdStorageData[resource.Mapping.Resource] // create object resourceClient, obj, err := JSONToUnstructured(data.Stub, ns, resource.Mapping, master.Dynamic) if err != nil { t.Fatal(err) } actual, err := resourceClient.Create(obj, metav1.CreateOptions{}) if err != nil { t.Fatal(err) } name := actual.GetName() // Set up clients, versioned data, and watches for all versions var ( clients = map[schema.GroupVersionResource]dynamic.ResourceInterface{} versionedData = map[schema.GroupVersionResource]*unstructured.Unstructured{} watches = map[schema.GroupVersionResource]watch.Interface{} ) for _, resource := range resources { clients[resource.Mapping.Resource] = master.Dynamic.Resource(resource.Mapping.Resource).Namespace(ns) versionedData[resource.Mapping.Resource], err = clients[resource.Mapping.Resource].Get(name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"error finding resource via %s: %v\", resource.Mapping.Resource.GroupVersion().String(), err) } watches[resource.Mapping.Resource], err = clients[resource.Mapping.Resource].Watch(metav1.ListOptions{ResourceVersion: actual.GetResourceVersion()}) if err != nil { t.Fatalf(\"error opening watch via %s: %v\", resource.Mapping.Resource.GroupVersion().String(), err) } } for _, resource := range resources { // clear out the things cleared in etcd versioned := versionedData[resource.Mapping.Resource] versioned.SetResourceVersion(\"\") versioned.SetSelfLink(\"\") versionedJSON, err := versioned.MarshalJSON() if err != nil { t.Error(err) continue } // Update in etcd if _, err := master.KV.Put(context.Background(), data.ExpectedEtcdPath, string(versionedJSON)); err != nil { t.Error(err) continue } t.Logf(\"wrote %s to etcd\", resource.Mapping.Resource.GroupVersion().String()) // Ensure everyone gets a watch event with the right version for watchResource, watcher := range watches { select { case event, ok := <-watcher.ResultChan(): if !ok { t.Fatalf(\"watch of %s closed in response to persisting %s\", watchResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String()) } if event.Type != watch.Modified { eventJSON, _ := json.Marshal(event) t.Errorf(\"unexpected watch event sent to watch of %s in response to persisting %s: %s\", watchResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String(), string(eventJSON)) continue } if event.Object.GetObjectKind().GroupVersionKind().GroupVersion() != watchResource.GroupVersion() { t.Errorf(\"unexpected group version object sent to watch of %s in response to persisting %s: %#v\", watchResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String(), event.Object) continue } t.Logf(\" received event for %s\", watchResource.GroupVersion().String()) case <-time.After(30 * time.Second): t.Errorf(\"timed out waiting for watch event for %s in response to persisting %s\", watchResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String()) continue } } // Ensure everyone can do a direct get and gets the right version for clientResource, client := range clients { obj, err := client.Get(name, metav1.GetOptions{}) if err != nil { t.Errorf(\"error looking up %s after persisting %s\", clientResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String()) continue } if obj.GetObjectKind().GroupVersionKind().GroupVersion() != clientResource.GroupVersion() { t.Errorf(\"unexpected group version retrieved from %s after persisting %s: %#v\", clientResource.GroupVersion().String(), resource.Mapping.Resource.GroupVersion().String(), obj) continue } t.Logf(\" fetched object for %s\", clientResource.GroupVersion().String()) } } }) } } "} {"_id":"q-en-kubernetes-2082ac15f6072b35699360e69a19216dee7be2563d9dd8a7b08f9c84789ac4c5","text":"import ( \"net/http\" \"os\" \"path/filepath\" \"github.com/gregjones/httpcache\""} {"_id":"q-en-kubernetes-2084b574a2d8820dba17cf7241bdf20ff36ed91808a88f77c50375eaa907ae0c","text":"wg.Add(2) go func() { defer h.t.Logf(\"Server read close, host=%s\", req.Host) defer wg.Done() defer h.t.Logf(\"Server read close, host=%s\", req.Host) io.Copy(conn, sconn) }() go func() { defer h.t.Logf(\"Server write close, host=%s\", req.Host) defer wg.Done() defer h.t.Logf(\"Server write close, host=%s\", req.Host) io.Copy(sconn, conn) }()"} {"_id":"q-en-kubernetes-208fa6b82243bf60716077cd0a0fc447913c0a72d6e846bb88a846509eab05cd","text":"package main import ( \"fmt\" \"os\" \"k8s.io/klog\""} {"_id":"q-en-kubernetes-209a4c2f7c9a35aa8cecfcf12667d1271da908875771ee01d637239a8c436db7","text":"// Updates from all sources AllSource = \"*\" // Used for ConfigMirrorAnnotationKey. MirrorType = \"mirror\" NamespaceDefault = api.NamespaceDefault )"} {"_id":"q-en-kubernetes-20ba5885de8567ca531b4577af02a555e32ae50637d3355dbd5ccede895f46df","text":"}) } } func TestMicroTimeUnmarshalJSONAndProtoEqual(t *testing.T) { cases := []struct { name string input MicroTime result bool }{ {\"nanosecond level precision\", UnixMicro(123, 123123123), true}, {\"microsecond level precision\", UnixMicro(123, 123123000), true}, } for _, c := range cases { t.Run(c.name, func(t *testing.T) { jsonData, err := c.input.MarshalJSON() if err != nil { t.Fatalf(\"Failed to marshal input to JSON: '%v': %v\", c.input, err) } protoData, err := c.input.Marshal() if err != nil { t.Fatalf(\"Failed to marshal input to proto: '%v': %v\", c.input, err) } var tJSON, tProto MicroTime if err = tJSON.UnmarshalJSON(jsonData); err != nil { t.Fatalf(\"Failed to unmarshal JSON: '%v': %v\", jsonData, err) } if err = tProto.Unmarshal(protoData); err != nil { t.Fatalf(\"Failed to unmarshal proto: '%v': %v\", protoData, err) } result := tJSON.Equal(&tProto) if result != c.result { t.Errorf(\"Failed equality test for '%v': expected %+v, got %+v\", c.input, c.result, result) } }) } } func TestMicroTimeProtoUnmarshalRaw(t *testing.T) { cases := []struct { name string input []byte expected MicroTime }{ // input is generated by Timestamp{123, 123123123}.Marshal() {\"nanosecond level precision\", []byte{8, 123, 16, 179, 235, 218, 58}, UnixMicro(123, 123123000)}, // input is generated by Timestamp{123, 123123000}.Marshal() {\"microsecond level precision\", []byte{8, 123, 16, 184, 234, 218, 58}, UnixMicro(123, 123123000)}, } for _, c := range cases { t.Run(c.name, func(t *testing.T) { var actual MicroTime if err := actual.Unmarshal(c.input); err != nil { t.Fatalf(\"Failed to unmarshal proto: '%v': %v\", c.input, err) } if !actual.Equal(&c.expected) { t.Errorf(\"Failed unmarshal from nanosecond-precise raw for '%v': expected %+v, got %+v\", c.input, c.expected, actual) } }) } } "} {"_id":"q-en-kubernetes-20c2115c51612a9a0f77edaf49488e2efc8a474deed3a4fa5de90fc63a2d357d","text":"// DiskIsAttached checks if a disk is attached to the given node. // Assumption: If node doesn't exist, disk is not attached to the node. DiskIsAttached(volPath string, nodeName k8stypes.NodeName) (bool, error) DiskIsAttached(volPath string, nodeName k8stypes.NodeName) (bool, string, error) // DisksAreAttached checks if a list disks are attached to the given node. // Assumption: If node doesn't exist, disks are not attached to the node."} {"_id":"q-en-kubernetes-211b6f396954d907f6360abfd575066df68ba296add27e1d080b8facd977f2b9","text":"} // Step 3: If the container logs directory does not exist, create it. if _, err := os.Stat(containerLogsDir); err != nil { if err := kl.os.MkdirAll(containerLogsDir, 0755); err != nil { glog.Errorf(\"Failed to create directory %q: %v\", containerLogsDir, err) if _, err := os.Stat(ContainerLogsDir); err != nil { if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { glog.Errorf(\"Failed to create directory %q: %v\", ContainerLogsDir, err) } }"} {"_id":"q-en-kubernetes-212cfe3f98ddeb9e62d410627435edd27ded28d6c7ecbe0928ecf24f07248075","text":"apiServiceLister listers.APIServiceLister apiServiceSynced cache.InformerSynced // serviceLister is used to get the IP to create the transport for serviceLister v1listers.ServiceLister servicesSynced cache.InformerSynced // To allow injection for testing. syncFn func(key string) error queue workqueue.RateLimitingInterface } func NewAPIServiceRegistrationController(apiServiceInformer informers.APIServiceInformer, serviceInformer v1informers.ServiceInformer, apiHandlerManager APIHandlerManager) *APIServiceRegistrationController { func NewAPIServiceRegistrationController(apiServiceInformer informers.APIServiceInformer, apiHandlerManager APIHandlerManager) *APIServiceRegistrationController { c := &APIServiceRegistrationController{ apiHandlerManager: apiHandlerManager, apiServiceLister: apiServiceInformer.Lister(), apiServiceSynced: apiServiceInformer.Informer().HasSynced, serviceLister: serviceInformer.Lister(), servicesSynced: serviceInformer.Informer().HasSynced, queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), \"APIServiceRegistrationController\"), }"} {"_id":"q-en-kubernetes-21503dff10bbde6433e81a7d6785891088641408bc5dce5ab3a805582765b809","text":"if err != nil { t.Fatalf(\"unexpected error %v\", err) } err = c.Convert(&A{}, &C{}, 0, nil) if err == nil { t.Errorf(\"unexpected non-error\")"} {"_id":"q-en-kubernetes-215daaa443ac04ded78101329a37955d1ceb03b013bf1bd108b7989e8ae951e6","text":" kind: ReplicationController apiVersion: v1 apiVersion: extensions/v1beta1 kind: Deployment metadata: name: etcd-discovery creationTimestamp: spec: strategy: type: Recreate resources: {} triggers: - type: ConfigChange replicas: 1 selector: name: etcd-discovery matchLabels: name: etcd-discovery template: metadata: creationTimestamp: labels: name: etcd-discovery spec:"} {"_id":"q-en-kubernetes-217bad504aaadadbf0caaf6967eb7c10dc16a6bf03c32792de7c5bb5ea57373d","text":"bashExec, exitCode, err) } } gomega.Expect(err).To(gomega.HaveOccurred(), \"%q should fail with exit code %d, but exit without error\", bashExec, exitCode) framework.ExpectError(err, \"%q should fail with exit code %d, but exit without error\", bashExec, exitCode) } // KubeletCommand performs `start`, `restart`, or `stop` on the kubelet running on the node of the target pod and waits"} {"_id":"q-en-kubernetes-2184649ac33f69d2ac29e41cca9412e80e7223e9b981c4c74d8eb3d58bd68c64","text":"e2eservice \"k8s.io/kubernetes/test/e2e/framework/service\" e2eskipper \"k8s.io/kubernetes/test/e2e/framework/skipper\" testutil \"k8s.io/kubernetes/test/utils\" imageutils \"k8s.io/kubernetes/test/utils/image\" utilpointer \"k8s.io/utils/pointer\" )"} {"_id":"q-en-kubernetes-21a0487a65b5071921fb9cdae2d2bafa73ebdbf2783df2c1e6fd147a47ae50ae","text":"// if you set fire time at X, you can get the bookmark within (X-1,X+1) period. // This is NOT thread-safe. type watcherBookmarkTimeBuckets struct { lock sync.Mutex watchersBuckets map[int64][]*cacheWatcher startBucketID int64 clock clock.Clock"} {"_id":"q-en-kubernetes-21d43009be64457f394da32805722837fb85588127d725bfa675030e463968ba","text":"return true, err } // scaleDownOldRCsForRecreate scales down old rcs when deployment strategy is \"Recreate\" func (dc *DeploymentController) scaleDownOldRCsForRecreate(oldRCs []*api.ReplicationController, deployment extensions.Deployment) (bool, error) { scaled := false for _, rc := range oldRCs { // Scaling not required. if rc.Spec.Replicas == 0 { continue } _, err := dc.scaleRCAndRecordEvent(rc, 0, deployment) if err != nil { return false, err } scaled = true } return scaled, nil } // scaleUpNewRCForRecreate scales up new rc when deployment strategy is \"Recreate\" func (dc *DeploymentController) scaleUpNewRCForRecreate(newRC *api.ReplicationController, deployment extensions.Deployment) (bool, error) { if newRC.Spec.Replicas == deployment.Spec.Replicas { // Scaling not required. return false, nil } _, err := dc.scaleRCAndRecordEvent(newRC, deployment.Spec.Replicas, deployment) return true, err } func (dc *DeploymentController) updateDeploymentStatus(allRCs []*api.ReplicationController, newRC *api.ReplicationController, deployment extensions.Deployment) error { totalReplicas := deploymentutil.GetReplicaCountForRCs(allRCs) updatedReplicas := deploymentutil.GetReplicaCountForRCs([]*api.ReplicationController{newRC})"} {"_id":"q-en-kubernetes-21d4f32548e506e334f13d139742dfebdb5143d941807ecd1c011423ca564773","text":"Describe(\"guestbook\", func() { var guestbookPath = filepath.Join(testContext.RepoRoot, \"examples/guestbook\") if testContext.Provider != \"gce\" && testContext.Provider != \"gke\" { By(fmt.Sprintf(\"Skipping guestbook, uses createExternalLoadBalancer, a (gce|gke) feature\")) } It(\"should create and stop a working application\", func() { if !providerIs(\"gce\", \"gke\") { By(fmt.Sprintf(\"Skipping guestbook, uses createExternalLoadBalancer, a (gce|gke) feature\")) return } defer cleanup(guestbookPath, frontendSelector, redisMasterSelector, redisSlaveSelector) By(\"creating all guestbook components\")"} {"_id":"q-en-kubernetes-21db8d4104d4f04d72022923b78f10aaf8faa330906cb5818b1fda9667cb3c44","text":"\"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library\","} {"_id":"q-en-kubernetes-21f921969f0d4dfc592aceadceba3bf91413c5fd9364d3b30e36bcce31afdbdf","text":"return state } func updateRunningPodAndContainerMetrics(pods []*kubecontainer.Pod) { // Set the number of running pods in the parameter metrics.RunningPodCount.Set(float64(len(pods))) // intermediate map to store the count of each \"container_state\" containerStateCount := make(map[string]int) for _, pod := range pods { containers := pod.Containers for _, container := range containers { // update the corresponding \"container_state\" in map to set value for the gaugeVec metrics containerStateCount[string(container.State)]++ } } for key, value := range containerStateCount { metrics.RunningContainerCount.WithLabelValues(key).Set(float64(value)) } } func (pr podRecords) getOld(id types.UID) *kubecontainer.Pod { r, ok := pr[id] if !ok {"} {"_id":"q-en-kubernetes-22075ee8db928af6e05bb1f2463fc2ab28cab6c7192dfe50d6f6e23844bf5fa4","text":"// Volume is added to asw. Because attach operation fails, volume should not be reported as attached to the node. waitForVolumeAddedToNode(t, generatedVolumeName, nodeName1, asw) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) // When volume is added to the node, it is set to mounted by default. Then the status will be updated by checking node status VolumeInUse. // Without this, the delete operation will be delayed due to mounted status"} {"_id":"q-en-kubernetes-226506a7022711190ffa06504cb00559dfb4084519de3cb199d650fa0df3af56","text":"if err != nil { return currentRevision, updateRevision, currentStatus, err } // update the set's status err = ssc.updateStatefulSetStatus(ctx, set, currentStatus) if err != nil { return currentRevision, updateRevision, currentStatus, err } klog.V(4).InfoS(\"StatefulSet pod status\", \"statefulSet\", klog.KObj(set), \"replicas\", currentStatus.Replicas, \"readyReplicas\", currentStatus.ReadyReplicas, \"currentReplicas\", currentStatus.CurrentReplicas, \"updatedReplicas\", currentStatus.UpdatedReplicas) klog.V(4).InfoS(\"StatefulSet revisions\", \"statefulSet\", klog.KObj(set), \"currentRevision\", currentStatus.CurrentRevision,"} {"_id":"q-en-kubernetes-227975a1ffa1439cc65c32a4ec429edf602bac0423f92f1b0ac316490bd9d585","text":"} } if oldCRD.UID != newCRD.UID { r.removeStorage_locked(oldCRD.UID) } storageMap := r.customStorage.Load().(crdStorageMap) oldInfo, found := storageMap[newCRD.UID] if !found {"} {"_id":"q-en-kubernetes-22a2cca52a6e1f190ab0f4d8f87d4b92a76781c61208933507ba609ec6168ec4","text":"// this is ok because we know exactly how we want to be serialized TypeMeta: metav1.TypeMeta{APIVersion: batchv1.SchemeGroupVersion.String(), Kind: \"Job\"}, ObjectMeta: metav1.ObjectMeta{ Name: o.Name, Annotations: annotations, Labels: cronJob.Spec.JobTemplate.Labels, OwnerReferences: []metav1.OwnerReference{ { APIVersion: batchv1.SchemeGroupVersion.String(), Kind: \"CronJob\", Name: cronJob.GetName(), UID: cronJob.GetUID(), }, }, Name: o.Name, Annotations: annotations, Labels: cronJob.Spec.JobTemplate.Labels, OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cronJob, batchv1.SchemeGroupVersion.WithKind(\"CronJob\"))}, }, Spec: cronJob.Spec.JobTemplate.Spec, }"} {"_id":"q-en-kubernetes-22b5661b97ea2dcd4cad39292301de8544b9969580d9481d2c2994a9c28d5473","text":"v1 \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/kubernetes/pkg/kubelet/cm\" \"k8s.io/kubernetes/pkg/kubelet/config\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\""} {"_id":"q-en-kubernetes-22c54e70c15e60ee2f8bc2703efc613c945cdccdcb777a997def9c42bd158427","text":"expected: &batchv1.Job{ TypeMeta: metav1.TypeMeta{APIVersion: batchv1.SchemeGroupVersion.String(), Kind: \"Job\"}, ObjectMeta: metav1.ObjectMeta{ Name: jobName, Annotations: map[string]string{\"cronjob.kubernetes.io/instantiate\": \"manual\"}, OwnerReferences: []metav1.OwnerReference{ { APIVersion: batchv1.SchemeGroupVersion.String(), Kind: \"CronJob\", Name: cronJob.GetName(), UID: cronJob.GetUID(), }, }, Name: jobName, Annotations: map[string]string{\"cronjob.kubernetes.io/instantiate\": \"manual\"}, OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cronJob, batchv1.SchemeGroupVersion.WithKind(\"CronJob\"))}, }, Spec: batchv1.JobSpec{ Template: corev1.PodTemplateSpec{"} {"_id":"q-en-kubernetes-22d5e863d96424ae2918182fcc76eb4996f65a5e68f23c2c74620a6fe334a0e7","text":"s.GenericAPIServer.Handler.NonGoRestfulMux.Handle(\"/apis\", apisHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandle(\"/apis/\", apisHandler) apiserviceRegistrationController := NewAPIServiceRegistrationController(informerFactory.Apiregistration().InternalVersion().APIServices(), c.GenericConfig.SharedInformerFactory.Core().V1().Services(), s) apiserviceRegistrationController := NewAPIServiceRegistrationController(informerFactory.Apiregistration().InternalVersion().APIServices(), s) availableController := statuscontrollers.NewAvailableConditionController( informerFactory.Apiregistration().InternalVersion().APIServices(), c.GenericConfig.SharedInformerFactory.Core().V1().Services(),"} {"_id":"q-en-kubernetes-230b3ccde0be7d719a9a3b20815bad8813f210ff595448496f5b2e60b237b4b4","text":" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\"

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version. The latest 1.0.x release of this document can be found [here](http://releases.k8s.io/release-1.0/docs/devel/adding-an-APIGroup.md). Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). -- Adding an API Group =============== This document includes the steps to add an API group. You may also want to take a look at PR [#16621](https://github.com/kubernetes/kubernetes/pull/16621) and PR [#13146](https://github.com/kubernetes/kubernetes/pull/13146), which add API groups. Please also read about [API conventions](api-conventions.md) and [API changes](api_changes.md) before adding an API group. ### Your core group package: We plan on improving the way the types are factored in the future; see [#16062](https://github.com/kubernetes/kubernetes/pull/16062) for the directions in which this might evolve. 1. Create a folder in pkg/apis to hold you group. Create types.go in pkg/apis/``/ and pkg/apis/``/``/ to define API objects in your group; 2. Create pkg/apis/``/{register.go, ``/register.go} to register this group's API objects to the encoding/decoding scheme (e.g., [pkg/apis/extensions/register.go](../../pkg/apis/extensions/register.go) and [pkg/apis/extensions/v1beta1/register.go](../../pkg/apis/extensions/v1beta1/register.go); 3. Add a pkg/apis/``/install/install.go, which is responsible for adding the group to the `latest` package, so that other packages can access the group's meta through `latest.Group`. You probably only need to change the name of group and version in the [example](../../pkg/apis/extensions/install/install.go)). You need to import this `install` package in {pkg/master, pkg/client/unversioned, cmd/kube-version-change}/import_known_versions.go, if you want to make your group accessible to other packages in the kube-apiserver binary, binaries that uses the client package, or the kube-version-change tool. Step 2 and 3 are mechanical, we plan on autogenerate these using the cmd/libs/go2idl/ tool. ### Scripts changes and auto-generated code: 1. Generate conversions and deep-copies: 1. Add your \"group/\" or \"group/version\" into hack/after-build/{update-generated-conversions.sh, update-generated-deep-copies.sh, verify-generated-conversions.sh, verify-generated-deep-copies.sh}; 2. Run hack/update-generated-conversions.sh, hack/update-generated-deep-copies.sh. 2. Generate files for Ugorji codec: 1. Touch types.generated.go in pkg/apis/``{/, ``}; 2. Run hack/update-codecgen.sh. ### Client (optional): We are overhauling pkg/client, so this section might be outdated; see [#15730](https://github.com/kubernetes/kubernetes/pull/15730) for how the client package might evolve. Currently, to add your group to the client package, you need to 1. Create pkg/client/unversioned/``.go, define a group client interface and implement the client. You can take pkg/client/unversioned/extensions.go as a reference. 2. Add the group client interface to the `Interface` in pkg/client/unversioned/client.go and add method to fetch the interface. Again, you can take how we add the Extensions group there as an example. 3. If you need to support the group in kubectl, you'll also need to modify pkg/kubectl/cmd/util/factory.go. ### Make the group/version selectable in unit tests (optional): 1. Add your group in pkg/api/testapi/testapi.go, then you can access the group in tests through testapi.``; 2. Add your \"group/version\" to `KUBE_API_VERSIONS` and `KUBE_TEST_API_VERSIONS` in hack/test-go.sh. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/adding-an-APIGroup.md?pixel)]()
"} {"_id":"q-en-kubernetes-231f42e716de7cff047514924c7d838007ada0188f38ccfbe935000e3482ef18","text":"} // prepare kube clients. client, leaderElectionClient, eventClient, err := createClients(c.ComponentConfig.ClientConnection, o.Master) client, leaderElectionClient, eventClient, err := createClients(c.ComponentConfig.ClientConnection, o.Master, c.ComponentConfig.LeaderElection.RenewDeadline.Duration) if err != nil { return nil, err }"} {"_id":"q-en-kubernetes-237058740670cd75109ff8d5362d71f4917da5b9fde602722c70b4cca7601200","text":"v1 \"k8s.io/api/core/v1\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" unstructuredv1 \"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/runtime\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/apimachinery/pkg/watch\" \"k8s.io/client-go/dynamic\" clientset \"k8s.io/client-go/kubernetes\" appsclient \"k8s.io/client-go/kubernetes/typed/apps/v1\" watchtools \"k8s.io/client-go/tools/watch\""} {"_id":"q-en-kubernetes-2380359e98d8af8bbad0f6d2f06b6bf6fb7304e2f55e97a89abaeed49b42be6e","text":"deploymentReplicas := 4 deploymentImage := \"gcr.io/google_samples/gb-redisslave:v1\" deploymentMinReadySeconds := 5 deploymentStrategyType := extensions.RollingUpdateDeploymentStrategyType Logf(\"Creating deployment %s\", deploymentName) newDeployment := newDeployment(deploymentName, deploymentReplicas, deploymentPodLabels, deploymentImageName, deploymentImage) newDeployment := newDeployment(deploymentName, deploymentReplicas, deploymentPodLabels, deploymentImageName, deploymentImage, deploymentStrategyType) newDeployment.Spec.Strategy.RollingUpdate = &extensions.RollingUpdateDeployment{ MaxUnavailable: intstr.FromInt(1), MaxSurge: intstr.FromInt(1),"} {"_id":"q-en-kubernetes-23af934366386aa1ebc539fdf638c5f6e4ffccf8556b72575bdda50d819f02f2","text":"vSphereInstance) } klog.V(4).Infof(\"DiskIsAttached result: %v and error: %q, for volume: %q\", attached, err, volPath) return attached, err return attached, volPath, err } requestTime := time.Now() isAttached, err := diskIsAttachedInternal(volPath, nodeName) isAttached, newVolumePath, err := diskIsAttachedInternal(volPath, nodeName) if err != nil { if vclib.IsManagedObjectNotFoundError(err) { err = vs.nodeManager.RediscoverNode(nodeName) if err == vclib.ErrNoVMFound { isAttached, err = false, nil } else if err == nil { isAttached, err = diskIsAttachedInternal(volPath, nodeName) isAttached, newVolumePath, err = diskIsAttachedInternal(volPath, nodeName) } } } vclib.RecordvSphereMetric(vclib.OperationDiskIsAttached, requestTime, err) return isAttached, err return isAttached, newVolumePath, err } // DisksAreAttached returns if disks are attached to the VM using controllers supported by the plugin."} {"_id":"q-en-kubernetes-23c0ce065df448931d282eaa0c577999f9b506c33f3009ba83c7bc2ef008f522","text":"if m.dynamicTemplate { go wait.Forever(func() { // check if the current template matches what we last requested if !reflect.DeepEqual(m.getLastRequest(), m.getTemplate()) { if !m.certSatisfiesTemplate() && !reflect.DeepEqual(m.getLastRequest(), m.getTemplate()) { // if the template is different, queue up an interrupt of the rotation deadline loop. // if we've requested a CSR that matches the new template by the time the interrupt is handled, the interrupt is disregarded. templateChanged <- struct{}{}"} {"_id":"q-en-kubernetes-23d179b9394b5fb854f811e123c5a4a433a78f83f90eb513ededfb997aac4db6","text":"// The name of this port. All ports in an EndpointSlice must have a unique // name. If the EndpointSlice is dervied from a Kubernetes service, this // corresponds to the Service.ports[].name. // Name must either be an empty string or pass IANA_SVC_NAME validation: // * must be no more than 15 characters long // * may contain only [-a-z0-9] // * must contain at least one letter [a-z] // * it must not start or end with a hyphen, nor contain adjacent hyphens // Name must either be an empty string or pass DNS_LABEL validation: // * must be no more than 63 characters long. // * must consist of lower case alphanumeric characters or '-'. // * must start and end with an alphanumeric character. // Default is empty string. optional string name = 1;"} {"_id":"q-en-kubernetes-23eb88d97b40d0ae1504cffb57d02607ac42bc7c675cd87d8fcda8af21247bad","text":"nodeStatusUpdateRetry = 5 // Location of container logs. containerLogsDir = \"/var/log/containers\" ContainerLogsDir = \"/var/log/containers\" // max backoff period, exported for the e2e test MaxContainerBackOff = 300 * time.Second"} {"_id":"q-en-kubernetes-23edfd63d9569787daa8761fd2787a8136331f5e77fb0657cd12c71fc3a1b8dc","text":"\"//vendor/k8s.io/apiserver/pkg/server:go_default_library\", \"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library\", \"//vendor/k8s.io/apiserver/pkg/util/proxy:go_default_library\", \"//vendor/k8s.io/client-go/informers/core/v1:go_default_library\", \"//vendor/k8s.io/client-go/listers/core/v1:go_default_library\", \"//vendor/k8s.io/client-go/pkg/version:go_default_library\", \"//vendor/k8s.io/client-go/rest:go_default_library\","} {"_id":"q-en-kubernetes-2447668b6a46c88f66763cdedce17f3c5dde1f5dbe6d890d99dc4a422a651af8","text":"\"//pkg/util/metrics:go_default_library\", \"//staging/src/k8s.io/api/apps/v1:go_default_library\", \"//staging/src/k8s.io/api/core/v1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library\","} {"_id":"q-en-kubernetes-24c607558d148f20e1452c09e2b008066d2dff8070467035baf18934f58516fe","text":"}, } func addOrUpdateUnschedulablePod(p *PriorityQueue, pod *v1.Pod) { p.lock.Lock() defer p.lock.Unlock() p.unschedulableQ.addOrUpdate(pod) } func getUnschedulablePod(p *PriorityQueue, pod *v1.Pod) *v1.Pod { p.lock.Lock() defer p.lock.Unlock() return p.unschedulableQ.get(pod) } func TestPriorityQueue_Add(t *testing.T) { q := NewPriorityQueue(nil) if err := q.Add(&medPriorityPod); err != nil {"} {"_id":"q-en-kubernetes-2505e054c903067ca99c77e6e3584e259186c215964dfcd1840305a90123c6d4","text":"func NewManager(topology []cadvisorapi.Node, topologyPolicyName string, topologyScopeName string, topologyPolicyOptions map[string]string) (Manager, error) { klog.InfoS(\"Creating topology manager with policy per scope\", \"topologyPolicyName\", topologyPolicyName, \"topologyScopeName\", topologyScopeName) // When policy is none, the scope is not relevant, so we can short circuit here. if topologyPolicyName == PolicyNone { return &manager{scope: NewNoneScope()}, nil } opts, err := NewPolicyOptions(topologyPolicyOptions) if err != nil { return nil, err"} {"_id":"q-en-kubernetes-2514bf7ae6e42fd2780ecd79f406b66922d7eaa054ceefee1fb51e1dd17ab0eb","text":"kubectl set resources deployment nginx --limits=cpu=0,memory=0 --requests=cpu=0,memory=0 # Print the result (in yaml format) of updating nginx container limits from a local, without hitting the server kubectl set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --local -o yaml`) kubectl set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --dry-run -o yaml`) ) // ResourcesOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of"} {"_id":"q-en-kubernetes-25313f326a7a31e92ea1dc4417bd732416065bb5d65f80e1a14c2a716a8b43be","text":"Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: name, Image: \"gcr.io/google_containers/busybox:1.24\", VolumeMounts: []v1.VolumeMount{ { Name: \"tmpfs\", MountPath: \"/tmp\", }, }, Command: cmd, }, }, RestartPolicy: v1.RestartPolicyNever, Volumes: []v1.Volume{ { Name: \"tmpfs\", VolumeSource: v1.VolumeSource{HostPath: &v1.HostPathVolumeSource{Path: \"/tmp\"}}, Name: name, Image: image, Lifecycle: lifecycle, }, }, },"} {"_id":"q-en-kubernetes-254c879e7f77a8c7a9e7d8da5e4e55b35da6c445bb024fcec71befca23204603","text":"gvr(\"\", \"v1\", \"pods\"): `{\"metadata\": {\"deletionTimestamp\": \"2020-01-01T00:00:00Z\", \"ownerReferences\":[]}, \"spec\": {\"containers\": [{\"image\": \"` + image2 + `\", \"name\": \"container7\"}]}}`, gvr(\"\", \"v1\", \"replicationcontrollers\"): `{\"spec\": {\"selector\": {\"new\": \"stuff2\"}}}`, gvr(\"\", \"v1\", \"resourcequotas\"): `{\"spec\": {\"hard\": {\"cpu\": \"25M\"}}}`, gvr(\"\", \"v1\", \"services\"): `{\"spec\": {\"externalName\": \"service2name\"}}`, gvr(\"\", \"v1\", \"services\"): `{\"spec\": {\"type\": \"ClusterIP\"}}`, gvr(\"apps\", \"v1\", \"daemonsets\"): `{\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"image\": \"` + image2 + `\", \"name\": \"container6\"}]}}}}`, gvr(\"apps\", \"v1\", \"deployments\"): `{\"metadata\": {\"labels\": {\"a\":\"c\"}}, \"spec\": {\"template\": {\"spec\": {\"containers\": [{\"image\": \"` + image2 + `\", \"name\": \"container6\"}]}}}}`, gvr(\"apps\", \"v1\", \"replicasets\"): `{\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"image\": \"` + image2 + `\", \"name\": \"container4\"}]}}}}`,"} {"_id":"q-en-kubernetes-255282f40d44d129192b496f16d682aef94e674b4638305619204466bc66900f","text":"genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIServerIdentity: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIServerTracing: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.ConsistentListFromCache: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.CustomResourceValidationExpressions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.EfficientWatchResumption: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, genericfeatures.KMSv1: {Default: false, PreRelease: featuregate.Deprecated}, genericfeatures.KMSv2: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.KMSv2KDF: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Beta}, genericfeatures.CustomResourceValidationExpressions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.RemainingItemCount: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 genericfeatures.StorageVersionAPI: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.StorageVersionHash: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.StructuredAuthenticationConfiguration: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.StructuredAuthorizationConfiguration: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.UnauthenticatedHTTP2DOSMitigation: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Beta}, genericfeatures.WatchBookmark: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, genericfeatures.WatchList: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.ZeroLimitedNominalConcurrencyShares: {Default: false, PreRelease: featuregate.Beta}, // inherited features from apiextensions-apiserver, relisted here to get a conflict if it is changed"} {"_id":"q-en-kubernetes-256b6072bd53b92049ad52ad2009a1ffc0d2b13e8983dd81ed777904226a3f66","text":"return NewDelayingQueueWithCustomClock(clock.RealClock{}, \"\") } // NewDelayingQueueWithCustomQueue constructs a new workqueue with ability to // inject custom queue Interface instead of the default one func NewDelayingQueueWithCustomQueue(q Interface, name string) DelayingInterface { return newDelayingQueue(clock.RealClock{}, q, name) } // NewNamedDelayingQueue constructs a new named workqueue with delayed queuing ability func NewNamedDelayingQueue(name string) DelayingInterface { return NewDelayingQueueWithCustomClock(clock.RealClock{}, name)"} {"_id":"q-en-kubernetes-258374fb96a4a9f09ed47fa71578906f9329a354ba0fe4e9906a6bf49489512f","text":"echo \"COPY nsswitch.conf /etc/\" >> \"${docker_file_path}\" fi # provide `--pull` argument to `docker build` if `KUBE_BUILD_PULL_LATEST_IMAGES` # is set to y or Y; otherwise try to build the image without forcefully # pulling the latest base image. local -a docker_build_opts=() if [[ \"${KUBE_BUILD_PULL_LATEST_IMAGES}\" =~ [yY] ]]; then docker_build_opts+=(\"--pull\") fi \"${DOCKER[@]}\" build \"${docker_build_opts[@]}\" -q -t \"${docker_image_tag}\" \"${docker_build_path}\" >/dev/null \"${DOCKER[@]}\" build ${docker_build_opts} -q -t \"${docker_image_tag}\" \"${docker_build_path}\" >/dev/null # If we are building an official/alpha/beta release we want to keep # docker images and tag them appropriately. local -r release_docker_image_tag=\"${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}\""} {"_id":"q-en-kubernetes-25971ad607f122b8d7a1ed1f5fea1e6c4195ad65bb3406126c008073d6bbc675","text":"t.Errorf(\"unexpected object: %v\", rc2) t.FailNow() } if test.expectPullPolicy != rc2.Spec.Template.Spec.InitContainers[0].ImagePullPolicy { t.Errorf(\"expected ImagePullPolicy: %s, got: %s\", test.expectPullPolicy, rc2.Spec.Template.Spec.InitContainers[0].ImagePullPolicy, ) if err := assertInitContainers(rc2.Spec.Template.Spec.InitContainers, test.expected, test.validators); err != nil { t.Errorf(\"test %v failed: %v\", test.name, err) } } }"} {"_id":"q-en-kubernetes-25f3fdcff06f5417d62219d49d4bdfff9cbe2ac20d48e725985a2c2d73ac095d","text":"package dockertools import ( \"bufio\" \"bytes\" \"errors\" \"fmt\""} {"_id":"q-en-kubernetes-26001b82068678a5265ab8f4d4004fe4242c7e269484d8b43c62dbaad3e54a99","text":"\"github.com/golang/glog\" \"k8s.io/api/core/v1\" clientv1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/client-go/tools/record\" runtimeapi \"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime\" \"k8s.io/kubernetes/pkg/kubelet/events\" \"k8s.io/kubernetes/pkg/kubelet/util/format\" \"k8s.io/kubernetes/pkg/kubelet/util/ioutils\" hashutil \"k8s.io/kubernetes/pkg/util/hash\""} {"_id":"q-en-kubernetes-2651108ada4f46e74e95aef5644cce8dd5e4ace23bc3645dbcfacd87b1ba87db","text":"// Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet `json:\"score,omitempty\"` // NormalizeScore is a list of plugins that should be invoked after the scoring phase to normalize scores. NormalizeScore *PluginSet `json:\"normalizeScore,omitempty\"` // Reserve is a list of plugins invoked when reserving a node to run the pod. Reserve *PluginSet `json:\"reserve,omitempty\"`"} {"_id":"q-en-kubernetes-267d15d8df7d801a58779dd334102220c8e0795c2c46a651b0a4732e4ee485ad","text":"runtime.ReallyCrash = s.ReallyCrashForTesting rand.Seed(time.Now().UTC().UnixNano()) credentialprovider.SetPreferredDockercfgPath(s.RootDirectory) glog.V(2).Infof(\"Using root directory: %v\", s.RootDirectory) // TODO(vmarmol): Do this through container config. oomAdjuster := kcfg.OOMAdjuster if err := oomAdjuster.ApplyOOMScoreAdj(0, int(s.OOMScoreAdj)); err != nil {"} {"_id":"q-en-kubernetes-2680d9666e7e5fc51ec95e98fa3e10e045e84b823074265b6c41b266ebbdc55b","text":" /* Copyright 2014 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package e2e import ( \"encoding/json\" \"fmt\" \"time\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait\" . \"github.com/onsi/ginkgo\" ) // partially cloned from webserver.go type State struct { Received map[string]int } func testPreStop(c *client.Client, ns string) { // This is the server that will receive the preStop notification podDescr := &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"server\", }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"server\", Image: \"gcr.io/google_containers/nettest:1.3\", Ports: []api.ContainerPort{{ContainerPort: 8080}}, }, }, }, } By(fmt.Sprintf(\"Creating server pod %s in namespace %s\", podDescr.Name, ns)) _, err := c.Pods(ns).Create(podDescr) expectNoError(err, fmt.Sprintf(\"creating pod %s\", podDescr.Name)) // At the end of the test, clean up by removing the pod. defer func() { By(\"Deleting the server pod\") c.Pods(ns).Delete(podDescr.Name, nil) }() By(\"Waiting for pods to come up.\") err = waitForPodRunningInNamespace(c, podDescr.Name, ns) expectNoError(err, \"waiting for server pod to start\") val := \"{\"Source\": \"prestop\"}\" podOut, err := c.Pods(ns).Get(podDescr.Name) expectNoError(err, \"getting pod info\") preStopDescr := &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"tester\", }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"tester\", Image: \"busybox\", Command: []string{\"sleep\", \"600\"}, Lifecycle: &api.Lifecycle{ PreStop: &api.Handler{ Exec: &api.ExecAction{ Command: []string{ \"wget\", \"-O-\", \"--post-data=\" + val, fmt.Sprintf(\"http://%s:8080/write\", podOut.Status.PodIP), }, }, }, }, }, }, }, } By(fmt.Sprintf(\"Creating tester pod %s in namespace %s\", podDescr.Name, ns)) _, err = c.Pods(ns).Create(preStopDescr) expectNoError(err, fmt.Sprintf(\"creating pod %s\", preStopDescr.Name)) deletePreStop := true // At the end of the test, clean up by removing the pod. defer func() { if deletePreStop { By(\"Deleting the tester pod\") c.Pods(ns).Delete(preStopDescr.Name, nil) } }() err = waitForPodRunningInNamespace(c, preStopDescr.Name, ns) expectNoError(err, \"waiting for tester pod to start\") // Delete the pod with the preStop handler. By(\"Deleting pre-stop pod\") if err := c.Pods(ns).Delete(preStopDescr.Name, nil); err == nil { deletePreStop = false } expectNoError(err, fmt.Sprintf(\"deleting pod: %s\", preStopDescr.Name)) // Validate that the server received the web poke. err = wait.Poll(time.Second*5, time.Second*60, func() (bool, error) { if body, err := c.Get(). Namespace(ns).Prefix(\"proxy\"). Resource(\"pods\"). Name(podDescr.Name). Suffix(\"read\"). DoRaw(); err != nil { By(fmt.Sprintf(\"Error validating prestop: %v\", err)) } else { state := State{} err := json.Unmarshal(body, &state) if err != nil { Logf(\"Error parsing: %v\", err) return false, nil } if state.Received[\"prestop\"] != 0 { return true, nil } Logf(\"Saw: %s\", string(body)) } return false, nil }) expectNoError(err, \"validating pre-stop.\") } var _ = Describe(\"PreStop\", func() { f := NewFramework(\"prestop\") It(\"should call prestop when killing a pod\", func() { testPreStop(f.Client, f.Namespace.Name) }) }) "} {"_id":"q-en-kubernetes-268194a9c777c8d494871d4cf61d20185026adf554baef7e98b9928ceeb64457","text":"} func TestDeleteOrEvict(t *testing.T) { for _, evictionSupported := range []bool{true, false} { evictionSupported := evictionSupported t.Run(fmt.Sprintf(\"evictionSupported=%v\", evictionSupported), func(t *testing.T) { h := &Helper{ Out: os.Stdout, GracePeriodSeconds: 10, } // Create 4 pods, and try to remove the first 2 var expectedEvictions []policyv1beta1.Eviction var create []runtime.Object deletePods := []corev1.Pod{} for i := 1; i <= 4; i++ { pod := &corev1.Pod{} pod.Name = fmt.Sprintf(\"mypod-%d\", i) pod.Namespace = \"default\" tests := []struct { description string evictionSupported bool disableEviction bool }{ { description: \"eviction supported/enabled\", evictionSupported: true, disableEviction: false, }, { description: \"eviction unsupported/disabled\", evictionSupported: false, disableEviction: false, }, { description: \"eviction supported/disabled\", evictionSupported: true, disableEviction: true, }, { description: \"eviction unsupported/disabled\", evictionSupported: false, disableEviction: false, }, } for _, tc := range tests { t.Run(tc.description, func(t *testing.T) { h := &Helper{ Out: os.Stdout, GracePeriodSeconds: 10, } create = append(create, pod) if i <= 2 { deletePods = append(deletePods, *pod) // Create 4 pods, and try to remove the first 2 var expectedEvictions []policyv1beta1.Eviction var create []runtime.Object deletePods := []corev1.Pod{} for i := 1; i <= 4; i++ { pod := &corev1.Pod{} pod.Name = fmt.Sprintf(\"mypod-%d\", i) pod.Namespace = \"default\" if evictionSupported { eviction := policyv1beta1.Eviction{} eviction.Kind = \"Eviction\" eviction.APIVersion = \"policy/v1\" eviction.Namespace = pod.Namespace eviction.Name = pod.Name create = append(create, pod) if i <= 2 { deletePods = append(deletePods, *pod) gracePeriodSeconds := int64(h.GracePeriodSeconds) eviction.DeleteOptions = &metav1.DeleteOptions{ GracePeriodSeconds: &gracePeriodSeconds, } if tc.evictionSupported && !tc.disableEviction { eviction := policyv1beta1.Eviction{} eviction.Kind = \"Eviction\" eviction.APIVersion = \"policy/v1\" eviction.Namespace = pod.Namespace eviction.Name = pod.Name expectedEvictions = append(expectedEvictions, eviction) gracePeriodSeconds := int64(h.GracePeriodSeconds) eviction.DeleteOptions = &metav1.DeleteOptions{ GracePeriodSeconds: &gracePeriodSeconds, } expectedEvictions = append(expectedEvictions, eviction) } } } // Build the fake client k := fake.NewSimpleClientset(create...) if evictionSupported { addEvictionSupport(t, k) } h.Client = k // Build the fake client k := fake.NewSimpleClientset(create...) if tc.evictionSupported { addEvictionSupport(t, k) } h.Client = k h.DisableEviction = tc.disableEviction // Do the eviction if err := h.DeleteOrEvictPods(deletePods); err != nil { t.Fatalf(\"error from DeleteOrEvictPods: %v\", err) } // Do the eviction if err := h.DeleteOrEvictPods(deletePods); err != nil { t.Fatalf(\"error from DeleteOrEvictPods: %v\", err) // Test that other pods are still there var remainingPods []string { podList, err := k.CoreV1().Pods(\"\").List(metav1.ListOptions{}) if err != nil { t.Fatalf(\"error listing pods: %v\", err) } // Test that other pods are still there var remainingPods []string { podList, err := k.CoreV1().Pods(\"\").List(metav1.ListOptions{}) if err != nil { t.Fatalf(\"error listing pods: %v\", err) } for _, pod := range podList.Items { remainingPods = append(remainingPods, pod.Namespace+\"/\"+pod.Name) } sort.Strings(remainingPods) } expected := []string{\"default/mypod-3\", \"default/mypod-4\"} if !reflect.DeepEqual(remainingPods, expected) { t.Errorf(\"unexpected remaining pods after DeleteOrEvictPods; actual %v; expected %v\", remainingPods, expected) for _, pod := range podList.Items { remainingPods = append(remainingPods, pod.Namespace+\"/\"+pod.Name) } sort.Strings(remainingPods) } expected := []string{\"default/mypod-3\", \"default/mypod-4\"} if !reflect.DeepEqual(remainingPods, expected) { t.Errorf(\"%s: unexpected remaining pods after DeleteOrEvictPods; actual %v; expected %v\", tc.description, remainingPods, expected) } // Test that pods were evicted as expected var actualEvictions []policyv1beta1.Eviction for _, action := range k.Actions() { if action.GetVerb() != \"create\" || action.GetResource().Resource != \"pods\" || action.GetSubresource() != \"eviction\" { continue } eviction := *action.(ktest.CreateAction).GetObject().(*policyv1beta1.Eviction) actualEvictions = append(actualEvictions, eviction) } sort.Slice(actualEvictions, func(i, j int) bool { return actualEvictions[i].Name < actualEvictions[j].Name }) if !reflect.DeepEqual(actualEvictions, expectedEvictions) { t.Errorf(\"unexpected evictions; actual %v; expected %v\", actualEvictions, expectedEvictions) // Test that pods were evicted as expected var actualEvictions []policyv1beta1.Eviction for _, action := range k.Actions() { if action.GetVerb() != \"create\" || action.GetResource().Resource != \"pods\" || action.GetSubresource() != \"eviction\" { continue } eviction := *action.(ktest.CreateAction).GetObject().(*policyv1beta1.Eviction) actualEvictions = append(actualEvictions, eviction) } sort.Slice(actualEvictions, func(i, j int) bool { return actualEvictions[i].Name < actualEvictions[j].Name }) if !reflect.DeepEqual(actualEvictions, expectedEvictions) { t.Errorf(\"%s: unexpected evictions; actual %v; expected %v\", tc.description, actualEvictions, expectedEvictions) } }) } }"} {"_id":"q-en-kubernetes-268b76d614de2c8d974e06bf7118eb52a39fe654dc93e88fa1ac1869d2779cdf","text":"# TODO update to dns role once we have one. ${KUBECTL} --kubeconfig=\"${CERT_DIR}/admin.kubeconfig\" create clusterrolebinding system:kube-dns --clusterrole=cluster-admin --serviceaccount=kube-system:default # use kubectl to create kubedns rc and service # use kubectl to create kubedns deployment and service ${KUBECTL} --kubeconfig=\"${CERT_DIR}/admin.kubeconfig\" --namespace=kube-system create -f kubedns-deployment.yaml ${KUBECTL} --kubeconfig=\"${CERT_DIR}/admin.kubeconfig\" --namespace=kube-system create -f kubedns-svc.yaml echo \"Kube-dns rc and service successfully deployed.\" echo \"Kube-dns deployment and service successfully deployed.\" rm kubedns-deployment.yaml kubedns-svc.yaml fi }"} {"_id":"q-en-kubernetes-269058c37b6990225f1fe87bc33385cdba6c668210960187cc3c0b9de435d0dc","text":"} } } func TestApiserverMetricsPods(t *testing.T) { callOrDie := func(_ interface{}, err error) { if err != nil { t.Fatalf(\"unexpected error: %v\", err) } } makePod := func(labelValue string) *v1.Pod { return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"foo\", Labels: map[string]string{\"foo\": labelValue}, }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: \"container\", Image: \"image\", }, }, }, } } _, server, closeFn := framework.RunAMaster(framework.NewMasterConfig()) defer closeFn() client, err := clientset.NewForConfig(&restclient.Config{Host: server.URL, QPS: -1}) if err != nil { t.Fatalf(\"Error in create clientset: %v\", err) } c := client.CoreV1().Pods(metav1.NamespaceDefault) for _, tc := range []struct { name string executor func() want string }{ { name: \"create pod\", executor: func() { callOrDie(c.Create(context.TODO(), makePod(\"foo\"), metav1.CreateOptions{})) }, want: `apiserver_request_total{code=\"201\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"resource\", subresource=\"\", verb=\"POST\", version=\"v1\"}`, }, { name: \"update pod\", executor: func() { callOrDie(c.Update(context.TODO(), makePod(\"bar\"), metav1.UpdateOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"resource\", subresource=\"\", verb=\"PUT\", version=\"v1\"}`, }, { name: \"update pod status\", executor: func() { callOrDie(c.UpdateStatus(context.TODO(), makePod(\"bar\"), metav1.UpdateOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"resource\", subresource=\"status\", verb=\"PUT\", version=\"v1\"}`, }, { name: \"get pod\", executor: func() { callOrDie(c.Get(context.TODO(), \"foo\", metav1.GetOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"resource\", subresource=\"\", verb=\"GET\", version=\"v1\"}`, }, { name: \"list pod\", executor: func() { callOrDie(c.List(context.TODO(), metav1.ListOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"namespace\", subresource=\"\", verb=\"LIST\", version=\"v1\"}`, }, { name: \"delete pod\", executor: func() { callOrDie(nil, c.Delete(context.TODO(), \"foo\", metav1.DeleteOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"pods\", scope=\"resource\", subresource=\"\", verb=\"DELETE\", version=\"v1\"}`, }, } { t.Run(tc.name, func(t *testing.T) { baseSamples, err := getSamples(server) if err != nil { t.Fatal(err) } tc.executor() updatedSamples, err := getSamples(server) if err != nil { t.Fatal(err) } newSamples := diffMetrics(updatedSamples, baseSamples) found := false for _, sample := range newSamples { if sample.Metric.String() == tc.want { found = true break } } if !found { t.Fatalf(\"could not find metric for API call >%s< among samples >%+v<\", tc.name, newSamples) } }) } } func TestApiserverMetricsNamespaces(t *testing.T) { callOrDie := func(_ interface{}, err error) { if err != nil { t.Fatalf(\"unexpected error: %v\", err) } } makeNamespace := func(labelValue string) *v1.Namespace { return &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: \"foo\", Labels: map[string]string{\"foo\": labelValue}, }, } } _, server, closeFn := framework.RunAMaster(framework.NewMasterConfig()) defer closeFn() client, err := clientset.NewForConfig(&restclient.Config{Host: server.URL, QPS: -1}) if err != nil { t.Fatalf(\"Error in create clientset: %v\", err) } c := client.CoreV1().Namespaces() for _, tc := range []struct { name string executor func() want string }{ { name: \"create namespace\", executor: func() { callOrDie(c.Create(context.TODO(), makeNamespace(\"foo\"), metav1.CreateOptions{})) }, want: `apiserver_request_total{code=\"201\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"resource\", subresource=\"\", verb=\"POST\", version=\"v1\"}`, }, { name: \"update namespace\", executor: func() { callOrDie(c.Update(context.TODO(), makeNamespace(\"bar\"), metav1.UpdateOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"resource\", subresource=\"\", verb=\"PUT\", version=\"v1\"}`, }, { name: \"update namespace status\", executor: func() { callOrDie(c.UpdateStatus(context.TODO(), makeNamespace(\"bar\"), metav1.UpdateOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"resource\", subresource=\"status\", verb=\"PUT\", version=\"v1\"}`, }, { name: \"get namespace\", executor: func() { callOrDie(c.Get(context.TODO(), \"foo\", metav1.GetOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"resource\", subresource=\"\", verb=\"GET\", version=\"v1\"}`, }, { name: \"list namespace\", executor: func() { callOrDie(c.List(context.TODO(), metav1.ListOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"cluster\", subresource=\"\", verb=\"LIST\", version=\"v1\"}`, }, { name: \"delete namespace\", executor: func() { callOrDie(nil, c.Delete(context.TODO(), \"foo\", metav1.DeleteOptions{})) }, want: `apiserver_request_total{code=\"200\", component=\"apiserver\", contentType=\"application/json\", dry_run=\"\", group=\"\", resource=\"namespaces\", scope=\"resource\", subresource=\"\", verb=\"DELETE\", version=\"v1\"}`, }, } { t.Run(tc.name, func(t *testing.T) { baseSamples, err := getSamples(server) if err != nil { t.Fatal(err) } tc.executor() updatedSamples, err := getSamples(server) if err != nil { t.Fatal(err) } newSamples := diffMetrics(updatedSamples, baseSamples) found := false for _, sample := range newSamples { if sample.Metric.String() == tc.want { found = true break } } if !found { t.Fatalf(\"could not find metric for API call >%s< among samples >%+v<\", tc.name, newSamples) } }) } } func getSamples(s *httptest.Server) (model.Samples, error) { metrics, err := scrapeMetrics(s) if err != nil { return nil, err } samples, ok := metrics[\"apiserver_request_total\"] if !ok { return nil, errors.New(\"apiserver_request_total doesn't exist\") } return samples, nil } func diffMetrics(newSamples model.Samples, oldSamples model.Samples) model.Samples { samplesDiff := model.Samples{} for _, sample := range newSamples { if !sampleExistsInSamples(sample, oldSamples) { samplesDiff = append(samplesDiff, sample) } } return samplesDiff } func sampleExistsInSamples(s *model.Sample, samples model.Samples) bool { for _, sample := range samples { if sample.Equal(s) { return true } } return false } "} {"_id":"q-en-kubernetes-269168ce5e2f88bbc09eb63ad5741a655840fd0a311ed73523b5bf5aea3a42ef","text":"manager.nodeStore.Add(c.oldNode) c.ds.Spec.UpdateStrategy = *strategy manager.dsStore.Add(c.ds) syncAndValidateDaemonSets(t, manager, c.ds, podControl, 0, 0, 0) expectedEvents := 0 if c.expectedEventsFunc != nil { expectedEvents = c.expectedEventsFunc(strategy.Type) } syncAndValidateDaemonSets(t, manager, c.ds, podControl, 0, 0, expectedEvents) manager.enqueueDaemonSet = func(ds *apps.DaemonSet) { if ds.Name == \"ds\" {"} {"_id":"q-en-kubernetes-26b6104f95b1d1c3a782bf95a1cf63b24de84e36a6e4fb51e504c9b3b55acce0","text":"return fmt.Errorf(\"size of file %s is %d, expected %d\", fpath, size, expectSize) } By(\"verifying file content\") // use `grep ... -f` rather than the expected content in a variable to reduce logging rtnstr, err = podExec(pod, fmt.Sprintf(\"grep -c -m1 -f %s %s\", dd_input, fpath)) By(\"verifying file hash\") rtnstr, err = podExec(pod, fmt.Sprintf(\"md5sum %s | cut -d' ' -f1\", fpath)) if err != nil { return fmt.Errorf(\"unable to test file content via `grep %s`: %v\", fpath, err) return fmt.Errorf(\"unable to test file hash via `md5sum %s`: %v\", fpath, err) } foundCnt, err := strconv.Atoi(strings.TrimSuffix(rtnstr, \"n\")) if err != nil { return fmt.Errorf(\"unable to convert string %q to int: %v\", rtnstr, err) actualHash := strings.TrimSuffix(rtnstr, \"n\") expectedHash, ok := md5hashes[expectSize] if !ok { return fmt.Errorf(\"File hash is unknown for file size %d. Was a new file size added to the test suite?\", expectSize) } if foundCnt == 0 { rtnstr, err = podExec(pod, fmt.Sprintf(\"cat %s\", dd_input)) if err != nil || len(rtnstr) == 0 { return fmt.Errorf(\"string not found in file %s and unable to read dd's input file %s: %v\", fpath, dd_input, err) } return fmt.Errorf(\"string %q not found in file %s\", rtnstr, fpath) if actualHash != expectedHash { return fmt.Errorf(\"MD5 hash is incorrect for file %s with size %d. Expected: `%s`; Actual: `%s`\", fpath, expectSize, expectedHash, actualHash) } return nil"} {"_id":"q-en-kubernetes-26b846990403b97c9c21025d0e36fa3de226d0eb0bff364fb6ec147e1409f6ca","text":"\"crypto/x509\" \"crypto/x509/pkix\" \"fmt\" \"net\" \"strings\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-26eb553f2c46386aebc767f178dc3c1ed2dc025ecacf97f8b72a938ec63151d0","text":"unmanagedNodes: sets.NewString(), routeCIDRs: map[string]string{}, resourceRequestBackoff: resourceRequestBackoff, DisksClient: newAzDisksClient(azClientConfig), SnapshotsClient: newSnapshotsClient(azClientConfig), RoutesClient: newAzRoutesClient(azClientConfig), SubnetsClient: newAzSubnetsClient(azClientConfig), InterfacesClient: newAzInterfacesClient(azClientConfig), RouteTablesClient: newAzRouteTablesClient(azClientConfig), LoadBalancerClient: newAzLoadBalancersClient(azClientConfig), SecurityGroupsClient: newAzSecurityGroupsClient(azClientConfig), StorageAccountClient: newAzStorageAccountClient(azClientConfig), VirtualMachinesClient: newAzVirtualMachinesClient(azClientConfig), PublicIPAddressesClient: newAzPublicIPAddressesClient(azClientConfig), VirtualMachineSizesClient: newAzVirtualMachineSizesClient(azClientConfig), VirtualMachineScaleSetsClient: newAzVirtualMachineScaleSetsClient(azClientConfig), VirtualMachineScaleSetVMsClient: newAzVirtualMachineScaleSetVMsClient(azClientConfig), FileClient: &azureFileClient{env: *env}, } az.metadata, err = NewInstanceMetadataService(metadataURL) if err != nil { return nil, err } // No credentials provided, InstanceMetadataService would be used for getting Azure resources. // Note that this only applies to Kubelet, controller-manager should configure credentials for managing Azure resources. if servicePrincipalToken == nil { return &az, nil } // Initialize Azure clients. azClientConfig := &azClientConfig{ subscriptionID: config.SubscriptionID, resourceManagerEndpoint: env.ResourceManagerEndpoint, servicePrincipalToken: servicePrincipalToken, rateLimiterReader: operationPollRateLimiter, rateLimiterWriter: operationPollRateLimiterWrite, CloudProviderBackoffRetries: config.CloudProviderBackoffRetries, CloudProviderBackoffDuration: config.CloudProviderBackoffDuration, ShouldOmitCloudProviderBackoff: config.shouldOmitCloudProviderBackoff(), } az.DisksClient = newAzDisksClient(azClientConfig) az.SnapshotsClient = newSnapshotsClient(azClientConfig) az.RoutesClient = newAzRoutesClient(azClientConfig) az.SubnetsClient = newAzSubnetsClient(azClientConfig) az.InterfacesClient = newAzInterfacesClient(azClientConfig) az.RouteTablesClient = newAzRouteTablesClient(azClientConfig) az.LoadBalancerClient = newAzLoadBalancersClient(azClientConfig) az.SecurityGroupsClient = newAzSecurityGroupsClient(azClientConfig) az.StorageAccountClient = newAzStorageAccountClient(azClientConfig) az.VirtualMachinesClient = newAzVirtualMachinesClient(azClientConfig) az.PublicIPAddressesClient = newAzPublicIPAddressesClient(azClientConfig) az.VirtualMachineSizesClient = newAzVirtualMachineSizesClient(azClientConfig) az.VirtualMachineScaleSetsClient = newAzVirtualMachineScaleSetsClient(azClientConfig) az.VirtualMachineScaleSetVMsClient = newAzVirtualMachineScaleSetVMsClient(azClientConfig) az.FileClient = &azureFileClient{env: *env} if az.MaximumLoadBalancerRuleCount == 0 { az.MaximumLoadBalancerRuleCount = maximumLoadBalancerRuleCount }"} {"_id":"q-en-kubernetes-271d157e92fb45dda5c0749760992b06ad3d10e576a755bda34ebb5e38455481","text":"{utiliptables.TableNAT, kubePostroutingChain, utiliptables.ChainPostrouting, \"kubernetes postrouting rules\", nil}, } var iptablesEnsureChains = []struct { table utiliptables.Table chain utiliptables.Chain }{ {utiliptables.TableNAT, KubeMarkDropChain}, } var iptablesCleanupOnlyChains = []iptablesJumpChain{} // CleanupLeftovers removes all iptables rules and chains created by the Proxier"} {"_id":"q-en-kubernetes-2738a0c35769a59828729142b5bb6eb9f9c2ee00fb2fc08dae91621e2cf5b50d","text":"# This file creates a standard build environment for building cross # platform go binary for the architecture kubernetes cares about. FROM golang:1.8.3 FROM golang:1.9.1 ENV GOARM 7 ENV KUBE_DYNAMIC_CROSSPLATFORMS "} {"_id":"q-en-kubernetes-27512f094f5379a4fdcac193ebff36191a45814adc033f92320ff7907b950c9d","text":"\"//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library\", \"//staging/src/k8s.io/component-base/cli/flag:go_default_library\", \"//staging/src/k8s.io/component-base/cli/globalflag:go_default_library\", \"//staging/src/k8s.io/component-base/logs:go_default_library\", \"//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library\", \"//staging/src/k8s.io/component-base/version:go_default_library\", \"//staging/src/k8s.io/component-base/version/verflag:go_default_library\","} {"_id":"q-en-kubernetes-2780e1b99760e095836500cffd9a5e3cfc51e442d1226f0e2e92f2ae95347489","text":"\"//pkg/kubelet/types:go_default_library\", \"//pkg/volume:go_default_library\", \"//vendor/github.com/golang/glog:go_default_library\", \"//vendor/github.com/golang/protobuf/proto:go_default_library\", \"//vendor/github.com/google/cadvisor/fs:go_default_library\", \"//vendor/github.com/google/cadvisor/info/v1:go_default_library\", \"//vendor/github.com/google/cadvisor/info/v2:go_default_library\","} {"_id":"q-en-kubernetes-2798527047d5d3dab13151744fbec19f87eddda3040636a2b91178e744705aa2","text":"// NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig { return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: inClusterClientConfig{}} return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}} } // NewInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name and the fallback auth reader func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides, fallbackReader io.Reader) ClientConfig { return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: inClusterClientConfig{}, fallbackReader: fallbackReader} return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}, fallbackReader: fallbackReader} } func (config *DeferredLoadingClientConfig) createClientConfig() (ClientConfig, error) {"} {"_id":"q-en-kubernetes-2798e273503503b616b3b9c2a85774ac4dec6cc31b67f7309f3c7b73395f4bc9","text":"} func (sched *Scheduler) addPodToSchedulingQueue(obj interface{}) { if err := sched.SchedulingQueue.Add(obj.(*v1.Pod)); err != nil { pod := obj.(*v1.Pod) klog.V(3).Infof(\"add event for unscheduled pod %s/%s\", pod.Namespace, pod.Name) if err := sched.SchedulingQueue.Add(pod); err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to queue %T: %v\", obj, err)) } }"} {"_id":"q-en-kubernetes-27f62daa9220fb6b09f9157b2af70de4e0ac599b001569f6a5fbd5f2460cb994","text":"``` Just call `make` to regenerate the diagrams. ## Building with Docker If you are on a Mac or your pip install is messed up, you can easily build with docker. ``` make docker ``` The first run will be slow but things should be fast after that. To clean up the docker containers that are created (and other cruft that is left around) you can run `make docker-clean`. If you are using boot2docker and get warnings about clock skew (or if things aren't building for some reason) then you can fix that up with `make fix-clock-skew`. ## Automatically rebuild on file changes If you have the fswatch utility installed, you can have it monitor the file system and automatically rebuild when files have changed. Just do a `make watch`. No newline at end of file"} {"_id":"q-en-kubernetes-2858fcd7f036256f16bc0ca221aa77f842520b00f76fa9005fc619b161e2524d","text":"\"testing\" \"github.com/prometheus/common/model\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime/schema\""} {"_id":"q-en-kubernetes-285a40825e280c75c8474c12cbf6fad783d418ebd8e5016ca7e0e06fe62706b9","text":"// Nodeports need SNAT, unless they're local. // ipset call var nodePortSet *IPSet var ( nodePortSet *IPSet entries []*utilipset.Entry ) switch protocol { case \"tcp\": nodePortSet = proxier.ipsetList[kubeNodePortSetTCP] entry = &utilipset.Entry{ entries = []*utilipset.Entry{{ // No need to provide ip info Port: svcInfo.NodePort(), Protocol: protocol, SetType: utilipset.BitmapPort, } }} case \"udp\": nodePortSet = proxier.ipsetList[kubeNodePortSetUDP] entry = &utilipset.Entry{ entries = []*utilipset.Entry{{ // No need to provide ip info Port: svcInfo.NodePort(), Protocol: protocol, SetType: utilipset.BitmapPort, } }} case \"sctp\": nodePortSet = proxier.ipsetList[kubeNodePortSetSCTP] entry = &utilipset.Entry{ IP: proxier.nodeIP.String(), Port: svcInfo.NodePort(), Protocol: protocol, SetType: utilipset.HashIPPort, // Since hash ip:port is used for SCTP, all the nodeIPs to be used in the SCTP ipset entries. entries = []*utilipset.Entry{} for _, nodeIP := range nodeIPs { entries = append(entries, &utilipset.Entry{ IP: nodeIP.String(), Port: svcInfo.NodePort(), Protocol: protocol, SetType: utilipset.HashIPPort, }) } default: // It should never hit klog.Errorf(\"Unsupported protocol type: %s\", protocol) } if nodePortSet != nil { if valid := nodePortSet.validateEntry(entry); !valid { klog.Errorf(\"%s\", fmt.Sprintf(EntryInvalidErr, entry, nodePortSet.Name)) entryInvalidErr := false for _, entry := range entries { if valid := nodePortSet.validateEntry(entry); !valid { klog.Errorf(\"%s\", fmt.Sprintf(EntryInvalidErr, entry, nodePortSet.Name)) entryInvalidErr = true break } nodePortSet.activeEntries.Insert(entry.String()) } if entryInvalidErr { continue } nodePortSet.activeEntries.Insert(entry.String()) } // Add externaltrafficpolicy=local type nodeport entry"} {"_id":"q-en-kubernetes-287387c9dd85c57bd6325e492c15b617476c333d2707b90598fd6d2715e0e3e0","text":"package apimachinery import ( \"encoding/json\" \"fmt\" \"strings\" \"sync\""} {"_id":"q-en-kubernetes-2898552b529676ca28a37180fe2ef85cf2184f47eda68d0f2474c404768b90d7","text":"glog.V(4).Infof(\"Deleting %q\", castObj.Name) c.enqueue(castObj) } // there aren't very many apiservices, just check them all. func (c *APIServiceRegistrationController) getAPIServicesFor(service *v1.Service) []*apiregistration.APIService { var ret []*apiregistration.APIService apiServiceList, _ := c.apiServiceLister.List(labels.Everything()) for _, apiService := range apiServiceList { if apiService.Spec.Service == nil { continue } if apiService.Spec.Service.Namespace == service.Namespace && apiService.Spec.Service.Name == service.Name { ret = append(ret, apiService) } } return ret } // TODO, think of a way to avoid checking on every service manipulation func (c *APIServiceRegistrationController) addService(obj interface{}) { for _, apiService := range c.getAPIServicesFor(obj.(*v1.Service)) { c.enqueue(apiService) } } func (c *APIServiceRegistrationController) updateService(obj, _ interface{}) { for _, apiService := range c.getAPIServicesFor(obj.(*v1.Service)) { c.enqueue(apiService) } } func (c *APIServiceRegistrationController) deleteService(obj interface{}) { castObj, ok := obj.(*v1.Service) if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { glog.Errorf(\"Couldn't get object from tombstone %#v\", obj) return } castObj, ok = tombstone.Obj.(*v1.Service) if !ok { glog.Errorf(\"Tombstone contained object that is not expected %#v\", obj) return } } for _, apiService := range c.getAPIServicesFor(castObj) { c.enqueue(apiService) } } "} {"_id":"q-en-kubernetes-28e43dcb5387297afad0b948e7912997e49ba88a09fa840a15ed0a86f659743e","text":"// GetNewReplicaSet returns a replica set that matches the intent of the given deployment; get ReplicaSetList from client interface. // Returns nil if the new replica set doesn't exist yet. func GetNewReplicaSet(deployment *extensions.Deployment, c clientset.Interface) (*extensions.ReplicaSet, error) { rsList, err := ListReplicaSets(deployment, rsListFromClient(c)) rsList, err := ListReplicaSets(deployment, RsListFromClient(c)) if err != nil { return nil, err } return FindNewReplicaSet(deployment, rsList) } // rsListFromClient returns an rsListFunc that wraps the given client. func rsListFromClient(c clientset.Interface) rsListFunc { // RsListFromClient returns an rsListFunc that wraps the given client. func RsListFromClient(c clientset.Interface) RsListFunc { return func(namespace string, options metav1.ListOptions) ([]*extensions.ReplicaSet, error) { rsList, err := c.Extensions().ReplicaSets(namespace).List(options) if err != nil {"} {"_id":"q-en-kubernetes-290e1f86d17f0fd7e8280e01679bf55910fc2aa2bb24adfa0f6b667d37dcad3c","text":" apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: hostname spec: backend: serviceName: hostname servicePort: 80 No newline at end of file servicePort: 80 "} {"_id":"q-en-kubernetes-29318b9df9fe421a915f613ba22b638c1bf77c5b00d3bbf2889d40839e5f2729","text":"for k, v := range pod.Annotations { copyPod.Annotations[k] = v } copyPod.Annotations[kubetypes.ConfigMirrorAnnotationKey] = kubetypes.MirrorType copyPod.Annotations[kubetypes.ConfigMirrorAnnotationKey] = getPodHash(pod) _, err := mc.apiserverClient.Pods(copyPod.Namespace).Create(©Pod) return err"} {"_id":"q-en-kubernetes-2993ad445c08d13d635032edd42d20b932d63972bd11eb85614aa2247eaa9d21","text":"node, victims, nominatedPodsToClear, err := sched.config.Algorithm.Preempt(preemptor, sched.config.NodeLister, scheduleErr) if err != nil { klog.Errorf(\"Error preempting victims to make room for %v/%v.\", preemptor.Namespace, preemptor.Name) klog.Errorf(\"Error preempting victims to make room for %v/%v: %v\", preemptor.Namespace, preemptor.Name, err) return \"\", err } var nodeName = \"\""} {"_id":"q-en-kubernetes-29a912dd0d30992d4c6777e412708c20fd1f08ad8232a0866175c0119777b774","text":"}) } // PodSecurityPolicyDescriber generates information about a PodSecurityPolicy. type PodSecurityPolicyDescriber struct { clientset.Interface } func (d *PodSecurityPolicyDescriber) Describe(namespace, name string, describerSettings printers.DescriberSettings) (string, error) { psp, err := d.Extensions().PodSecurityPolicies().Get(name, metav1.GetOptions{}) if err != nil { return \"\", err } return describePodSecurityPolicy(psp) } func describePodSecurityPolicy(psp *extensions.PodSecurityPolicy) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, \"Name:t%sn\", psp.Name) w.Write(LEVEL_0, \"nSettings:n\") w.Write(LEVEL_1, \"Allow Privileged:t%tn\", psp.Spec.Privileged) w.Write(LEVEL_1, \"Default Add Capabilities:t%vn\", capsToString(psp.Spec.DefaultAddCapabilities)) w.Write(LEVEL_1, \"Required Drop Capabilities:t%sn\", capsToString(psp.Spec.RequiredDropCapabilities)) w.Write(LEVEL_1, \"Allowed Capabilities:t%sn\", capsToString(psp.Spec.AllowedCapabilities)) w.Write(LEVEL_1, \"Allowed Volume Types:t%sn\", fsTypeToString(psp.Spec.Volumes)) w.Write(LEVEL_1, \"Allow Host Network:t%tn\", psp.Spec.HostNetwork) w.Write(LEVEL_1, \"Allow Host Ports:t%sn\", hostPortRangeToString(psp.Spec.HostPorts)) w.Write(LEVEL_1, \"Allow Host PID:t%tn\", psp.Spec.HostPID) w.Write(LEVEL_1, \"Allow Host IPC:t%tn\", psp.Spec.HostIPC) w.Write(LEVEL_1, \"Read Only Root Filesystem:t%vn\", psp.Spec.ReadOnlyRootFilesystem) w.Write(LEVEL_1, \"SELinux Context Strategy: %stn\", string(psp.Spec.SELinux.Rule)) var user, role, seLinuxType, level string if psp.Spec.SELinux.SELinuxOptions != nil { user = psp.Spec.SELinux.SELinuxOptions.User role = psp.Spec.SELinux.SELinuxOptions.Role seLinuxType = psp.Spec.SELinux.SELinuxOptions.Type level = psp.Spec.SELinux.SELinuxOptions.Level } w.Write(LEVEL_2, \"User:t%sn\", stringOrNone(user)) w.Write(LEVEL_2, \"Role:t%sn\", stringOrNone(role)) w.Write(LEVEL_2, \"Type:t%sn\", stringOrNone(seLinuxType)) w.Write(LEVEL_2, \"Level:t%sn\", stringOrNone(level)) w.Write(LEVEL_1, \"Run As User Strategy: %stn\", string(psp.Spec.RunAsUser.Rule)) w.Write(LEVEL_2, \"Ranges:t%sn\", userIDRangeToString(psp.Spec.RunAsUser.Ranges)) w.Write(LEVEL_1, \"FSGroup Strategy: %stn\", string(psp.Spec.FSGroup.Rule)) w.Write(LEVEL_2, \"Ranges:t%sn\", groupIDRangeToString(psp.Spec.FSGroup.Ranges)) w.Write(LEVEL_1, \"Supplemental Groups Strategy: %stn\", string(psp.Spec.SupplementalGroups.Rule)) w.Write(LEVEL_2, \"Ranges:t%sn\", groupIDRangeToString(psp.Spec.SupplementalGroups.Ranges)) return nil }) } func stringOrAll(s string) string { if len(s) > 0 { return s } return \"*\" } func stringOrNone(s string) string { if len(s) > 0 { return s } return \"\" } func fsTypeToString(volumes []extensions.FSType) string { strVolumes := []string{} for _, v := range volumes { strVolumes = append(strVolumes, string(v)) } return stringOrNone(strings.Join(strVolumes, \",\")) } func hostPortRangeToString(ranges []extensions.HostPortRange) string { formattedString := \"\" if ranges != nil { strRanges := []string{} for _, r := range ranges { strRanges = append(strRanges, fmt.Sprintf(\"%d-%d\", r.Min, r.Max)) } formattedString = strings.Join(strRanges, \",\") } return stringOrNone(formattedString) } func userIDRangeToString(ranges []extensions.UserIDRange) string { formattedString := \"\" if ranges != nil { strRanges := []string{} for _, r := range ranges { strRanges = append(strRanges, fmt.Sprintf(\"%d-%d\", r.Min, r.Max)) } formattedString = strings.Join(strRanges, \",\") } return stringOrNone(formattedString) } func groupIDRangeToString(ranges []extensions.GroupIDRange) string { formattedString := \"\" if ranges != nil { strRanges := []string{} for _, r := range ranges { strRanges = append(strRanges, fmt.Sprintf(\"%d-%d\", r.Min, r.Max)) } formattedString = strings.Join(strRanges, \",\") } return stringOrNone(formattedString) } func capsToString(caps []api.Capability) string { formattedString := \"\" if caps != nil { strCaps := []string{} for _, c := range caps { strCaps = append(strCaps, string(c)) } formattedString = strings.Join(strCaps, \",\") } return stringOrNone(formattedString) } // newErrNoDescriber creates a new ErrNoDescriber with the names of the provided types. func newErrNoDescriber(types ...reflect.Type) error { names := make([]string, 0, len(types))"} {"_id":"q-en-kubernetes-29ad0ed9eda1bf1ef6a60e1452ab272ffb32160d08160a2c8396de4e3b885024","text":"\"description\": \"ServicePort contains information on service's port.\", \"properties\": { \"appProtocol\": { \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.\", \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.\", \"type\": \"string\" }, \"name\": {"} {"_id":"q-en-kubernetes-29cc55ca31fa87d8f0e624ffb35097645ba03ad675c5a2b7168587b35c19b619","text":"// Read retrieves data with the given \"key\" from CycleState. If the key is not // present an error is returned. // This function is not thread safe. In multi-threaded code, lock should be // acquired first. // This function is thread safe by acquiring an internal lock first. func (c *CycleState) Read(key StateKey) (StateData, error) { c.mx.RLock() defer c.mx.RUnlock() if v, ok := c.storage[key]; ok { return v, nil }"} {"_id":"q-en-kubernetes-29d3000b1c61d5cc8a6a262939249245b4bbe901dffef43c7587c9b61e54e5e7","text":"// returned. func (adapter *EndpointsAdapter) Create(namespace string, endpoints *corev1.Endpoints) (*corev1.Endpoints, error) { endpoints, err := adapter.endpointClient.Endpoints(namespace).Create(endpoints) if err == nil && adapter.endpointSliceClient != nil { _, err = adapter.ensureEndpointSliceFromEndpoints(namespace, endpoints) if err == nil { err = adapter.EnsureEndpointSliceFromEndpoints(namespace, endpoints) } return endpoints, err }"} {"_id":"q-en-kubernetes-29ea7fe9b13e8aefa663ee778415add4ef8aa63519bcb6452fe4efd20a176b71","text":"} func (f *FakeMounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(f, dir) return isNotMountPoint(f, dir) } func (f *FakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {"} {"_id":"q-en-kubernetes-29fb8829b9d1fd257ef3dc59bfc80f22ca8f8b126071f9af06fae9f3b0807298","text":"CLUSTER_IP_RANGE=\"${CONTAINER_SUBNET}\" fi # If enabled kube-controller-manager will be started with the --enable-hostpath-provisioner flag ENABLE_HOSTPATH_PROVISIONER=\"${ENABLE_HOSTPATH_PROVISIONER:-true}\" # OpenContrail networking plugin specific settings OPENCONTRAIL_TAG=\"${OPENCONTRAIL_TAG:-R2.20}\" OPENCONTRAIL_KUBERNETES_TAG=\"${OPENCONTRAIL_KUBERNETES_TAG:-master}\""} {"_id":"q-en-kubernetes-29fce90aee316a5d21e13eb93dc1e8959e34d8e4315b66812ca3ecc683b6cbb4","text":"}, }, }, }) }, true) }) // The following tests for remote command execution and port forwarding are"} {"_id":"q-en-kubernetes-2a2195e369771997843fd927b58d7ec2ca049a799edd65ef4732cf374512caa6","text":"importmap = \"k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/healthz\", importpath = \"k8s.io/apiserver/pkg/server/healthz\", deps = [ \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library\", \"//vendor/k8s.io/klog:go_default_library\", ],"} {"_id":"q-en-kubernetes-2a45e11622b2551d6eac6ae5bb2e80781867110c72753de45664d95963dfaa81","text":"} } } func TestPredicatesRegistered(t *testing.T) { var functionNames []string // Files and directories which predicates may be referenced targetFiles := []string{ \"./../../algorithmprovider/defaults/defaults.go\", // Default algorithm \"./../../factory/plugins.go\", // Registered in init() \"./../../../../../pkg/\", // kubernetes/pkg, often used by kubelet or controller } // List all golang source files under ./predicates/, excluding test files and sub-directories. files, err := codeinspector.GetSourceCodeFiles(\".\") if err != nil { t.Errorf(\"unexpected error: %v when listing files in current directory\", err) } // Get all public predicates in files. for _, filePath := range files { functions, err := codeinspector.GetPublicFunctions(filePath) if err == nil { functionNames = append(functionNames, functions...) } else { t.Errorf(\"unexpected error when parsing %s\", filePath) } } // Check if all public predicates are referenced in target files. for _, functionName := range functionNames { args := []string{\"-rl\", functionName} args = append(args, targetFiles...) err := exec.Command(\"grep\", args...).Run() if err != nil { switch err.Error() { case \"exit status 2\": t.Errorf(\"unexpected error when checking %s\", functionName) case \"exit status 1\": t.Errorf(\"predicate %s is implemented as public but seems not registered or used in any other place\", functionName) } } } } "} {"_id":"q-en-kubernetes-2a4de7710deb02723dc25c53bd930d9fb6686493f4d6efcbd1c164d222f93fab","text":"if [ ! -w $(dirname `which gcloud`) ]; then sudo_prefix=\"sudo\" fi ${sudo_prefix} gcloud ${gcloud_prompt:-} components update alpha || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update beta || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update ${CMD_GROUP:-} || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update kubectl|| true ${sudo_prefix} gcloud ${gcloud_prompt:-} components install alpha || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components install beta || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components install kubectl|| true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update || true }"} {"_id":"q-en-kubernetes-2a58c21b146c955ade49a0b06594fdb9be925274d63cd90901d40f4b70b49753","text":"// Initialize passes a Kubernetes clientBuilder interface to the cloud provider func (vs *VSphere) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) { vs.kubeClient = clientBuilder.ClientOrDie(\"vsphere-legacy-cloud-provider\") vs.nodeManager.SetNodeGetter(vs.kubeClient.CoreV1()) } // Initialize Node Informers"} {"_id":"q-en-kubernetes-2a8219d4d22c730eb202480a507940396324017f9bfc5340333a6845ed7fbbcc","text":"return allErrs } func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fldPath *field.Path) field.ErrorList { const newFinalizersErrorMsg string = `no new finalizers can be added if the object is being deleted` allErrs := field.ErrorList{} extra := sets.NewString(newFinalizers...).Difference(sets.NewString(oldFinalizers...)) if len(extra) != 0 { allErrs = append(allErrs, field.Forbidden(fldPath, fmt.Sprintf(\"no new finalizers can be added if the object is being deleted, found new finalizers %#v\", extra.List()))) } return allErrs } func validateVolumes(volumes []api.Volume, fldPath *field.Path) (sets.String, field.ErrorList) { allErrs := field.ErrorList{}"} {"_id":"q-en-kubernetes-2a8f5b61bd0aab7ea0c63abc4cbb6d78568fd3eba022578474f83cbf191a028b","text":"Fail(fmt.Sprintf(format, a...), 1) } func providerIs(providers ...string) bool { if testContext.Provider == \"\" { Fail(\"testContext.Provider is not defined\") } for _, provider := range providers { if strings.ToLower(provider) == strings.ToLower(testContext.Provider) { return true } } return false } type podCondition func(pod *api.Pod) (bool, error) func waitForPodCondition(c *client.Client, ns, podName, desc string, condition podCondition) error {"} {"_id":"q-en-kubernetes-2aa3cf97f31440d38d4d0c00bbb273a4d4faf92c1339f01468e6e47e3535e794","text":"} } var reinvocationMarkerFixture = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: \"default\", Name: \"marker\", }, Spec: corev1.PodSpec{ Containers: []v1.Container{{ Name: \"fake-name\", Image: \"fakeimage\", }}, }, func newReinvocationMarkerFixture(namespace string) *corev1.Pod { return &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: \"marker\", Labels: map[string]string{ \"marker\": \"true\", }, }, Spec: corev1.PodSpec{ Containers: []v1.Container{{ Name: \"fake-name\", Image: \"fakeimage\", }}, }, } }"} {"_id":"q-en-kubernetes-2b4b0536535d8a0f536c649427f0f55c17b3d39e2aadba21d4e9b64af94d0939","text":"InitContainers: []v1.Container{ { Image: image.GetE2EImage(), Name: podName, Name: \"init-container\", Command: []string{ \"powershell.exe\", \"-Command\","} {"_id":"q-en-kubernetes-2b9a330e6d97f060759ca9ef35bc932e46b14df554d862047c444904f4742be9","text":"MUST succeed. It MUST succeed when deleting the Deployment. release: v1.20 file: test/e2e/apps/deployment.go - testname: Deployment, status sub-resource codename: '[sig-apps] Deployment should validate Deployment Status endpoints [Conformance]' description: When a Deployment is created it MUST succeed. Attempt to read, update and patch its status sub-resource; all mutating sub-resource operations MUST be visible to subsequent reads. release: v1.22 file: test/e2e/apps/deployment.go - testname: 'PodDisruptionBudget: list and delete collection' codename: '[sig-apps] DisruptionController Listing PodDisruptionBudgets for all namespaces should list and delete a collection of PodDisruptionBudgets [Conformance]'"} {"_id":"q-en-kubernetes-2bb6f68add060cca6ac2644e12f14b5033d959c7046e932cba01aca100d8570b","text":"rc=1 fi # ensure all generic features are added in alphabetic order lines=$(git grep 'genericfeatures[.].*:' -- pkg/features/kube_features.go) sorted_lines=$(echo \"$lines\" | sort -f) if [[ \"$lines\" != \"$sorted_lines\" ]]; then echo \"Generic features in pkg/features/kube_features.go not sorted\" >&2 echo >&2 echo \"Expected:\" >&2 echo \"$sorted_lines\" >&2 echo >&2 echo \"Got:\" >&2 echo \"$lines\" >&2 rc=1 fi exit $rc"} {"_id":"q-en-kubernetes-2bca6ee29cb3996a3963a7665ca806b9a92aa874199c2b0dff8bdf5d96e879db","text":"mu.Unlock() } if !concreteOp.SkipWaitToCompletion { // SkipWaitToCompletion=false indicates this step has waited for the Pods to be scheduled. // So we reset the metrics in global registry; otherwise metrics gathered in this step // will be carried over to next step. legacyregistry.Reset() } case *churnOp: var namespace string if concreteOp.Namespace != nil {"} {"_id":"q-en-kubernetes-2bd3742bf5df1c30813af81abbd4b971968e462ac6f11bdcd10631af66509492","text":"} func (az *Cloud) getIPForMachine(nodeName types.NodeName) (string, error) { az.operationPollRateLimiter.Accept() machine, exists, err := az.getVirtualMachine(nodeName) if !exists { return \"\", cloudprovider.InstanceNotFound"} {"_id":"q-en-kubernetes-2bee126518a941d4d2be7cffcb625875665c055b56637e5c6dd1b9cf2e5f8e07","text":"cmd.Flags().DurationVar(&o.drainer.Timeout, \"timeout\", o.drainer.Timeout, \"The length of time to wait before giving up, zero means infinite\") cmd.Flags().StringVarP(&o.drainer.Selector, \"selector\", \"l\", o.drainer.Selector, \"Selector (label query) to filter on\") cmd.Flags().StringVarP(&o.drainer.PodSelector, \"pod-selector\", \"\", o.drainer.PodSelector, \"Label selector to filter pods on the node\") cmd.Flags().BoolVar(&o.drainer.DisableEviction, \"disable-eviction\", o.drainer.DisableEviction, \"Force drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, use with caution.\") cmdutil.AddDryRunFlag(cmd) return cmd"} {"_id":"q-en-kubernetes-2bffd891062c804488e28110e1edec716550273b558a301184448b5dd7fa9f37","text":"measurePods: 1000 - name: SchedulingMigratedInTreePVs featureGates: CSIMigrationAWS: true workloadTemplate: - opcode: createNodes countParam: $initNodes"} {"_id":"q-en-kubernetes-2c07d0ab5e9a372e22f84d08ec61afa76da6d3e9f6807812d9ef5a0a1af7a35b","text":"import ( goflag \"flag\" \"fmt\" \"math/rand\" \"os\" \"time\""} {"_id":"q-en-kubernetes-2c208104c97c8b81c50afee1b425609277a1096555ed1595aaade235312d73d1","text":"//CredentialsManager credentialManager *SecretCredentialManager nodeLister corelisters.NodeLister nodeGetter coreclients.NodesGetter // Mutexes registeredNodesLock sync.RWMutex nodeInfoLock sync.RWMutex"} {"_id":"q-en-kubernetes-2c3bfb2e0e316e72c114d72f9ff1e63f78b3efac17354a2c188abe1ce908c749","text":"klog.Errorf(\"cannot convert to *v1.Pod: %v\", t) return } klog.V(3).Infof(\"delete event for scheduled pod %s/%s \", pod.Namespace, pod.Name) // NOTE: Updates must be written to scheduler cache before invalidating // equivalence cache, because we could snapshot equivalence cache after the // invalidation and then snapshot the cache itself. If the cache is"} {"_id":"q-en-kubernetes-2c486f7e048f9ef2fb214fc46208e15ec418bdb47e1c7740a61ec01f49576479","text":" /* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cloudcfg import ( \"bytes\" \"encoding/json\" \"reflect\" \"testing\" \"gopkg.in/v1/yaml\" ) func TestYAMLPrinterPrint(t *testing.T) { type testStruct struct { Key string `yaml:\"Key\" json:\"Key\"` Map map[string]int `yaml:\"Map\" json:\"Map\"` StringList []string `yaml:\"StringList\" json:\"StringList\"` IntList []int `yaml:\"IntList\" json:\"IntList\"` } testData := testStruct{ \"testValue\", map[string]int{\"TestSubkey\": 1}, []string{\"a\", \"b\", \"c\"}, []int{1, 2, 3}, } printer := &YAMLPrinter{} buf := bytes.NewBuffer([]byte{}) err := printer.Print([]byte(\"invalidJSON\"), buf) if err == nil { t.Error(\"Error: didn't fail on invalid JSON data\") } jTestData, err := json.Marshal(&testData) if err != nil { t.Fatal(\"Unexpected error: couldn't marshal test data\") } err = printer.Print(jTestData, buf) if err != nil { t.Fatal(err) } var poutput testStruct err = yaml.Unmarshal(buf.Bytes(), &poutput) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(testData, poutput) { t.Error(\"Test data and unmarshaled data are not equal\") } } "} {"_id":"q-en-kubernetes-2c688ee6efd2ff9a134420a1a21f92e3db118ca2fef7bf7cff6941cbb3300d1f","text":"// address is required. if len(spec.ServerAddressByClientCIDRs) == 0 { allErrs = append(allErrs, field.Required(fieldPath.Child(\"serverAddressByClientCIDRs\"), \"\")) } else { for i, address := range spec.ServerAddressByClientCIDRs { idxPath := fieldPath.Child(\"serverAddressByClientCIDRs\").Index(i) if len(address.ClientCIDR) > 0 { if _, _, err := net.ParseCIDR(address.ClientCIDR); err != nil { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"clientCIDR\"), address.ClientCIDR, fmt.Sprintf(\"must be a valid CIDR: %v\", err))) } } } } return allErrs }"} {"_id":"q-en-kubernetes-2c76c23dce4f095b9ac3be23c0031e80bc759773efd7e7f98457f300159bb0a5","text":" // +build !cgo !linux // +build !linux /* Copyright 2015 The Kubernetes Authors."} {"_id":"q-en-kubernetes-2ca85d83715504c69148862e000f0e6c6890aad388519e5b7fd20dbb70a38b1d","text":"CPU utilization for the pod will not be defined and the autoscaler will not take any action. Further details of the autoscaling algorithm are given [here](../design/horizontal-pod-autoscaler.md#autoscaling-algorithm). Autoscaler uses heapster to collect CPU utilization. Therefore, it is required to deploy heapster monitoring in your cluster for autoscaling to work. Autoscaler accesses corresponding replication controller or deployment by scale sub-resource. Scale is an interface which allows to dynamically set the number of replicas and to learn the current state of them. More details on scale sub-resource can be found [here](../design/horizontal-pod-autoscaler.md#scale-subresource)."} {"_id":"q-en-kubernetes-2cbc5b3a3d15907e7beeb65f6a563557026cd29c13530fd9bbb978cd4d120897","text":"func prepareSubpathTarget(mounter Interface, subpath Subpath) (bool, string, error) { // Early check for already bind-mounted subpath. bindPathTarget := getSubpathBindTarget(subpath) notMount, err := IsNotMountPoint(mounter, bindPathTarget) notMount, err := mounter.IsNotMountPoint(bindPathTarget) if err != nil { if !os.IsNotExist(err) { return false, \"\", fmt.Errorf(\"error checking path %s for mount: %s\", bindPathTarget, err)"} {"_id":"q-en-kubernetes-2cbdc2cb78a46a7d12cb3538e974c6cb788416578d6cab74feb697579cfae0bc","text":"[[constraint]] name = \"github.com/modern-go/reflect2\" version = \"1.0.0\" version = \"1.0.1\" "} {"_id":"q-en-kubernetes-2cf7a7938161786550a8a4b636fc5d4c20ddad13464a0c5da2fc3af4ce8d640f","text":"\"description\": \"ServicePort contains information on service's port.\", \"properties\": { \"appProtocol\": { \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"type\": \"string\" }, \"name\": {"} {"_id":"q-en-kubernetes-2d272a10f8bb4ac3456171cc46fd3faad0e2283dbf796295360d8f3472fb1a0b","text":"CreateTCPLoadBalancer(name, region string, externalIP net.IP, ports []int, hosts []string, affinityType api.AffinityType) (string, error) // UpdateTCPLoadBalancer updates hosts under the specified load balancer. UpdateTCPLoadBalancer(name, region string, hosts []string) error // DeleteTCPLoadBalancer deletes a specified load balancer. DeleteTCPLoadBalancer(name, region string) error // EnsureTCPLoadBalancerDeleted deletes the specified load balancer if it // exists, returning nil if the load balancer specified either didn't exist or // was successfully deleted. // This construction is useful because many cloud providers' load balancers // have multiple underlying components, meaning a Get could say that the LB // doesn't exist even if some part of it is still laying around. EnsureTCPLoadBalancerDeleted(name, region string) error } // Instances is an abstract, pluggable interface for sets of instances."} {"_id":"q-en-kubernetes-2d2f1c2619fff3273edbe63acf0a168664d71b4b9ebe1918b1f536f5933f7fed","text":"command: - /bin/sh - -c - echo -998 > /proc/$$$/oom_score_adj && kube-proxy {{kubeconfig}} {{cluster_cidr}} --resource-container=\"\" {{params}} 1>>/var/log/kube-proxy.log 2>&1 - kube-proxy {{kubeconfig}} {{cluster_cidr}} --resource-container=\"\" --oom-score-adj=-998 {{params}} 1>>/var/log/kube-proxy.log 2>&1 {{container_env}} {{kube_cache_mutation_detector_env_name}} {{kube_cache_mutation_detector_env_value}}"} {"_id":"q-en-kubernetes-2d4b1c492aed525ad82d7b35b3ee48579c3b9e6eb2ab5a645b0c66cc8532e57b","text":"}) /* Testname: allowPrivilegeEscalation=false. Description: Configuring the allowPrivilegeEscalation to false, does not allow the privilege escalation operation. A container is configured with allowPrivilegeEscalation=false and a given uid (1000) which is not 0. When the container is run, the container is run using uid=1000. This test is marked LinuxOnly since Windows does not support running as UID / GID, or privilege escalation. Release : v1.15 Testname: Security Context, allowPrivilegeEscalation=false. Description: Configuring the allowPrivilegeEscalation to false, does not allow the privilege escalation operation. A container is configured with allowPrivilegeEscalation=false and a given uid (1000) which is not 0. When the container is run, container's output MUST match with expected output verifying container ran with given uid i.e. uid=1000. [LinuxOnly]: This test is marked LinuxOnly since Windows does not support running as UID / GID, or privilege escalation. */ It(\"should not allow privilege escalation when false [LinuxOnly] [NodeConformance]\", func() { framework.ConformanceIt(\"should not allow privilege escalation when false [LinuxOnly] [NodeConformance]\", func() { podName := \"alpine-nnp-false-\" + string(uuid.NewUUID()) apeFalse := false if err := createAndMatchOutput(podName, \"Effective uid: 1000\", &apeFalse, 1000); err != nil {"} {"_id":"q-en-kubernetes-2d4c0fbb30abe3949169075e589c8289a804000ef8b9336c980b3271b6c6745a","text":"t.Run(test.name, func(t *testing.T) { serviceName := types.NamespacedName{Namespace: \"default\", Name: \"myservice\"} sgList, err := c.buildELBSecurityGroupList(serviceName, \"aid\", test.extraSGsAnnotation) sgList, err := c.buildELBSecurityGroupList(serviceName, \"aid\", test.annotations) assert.NoError(t, err, \"buildELBSecurityGroupList failed\") extraSGs := sgList[1:] assert.True(t, sets.NewString(test.expectedSGs...).Equal(sets.NewString(extraSGs...)),"} {"_id":"q-en-kubernetes-2d58bc425e2c158b9a2a1b143d0008a67bce2cf5e3f56952a0161b818d90418a","text":"// are set to 0. func completeRollingUpdate(set *apps.StatefulSet, status *apps.StatefulSetStatus) { if set.Spec.UpdateStrategy.Type == apps.RollingUpdateStatefulSetStrategyType && status.UpdatedReplicas == status.Replicas && status.ReadyReplicas == status.Replicas { status.UpdatedReplicas == *set.Spec.Replicas && status.ReadyReplicas == *set.Spec.Replicas && status.Replicas == *set.Spec.Replicas { status.CurrentReplicas = status.UpdatedReplicas status.CurrentRevision = status.UpdateRevision }"} {"_id":"q-en-kubernetes-2da9c5047ff5958a2b240aa981775e40454a467efe67e42c43d9035ad7a47260","text":"}) }) Context(\"when pod using local volume with non-existant path\", func() { ep := &eventPatterns{ reason: \"FailedMount\", pattern: make([]string, 2)} ep.pattern = append(ep.pattern, \"MountVolume.SetUp failed\") ep.pattern = append(ep.pattern, \"does not exist\") It(\"should not be able to mount\", func() { testVol := &localTestVolume{ node: config.node0, hostDir: \"/non-existent/location/nowhere\", localVolumeType: testVolType, } By(\"Creating local PVC and PV\") createLocalPVCsPVs(config, []*localTestVolume{testVol}, testMode) pod, err := createLocalPod(config, testVol) Expect(err).To(HaveOccurred()) checkPodEvents(config, pod.Name, ep) verifyLocalVolume(config, testVol) cleanupLocalPVCsPVs(config, []*localTestVolume{testVol}) }) }) }) } Context(\"when pod's node is different from PV's NodeAffinity\", func() { Context(\"when local volume cannot be mounted [Slow]\", func() { // TODO: // - make the pod create timeout shorter // - check for these errors in unit tests intead It(\"should fail mount due to non-existant path\", func() { ep := &eventPatterns{ reason: \"FailedMount\", pattern: make([]string, 2)} ep.pattern = append(ep.pattern, \"MountVolume.SetUp failed\") ep.pattern = append(ep.pattern, \"does not exist\") testVol := &localTestVolume{ node: config.node0, hostDir: \"/non-existent/location/nowhere\", localVolumeType: DirectoryLocalVolumeType, } By(\"Creating local PVC and PV\") createLocalPVCsPVs(config, []*localTestVolume{testVol}, immediateMode) pod, err := createLocalPod(config, testVol) Expect(err).To(HaveOccurred()) checkPodEvents(config, pod.Name, ep) verifyLocalVolume(config, testVol) cleanupLocalPVCsPVs(config, []*localTestVolume{testVol}) }) BeforeEach(func() { if len(config.nodes) < 2 { framework.Skipf(\"Runs only when number of nodes >= 2\") } }) It(\"should fail mount due to wrong node\", func() { if len(config.nodes) < 2 { framework.Skipf(\"Runs only when number of nodes >= 2\") } ep := &eventPatterns{ reason: \"FailedScheduling\", pattern: make([]string, 2)} ep.pattern = append(ep.pattern, \"MatchNodeSelector\") ep.pattern = append(ep.pattern, \"VolumeNodeAffinityConflict\") ep := &eventPatterns{ reason: \"FailedMount\", pattern: make([]string, 2)} ep.pattern = append(ep.pattern, \"NodeSelectorTerm\") ep.pattern = append(ep.pattern, \"MountVolume.NodeAffinity check failed\") It(\"should not be able to mount due to different NodeAffinity\", func() { testPodWithNodeName(config, testVolType, ep, config.nodes[1].Name, makeLocalPodWithNodeAffinity, testMode) }) testVols := setupLocalVolumesPVCsPVs(config, DirectoryLocalVolumeType, config.node0, 1, immediateMode) testVol := testVols[0] It(\"should not be able to mount due to different NodeSelector\", func() { testPodWithNodeName(config, testVolType, ep, config.nodes[1].Name, makeLocalPodWithNodeSelector, testMode) }) pod := makeLocalPodWithNodeName(config, testVol, config.nodes[1].Name) pod, err := config.client.CoreV1().Pods(config.ns).Create(pod) Expect(err).NotTo(HaveOccurred()) }) err = framework.WaitForPodNameRunningInNamespace(config.client, pod.Name, pod.Namespace) Expect(err).To(HaveOccurred()) checkPodEvents(config, pod.Name, ep) Context(\"when pod's node is different from PV's NodeName\", func() { cleanupLocalVolumes(config, []*localTestVolume{testVol}) }) }) BeforeEach(func() { if len(config.nodes) < 2 { framework.Skipf(\"Runs only when number of nodes >= 2\") } }) Context(\"when pod's node is different from PV's NodeAffinity\", func() { var ( testVol *localTestVolume volumeType localVolumeType ) BeforeEach(func() { if len(config.nodes) < 2 { framework.Skipf(\"Runs only when number of nodes >= 2\") } ep := &eventPatterns{ reason: \"FailedMount\", pattern: make([]string, 2)} ep.pattern = append(ep.pattern, \"NodeSelectorTerm\") ep.pattern = append(ep.pattern, \"MountVolume.NodeAffinity check failed\") volumeType = DirectoryLocalVolumeType setupStorageClass(config, &immediateMode) testVols := setupLocalVolumesPVCsPVs(config, volumeType, config.node0, 1, immediateMode) testVol = testVols[0] }) It(\"should not be able to mount due to different NodeName\", func() { testPodWithNodeName(config, testVolType, ep, config.nodes[1].Name, makeLocalPodWithNodeName, testMode) }) }) AfterEach(func() { cleanupLocalVolumes(config, []*localTestVolume{testVol}) cleanupStorageClass(config) }) } It(\"should not be able to mount due to different NodeAffinity\", func() { testPodWithNodeConflict(config, volumeType, config.nodes[1].Name, makeLocalPodWithNodeAffinity, immediateMode) }) It(\"should not be able to mount due to different NodeSelector\", func() { testPodWithNodeConflict(config, volumeType, config.nodes[1].Name, makeLocalPodWithNodeSelector, immediateMode) }) }) Context(\"when using local volume provisioner\", func() { var volumePath string"} {"_id":"q-en-kubernetes-2db5aecfdcf37282dc75d51314398feb1fbd301303a00cbe03d0eac989d21bf8","text":"scheme := runtime.NewScheme() scheme.AddKnownTypes(cmResource.GroupVersion(), &v1.ConfigMap{}) codecs := serializer.NewCodecFactory(scheme) o := NewFieldManagedObjectTracker(scheme, codecs.UniversalDecoder(), fakeTypeConverter) o := NewFieldManagedObjectTracker(scheme, codecs.UniversalDecoder(), configMapTypeConverter(scheme)) reaction := ObjectReaction(o) action := NewCreateAction(cmResource, \"default\", &v1.ConfigMap{"} {"_id":"q-en-kubernetes-2dc822a0d2ce95b46ddd1d56a31024cf77b33534dfd9e81ec9a859f39739651a","text":"minRequestTimeout: minRequestTimeout, } crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: ret.createCustomResourceDefinition, UpdateFunc: ret.updateCustomResourceDefinition, DeleteFunc: func(obj interface{}) { ret.removeDeadStorage()"} {"_id":"q-en-kubernetes-2df4c5ccc157eada278ac2f135e0c37c30a65e9a8931c0857e2bccd11d1ed9c2","text":"\"httpGet\": { \"host\": \"127.0.0.1\", \"port\": 8080, \"path\": \"/healthz\" \"path\": \"/healthz?exclude=etcd\" }, \"initialDelaySeconds\": {{liveness_probe_initial_delay}}, \"timeoutSeconds\": 15 }, \"readinessProbe\": { \"httpGet\": { \"host\": \"127.0.0.1\", \"port\": 8080, \"path\": \"/healthz\" }, \"timeoutSeconds\": 15 }, \"ports\":[ { \"name\": \"https\", \"containerPort\": {{secure_port}},"} {"_id":"q-en-kubernetes-2e4a5ddca8a70cffd9a581af7bb1a2e8ec75a3c132bc4bbbd1cb54880ec9537c","text":"func TestPodContainerDeviceAllocation(t *testing.T) { flag.Set(\"alsologtostderr\", fmt.Sprintf(\"%t\", true)) var logLevel string flag.StringVar(&logLevel, \"logLevel\", \"4\", \"test\") flag.Lookup(\"v\").Value.Set(logLevel) res1 := TestResource{ resourceName: \"domain1.com/resource1\", resourceQuantity: *resource.NewQuantity(int64(2), resource.DecimalSI),"} {"_id":"q-en-kubernetes-2e573d80625dbf40e7621d022aa8f1c4bfee9da58f1c5635791bea2fbe1f0344","text":"timeoutCtx, timeoutCancel := context.WithTimeout(ctx, le.config.RenewDeadline) defer timeoutCancel() err := wait.PollImmediateUntil(le.config.RetryPeriod, func() (bool, error) { return le.tryAcquireOrRenew(), nil done := make(chan bool, 1) go func() { defer close(done) done <- le.tryAcquireOrRenew() }() select { case <-timeoutCtx.Done(): return false, fmt.Errorf(\"failed to tryAcquireOrRenew %s\", timeoutCtx.Err()) case result := <-done: return result, nil } }, timeoutCtx.Done()) le.maybeReportTransition() desc := le.config.Lock.Describe() if err == nil {"} {"_id":"q-en-kubernetes-2e6a389d2ac786185fd3cac5016250b463531b3b91fd5205cf2517b3baab5201","text":"out.Filter = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Filter)) out.PostFilter = (*v1alpha1.PluginSet)(unsafe.Pointer(in.PostFilter)) out.Score = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Score)) out.NormalizeScore = (*v1alpha1.PluginSet)(unsafe.Pointer(in.NormalizeScore)) out.Reserve = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Reserve)) out.Permit = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Permit)) out.PreBind = (*v1alpha1.PluginSet)(unsafe.Pointer(in.PreBind))"} {"_id":"q-en-kubernetes-2e7a6836ebdd5be7c247a4aabbc614f5a9025bb0dabcf3492021d7b553742d05","text":"// +k8s:deepcopy-gen=package package testing package testing // import \"k8s.io/apiserver/pkg/endpoints/testing\" "} {"_id":"q-en-kubernetes-2e7e61e4522cca6281faaaa63212035c24979aa0c38638aaf96b1d3f50d2473b","text":"return nameservers, searches, options, utilerrors.NewAggregate(allErrors) } // Reads a resolv.conf-like file and returns the DNS config options from it. // Returns an empty DNSConfig if the given resolverConfigFile is an empty string. func getDNSConfig(resolverConfigFile string) (*runtimeapi.DNSConfig, error) { var hostDNS, hostSearch, hostOptions []string // Get host DNS settings if resolverConfigFile != \"\" { f, err := os.Open(resolverConfigFile) if err != nil { klog.ErrorS(err, \"Could not open resolv conf file.\") return nil, err } defer f.Close() hostDNS, hostSearch, hostOptions, err = parseResolvConf(f) if err != nil { err := fmt.Errorf(\"Encountered error while parsing resolv conf file. Error: %w\", err) klog.ErrorS(err, \"Could not parse resolv conf file.\") return nil, err } } return &runtimeapi.DNSConfig{ Servers: hostDNS, Searches: hostSearch, Options: hostOptions, }, nil } func getPodDNSType(pod *v1.Pod) (podDNSType, error) { dnsPolicy := pod.Spec.DNSPolicy switch dnsPolicy {"} {"_id":"q-en-kubernetes-2ec442f23b082a559d33dff264eab2147ef2ba01632e3344394462e719ce911b","text":"// if nodeAffinity.RequiredDuringSchedulingRequiredDuringExecution != nil { // \tnodeSelectorTerms := nodeAffinity.RequiredDuringSchedulingRequiredDuringExecution.NodeSelectorTerms // \tglog.V(10).Infof(\"Match for RequiredDuringSchedulingRequiredDuringExecution node selector terms %+v\", nodeSelectorTerms) // \tnodeAffinityMatches = NodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) // \tnodeAffinityMatches = nodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) // } // Match node selector for requiredDuringSchedulingIgnoredDuringExecution. if nodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil { nodeSelectorTerms := nodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms glog.V(10).Infof(\"Match for RequiredDuringSchedulingIgnoredDuringExecution node selector terms %+v\", nodeSelectorTerms) nodeAffinityMatches = nodeAffinityMatches && NodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) nodeAffinityMatches = nodeAffinityMatches && nodeMatchesNodeSelectorTerms(node, nodeSelectorTerms) } }"} {"_id":"q-en-kubernetes-2ed4d9b5e156808c3490220e5dd2f5b91e7b88864f31bec3e17d21f5e33c287b","text":"} } func TestAttacherWaitForAttach(t *testing.T) { tests := []struct { name string driver string makeAttachment func() *storage.VolumeAttachment expectedAttachID string expectError bool }{ { name: \"successful attach\", driver: \"attachable\", makeAttachment: func() *storage.VolumeAttachment { testAttachID := getAttachmentName(\"test-vol\", \"attachable\", \"node\") successfulAttachment := makeTestAttachment(testAttachID, \"node\", \"test-pv\") successfulAttachment.Status.Attached = true return successfulAttachment }, expectedAttachID: getAttachmentName(\"test-vol\", \"attachable\", \"node\"), expectError: false, }, { name: \"failed attach\", driver: \"attachable\", expectError: true, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { plug, _, tmpDir, _ := newTestWatchPlugin(t, nil) defer os.RemoveAll(tmpDir) attacher, err := plug.NewAttacher() if err != nil { t.Fatalf(\"failed to create new attacher: %v\", err) } csiAttacher := attacher.(*csiAttacher) spec := volume.NewSpecFromPersistentVolume(makeTestPV(\"test-pv\", 10, test.driver, \"test-vol\"), false) if test.makeAttachment != nil { attachment := test.makeAttachment() _, err = csiAttacher.k8s.StorageV1beta1().VolumeAttachments().Create(attachment) if err != nil { t.Fatalf(\"failed to create VolumeAttachment: %v\", err) } gotAttachment, err := csiAttacher.k8s.StorageV1beta1().VolumeAttachments().Get(attachment.Name, meta.GetOptions{}) if err != nil { t.Fatalf(\"failed to get created VolumeAttachment: %v\", err) } t.Logf(\"created test VolumeAttachment %+v\", gotAttachment) } attachID, err := csiAttacher.WaitForAttach(spec, \"\", nil, time.Second) if err != nil && !test.expectError { t.Errorf(\"Unexpected error: %s\", err) } if err == nil && test.expectError { t.Errorf(\"Expected error, got none\") } if attachID != test.expectedAttachID { t.Errorf(\"Expected attachID %q, got %q\", test.expectedAttachID, attachID) } }) } } func TestAttacherWaitForVolumeAttachment(t *testing.T) { nodeName := \"test-node\" testCases := []struct {"} {"_id":"q-en-kubernetes-2ed83e725cf9d363ab334bf9a5336f56f2d9bc7e0271efc453b62f771a51b631","text":"package gce import ( \"net/http\" \"net/http/httptest\" \"reflect\" \"testing\" compute \"google.golang.org/api/compute/v1\" \"k8s.io/kubernetes/pkg/util/flowcontrol\" \"k8s.io/kubernetes/pkg/util/rand\" utiltesting \"k8s.io/kubernetes/pkg/util/testing\" ) func TestGetRegion(t *testing.T) {"} {"_id":"q-en-kubernetes-2eda084ecb25b594e923a9f1e4a72c64945109105af7662dd45b827669ac9170","text":"if err != nil { assert.NoErrorf(t, err, \"unable to create temp file\") } stdoutBuf := &bytes.Buffer{} stderrBuf := &bytes.Buffer{} containerID := \"fake-container-id\""} {"_id":"q-en-kubernetes-2ef1fe16c8de0656f8469dcafcde90ca7177dbf8a16a0bc13845a7e93f501182","text":"} // writeLogs writes logs into stdout, stderr. func (w *logWriter) write(msg *logMessage) error { func (w *logWriter) write(msg *logMessage, addPrefix bool) error { if msg.timestamp.Before(w.opts.since) { // Skip the line because it's older than since return nil } line := msg.log if w.opts.timestamp { if w.opts.timestamp && addPrefix { prefix := append([]byte(msg.timestamp.Format(timeFormatOut)), delimiter[0]) line = append(prefix, line...) }"} {"_id":"q-en-kubernetes-2efe1506faddd22c9f3e952ce0348d89809254da8f8c21bf0e811faa86de9ac2","text":"// in node status. By calling this function (GetVolumesToReportAttached), node status should be updated, and the volume // will not need to be updated until new changes are applied (detach is triggered again) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) }"} {"_id":"q-en-kubernetes-2f1dfce6af80261f312f4da284e389cdd710fc4e958bcd17e7b86c481d7b3b40","text":"{\"name\" : \"BalancedResourceAllocation\", \"weight\" : 1}, {\"name\" : \"ServiceSpreadingPriority\", \"weight\" : 1}, {\"name\" : \"EqualPriority\", \"weight\" : 1} ] ], \"hardPodAffinitySymmetricWeight\" : 10 }"} {"_id":"q-en-kubernetes-2f71fb7009dc20d8d58c2d365593cfa672d5c4eb60a86fcb05b73f3481fa6cf4","text":"numErrs: 0, }, { name: \"invalid duplicate targetports (number with same protocol)\", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"q\", Port: 1, Protocol: \"TCP\", TargetPort: intstr.FromInt(8080)}) s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"r\", Port: 2, Protocol: \"TCP\", TargetPort: intstr.FromInt(8080)}) }, numErrs: 1, }, { name: \"invalid duplicate targetports (name with same protocol)\", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"q\", Port: 1, Protocol: \"TCP\", TargetPort: intstr.FromString(\"http\")}) s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"r\", Port: 2, Protocol: \"TCP\", TargetPort: intstr.FromString(\"http\")}) }, numErrs: 1, }, { name: \"valid duplicate targetports (number with different protocols)\", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"q\", Port: 1, Protocol: \"TCP\", TargetPort: intstr.FromInt(8080)}) s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"r\", Port: 2, Protocol: \"UDP\", TargetPort: intstr.FromInt(8080)}) }, numErrs: 0, }, { name: \"valid duplicate targetports (name with different protocols)\", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"q\", Port: 1, Protocol: \"TCP\", TargetPort: intstr.FromString(\"http\")}) s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: \"r\", Port: 2, Protocol: \"UDP\", TargetPort: intstr.FromString(\"http\")}) }, numErrs: 0, }, { name: \"valid type - cluster\", tweakSvc: func(s *api.Service) { s.Spec.Type = api.ServiceTypeClusterIP"} {"_id":"q-en-kubernetes-2f894dbc8003b4e91421b7ccb30bce275186633f85a32d8cd76f3a5b5ce777ff","text":"MASTER_IP=\"\" MINION_IPS=\"\" KUBECTL_PATH=${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl # Assumed Vars: # KUBE_ROOT function test-build-release {"} {"_id":"q-en-kubernetes-2f8ca2de51486d0fe4e0aa407ddd578f4a27e7eb894a84625d48dc6a575bc831","text":"pluginapi.RegisterDevicePluginServer(m.server, m) go m.server.Serve(sock) // Wait till grpc server is ready. for i := 0; i < 10; i++ { services := m.server.GetServiceInfo() if len(services) > 0 { break } time.Sleep(1 * time.Second) _, conn, err := dial(m.socket) if err != nil { return err } conn.Close() log.Println(\"Starting to serve on\", m.socket) return nil"} {"_id":"q-en-kubernetes-2fa3f0d066d2651904a6ba3b4e3674310fa17a90bb0ce1f2b3f3bb3d594d2e41","text":"return c.check(r) } // getExcludedChecks extracts the health check names to be excluded from the query param func getExcludedChecks(r *http.Request) sets.String { checks, found := r.URL.Query()[\"exclude\"] if found { return sets.NewString(checks...) } return sets.NewString() } // handleRootHealthz returns an http.HandlerFunc that serves the provided checks. func handleRootHealthz(checks ...HealthzChecker) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { failed := false excluded := getExcludedChecks(r) var verboseOut bytes.Buffer for _, check := range checks { // no-op the check if we've specified we want to exclude the check if excluded.Has(check.Name()) { excluded.Delete(check.Name()) fmt.Fprintf(&verboseOut, \"[+]%v excluded: okn\", check.Name()) continue } if err := check.Check(r); err != nil { // don't include the error since this endpoint is public. If someone wants more detail // they should have explicit permission to the detailed checks."} {"_id":"q-en-kubernetes-303a059b91b2663b4d81aa537984724b34f1d55f48702944031ae88fedb34e9e","text":"// Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet // NormalizeScore is a list of plugins that should be invoked after the scoring phase to normalize scores. NormalizeScore *PluginSet // Reserve is a list of plugins invoked when reserving a node to run the pod. Reserve *PluginSet"} {"_id":"q-en-kubernetes-304fddf5a53f36ed52ec99d407b40ffa69205cac344d63d312c9934ccea99292","text":"}) nc.leaseLister = leaseInformer.Lister() nc.leaseInformerSynced = leaseInformer.Informer().HasSynced if utilfeature.DefaultFeatureGate.Enabled(features.NodeLease) { nc.leaseInformerSynced = leaseInformer.Informer().HasSynced } else { // Always indicate that lease is synced to prevent syncing lease. nc.leaseInformerSynced = func() bool { return true } } nc.nodeLister = nodeInformer.Lister() nc.nodeInformerSynced = nodeInformer.Informer().HasSynced"} {"_id":"q-en-kubernetes-30bb2256ab855e3fa51af69ccd55a53f6024279d2fb5cbcec2b9b7a7a3026a2f","text":"func TestIsCurrentInstance(t *testing.T) { cloud := &Cloud{ Config: Config{ VMType: vmTypeVMSS, VMType: vmTypeStandard, }, } testcases := []struct {"} {"_id":"q-en-kubernetes-30bcfced3d39e0cc43e96b72eed597f0d92f9e0d9c06080904cfd3761abeba92","text":"parameters[k] = v.(string) } } if snapshotProvider, ok := snapshotClass.Object[\"driver\"]; ok { snapshotter = snapshotProvider.(string) } } return testsuites.GetSnapshotClass(snapshotter, parameters, ns, suffix)"} {"_id":"q-en-kubernetes-30c11151990ccce499ac1ad6947a662fd442dc3b5a31fda2d5b087dba1c7e7d1","text":"}) // TODO: add tests that cover deployment.Spec.MinReadySeconds once we solved clock-skew issues // See https://github.com/kubernetes/kubernetes/issues/29229 ginkgo.It(\"should run the lifecycle of a Deployment\", func() { deploymentResource := schema.GroupVersionResource{Group: \"apps\", Version: \"v1\", Resource: \"deployments\"} testNamespaceName := f.Namespace.Name testDeploymentName := \"test-deployment\" testDeploymentInitialImage := imageutils.GetE2EImage(imageutils.Agnhost) testDeploymentPatchImage := imageutils.GetE2EImage(imageutils.Pause) testDeploymentUpdateImage := imageutils.GetE2EImage(imageutils.Httpd) testDeploymentDefaultReplicas := int32(3) testDeploymentMinimumReplicas := int32(1) testDeploymentNoReplicas := int32(0) testDeploymentLabels := map[string]string{\"test-deployment-static\": \"true\"} testDeploymentLabelsFlat := \"test-deployment-static=true\" testDeploymentLabelSelectors := metav1.LabelSelector{ MatchLabels: testDeploymentLabels, } w := &cache.ListWatch{ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = testDeploymentLabelsFlat return f.ClientSet.AppsV1().Deployments(testNamespaceName).Watch(context.TODO(), options) }, } deploymentsList, err := f.ClientSet.AppsV1().Deployments(\"\").List(context.TODO(), metav1.ListOptions{LabelSelector: testDeploymentLabelsFlat}) framework.ExpectNoError(err, \"failed to list Deployments\") ginkgo.By(\"creating a Deployment\") testDeployment := appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: testDeploymentName, Labels: map[string]string{\"test-deployment-static\": \"true\"}, }, Spec: appsv1.DeploymentSpec{ Replicas: &testDeploymentDefaultReplicas, Selector: &testDeploymentLabelSelectors, Template: v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: testDeploymentLabelSelectors.MatchLabels, }, Spec: v1.PodSpec{ Containers: []v1.Container{{ Name: testDeploymentName, Image: testDeploymentInitialImage, }}, }, }, }, } _, err = f.ClientSet.AppsV1().Deployments(testNamespaceName).Create(context.TODO(), &testDeployment, metav1.CreateOptions{}) framework.ExpectNoError(err, \"failed to create Deployment %v in namespace %v\", testDeploymentName, testNamespaceName) ginkgo.By(\"waiting for Deployment to be created\") ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Added: if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Added) ginkgo.By(\"waiting for all Replicas to be Ready\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" && deployment.Status.AvailableReplicas == testDeploymentDefaultReplicas && deployment.Status.ReadyReplicas == testDeploymentDefaultReplicas return found, nil } return false, nil }) framework.ExpectNoError(err, \"failed to see replicas of %v in namespace %v scale to requested amount of %v\", testDeployment.Name, testNamespaceName, testDeploymentDefaultReplicas) ginkgo.By(\"patching the Deployment\") deploymentPatch, err := json.Marshal(map[string]interface{}{ \"metadata\": map[string]interface{}{ \"labels\": map[string]string{\"test-deployment\": \"patched\"}, }, \"spec\": map[string]interface{}{ \"replicas\": testDeploymentMinimumReplicas, \"template\": map[string]interface{}{ \"spec\": map[string]interface{}{ \"containers\": [1]map[string]interface{}{{ \"name\": testDeploymentName, \"image\": testDeploymentPatchImage, \"command\": []string{\"/bin/sleep\", \"100000\"}, }}, }, }, }, }) framework.ExpectNoError(err, \"failed to Marshal Deployment JSON patch\") _, err = f.ClientSet.AppsV1().Deployments(testNamespaceName).Patch(context.TODO(), testDeploymentName, types.StrategicMergePatchType, []byte(deploymentPatch), metav1.PatchOptions{}) framework.ExpectNoError(err, \"failed to patch Deployment\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Modified: if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Modified) ginkgo.By(\"waiting for Replicas to scale\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" && deployment.Status.AvailableReplicas == testDeploymentMinimumReplicas && deployment.Status.ReadyReplicas == testDeploymentMinimumReplicas && deployment.Spec.Template.Spec.Containers[0].Image == testDeploymentPatchImage return found, nil } return false, nil }) framework.ExpectNoError(err, \"failed to see replicas of %v in namespace %v scale to requested amount of %v\", testDeployment.Name, testNamespaceName, testDeploymentMinimumReplicas) ginkgo.By(\"listing Deployments\") deploymentsList, err = f.ClientSet.AppsV1().Deployments(\"\").List(context.TODO(), metav1.ListOptions{LabelSelector: testDeploymentLabelsFlat}) framework.ExpectNoError(err, \"failed to list Deployments\") foundDeployment := false for _, deploymentItem := range deploymentsList.Items { if deploymentItem.ObjectMeta.Name == testDeploymentName && deploymentItem.ObjectMeta.Namespace == testNamespaceName && deploymentItem.ObjectMeta.Labels[\"test-deployment-static\"] == \"true\" { foundDeployment = true break } } framework.ExpectEqual(foundDeployment, true, \"unable to find the Deployment in list\", deploymentsList) ginkgo.By(\"updating the Deployment\") testDeploymentUpdate := testDeployment testDeploymentUpdate.ObjectMeta.Labels[\"test-deployment\"] = \"updated\" testDeploymentUpdate.Spec.Template.Spec.Containers[0].Image = testDeploymentUpdateImage testDeploymentDefaultReplicasPointer := &testDeploymentDefaultReplicas testDeploymentUpdate.Spec.Replicas = testDeploymentDefaultReplicasPointer testDeploymentUpdateUnstructuredMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&testDeploymentUpdate) framework.ExpectNoError(err, \"failed to convert to unstructured\") testDeploymentUpdateUnstructured := unstructuredv1.Unstructured{ Object: testDeploymentUpdateUnstructuredMap, } // currently this hasn't been able to hit the endpoint replaceAppsV1NamespacedDeploymentStatus _, err = dc.Resource(deploymentResource).Namespace(testNamespaceName).Update(context.TODO(), &testDeploymentUpdateUnstructured, metav1.UpdateOptions{}) //, \"status\") framework.ExpectNoError(err, \"failed to update the DeploymentStatus\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Modified: if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Modified) ginkgo.By(\"fetching the DeploymentStatus\") deploymentGetUnstructured, err := dc.Resource(deploymentResource).Namespace(testNamespaceName).Get(context.TODO(), testDeploymentName, metav1.GetOptions{}, \"status\") framework.ExpectNoError(err, \"failed to fetch the Deployment\") deploymentGet := appsv1.Deployment{} err = runtime.DefaultUnstructuredConverter.FromUnstructured(deploymentGetUnstructured.Object, &deploymentGet) framework.ExpectNoError(err, \"failed to convert the unstructured response to a Deployment\") framework.ExpectEqual(deploymentGet.Spec.Template.Spec.Containers[0].Image, testDeploymentUpdateImage, \"failed to update image\") framework.ExpectEqual(deploymentGet.ObjectMeta.Labels[\"test-deployment\"], \"updated\", \"failed to update labels\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" && deployment.Status.AvailableReplicas == testDeploymentDefaultReplicas && deployment.Status.ReadyReplicas == testDeploymentDefaultReplicas return found, nil } return false, nil }) framework.ExpectNoError(err, \"failed to see replicas of %v in namespace %v scale to requested amount of %v\", testDeployment.Name, testNamespaceName, testDeploymentDefaultReplicas) ginkgo.By(\"patching the DeploymentStatus\") deploymentStatusPatch, err := json.Marshal(map[string]interface{}{ \"metadata\": map[string]interface{}{ \"labels\": map[string]string{\"test-deployment\": \"patched-status\"}, }, \"status\": map[string]interface{}{ \"readyReplicas\": testDeploymentNoReplicas, }, }) framework.ExpectNoError(err, \"failed to Marshal Deployment JSON patch\") dc.Resource(deploymentResource).Namespace(testNamespaceName).Patch(context.TODO(), testDeploymentName, types.StrategicMergePatchType, []byte(deploymentStatusPatch), metav1.PatchOptions{}, \"status\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Modified: if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Modified) ginkgo.By(\"fetching the DeploymentStatus\") deploymentGetUnstructured, err = dc.Resource(deploymentResource).Namespace(testNamespaceName).Get(context.TODO(), testDeploymentName, metav1.GetOptions{}, \"status\") framework.ExpectNoError(err, \"failed to fetch the DeploymentStatus\") deploymentGet = appsv1.Deployment{} err = runtime.DefaultUnstructuredConverter.FromUnstructured(deploymentGetUnstructured.Object, &deploymentGet) framework.ExpectNoError(err, \"failed to convert the unstructured response to a Deployment\") framework.ExpectEqual(deploymentGet.Spec.Template.Spec.Containers[0].Image, testDeploymentUpdateImage, \"failed to update image\") framework.ExpectEqual(deploymentGet.ObjectMeta.Labels[\"test-deployment\"], \"updated\", \"failed to update labels\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" && deployment.Status.AvailableReplicas == testDeploymentDefaultReplicas && deployment.Status.ReadyReplicas == testDeploymentDefaultReplicas && deployment.Spec.Template.Spec.Containers[0].Image == testDeploymentUpdateImage return found, nil } return false, nil }) framework.ExpectNoError(err, \"failed to see replicas of %v in namespace %v scale to requested amount of %v\", testDeployment.Name, testNamespaceName, testDeploymentDefaultReplicas) ginkgo.By(\"deleting the Deployment\") err = f.ClientSet.AppsV1().Deployments(testNamespaceName).DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: testDeploymentLabelsFlat}) framework.ExpectNoError(err, \"failed to delete Deployment via collection\") ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, deploymentsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Deleted: if deployment, ok := event.Object.(*appsv1.Deployment); ok { found := deployment.ObjectMeta.Name == testDeployment.Name && deployment.Labels[\"test-deployment-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Deleted) }) }) func failureTrap(c clientset.Interface, ns string) {"} {"_id":"q-en-kubernetes-30e446c9ddbdfdf4f737e04894b02b588104e46eb61dd8212fa65fa8607c0d53","text":"// Makes sure the security group exists. // For multi-cluster isolation, name must be globally unique, for example derived from the service UUID. // Additional tags can be specified // Returns the security group id or error func (c *Cloud) ensureSecurityGroup(name string, description string) (string, error) { func (c *Cloud) ensureSecurityGroup(name string, description string, additionalTags map[string]string) (string, error) { groupID := \"\" attempt := 0 for {"} {"_id":"q-en-kubernetes-3113178345a4149f0419e8fb2f89dd0ae0a875b91dc6c267d1b8e52915e10142","text":"err := esController.syncService(fmt.Sprintf(\"%s/%s\", namespace, missingServiceName)) // Since the service doesn't exist, we should get a not found error assert.NotNil(t, err, \"Expected no error syncing service\") assert.Equal(t, err.Error(), \"service \"notthere\" not found\") // nil should be returned when the service doesn't exist assert.Nil(t, err, \"Expected no error syncing service\") // That should mean no client actions were performed assert.Len(t, client.Actions(), 0)"} {"_id":"q-en-kubernetes-31193288258fee76a48a170644cc613a75dea9d3538d3115465a1f5ecf8a7a34","text":"} } if klog.V(4).Enabled() { if klog.V(10).Enabled() { for i := range result { klog.InfoS(\"Calculated node's final score for pod\", \"pod\", klog.KObj(pod), \"node\", result[i].Name, \"score\", result[i].Score) }"} {"_id":"q-en-kubernetes-312ce29c3dadad20bcaf55cde48f6d971d32b6e7da8458872a06e151dffbce5f","text":"ginkgo.Context(\"once the node is setup\", func() { ginkgo.It(\"container runtime's oom-score-adj should be -999\", func() { runtimePids, err := getPidsForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile) gomega.Expect(err).To(gomega.BeNil(), \"failed to get list of container runtime pids\") framework.ExpectNoError(err, \"failed to get list of container runtime pids\") for _, pid := range runtimePids { gomega.Eventually(func() error { return validateOOMScoreAdjSetting(pid, -999)"} {"_id":"q-en-kubernetes-31523b44bbb1bb48f38e257fe239a885088cdef398e5538e62dedf69dfb641f0","text":"} // Status indicates the result of running a plugin. It consists of a code, a // message, (optionally) an error and an plugin name it fails by. When the status // code is not `Success`, the reasons should explain why. // message, (optionally) an error and an plugin name it fails by. // When the status code is not Success, the reasons should explain why. // And, when code is Success, all the other fields should be empty. // NOTE: A nil Status is also considered as Success. type Status struct { code Code"} {"_id":"q-en-kubernetes-318023309a74e5810b1a744a27dc248736ab4d0899c6e07f2ccbc9ed7445740d","text":"return false, output, nil } } // getRbdImageInfo try to get rbdImageInfo from deviceMountPath. func getRbdImageInfo(deviceMountPath string) (*rbdImageInfo, error) { deviceMountedPathSeps := strings.Split(filepath.Base(deviceMountPath), \"-image-\") if len(deviceMountedPathSeps) != 2 { return nil, fmt.Errorf(\"Can't found devicePath for %s \", deviceMountPath) } return &rbdImageInfo{ pool: deviceMountedPathSeps[0], name: deviceMountedPathSeps[1], }, nil } "} {"_id":"q-en-kubernetes-31a7eaa80511f7d14c9e4b533d024f92e875d05c6187e680bca1af8e1e61d7f4","text":"return \"\", fmt.Errorf(\"created security group, but id was not returned: %s\", name) } err := c.tagging.createTags(c.ec2, groupID, ResourceLifecycleOwned, nil) err := c.tagging.createTags(c.ec2, groupID, ResourceLifecycleOwned, additionalTags) if err != nil { // If we retry, ensureClusterTags will recover from this - it // will add the missing tags. We could delete the security"} {"_id":"q-en-kubernetes-3213574cc641de0acf4fd6f427885099b917a706a1c2a7527106b0de680b5ac8","text":"\"context\" \"fmt\" \"math/rand\" \"sort\" \"sync\" \"sync/atomic\" \"time\""} {"_id":"q-en-kubernetes-322dcfd43c3da1d3b8584df754f853b504ce70faf08a1a2d70938cdcb2baefdf","text":"} }) }) ginkgo.Context(\"PriorityClass endpoints\", func() { var cs clientset.Interface f := framework.NewDefaultFramework(\"sched-preemption-path\") var pcs []*schedulingv1.PriorityClass ginkgo.BeforeEach(func() { cs = f.ClientSet // Create 2 PriorityClass: p1, p2. for i := 1; i <= 2; i++ { name, val := fmt.Sprintf(\"p%d\", i), int32(i) pc, err := cs.SchedulingV1().PriorityClasses().Create(context.TODO(), &schedulingv1.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: name}, Value: val}, metav1.CreateOptions{}) if err != nil { framework.Logf(\"Failed to create priority '%v/%v'. Reason: %v. Msg: %v\", name, val, apierrors.ReasonForError(err), err) } framework.ExpectEqual(err == nil || apierrors.IsAlreadyExists(err), true) pcs = append(pcs, pc) } }) ginkgo.AfterEach(func() { // Print out additional info if tests failed. if ginkgo.CurrentGinkgoTestDescription().Failed { // List existing PriorityClasses. priorityList, err := cs.SchedulingV1().PriorityClasses().List(context.TODO(), metav1.ListOptions{}) if err != nil { framework.Logf(\"Unable to list PriorityClasses: %v\", err) } else { framework.Logf(\"List existing PriorityClasses:\") for _, p := range priorityList.Items { framework.Logf(\"%v/%v created at %v\", p.Name, p.Value, p.CreationTimestamp) } } } // Cannot run collection deletion which would delete all system level priority classes. for _, pc := range pcs { err := cs.SchedulingV1().PriorityClasses().Delete(context.TODO(), pc.Name, *metav1.NewDeleteOptions(0)) framework.ExpectNoError(err) } }) ginkgo.It(\"verify PriorityClass endpoints can be operated with different HTTP methods\", func() { // 1. Patch/Update on immutable fields will fail. pcCopy := pcs[0].DeepCopy() pcCopy.Value = pcCopy.Value * 10 err := patchPriorityClass(cs, pcs[0], pcCopy) framework.ExpectError(err, \"expect a patch error on an immutable field\") framework.Logf(\"%v\", err) pcCopy = pcs[1].DeepCopy() pcCopy.Value = pcCopy.Value * 10 _, err = cs.SchedulingV1().PriorityClasses().Update(context.TODO(), pcCopy, metav1.UpdateOptions{}) framework.ExpectError(err, \"expect an update error on an immutable field\") framework.Logf(\"%v\", err) // 2. Patch/Update on mutable fields will succeed. newDesc := \"updated description\" pcCopy = pcs[0].DeepCopy() pcCopy.Description = newDesc err = patchPriorityClass(cs, pcs[0], pcCopy) framework.ExpectNoError(err) pcCopy = pcs[1].DeepCopy() pcCopy.Description = newDesc _, err = cs.SchedulingV1().PriorityClasses().Update(context.TODO(), pcCopy, metav1.UpdateOptions{}) framework.ExpectNoError(err) // 3. List existing PriorityClasses. _, err = cs.SchedulingV1().PriorityClasses().List(context.TODO(), metav1.ListOptions{}) framework.ExpectNoError(err) // 4. Verify fields of updated PriorityClasses. for _, pc := range pcs { livePC, err := cs.SchedulingV1().PriorityClasses().Get(context.TODO(), pc.Name, metav1.GetOptions{}) framework.ExpectNoError(err) framework.ExpectEqual(livePC.Value, pc.Value) framework.ExpectEqual(livePC.Description, newDesc) } }) }) }) type pauseRSConfig struct {"} {"_id":"q-en-kubernetes-3233c751ea2287fbdb5ff8e6f3e80c3d9f3435eb9a9a927a5d5fb9424f685f09","text":"\"enableHttps\": false, \"nodeCacheCapable\": false } ] ], \"hardPodAffinitySymmetricWeight\" : 10 }"} {"_id":"q-en-kubernetes-3240861ff9ba9338377fe408d0cf7e2ad32c684f2b293788073c5d8bff91e333","text":"// StoreCertsInSecrets is alpha in v1.8 StoreCertsInSecrets = \"StoreCertsInSecrets\" // SupportIPVSProxyMode is alpha in v1.8 SupportIPVSProxyMode = \"SupportIPVSProxyMode\" ) var v190 = version.MustParseSemantic(\"v1.9.0\") var v190 = version.MustParseSemantic(\"v1.9.0-alpha.1\") // InitFeatureGates are the default feature gates for the init command var InitFeatureGates = FeatureList{ SelfHosting: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Beta}}, StoreCertsInSecrets: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}}, HighAvailability: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190}, SelfHosting: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Beta}}, StoreCertsInSecrets: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}}, HighAvailability: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190}, SupportIPVSProxyMode: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190}, } // Feature represents a feature being gated"} {"_id":"q-en-kubernetes-3247e0c632e1bddc85b674c38b0bf23adef9035e3f13dba3df8d99ed48ef0f6f","text":"} } // CloneTLSConfig returns a tls.Config with all exported fields except SessionTicketsDisabled and SessionTicketKey copied. // This makes it safe to call CloneTLSConfig on a config in active use by a server. // TODO: replace with tls.Config#Clone when we move to go1.8 func CloneTLSConfig(cfg *tls.Config) *tls.Config { if cfg == nil { return &tls.Config{} } return &tls.Config{ Rand: cfg.Rand, Time: cfg.Time, Certificates: cfg.Certificates, NameToCertificate: cfg.NameToCertificate, GetCertificate: cfg.GetCertificate, RootCAs: cfg.RootCAs, NextProtos: cfg.NextProtos, ServerName: cfg.ServerName, ClientAuth: cfg.ClientAuth, ClientCAs: cfg.ClientCAs, InsecureSkipVerify: cfg.InsecureSkipVerify, CipherSuites: cfg.CipherSuites, PreferServerCipherSuites: cfg.PreferServerCipherSuites, ClientSessionCache: cfg.ClientSessionCache, MinVersion: cfg.MinVersion, MaxVersion: cfg.MaxVersion, CurvePreferences: cfg.CurvePreferences, } } func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) { if transport == nil { return nil, nil"} {"_id":"q-en-kubernetes-3268eee9a9e14645cef60ad06a341ac0d9ad7f886e8e0d0a066f51ffe8c5770d","text":"fs.DurationVar(&s.ShutdownDelayDuration, \"shutdown-delay-duration\", s.ShutdownDelayDuration, \"\"+ \"Time to delay the termination. During that time the server keeps serving requests normally and /healthz \"+ \"returns success, but /readzy immediately returns failure. Graceful termination starts after this delay \"+ \"returns success, but /readyz immediately returns failure. Graceful termination starts after this delay \"+ \"has elapsed. This can be used to allow load balancer to stop sending traffic to this server.\") utilfeature.DefaultMutableFeatureGate.AddFlag(fs)"} {"_id":"q-en-kubernetes-326ff19840eace31d81b1eb7dec78d22c5a88b9c03dbb275c2abf87d9e56bf02","text":"// unicode code point can be up to 4 bytes long) strWithMaxLength.MaxElements = zeroIfNegative(*s.MaxLength()) * 4 } else { strWithMaxLength.MaxElements = estimateMaxStringLengthPerRequest(s) if len(s.Enum()) > 0 { strWithMaxLength.MaxElements = estimateMaxStringEnumLength(s) } else { strWithMaxLength.MaxElements = estimateMaxStringLengthPerRequest(s) } } return strWithMaxLength case \"boolean\":"} {"_id":"q-en-kubernetes-328cb6bbdb1c035c0b632fb6ba80a8616540a70e0758db99fb7ebd2a3bc608b5","text":"\"fmt\" \"reflect\" \"strings\" \"testing\" \"time\" apiextensions \"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset\""} {"_id":"q-en-kubernetes-32e47cd19e82eae8042c6317680feb55068a7575dbbefbdcde9a2cfc6e6b4099","text":"// createClients creates a kube client and an event client from the given config and masterOverride. // TODO remove masterOverride when CLI flags are removed. func createClients(config componentconfig.ClientConnectionConfiguration, masterOverride string) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) { func createClients(config componentconfig.ClientConnectionConfiguration, masterOverride string, timeout time.Duration) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) { if len(config.KubeConfigFile) == 0 && len(masterOverride) == 0 { glog.Warningf(\"Neither --kubeconfig nor --master was specified. Using default API client. This might not work.\") }"} {"_id":"q-en-kubernetes-32f38cc2b8d61b792b97eeed93107598b448826d4196cf58c452e1ab0ba12b2d","text":"currentBucketID := t.clock.Now().Unix() // There should be one or two elements in almost all cases expiredWatchers := make([][]*cacheWatcher, 0, 2) t.lock.Lock() defer t.lock.Unlock() for ; t.startBucketID <= currentBucketID; t.startBucketID++ { if watchers, ok := t.watchersBuckets[t.startBucketID]; ok { delete(t.watchersBuckets, t.startBucketID)"} {"_id":"q-en-kubernetes-32f62ef17e1f38e178718d918861823aed4dfa9aff54f5cd9f441155b9d6320e","text":"}, }, }, \"invalid extended resource requirement without limit\": { expectedError: \"Limit must be set\", spec: core.Pod{ ObjectMeta: metav1.ObjectMeta{Name: \"123\", Namespace: \"ns\"}, Spec: core.PodSpec{ Containers: []core.Container{ { Name: \"invalid\", Image: \"image\", ImagePullPolicy: \"IfNotPresent\", Resources: core.ResourceRequirements{ Requests: core.ResourceList{ core.ResourceName(\"example.com/a\"): resource.MustParse(\"2\"), }, }, }, }, RestartPolicy: core.RestartPolicyAlways, DNSPolicy: core.DNSClusterFirst, }, }, }, \"invalid fractional extended resource in container request\": { expectedError: \"must be an integer\", spec: core.Pod{"} {"_id":"q-en-kubernetes-331a9ad6edb5ac1539f728cd48dc76bc9d0d4498fd85e716a79ad228728c20f9","text":"e26fc85d14a1d3dc25569831acc06919673c545a kube::util::go_install_from_commit github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle a280fbac1a0a4c67b0eee660b4fd1b3db7c9f058 c72631a220406c4fae276861ee286aaec82c5af2 touch \"${KUBE_ROOT}/vendor/BUILD\""} {"_id":"q-en-kubernetes-3332ab3ccef4bdba8fdead76dcfcd7588e1ac36ab98a02b2e8692209dd55a802","text":"if err := p.Unmarshal(data); err != nil { return err } m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local() // truncate precision to microseconds to match JSON marshaling/unmarshaling truncatedNanoseconds := time.Duration(p.Nanos).Truncate(time.Microsecond) m.Time = time.Unix(p.Seconds, int64(truncatedNanoseconds)).Local() return nil }"} {"_id":"q-en-kubernetes-334d8ab20573459bb5c66ae46f0152525c2ca777e814f0cb4819d75fbf4317f0","text":"podName := \"statscollectiontest-\" + string(uuid.NewUUID()) pod := v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: podName, Name: fmt.Sprintf(\"%s-%d\", podName, i), Labels: map[string]string{ \"name\": podName, \"testapp\": \"stats-collection\","} {"_id":"q-en-kubernetes-3357bd62a2ed339303a348caf3f545697e78515fab11f10650c4c06dd6788376","text":"w = crlf.NewCRLFWriter(w) } results.header.writeTo(w) if addHeader { results.header.writeTo(w) } if !containsError { if err := printer.PrintObj(objToEdit, w); err != nil {"} {"_id":"q-en-kubernetes-3372c0dd9d039e595f5ac78aac4703241d99cf4337c1990deb41ff6873b6fa36","text":" //go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by openapi-gen. DO NOT EDIT. // This file was autogenerated by openapi-gen. Do not edit it manually! package openapi import ( v1 \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1\" v1beta1 \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1\" resource \"k8s.io/apimachinery/pkg/api/resource\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" intstr \"k8s.io/apimachinery/pkg/util/intstr\" common \"k8s.io/kube-openapi/pkg/common\" spec \"k8s.io/kube-openapi/pkg/validation/spec\" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ \"k8s.io/api/admissionregistration/v1.MutatingWebhook\": schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), \"k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration\": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), \"k8s.io/api/admissionregistration/v1.MutatingWebhookConfigurationList\": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), \"k8s.io/api/admissionregistration/v1.Rule\": schema_k8sio_api_admissionregistration_v1_Rule(ref), \"k8s.io/api/admissionregistration/v1.RuleWithOperations\": schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), \"k8s.io/api/admissionregistration/v1.ServiceReference\": schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), \"k8s.io/api/admissionregistration/v1.ValidatingWebhook\": schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), \"k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration\": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), \"k8s.io/api/admissionregistration/v1.ValidatingWebhookConfigurationList\": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), \"k8s.io/api/admissionregistration/v1.WebhookClientConfig\": schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), \"k8s.io/api/admissionregistration/v1beta1.MutatingWebhook\": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), \"k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration\": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), \"k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList\": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), \"k8s.io/api/admissionregistration/v1beta1.Rule\": schema_k8sio_api_admissionregistration_v1beta1_Rule(ref), \"k8s.io/api/admissionregistration/v1beta1.RuleWithOperations\": schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref), \"k8s.io/api/admissionregistration/v1beta1.ServiceReference\": schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), \"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook\": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), \"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration\": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref), \"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfigurationList\": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref), \"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig\": schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref), \"k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion\": schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref), \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersion\": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref), \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition\": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref), \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionList\": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref), \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec\": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref), \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus\": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref), \"k8s.io/api/apps/v1.ControllerRevision\": schema_k8sio_api_apps_v1_ControllerRevision(ref), \"k8s.io/api/apps/v1.ControllerRevisionList\": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), \"k8s.io/api/apps/v1.DaemonSet\": schema_k8sio_api_apps_v1_DaemonSet(ref), \"k8s.io/api/apps/v1.DaemonSetCondition\": schema_k8sio_api_apps_v1_DaemonSetCondition(ref), \"k8s.io/api/apps/v1.DaemonSetList\": schema_k8sio_api_apps_v1_DaemonSetList(ref), \"k8s.io/api/apps/v1.DaemonSetSpec\": schema_k8sio_api_apps_v1_DaemonSetSpec(ref), \"k8s.io/api/apps/v1.DaemonSetStatus\": schema_k8sio_api_apps_v1_DaemonSetStatus(ref), \"k8s.io/api/apps/v1.DaemonSetUpdateStrategy\": schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), \"k8s.io/api/apps/v1.Deployment\": schema_k8sio_api_apps_v1_Deployment(ref), \"k8s.io/api/apps/v1.DeploymentCondition\": schema_k8sio_api_apps_v1_DeploymentCondition(ref), \"k8s.io/api/apps/v1.DeploymentList\": schema_k8sio_api_apps_v1_DeploymentList(ref), \"k8s.io/api/apps/v1.DeploymentSpec\": schema_k8sio_api_apps_v1_DeploymentSpec(ref), \"k8s.io/api/apps/v1.DeploymentStatus\": schema_k8sio_api_apps_v1_DeploymentStatus(ref), \"k8s.io/api/apps/v1.DeploymentStrategy\": schema_k8sio_api_apps_v1_DeploymentStrategy(ref), \"k8s.io/api/apps/v1.ReplicaSet\": schema_k8sio_api_apps_v1_ReplicaSet(ref), \"k8s.io/api/apps/v1.ReplicaSetCondition\": schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), \"k8s.io/api/apps/v1.ReplicaSetList\": schema_k8sio_api_apps_v1_ReplicaSetList(ref), \"k8s.io/api/apps/v1.ReplicaSetSpec\": schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), \"k8s.io/api/apps/v1.ReplicaSetStatus\": schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), \"k8s.io/api/apps/v1.RollingUpdateDaemonSet\": schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), \"k8s.io/api/apps/v1.RollingUpdateDeployment\": schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), \"k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy\": schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), \"k8s.io/api/apps/v1.StatefulSet\": schema_k8sio_api_apps_v1_StatefulSet(ref), \"k8s.io/api/apps/v1.StatefulSetCondition\": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), \"k8s.io/api/apps/v1.StatefulSetList\": schema_k8sio_api_apps_v1_StatefulSetList(ref), \"k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy\": schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), \"k8s.io/api/apps/v1.StatefulSetSpec\": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), \"k8s.io/api/apps/v1.StatefulSetStatus\": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), \"k8s.io/api/apps/v1.StatefulSetUpdateStrategy\": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), \"k8s.io/api/apps/v1beta1.ControllerRevision\": schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), \"k8s.io/api/apps/v1beta1.ControllerRevisionList\": schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), \"k8s.io/api/apps/v1beta1.Deployment\": schema_k8sio_api_apps_v1beta1_Deployment(ref), \"k8s.io/api/apps/v1beta1.DeploymentCondition\": schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), \"k8s.io/api/apps/v1beta1.DeploymentList\": schema_k8sio_api_apps_v1beta1_DeploymentList(ref), \"k8s.io/api/apps/v1beta1.DeploymentRollback\": schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), \"k8s.io/api/apps/v1beta1.DeploymentSpec\": schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), \"k8s.io/api/apps/v1beta1.DeploymentStatus\": schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), \"k8s.io/api/apps/v1beta1.DeploymentStrategy\": schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), \"k8s.io/api/apps/v1beta1.RollbackConfig\": schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), \"k8s.io/api/apps/v1beta1.RollingUpdateDeployment\": schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), \"k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy\": schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), \"k8s.io/api/apps/v1beta1.Scale\": schema_k8sio_api_apps_v1beta1_Scale(ref), \"k8s.io/api/apps/v1beta1.ScaleSpec\": schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), \"k8s.io/api/apps/v1beta1.ScaleStatus\": schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), \"k8s.io/api/apps/v1beta1.StatefulSet\": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), \"k8s.io/api/apps/v1beta1.StatefulSetCondition\": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), \"k8s.io/api/apps/v1beta1.StatefulSetList\": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), \"k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy\": schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), \"k8s.io/api/apps/v1beta1.StatefulSetSpec\": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), \"k8s.io/api/apps/v1beta1.StatefulSetStatus\": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), \"k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy\": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), \"k8s.io/api/apps/v1beta2.ControllerRevision\": schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), \"k8s.io/api/apps/v1beta2.ControllerRevisionList\": schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), \"k8s.io/api/apps/v1beta2.DaemonSet\": schema_k8sio_api_apps_v1beta2_DaemonSet(ref), \"k8s.io/api/apps/v1beta2.DaemonSetCondition\": schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), \"k8s.io/api/apps/v1beta2.DaemonSetList\": schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), \"k8s.io/api/apps/v1beta2.DaemonSetSpec\": schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), \"k8s.io/api/apps/v1beta2.DaemonSetStatus\": schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), \"k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy\": schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), \"k8s.io/api/apps/v1beta2.Deployment\": schema_k8sio_api_apps_v1beta2_Deployment(ref), \"k8s.io/api/apps/v1beta2.DeploymentCondition\": schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), \"k8s.io/api/apps/v1beta2.DeploymentList\": schema_k8sio_api_apps_v1beta2_DeploymentList(ref), \"k8s.io/api/apps/v1beta2.DeploymentSpec\": schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), \"k8s.io/api/apps/v1beta2.DeploymentStatus\": schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), \"k8s.io/api/apps/v1beta2.DeploymentStrategy\": schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), \"k8s.io/api/apps/v1beta2.ReplicaSet\": schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), \"k8s.io/api/apps/v1beta2.ReplicaSetCondition\": schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), \"k8s.io/api/apps/v1beta2.ReplicaSetList\": schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), \"k8s.io/api/apps/v1beta2.ReplicaSetSpec\": schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), \"k8s.io/api/apps/v1beta2.ReplicaSetStatus\": schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), \"k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet\": schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), \"k8s.io/api/apps/v1beta2.RollingUpdateDeployment\": schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), \"k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy\": schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), \"k8s.io/api/apps/v1beta2.Scale\": schema_k8sio_api_apps_v1beta2_Scale(ref), \"k8s.io/api/apps/v1beta2.ScaleSpec\": schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), \"k8s.io/api/apps/v1beta2.ScaleStatus\": schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), \"k8s.io/api/apps/v1beta2.StatefulSet\": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), \"k8s.io/api/apps/v1beta2.StatefulSetCondition\": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), \"k8s.io/api/apps/v1beta2.StatefulSetList\": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), \"k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy\": schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), \"k8s.io/api/apps/v1beta2.StatefulSetSpec\": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), \"k8s.io/api/apps/v1beta2.StatefulSetStatus\": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), \"k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy\": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), \"k8s.io/api/authentication/v1.BoundObjectReference\": schema_k8sio_api_authentication_v1_BoundObjectReference(ref), \"k8s.io/api/authentication/v1.TokenRequest\": schema_k8sio_api_authentication_v1_TokenRequest(ref), \"k8s.io/api/authentication/v1.TokenRequestSpec\": schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), \"k8s.io/api/authentication/v1.TokenRequestStatus\": schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), \"k8s.io/api/authentication/v1.TokenReview\": schema_k8sio_api_authentication_v1_TokenReview(ref), \"k8s.io/api/authentication/v1.TokenReviewSpec\": schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), \"k8s.io/api/authentication/v1.TokenReviewStatus\": schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), \"k8s.io/api/authentication/v1.UserInfo\": schema_k8sio_api_authentication_v1_UserInfo(ref), \"k8s.io/api/authentication/v1beta1.TokenReview\": schema_k8sio_api_authentication_v1beta1_TokenReview(ref), \"k8s.io/api/authentication/v1beta1.TokenReviewSpec\": schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), \"k8s.io/api/authentication/v1beta1.TokenReviewStatus\": schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), \"k8s.io/api/authentication/v1beta1.UserInfo\": schema_k8sio_api_authentication_v1beta1_UserInfo(ref), \"k8s.io/api/authorization/v1.LocalSubjectAccessReview\": schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), \"k8s.io/api/authorization/v1.NonResourceAttributes\": schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), \"k8s.io/api/authorization/v1.NonResourceRule\": schema_k8sio_api_authorization_v1_NonResourceRule(ref), \"k8s.io/api/authorization/v1.ResourceAttributes\": schema_k8sio_api_authorization_v1_ResourceAttributes(ref), \"k8s.io/api/authorization/v1.ResourceRule\": schema_k8sio_api_authorization_v1_ResourceRule(ref), \"k8s.io/api/authorization/v1.SelfSubjectAccessReview\": schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), \"k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec\": schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), \"k8s.io/api/authorization/v1.SelfSubjectRulesReview\": schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), \"k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec\": schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), \"k8s.io/api/authorization/v1.SubjectAccessReview\": schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), \"k8s.io/api/authorization/v1.SubjectAccessReviewSpec\": schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), \"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\": schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), \"k8s.io/api/authorization/v1.SubjectRulesReviewStatus\": schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), \"k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview\": schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), \"k8s.io/api/authorization/v1beta1.NonResourceAttributes\": schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), \"k8s.io/api/authorization/v1beta1.NonResourceRule\": schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), \"k8s.io/api/authorization/v1beta1.ResourceAttributes\": schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), \"k8s.io/api/authorization/v1beta1.ResourceRule\": schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), \"k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview\": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), \"k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec\": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), \"k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview\": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), \"k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec\": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), \"k8s.io/api/authorization/v1beta1.SubjectAccessReview\": schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec\": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), \"k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus\": schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), \"k8s.io/api/autoscaling/v1.ContainerResourceMetricSource\": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), \"k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus\": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), \"k8s.io/api/autoscaling/v1.ExternalMetricSource\": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), \"k8s.io/api/autoscaling/v1.ExternalMetricStatus\": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler\": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition\": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList\": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec\": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus\": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), \"k8s.io/api/autoscaling/v1.MetricSpec\": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), \"k8s.io/api/autoscaling/v1.MetricStatus\": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), \"k8s.io/api/autoscaling/v1.ObjectMetricSource\": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), \"k8s.io/api/autoscaling/v1.ObjectMetricStatus\": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), \"k8s.io/api/autoscaling/v1.PodsMetricSource\": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), \"k8s.io/api/autoscaling/v1.PodsMetricStatus\": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), \"k8s.io/api/autoscaling/v1.ResourceMetricSource\": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), \"k8s.io/api/autoscaling/v1.ResourceMetricStatus\": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v1.Scale\": schema_k8sio_api_autoscaling_v1_Scale(ref), \"k8s.io/api/autoscaling/v1.ScaleSpec\": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), \"k8s.io/api/autoscaling/v1.ScaleStatus\": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), \"k8s.io/api/autoscaling/v2.ContainerResourceMetricSource\": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus\": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\": schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref), \"k8s.io/api/autoscaling/v2.ExternalMetricSource\": schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref), \"k8s.io/api/autoscaling/v2.ExternalMetricStatus\": schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref), \"k8s.io/api/autoscaling/v2.HPAScalingPolicy\": schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref), \"k8s.io/api/autoscaling/v2.HPAScalingRules\": schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerList\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref), \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus\": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref), \"k8s.io/api/autoscaling/v2.MetricIdentifier\": schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref), \"k8s.io/api/autoscaling/v2.MetricSpec\": schema_k8sio_api_autoscaling_v2_MetricSpec(ref), \"k8s.io/api/autoscaling/v2.MetricStatus\": schema_k8sio_api_autoscaling_v2_MetricStatus(ref), \"k8s.io/api/autoscaling/v2.MetricTarget\": schema_k8sio_api_autoscaling_v2_MetricTarget(ref), \"k8s.io/api/autoscaling/v2.MetricValueStatus\": schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref), \"k8s.io/api/autoscaling/v2.ObjectMetricSource\": schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref), \"k8s.io/api/autoscaling/v2.ObjectMetricStatus\": schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref), \"k8s.io/api/autoscaling/v2.PodsMetricSource\": schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref), \"k8s.io/api/autoscaling/v2.PodsMetricStatus\": schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref), \"k8s.io/api/autoscaling/v2.ResourceMetricSource\": schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2.ResourceMetricStatus\": schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource\": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus\": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), \"k8s.io/api/autoscaling/v2beta1.ExternalMetricSource\": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), \"k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus\": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler\": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition\": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList\": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec\": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus\": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), \"k8s.io/api/autoscaling/v2beta1.MetricSpec\": schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), \"k8s.io/api/autoscaling/v2beta1.MetricStatus\": schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.ObjectMetricSource\": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), \"k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus\": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.PodsMetricSource\": schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), \"k8s.io/api/autoscaling/v2beta1.PodsMetricStatus\": schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta1.ResourceMetricSource\": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus\": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource\": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus\": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\": schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), \"k8s.io/api/autoscaling/v2beta2.ExternalMetricSource\": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), \"k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus\": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy\": schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), \"k8s.io/api/autoscaling/v2beta2.HPAScalingRules\": schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerList\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus\": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\": schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), \"k8s.io/api/autoscaling/v2beta2.MetricSpec\": schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), \"k8s.io/api/autoscaling/v2beta2.MetricStatus\": schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.MetricTarget\": schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\": schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), \"k8s.io/api/autoscaling/v2beta2.ObjectMetricSource\": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), \"k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus\": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.PodsMetricSource\": schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), \"k8s.io/api/autoscaling/v2beta2.PodsMetricStatus\": schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), \"k8s.io/api/autoscaling/v2beta2.ResourceMetricSource\": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), \"k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus\": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), \"k8s.io/api/batch/v1.CronJob\": schema_k8sio_api_batch_v1_CronJob(ref), \"k8s.io/api/batch/v1.CronJobList\": schema_k8sio_api_batch_v1_CronJobList(ref), \"k8s.io/api/batch/v1.CronJobSpec\": schema_k8sio_api_batch_v1_CronJobSpec(ref), \"k8s.io/api/batch/v1.CronJobStatus\": schema_k8sio_api_batch_v1_CronJobStatus(ref), \"k8s.io/api/batch/v1.Job\": schema_k8sio_api_batch_v1_Job(ref), \"k8s.io/api/batch/v1.JobCondition\": schema_k8sio_api_batch_v1_JobCondition(ref), \"k8s.io/api/batch/v1.JobList\": schema_k8sio_api_batch_v1_JobList(ref), \"k8s.io/api/batch/v1.JobSpec\": schema_k8sio_api_batch_v1_JobSpec(ref), \"k8s.io/api/batch/v1.JobStatus\": schema_k8sio_api_batch_v1_JobStatus(ref), \"k8s.io/api/batch/v1.JobTemplateSpec\": schema_k8sio_api_batch_v1_JobTemplateSpec(ref), \"k8s.io/api/batch/v1.UncountedTerminatedPods\": schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref), \"k8s.io/api/batch/v1beta1.CronJob\": schema_k8sio_api_batch_v1beta1_CronJob(ref), \"k8s.io/api/batch/v1beta1.CronJobList\": schema_k8sio_api_batch_v1beta1_CronJobList(ref), \"k8s.io/api/batch/v1beta1.CronJobSpec\": schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), \"k8s.io/api/batch/v1beta1.CronJobStatus\": schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), \"k8s.io/api/batch/v1beta1.JobTemplate\": schema_k8sio_api_batch_v1beta1_JobTemplate(ref), \"k8s.io/api/batch/v1beta1.JobTemplateSpec\": schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), \"k8s.io/api/certificates/v1.CertificateSigningRequest\": schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref), \"k8s.io/api/certificates/v1.CertificateSigningRequestCondition\": schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref), \"k8s.io/api/certificates/v1.CertificateSigningRequestList\": schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref), \"k8s.io/api/certificates/v1.CertificateSigningRequestSpec\": schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref), \"k8s.io/api/certificates/v1.CertificateSigningRequestStatus\": schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref), \"k8s.io/api/certificates/v1beta1.CertificateSigningRequest\": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition\": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestList\": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec\": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus\": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), \"k8s.io/api/coordination/v1.Lease\": schema_k8sio_api_coordination_v1_Lease(ref), \"k8s.io/api/coordination/v1.LeaseList\": schema_k8sio_api_coordination_v1_LeaseList(ref), \"k8s.io/api/coordination/v1.LeaseSpec\": schema_k8sio_api_coordination_v1_LeaseSpec(ref), \"k8s.io/api/coordination/v1beta1.Lease\": schema_k8sio_api_coordination_v1beta1_Lease(ref), \"k8s.io/api/coordination/v1beta1.LeaseList\": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), \"k8s.io/api/coordination/v1beta1.LeaseSpec\": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), \"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), \"k8s.io/api/core/v1.Affinity\": schema_k8sio_api_core_v1_Affinity(ref), \"k8s.io/api/core/v1.AttachedVolume\": schema_k8sio_api_core_v1_AttachedVolume(ref), \"k8s.io/api/core/v1.AvoidPods\": schema_k8sio_api_core_v1_AvoidPods(ref), \"k8s.io/api/core/v1.AzureDiskVolumeSource\": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), \"k8s.io/api/core/v1.AzureFilePersistentVolumeSource\": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), \"k8s.io/api/core/v1.AzureFileVolumeSource\": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), \"k8s.io/api/core/v1.Binding\": schema_k8sio_api_core_v1_Binding(ref), \"k8s.io/api/core/v1.CSIPersistentVolumeSource\": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), \"k8s.io/api/core/v1.CSIVolumeSource\": schema_k8sio_api_core_v1_CSIVolumeSource(ref), \"k8s.io/api/core/v1.Capabilities\": schema_k8sio_api_core_v1_Capabilities(ref), \"k8s.io/api/core/v1.CephFSPersistentVolumeSource\": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), \"k8s.io/api/core/v1.CephFSVolumeSource\": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), \"k8s.io/api/core/v1.CinderPersistentVolumeSource\": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), \"k8s.io/api/core/v1.CinderVolumeSource\": schema_k8sio_api_core_v1_CinderVolumeSource(ref), \"k8s.io/api/core/v1.ClientIPConfig\": schema_k8sio_api_core_v1_ClientIPConfig(ref), \"k8s.io/api/core/v1.ComponentCondition\": schema_k8sio_api_core_v1_ComponentCondition(ref), \"k8s.io/api/core/v1.ComponentStatus\": schema_k8sio_api_core_v1_ComponentStatus(ref), \"k8s.io/api/core/v1.ComponentStatusList\": schema_k8sio_api_core_v1_ComponentStatusList(ref), \"k8s.io/api/core/v1.ConfigMap\": schema_k8sio_api_core_v1_ConfigMap(ref), \"k8s.io/api/core/v1.ConfigMapEnvSource\": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), \"k8s.io/api/core/v1.ConfigMapKeySelector\": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), \"k8s.io/api/core/v1.ConfigMapList\": schema_k8sio_api_core_v1_ConfigMapList(ref), \"k8s.io/api/core/v1.ConfigMapNodeConfigSource\": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), \"k8s.io/api/core/v1.ConfigMapProjection\": schema_k8sio_api_core_v1_ConfigMapProjection(ref), \"k8s.io/api/core/v1.ConfigMapVolumeSource\": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), \"k8s.io/api/core/v1.Container\": schema_k8sio_api_core_v1_Container(ref), \"k8s.io/api/core/v1.ContainerImage\": schema_k8sio_api_core_v1_ContainerImage(ref), \"k8s.io/api/core/v1.ContainerPort\": schema_k8sio_api_core_v1_ContainerPort(ref), \"k8s.io/api/core/v1.ContainerState\": schema_k8sio_api_core_v1_ContainerState(ref), \"k8s.io/api/core/v1.ContainerStateRunning\": schema_k8sio_api_core_v1_ContainerStateRunning(ref), \"k8s.io/api/core/v1.ContainerStateTerminated\": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), \"k8s.io/api/core/v1.ContainerStateWaiting\": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), \"k8s.io/api/core/v1.ContainerStatus\": schema_k8sio_api_core_v1_ContainerStatus(ref), \"k8s.io/api/core/v1.DaemonEndpoint\": schema_k8sio_api_core_v1_DaemonEndpoint(ref), \"k8s.io/api/core/v1.DownwardAPIProjection\": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), \"k8s.io/api/core/v1.DownwardAPIVolumeFile\": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), \"k8s.io/api/core/v1.DownwardAPIVolumeSource\": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), \"k8s.io/api/core/v1.EmptyDirVolumeSource\": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), \"k8s.io/api/core/v1.EndpointAddress\": schema_k8sio_api_core_v1_EndpointAddress(ref), \"k8s.io/api/core/v1.EndpointPort\": schema_k8sio_api_core_v1_EndpointPort(ref), \"k8s.io/api/core/v1.EndpointSubset\": schema_k8sio_api_core_v1_EndpointSubset(ref), \"k8s.io/api/core/v1.Endpoints\": schema_k8sio_api_core_v1_Endpoints(ref), \"k8s.io/api/core/v1.EndpointsList\": schema_k8sio_api_core_v1_EndpointsList(ref), \"k8s.io/api/core/v1.EnvFromSource\": schema_k8sio_api_core_v1_EnvFromSource(ref), \"k8s.io/api/core/v1.EnvVar\": schema_k8sio_api_core_v1_EnvVar(ref), \"k8s.io/api/core/v1.EnvVarSource\": schema_k8sio_api_core_v1_EnvVarSource(ref), \"k8s.io/api/core/v1.EphemeralContainer\": schema_k8sio_api_core_v1_EphemeralContainer(ref), \"k8s.io/api/core/v1.EphemeralContainerCommon\": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), \"k8s.io/api/core/v1.EphemeralVolumeSource\": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), \"k8s.io/api/core/v1.Event\": schema_k8sio_api_core_v1_Event(ref), \"k8s.io/api/core/v1.EventList\": schema_k8sio_api_core_v1_EventList(ref), \"k8s.io/api/core/v1.EventSeries\": schema_k8sio_api_core_v1_EventSeries(ref), \"k8s.io/api/core/v1.EventSource\": schema_k8sio_api_core_v1_EventSource(ref), \"k8s.io/api/core/v1.ExecAction\": schema_k8sio_api_core_v1_ExecAction(ref), \"k8s.io/api/core/v1.FCVolumeSource\": schema_k8sio_api_core_v1_FCVolumeSource(ref), \"k8s.io/api/core/v1.FlexPersistentVolumeSource\": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), \"k8s.io/api/core/v1.FlexVolumeSource\": schema_k8sio_api_core_v1_FlexVolumeSource(ref), \"k8s.io/api/core/v1.FlockerVolumeSource\": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), \"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), \"k8s.io/api/core/v1.GRPCAction\": schema_k8sio_api_core_v1_GRPCAction(ref), \"k8s.io/api/core/v1.GitRepoVolumeSource\": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), \"k8s.io/api/core/v1.GlusterfsPersistentVolumeSource\": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), \"k8s.io/api/core/v1.GlusterfsVolumeSource\": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), \"k8s.io/api/core/v1.HTTPGetAction\": schema_k8sio_api_core_v1_HTTPGetAction(ref), \"k8s.io/api/core/v1.HTTPHeader\": schema_k8sio_api_core_v1_HTTPHeader(ref), \"k8s.io/api/core/v1.HostAlias\": schema_k8sio_api_core_v1_HostAlias(ref), \"k8s.io/api/core/v1.HostPathVolumeSource\": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), \"k8s.io/api/core/v1.ISCSIPersistentVolumeSource\": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), \"k8s.io/api/core/v1.ISCSIVolumeSource\": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), \"k8s.io/api/core/v1.KeyToPath\": schema_k8sio_api_core_v1_KeyToPath(ref), \"k8s.io/api/core/v1.Lifecycle\": schema_k8sio_api_core_v1_Lifecycle(ref), \"k8s.io/api/core/v1.LifecycleHandler\": schema_k8sio_api_core_v1_LifecycleHandler(ref), \"k8s.io/api/core/v1.LimitRange\": schema_k8sio_api_core_v1_LimitRange(ref), \"k8s.io/api/core/v1.LimitRangeItem\": schema_k8sio_api_core_v1_LimitRangeItem(ref), \"k8s.io/api/core/v1.LimitRangeList\": schema_k8sio_api_core_v1_LimitRangeList(ref), \"k8s.io/api/core/v1.LimitRangeSpec\": schema_k8sio_api_core_v1_LimitRangeSpec(ref), \"k8s.io/api/core/v1.List\": schema_k8sio_api_core_v1_List(ref), \"k8s.io/api/core/v1.LoadBalancerIngress\": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), \"k8s.io/api/core/v1.LoadBalancerStatus\": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), \"k8s.io/api/core/v1.LocalObjectReference\": schema_k8sio_api_core_v1_LocalObjectReference(ref), \"k8s.io/api/core/v1.LocalVolumeSource\": schema_k8sio_api_core_v1_LocalVolumeSource(ref), \"k8s.io/api/core/v1.NFSVolumeSource\": schema_k8sio_api_core_v1_NFSVolumeSource(ref), \"k8s.io/api/core/v1.Namespace\": schema_k8sio_api_core_v1_Namespace(ref), \"k8s.io/api/core/v1.NamespaceCondition\": schema_k8sio_api_core_v1_NamespaceCondition(ref), \"k8s.io/api/core/v1.NamespaceList\": schema_k8sio_api_core_v1_NamespaceList(ref), \"k8s.io/api/core/v1.NamespaceSpec\": schema_k8sio_api_core_v1_NamespaceSpec(ref), \"k8s.io/api/core/v1.NamespaceStatus\": schema_k8sio_api_core_v1_NamespaceStatus(ref), \"k8s.io/api/core/v1.Node\": schema_k8sio_api_core_v1_Node(ref), \"k8s.io/api/core/v1.NodeAddress\": schema_k8sio_api_core_v1_NodeAddress(ref), \"k8s.io/api/core/v1.NodeAffinity\": schema_k8sio_api_core_v1_NodeAffinity(ref), \"k8s.io/api/core/v1.NodeCondition\": schema_k8sio_api_core_v1_NodeCondition(ref), \"k8s.io/api/core/v1.NodeConfigSource\": schema_k8sio_api_core_v1_NodeConfigSource(ref), \"k8s.io/api/core/v1.NodeConfigStatus\": schema_k8sio_api_core_v1_NodeConfigStatus(ref), \"k8s.io/api/core/v1.NodeDaemonEndpoints\": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), \"k8s.io/api/core/v1.NodeList\": schema_k8sio_api_core_v1_NodeList(ref), \"k8s.io/api/core/v1.NodeProxyOptions\": schema_k8sio_api_core_v1_NodeProxyOptions(ref), \"k8s.io/api/core/v1.NodeResources\": schema_k8sio_api_core_v1_NodeResources(ref), \"k8s.io/api/core/v1.NodeSelector\": schema_k8sio_api_core_v1_NodeSelector(ref), \"k8s.io/api/core/v1.NodeSelectorRequirement\": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), \"k8s.io/api/core/v1.NodeSelectorTerm\": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), \"k8s.io/api/core/v1.NodeSpec\": schema_k8sio_api_core_v1_NodeSpec(ref), \"k8s.io/api/core/v1.NodeStatus\": schema_k8sio_api_core_v1_NodeStatus(ref), \"k8s.io/api/core/v1.NodeSystemInfo\": schema_k8sio_api_core_v1_NodeSystemInfo(ref), \"k8s.io/api/core/v1.ObjectFieldSelector\": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), \"k8s.io/api/core/v1.ObjectReference\": schema_k8sio_api_core_v1_ObjectReference(ref), \"k8s.io/api/core/v1.PersistentVolume\": schema_k8sio_api_core_v1_PersistentVolume(ref), \"k8s.io/api/core/v1.PersistentVolumeClaim\": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimCondition\": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimList\": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimSpec\": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimStatus\": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimTemplate\": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), \"k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource\": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), \"k8s.io/api/core/v1.PersistentVolumeList\": schema_k8sio_api_core_v1_PersistentVolumeList(ref), \"k8s.io/api/core/v1.PersistentVolumeSource\": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), \"k8s.io/api/core/v1.PersistentVolumeSpec\": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), \"k8s.io/api/core/v1.PersistentVolumeStatus\": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), \"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), \"k8s.io/api/core/v1.Pod\": schema_k8sio_api_core_v1_Pod(ref), \"k8s.io/api/core/v1.PodAffinity\": schema_k8sio_api_core_v1_PodAffinity(ref), \"k8s.io/api/core/v1.PodAffinityTerm\": schema_k8sio_api_core_v1_PodAffinityTerm(ref), \"k8s.io/api/core/v1.PodAntiAffinity\": schema_k8sio_api_core_v1_PodAntiAffinity(ref), \"k8s.io/api/core/v1.PodAttachOptions\": schema_k8sio_api_core_v1_PodAttachOptions(ref), \"k8s.io/api/core/v1.PodCondition\": schema_k8sio_api_core_v1_PodCondition(ref), \"k8s.io/api/core/v1.PodDNSConfig\": schema_k8sio_api_core_v1_PodDNSConfig(ref), \"k8s.io/api/core/v1.PodDNSConfigOption\": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), \"k8s.io/api/core/v1.PodExecOptions\": schema_k8sio_api_core_v1_PodExecOptions(ref), \"k8s.io/api/core/v1.PodIP\": schema_k8sio_api_core_v1_PodIP(ref), \"k8s.io/api/core/v1.PodList\": schema_k8sio_api_core_v1_PodList(ref), \"k8s.io/api/core/v1.PodLogOptions\": schema_k8sio_api_core_v1_PodLogOptions(ref), \"k8s.io/api/core/v1.PodOS\": schema_k8sio_api_core_v1_PodOS(ref), \"k8s.io/api/core/v1.PodPortForwardOptions\": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), \"k8s.io/api/core/v1.PodProxyOptions\": schema_k8sio_api_core_v1_PodProxyOptions(ref), \"k8s.io/api/core/v1.PodReadinessGate\": schema_k8sio_api_core_v1_PodReadinessGate(ref), \"k8s.io/api/core/v1.PodSecurityContext\": schema_k8sio_api_core_v1_PodSecurityContext(ref), \"k8s.io/api/core/v1.PodSignature\": schema_k8sio_api_core_v1_PodSignature(ref), \"k8s.io/api/core/v1.PodSpec\": schema_k8sio_api_core_v1_PodSpec(ref), \"k8s.io/api/core/v1.PodStatus\": schema_k8sio_api_core_v1_PodStatus(ref), \"k8s.io/api/core/v1.PodStatusResult\": schema_k8sio_api_core_v1_PodStatusResult(ref), \"k8s.io/api/core/v1.PodTemplate\": schema_k8sio_api_core_v1_PodTemplate(ref), \"k8s.io/api/core/v1.PodTemplateList\": schema_k8sio_api_core_v1_PodTemplateList(ref), \"k8s.io/api/core/v1.PodTemplateSpec\": schema_k8sio_api_core_v1_PodTemplateSpec(ref), \"k8s.io/api/core/v1.PortStatus\": schema_k8sio_api_core_v1_PortStatus(ref), \"k8s.io/api/core/v1.PortworxVolumeSource\": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), \"k8s.io/api/core/v1.PreferAvoidPodsEntry\": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), \"k8s.io/api/core/v1.PreferredSchedulingTerm\": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), \"k8s.io/api/core/v1.Probe\": schema_k8sio_api_core_v1_Probe(ref), \"k8s.io/api/core/v1.ProbeHandler\": schema_k8sio_api_core_v1_ProbeHandler(ref), \"k8s.io/api/core/v1.ProjectedVolumeSource\": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), \"k8s.io/api/core/v1.QuobyteVolumeSource\": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), \"k8s.io/api/core/v1.RBDPersistentVolumeSource\": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), \"k8s.io/api/core/v1.RBDVolumeSource\": schema_k8sio_api_core_v1_RBDVolumeSource(ref), \"k8s.io/api/core/v1.RangeAllocation\": schema_k8sio_api_core_v1_RangeAllocation(ref), \"k8s.io/api/core/v1.ReplicationController\": schema_k8sio_api_core_v1_ReplicationController(ref), \"k8s.io/api/core/v1.ReplicationControllerCondition\": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), \"k8s.io/api/core/v1.ReplicationControllerList\": schema_k8sio_api_core_v1_ReplicationControllerList(ref), \"k8s.io/api/core/v1.ReplicationControllerSpec\": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), \"k8s.io/api/core/v1.ReplicationControllerStatus\": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), \"k8s.io/api/core/v1.ResourceFieldSelector\": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), \"k8s.io/api/core/v1.ResourceQuota\": schema_k8sio_api_core_v1_ResourceQuota(ref), \"k8s.io/api/core/v1.ResourceQuotaList\": schema_k8sio_api_core_v1_ResourceQuotaList(ref), \"k8s.io/api/core/v1.ResourceQuotaSpec\": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), \"k8s.io/api/core/v1.ResourceQuotaStatus\": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), \"k8s.io/api/core/v1.ResourceRequirements\": schema_k8sio_api_core_v1_ResourceRequirements(ref), \"k8s.io/api/core/v1.SELinuxOptions\": schema_k8sio_api_core_v1_SELinuxOptions(ref), \"k8s.io/api/core/v1.ScaleIOPersistentVolumeSource\": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), \"k8s.io/api/core/v1.ScaleIOVolumeSource\": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), \"k8s.io/api/core/v1.ScopeSelector\": schema_k8sio_api_core_v1_ScopeSelector(ref), \"k8s.io/api/core/v1.ScopedResourceSelectorRequirement\": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), \"k8s.io/api/core/v1.SeccompProfile\": schema_k8sio_api_core_v1_SeccompProfile(ref), \"k8s.io/api/core/v1.Secret\": schema_k8sio_api_core_v1_Secret(ref), \"k8s.io/api/core/v1.SecretEnvSource\": schema_k8sio_api_core_v1_SecretEnvSource(ref), \"k8s.io/api/core/v1.SecretKeySelector\": schema_k8sio_api_core_v1_SecretKeySelector(ref), \"k8s.io/api/core/v1.SecretList\": schema_k8sio_api_core_v1_SecretList(ref), \"k8s.io/api/core/v1.SecretProjection\": schema_k8sio_api_core_v1_SecretProjection(ref), \"k8s.io/api/core/v1.SecretReference\": schema_k8sio_api_core_v1_SecretReference(ref), \"k8s.io/api/core/v1.SecretVolumeSource\": schema_k8sio_api_core_v1_SecretVolumeSource(ref), \"k8s.io/api/core/v1.SecurityContext\": schema_k8sio_api_core_v1_SecurityContext(ref), \"k8s.io/api/core/v1.SerializedReference\": schema_k8sio_api_core_v1_SerializedReference(ref), \"k8s.io/api/core/v1.Service\": schema_k8sio_api_core_v1_Service(ref), \"k8s.io/api/core/v1.ServiceAccount\": schema_k8sio_api_core_v1_ServiceAccount(ref), \"k8s.io/api/core/v1.ServiceAccountList\": schema_k8sio_api_core_v1_ServiceAccountList(ref), \"k8s.io/api/core/v1.ServiceAccountTokenProjection\": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), \"k8s.io/api/core/v1.ServiceList\": schema_k8sio_api_core_v1_ServiceList(ref), \"k8s.io/api/core/v1.ServicePort\": schema_k8sio_api_core_v1_ServicePort(ref), \"k8s.io/api/core/v1.ServiceProxyOptions\": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), \"k8s.io/api/core/v1.ServiceSpec\": schema_k8sio_api_core_v1_ServiceSpec(ref), \"k8s.io/api/core/v1.ServiceStatus\": schema_k8sio_api_core_v1_ServiceStatus(ref), \"k8s.io/api/core/v1.SessionAffinityConfig\": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), \"k8s.io/api/core/v1.StorageOSPersistentVolumeSource\": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), \"k8s.io/api/core/v1.StorageOSVolumeSource\": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), \"k8s.io/api/core/v1.Sysctl\": schema_k8sio_api_core_v1_Sysctl(ref), \"k8s.io/api/core/v1.TCPSocketAction\": schema_k8sio_api_core_v1_TCPSocketAction(ref), \"k8s.io/api/core/v1.Taint\": schema_k8sio_api_core_v1_Taint(ref), \"k8s.io/api/core/v1.Toleration\": schema_k8sio_api_core_v1_Toleration(ref), \"k8s.io/api/core/v1.TopologySelectorLabelRequirement\": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), \"k8s.io/api/core/v1.TopologySelectorTerm\": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), \"k8s.io/api/core/v1.TopologySpreadConstraint\": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), \"k8s.io/api/core/v1.TypedLocalObjectReference\": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), \"k8s.io/api/core/v1.Volume\": schema_k8sio_api_core_v1_Volume(ref), \"k8s.io/api/core/v1.VolumeDevice\": schema_k8sio_api_core_v1_VolumeDevice(ref), \"k8s.io/api/core/v1.VolumeMount\": schema_k8sio_api_core_v1_VolumeMount(ref), \"k8s.io/api/core/v1.VolumeNodeAffinity\": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), \"k8s.io/api/core/v1.VolumeProjection\": schema_k8sio_api_core_v1_VolumeProjection(ref), \"k8s.io/api/core/v1.VolumeSource\": schema_k8sio_api_core_v1_VolumeSource(ref), \"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), \"k8s.io/api/core/v1.WeightedPodAffinityTerm\": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), \"k8s.io/api/core/v1.WindowsSecurityContextOptions\": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), \"k8s.io/api/discovery/v1.Endpoint\": schema_k8sio_api_discovery_v1_Endpoint(ref), \"k8s.io/api/discovery/v1.EndpointConditions\": schema_k8sio_api_discovery_v1_EndpointConditions(ref), \"k8s.io/api/discovery/v1.EndpointHints\": schema_k8sio_api_discovery_v1_EndpointHints(ref), \"k8s.io/api/discovery/v1.EndpointPort\": schema_k8sio_api_discovery_v1_EndpointPort(ref), \"k8s.io/api/discovery/v1.EndpointSlice\": schema_k8sio_api_discovery_v1_EndpointSlice(ref), \"k8s.io/api/discovery/v1.EndpointSliceList\": schema_k8sio_api_discovery_v1_EndpointSliceList(ref), \"k8s.io/api/discovery/v1.ForZone\": schema_k8sio_api_discovery_v1_ForZone(ref), \"k8s.io/api/discovery/v1beta1.Endpoint\": schema_k8sio_api_discovery_v1beta1_Endpoint(ref), \"k8s.io/api/discovery/v1beta1.EndpointConditions\": schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), \"k8s.io/api/discovery/v1beta1.EndpointHints\": schema_k8sio_api_discovery_v1beta1_EndpointHints(ref), \"k8s.io/api/discovery/v1beta1.EndpointPort\": schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), \"k8s.io/api/discovery/v1beta1.EndpointSlice\": schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), \"k8s.io/api/discovery/v1beta1.EndpointSliceList\": schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), \"k8s.io/api/discovery/v1beta1.ForZone\": schema_k8sio_api_discovery_v1beta1_ForZone(ref), \"k8s.io/api/events/v1.Event\": schema_k8sio_api_events_v1_Event(ref), \"k8s.io/api/events/v1.EventList\": schema_k8sio_api_events_v1_EventList(ref), \"k8s.io/api/events/v1.EventSeries\": schema_k8sio_api_events_v1_EventSeries(ref), \"k8s.io/api/events/v1beta1.Event\": schema_k8sio_api_events_v1beta1_Event(ref), \"k8s.io/api/events/v1beta1.EventList\": schema_k8sio_api_events_v1beta1_EventList(ref), \"k8s.io/api/events/v1beta1.EventSeries\": schema_k8sio_api_events_v1beta1_EventSeries(ref), \"k8s.io/api/extensions/v1beta1.AllowedCSIDriver\": schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref), \"k8s.io/api/extensions/v1beta1.AllowedFlexVolume\": schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref), \"k8s.io/api/extensions/v1beta1.AllowedHostPath\": schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref), \"k8s.io/api/extensions/v1beta1.DaemonSet\": schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), \"k8s.io/api/extensions/v1beta1.DaemonSetCondition\": schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), \"k8s.io/api/extensions/v1beta1.DaemonSetList\": schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), \"k8s.io/api/extensions/v1beta1.DaemonSetSpec\": schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), \"k8s.io/api/extensions/v1beta1.DaemonSetStatus\": schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), \"k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy\": schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), \"k8s.io/api/extensions/v1beta1.Deployment\": schema_k8sio_api_extensions_v1beta1_Deployment(ref), \"k8s.io/api/extensions/v1beta1.DeploymentCondition\": schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), \"k8s.io/api/extensions/v1beta1.DeploymentList\": schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), \"k8s.io/api/extensions/v1beta1.DeploymentRollback\": schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), \"k8s.io/api/extensions/v1beta1.DeploymentSpec\": schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), \"k8s.io/api/extensions/v1beta1.DeploymentStatus\": schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), \"k8s.io/api/extensions/v1beta1.DeploymentStrategy\": schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), \"k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions\": schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref), \"k8s.io/api/extensions/v1beta1.HTTPIngressPath\": schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), \"k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue\": schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), \"k8s.io/api/extensions/v1beta1.HostPortRange\": schema_k8sio_api_extensions_v1beta1_HostPortRange(ref), \"k8s.io/api/extensions/v1beta1.IDRange\": schema_k8sio_api_extensions_v1beta1_IDRange(ref), \"k8s.io/api/extensions/v1beta1.IPBlock\": schema_k8sio_api_extensions_v1beta1_IPBlock(ref), \"k8s.io/api/extensions/v1beta1.Ingress\": schema_k8sio_api_extensions_v1beta1_Ingress(ref), \"k8s.io/api/extensions/v1beta1.IngressBackend\": schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), \"k8s.io/api/extensions/v1beta1.IngressList\": schema_k8sio_api_extensions_v1beta1_IngressList(ref), \"k8s.io/api/extensions/v1beta1.IngressRule\": schema_k8sio_api_extensions_v1beta1_IngressRule(ref), \"k8s.io/api/extensions/v1beta1.IngressRuleValue\": schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), \"k8s.io/api/extensions/v1beta1.IngressSpec\": schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), \"k8s.io/api/extensions/v1beta1.IngressStatus\": schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), \"k8s.io/api/extensions/v1beta1.IngressTLS\": schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicy\": schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule\": schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule\": schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicyList\": schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicyPeer\": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicyPort\": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), \"k8s.io/api/extensions/v1beta1.NetworkPolicySpec\": schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), \"k8s.io/api/extensions/v1beta1.PodSecurityPolicy\": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref), \"k8s.io/api/extensions/v1beta1.PodSecurityPolicyList\": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref), \"k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec\": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref), \"k8s.io/api/extensions/v1beta1.ReplicaSet\": schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), \"k8s.io/api/extensions/v1beta1.ReplicaSetCondition\": schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), \"k8s.io/api/extensions/v1beta1.ReplicaSetList\": schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), \"k8s.io/api/extensions/v1beta1.ReplicaSetSpec\": schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), \"k8s.io/api/extensions/v1beta1.ReplicaSetStatus\": schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), \"k8s.io/api/extensions/v1beta1.RollbackConfig\": schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), \"k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet\": schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), \"k8s.io/api/extensions/v1beta1.RollingUpdateDeployment\": schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), \"k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions\": schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref), \"k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions\": schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref), \"k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions\": schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref), \"k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions\": schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref), \"k8s.io/api/extensions/v1beta1.Scale\": schema_k8sio_api_extensions_v1beta1_Scale(ref), \"k8s.io/api/extensions/v1beta1.ScaleSpec\": schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), \"k8s.io/api/extensions/v1beta1.ScaleStatus\": schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), \"k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions\": schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod\": schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowSchema\": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition\": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaList\": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec\": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref), \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus\": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref), \"k8s.io/api/flowcontrol/v1alpha1.GroupSubject\": schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref), \"k8s.io/api/flowcontrol/v1alpha1.LimitResponse\": schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref), \"k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects\": schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationList\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref), \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus\": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref), \"k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration\": schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref), \"k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject\": schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref), \"k8s.io/api/flowcontrol/v1alpha1.Subject\": schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref), \"k8s.io/api/flowcontrol/v1alpha1.UserSubject\": schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod\": schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowSchema\": schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition\": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaList\": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec\": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref), \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus\": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref), \"k8s.io/api/flowcontrol/v1beta1.GroupSubject\": schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref), \"k8s.io/api/flowcontrol/v1beta1.LimitResponse\": schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref), \"k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects\": schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationList\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref), \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus\": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref), \"k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration\": schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject\": schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref), \"k8s.io/api/flowcontrol/v1beta1.Subject\": schema_k8sio_api_flowcontrol_v1beta1_Subject(ref), \"k8s.io/api/flowcontrol/v1beta1.UserSubject\": schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod\": schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowSchema\": schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition\": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaList\": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec\": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref), \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus\": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref), \"k8s.io/api/flowcontrol/v1beta2.GroupSubject\": schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref), \"k8s.io/api/flowcontrol/v1beta2.LimitResponse\": schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref), \"k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects\": schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationList\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref), \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus\": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref), \"k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration\": schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref), \"k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule\": schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref), \"k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject\": schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref), \"k8s.io/api/flowcontrol/v1beta2.Subject\": schema_k8sio_api_flowcontrol_v1beta2_Subject(ref), \"k8s.io/api/flowcontrol/v1beta2.UserSubject\": schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref), \"k8s.io/api/imagepolicy/v1alpha1.ImageReview\": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec\": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec\": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus\": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), \"k8s.io/api/networking/v1.HTTPIngressPath\": schema_k8sio_api_networking_v1_HTTPIngressPath(ref), \"k8s.io/api/networking/v1.HTTPIngressRuleValue\": schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref), \"k8s.io/api/networking/v1.IPBlock\": schema_k8sio_api_networking_v1_IPBlock(ref), \"k8s.io/api/networking/v1.Ingress\": schema_k8sio_api_networking_v1_Ingress(ref), \"k8s.io/api/networking/v1.IngressBackend\": schema_k8sio_api_networking_v1_IngressBackend(ref), \"k8s.io/api/networking/v1.IngressClass\": schema_k8sio_api_networking_v1_IngressClass(ref), \"k8s.io/api/networking/v1.IngressClassList\": schema_k8sio_api_networking_v1_IngressClassList(ref), \"k8s.io/api/networking/v1.IngressClassParametersReference\": schema_k8sio_api_networking_v1_IngressClassParametersReference(ref), \"k8s.io/api/networking/v1.IngressClassSpec\": schema_k8sio_api_networking_v1_IngressClassSpec(ref), \"k8s.io/api/networking/v1.IngressList\": schema_k8sio_api_networking_v1_IngressList(ref), \"k8s.io/api/networking/v1.IngressRule\": schema_k8sio_api_networking_v1_IngressRule(ref), \"k8s.io/api/networking/v1.IngressRuleValue\": schema_k8sio_api_networking_v1_IngressRuleValue(ref), \"k8s.io/api/networking/v1.IngressServiceBackend\": schema_k8sio_api_networking_v1_IngressServiceBackend(ref), \"k8s.io/api/networking/v1.IngressSpec\": schema_k8sio_api_networking_v1_IngressSpec(ref), \"k8s.io/api/networking/v1.IngressStatus\": schema_k8sio_api_networking_v1_IngressStatus(ref), \"k8s.io/api/networking/v1.IngressTLS\": schema_k8sio_api_networking_v1_IngressTLS(ref), \"k8s.io/api/networking/v1.NetworkPolicy\": schema_k8sio_api_networking_v1_NetworkPolicy(ref), \"k8s.io/api/networking/v1.NetworkPolicyEgressRule\": schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), \"k8s.io/api/networking/v1.NetworkPolicyIngressRule\": schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), \"k8s.io/api/networking/v1.NetworkPolicyList\": schema_k8sio_api_networking_v1_NetworkPolicyList(ref), \"k8s.io/api/networking/v1.NetworkPolicyPeer\": schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), \"k8s.io/api/networking/v1.NetworkPolicyPort\": schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), \"k8s.io/api/networking/v1.NetworkPolicySpec\": schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), \"k8s.io/api/networking/v1.ServiceBackendPort\": schema_k8sio_api_networking_v1_ServiceBackendPort(ref), \"k8s.io/api/networking/v1beta1.HTTPIngressPath\": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), \"k8s.io/api/networking/v1beta1.HTTPIngressRuleValue\": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), \"k8s.io/api/networking/v1beta1.Ingress\": schema_k8sio_api_networking_v1beta1_Ingress(ref), \"k8s.io/api/networking/v1beta1.IngressBackend\": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), \"k8s.io/api/networking/v1beta1.IngressClass\": schema_k8sio_api_networking_v1beta1_IngressClass(ref), \"k8s.io/api/networking/v1beta1.IngressClassList\": schema_k8sio_api_networking_v1beta1_IngressClassList(ref), \"k8s.io/api/networking/v1beta1.IngressClassParametersReference\": schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref), \"k8s.io/api/networking/v1beta1.IngressClassSpec\": schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), \"k8s.io/api/networking/v1beta1.IngressList\": schema_k8sio_api_networking_v1beta1_IngressList(ref), \"k8s.io/api/networking/v1beta1.IngressRule\": schema_k8sio_api_networking_v1beta1_IngressRule(ref), \"k8s.io/api/networking/v1beta1.IngressRuleValue\": schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), \"k8s.io/api/networking/v1beta1.IngressSpec\": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), \"k8s.io/api/networking/v1beta1.IngressStatus\": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), \"k8s.io/api/networking/v1beta1.IngressTLS\": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), \"k8s.io/api/node/v1.Overhead\": schema_k8sio_api_node_v1_Overhead(ref), \"k8s.io/api/node/v1.RuntimeClass\": schema_k8sio_api_node_v1_RuntimeClass(ref), \"k8s.io/api/node/v1.RuntimeClassList\": schema_k8sio_api_node_v1_RuntimeClassList(ref), \"k8s.io/api/node/v1.Scheduling\": schema_k8sio_api_node_v1_Scheduling(ref), \"k8s.io/api/node/v1alpha1.Overhead\": schema_k8sio_api_node_v1alpha1_Overhead(ref), \"k8s.io/api/node/v1alpha1.RuntimeClass\": schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), \"k8s.io/api/node/v1alpha1.RuntimeClassList\": schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), \"k8s.io/api/node/v1alpha1.RuntimeClassSpec\": schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), \"k8s.io/api/node/v1alpha1.Scheduling\": schema_k8sio_api_node_v1alpha1_Scheduling(ref), \"k8s.io/api/node/v1beta1.Overhead\": schema_k8sio_api_node_v1beta1_Overhead(ref), \"k8s.io/api/node/v1beta1.RuntimeClass\": schema_k8sio_api_node_v1beta1_RuntimeClass(ref), \"k8s.io/api/node/v1beta1.RuntimeClassList\": schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), \"k8s.io/api/node/v1beta1.Scheduling\": schema_k8sio_api_node_v1beta1_Scheduling(ref), \"k8s.io/api/policy/v1.Eviction\": schema_k8sio_api_policy_v1_Eviction(ref), \"k8s.io/api/policy/v1.PodDisruptionBudget\": schema_k8sio_api_policy_v1_PodDisruptionBudget(ref), \"k8s.io/api/policy/v1.PodDisruptionBudgetList\": schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref), \"k8s.io/api/policy/v1.PodDisruptionBudgetSpec\": schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref), \"k8s.io/api/policy/v1.PodDisruptionBudgetStatus\": schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref), \"k8s.io/api/policy/v1beta1.AllowedCSIDriver\": schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref), \"k8s.io/api/policy/v1beta1.AllowedFlexVolume\": schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref), \"k8s.io/api/policy/v1beta1.AllowedHostPath\": schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref), \"k8s.io/api/policy/v1beta1.Eviction\": schema_k8sio_api_policy_v1beta1_Eviction(ref), \"k8s.io/api/policy/v1beta1.FSGroupStrategyOptions\": schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref), \"k8s.io/api/policy/v1beta1.HostPortRange\": schema_k8sio_api_policy_v1beta1_HostPortRange(ref), \"k8s.io/api/policy/v1beta1.IDRange\": schema_k8sio_api_policy_v1beta1_IDRange(ref), \"k8s.io/api/policy/v1beta1.PodDisruptionBudget\": schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), \"k8s.io/api/policy/v1beta1.PodDisruptionBudgetList\": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), \"k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec\": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), \"k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus\": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), \"k8s.io/api/policy/v1beta1.PodSecurityPolicy\": schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref), \"k8s.io/api/policy/v1beta1.PodSecurityPolicyList\": schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref), \"k8s.io/api/policy/v1beta1.PodSecurityPolicySpec\": schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref), \"k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions\": schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref), \"k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions\": schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref), \"k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions\": schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref), \"k8s.io/api/policy/v1beta1.SELinuxStrategyOptions\": schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref), \"k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions\": schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref), \"k8s.io/api/rbac/v1.AggregationRule\": schema_k8sio_api_rbac_v1_AggregationRule(ref), \"k8s.io/api/rbac/v1.ClusterRole\": schema_k8sio_api_rbac_v1_ClusterRole(ref), \"k8s.io/api/rbac/v1.ClusterRoleBinding\": schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), \"k8s.io/api/rbac/v1.ClusterRoleBindingList\": schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), \"k8s.io/api/rbac/v1.ClusterRoleList\": schema_k8sio_api_rbac_v1_ClusterRoleList(ref), \"k8s.io/api/rbac/v1.PolicyRule\": schema_k8sio_api_rbac_v1_PolicyRule(ref), \"k8s.io/api/rbac/v1.Role\": schema_k8sio_api_rbac_v1_Role(ref), \"k8s.io/api/rbac/v1.RoleBinding\": schema_k8sio_api_rbac_v1_RoleBinding(ref), \"k8s.io/api/rbac/v1.RoleBindingList\": schema_k8sio_api_rbac_v1_RoleBindingList(ref), \"k8s.io/api/rbac/v1.RoleList\": schema_k8sio_api_rbac_v1_RoleList(ref), \"k8s.io/api/rbac/v1.RoleRef\": schema_k8sio_api_rbac_v1_RoleRef(ref), \"k8s.io/api/rbac/v1.Subject\": schema_k8sio_api_rbac_v1_Subject(ref), \"k8s.io/api/rbac/v1alpha1.AggregationRule\": schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), \"k8s.io/api/rbac/v1alpha1.ClusterRole\": schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), \"k8s.io/api/rbac/v1alpha1.ClusterRoleBinding\": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), \"k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList\": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), \"k8s.io/api/rbac/v1alpha1.ClusterRoleList\": schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), \"k8s.io/api/rbac/v1alpha1.PolicyRule\": schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), \"k8s.io/api/rbac/v1alpha1.Role\": schema_k8sio_api_rbac_v1alpha1_Role(ref), \"k8s.io/api/rbac/v1alpha1.RoleBinding\": schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), \"k8s.io/api/rbac/v1alpha1.RoleBindingList\": schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), \"k8s.io/api/rbac/v1alpha1.RoleList\": schema_k8sio_api_rbac_v1alpha1_RoleList(ref), \"k8s.io/api/rbac/v1alpha1.RoleRef\": schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), \"k8s.io/api/rbac/v1alpha1.Subject\": schema_k8sio_api_rbac_v1alpha1_Subject(ref), \"k8s.io/api/rbac/v1beta1.AggregationRule\": schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), \"k8s.io/api/rbac/v1beta1.ClusterRole\": schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), \"k8s.io/api/rbac/v1beta1.ClusterRoleBinding\": schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), \"k8s.io/api/rbac/v1beta1.ClusterRoleBindingList\": schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), \"k8s.io/api/rbac/v1beta1.ClusterRoleList\": schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), \"k8s.io/api/rbac/v1beta1.PolicyRule\": schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), \"k8s.io/api/rbac/v1beta1.Role\": schema_k8sio_api_rbac_v1beta1_Role(ref), \"k8s.io/api/rbac/v1beta1.RoleBinding\": schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), \"k8s.io/api/rbac/v1beta1.RoleBindingList\": schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), \"k8s.io/api/rbac/v1beta1.RoleList\": schema_k8sio_api_rbac_v1beta1_RoleList(ref), \"k8s.io/api/rbac/v1beta1.RoleRef\": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), \"k8s.io/api/rbac/v1beta1.Subject\": schema_k8sio_api_rbac_v1beta1_Subject(ref), \"k8s.io/api/scheduling/v1.PriorityClass\": schema_k8sio_api_scheduling_v1_PriorityClass(ref), \"k8s.io/api/scheduling/v1.PriorityClassList\": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), \"k8s.io/api/scheduling/v1alpha1.PriorityClass\": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), \"k8s.io/api/scheduling/v1alpha1.PriorityClassList\": schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), \"k8s.io/api/scheduling/v1beta1.PriorityClass\": schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), \"k8s.io/api/scheduling/v1beta1.PriorityClassList\": schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), \"k8s.io/api/storage/v1.CSIDriver\": schema_k8sio_api_storage_v1_CSIDriver(ref), \"k8s.io/api/storage/v1.CSIDriverList\": schema_k8sio_api_storage_v1_CSIDriverList(ref), \"k8s.io/api/storage/v1.CSIDriverSpec\": schema_k8sio_api_storage_v1_CSIDriverSpec(ref), \"k8s.io/api/storage/v1.CSINode\": schema_k8sio_api_storage_v1_CSINode(ref), \"k8s.io/api/storage/v1.CSINodeDriver\": schema_k8sio_api_storage_v1_CSINodeDriver(ref), \"k8s.io/api/storage/v1.CSINodeList\": schema_k8sio_api_storage_v1_CSINodeList(ref), \"k8s.io/api/storage/v1.CSINodeSpec\": schema_k8sio_api_storage_v1_CSINodeSpec(ref), \"k8s.io/api/storage/v1.StorageClass\": schema_k8sio_api_storage_v1_StorageClass(ref), \"k8s.io/api/storage/v1.StorageClassList\": schema_k8sio_api_storage_v1_StorageClassList(ref), \"k8s.io/api/storage/v1.TokenRequest\": schema_k8sio_api_storage_v1_TokenRequest(ref), \"k8s.io/api/storage/v1.VolumeAttachment\": schema_k8sio_api_storage_v1_VolumeAttachment(ref), \"k8s.io/api/storage/v1.VolumeAttachmentList\": schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), \"k8s.io/api/storage/v1.VolumeAttachmentSource\": schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), \"k8s.io/api/storage/v1.VolumeAttachmentSpec\": schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), \"k8s.io/api/storage/v1.VolumeAttachmentStatus\": schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), \"k8s.io/api/storage/v1.VolumeError\": schema_k8sio_api_storage_v1_VolumeError(ref), \"k8s.io/api/storage/v1.VolumeNodeResources\": schema_k8sio_api_storage_v1_VolumeNodeResources(ref), \"k8s.io/api/storage/v1alpha1.CSIStorageCapacity\": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref), \"k8s.io/api/storage/v1alpha1.CSIStorageCapacityList\": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref), \"k8s.io/api/storage/v1alpha1.VolumeAttachment\": schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), \"k8s.io/api/storage/v1alpha1.VolumeAttachmentList\": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), \"k8s.io/api/storage/v1alpha1.VolumeAttachmentSource\": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), \"k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec\": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), \"k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus\": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), \"k8s.io/api/storage/v1alpha1.VolumeError\": schema_k8sio_api_storage_v1alpha1_VolumeError(ref), \"k8s.io/api/storage/v1beta1.CSIDriver\": schema_k8sio_api_storage_v1beta1_CSIDriver(ref), \"k8s.io/api/storage/v1beta1.CSIDriverList\": schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), \"k8s.io/api/storage/v1beta1.CSIDriverSpec\": schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), \"k8s.io/api/storage/v1beta1.CSINode\": schema_k8sio_api_storage_v1beta1_CSINode(ref), \"k8s.io/api/storage/v1beta1.CSINodeDriver\": schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), \"k8s.io/api/storage/v1beta1.CSINodeList\": schema_k8sio_api_storage_v1beta1_CSINodeList(ref), \"k8s.io/api/storage/v1beta1.CSINodeSpec\": schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), \"k8s.io/api/storage/v1beta1.CSIStorageCapacity\": schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref), \"k8s.io/api/storage/v1beta1.CSIStorageCapacityList\": schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref), \"k8s.io/api/storage/v1beta1.StorageClass\": schema_k8sio_api_storage_v1beta1_StorageClass(ref), \"k8s.io/api/storage/v1beta1.StorageClassList\": schema_k8sio_api_storage_v1beta1_StorageClassList(ref), \"k8s.io/api/storage/v1beta1.TokenRequest\": schema_k8sio_api_storage_v1beta1_TokenRequest(ref), \"k8s.io/api/storage/v1beta1.VolumeAttachment\": schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), \"k8s.io/api/storage/v1beta1.VolumeAttachmentList\": schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), \"k8s.io/api/storage/v1beta1.VolumeAttachmentSource\": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), \"k8s.io/api/storage/v1beta1.VolumeAttachmentSpec\": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), \"k8s.io/api/storage/v1beta1.VolumeAttachmentStatus\": schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), \"k8s.io/api/storage/v1beta1.VolumeError\": schema_k8sio_api_storage_v1beta1_VolumeError(ref), \"k8s.io/api/storage/v1beta1.VolumeNodeResources\": schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest\": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse\": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview\": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition\": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion\": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion\": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale\": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus\": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources\": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation\": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation\": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON\": schema_pkg_apis_apiextensions_v1_JSON(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray\": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool\": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray\": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference\": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule\": schema_pkg_apis_apiextensions_v1_ValidationRule(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig\": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion\": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest\": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse\": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview\": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation\": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation\": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON\": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray\": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool\": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray\": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference\": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule\": schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig\": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), \"k8s.io/apimachinery/pkg/api/resource.Quantity\": schema_apimachinery_pkg_api_resource_Quantity(ref), \"k8s.io/apimachinery/pkg/api/resource.int64Amount\": schema_apimachinery_pkg_api_resource_int64Amount(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup\": schema_pkg_apis_meta_v1_APIGroup(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList\": schema_pkg_apis_meta_v1_APIGroupList(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.APIResource\": schema_pkg_apis_meta_v1_APIResource(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList\": schema_pkg_apis_meta_v1_APIResourceList(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions\": schema_pkg_apis_meta_v1_APIVersions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions\": schema_pkg_apis_meta_v1_ApplyOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\": schema_pkg_apis_meta_v1_Condition(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions\": schema_pkg_apis_meta_v1_CreateOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions\": schema_pkg_apis_meta_v1_DeleteOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\": schema_pkg_apis_meta_v1_Duration(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1\": schema_pkg_apis_meta_v1_FieldsV1(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions\": schema_pkg_apis_meta_v1_GetOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind\": schema_pkg_apis_meta_v1_GroupKind(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource\": schema_pkg_apis_meta_v1_GroupResource(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion\": schema_pkg_apis_meta_v1_GroupVersion(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery\": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind\": schema_pkg_apis_meta_v1_GroupVersionKind(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource\": schema_pkg_apis_meta_v1_GroupVersionResource(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent\": schema_pkg_apis_meta_v1_InternalEvent(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\": schema_pkg_apis_meta_v1_LabelSelector(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement\": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.List\": schema_pkg_apis_meta_v1_List(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\": schema_pkg_apis_meta_v1_ListMeta(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions\": schema_pkg_apis_meta_v1_ListOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry\": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\": schema_pkg_apis_meta_v1_MicroTime(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\": schema_pkg_apis_meta_v1_ObjectMeta(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference\": schema_pkg_apis_meta_v1_OwnerReference(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata\": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList\": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Patch\": schema_pkg_apis_meta_v1_Patch(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions\": schema_pkg_apis_meta_v1_PatchOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions\": schema_pkg_apis_meta_v1_Preconditions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths\": schema_pkg_apis_meta_v1_RootPaths(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR\": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\": schema_pkg_apis_meta_v1_Status(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause\": schema_pkg_apis_meta_v1_StatusCause(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails\": schema_pkg_apis_meta_v1_StatusDetails(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Table\": schema_pkg_apis_meta_v1_Table(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition\": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions\": schema_pkg_apis_meta_v1_TableOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.TableRow\": schema_pkg_apis_meta_v1_TableRow(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition\": schema_pkg_apis_meta_v1_TableRowCondition(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\": schema_pkg_apis_meta_v1_Time(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp\": schema_pkg_apis_meta_v1_Timestamp(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta\": schema_pkg_apis_meta_v1_TypeMeta(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions\": schema_pkg_apis_meta_v1_UpdateOptions(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent\": schema_pkg_apis_meta_v1_WatchEvent(ref), \"k8s.io/apimachinery/pkg/apis/meta/v1beta1.PartialObjectMetadataList\": schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), \"k8s.io/apimachinery/pkg/runtime.RawExtension\": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), \"k8s.io/apimachinery/pkg/runtime.TypeMeta\": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), \"k8s.io/apimachinery/pkg/runtime.Unknown\": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\": schema_apimachinery_pkg_util_intstr_IntOrString(ref), \"k8s.io/apimachinery/pkg/version.Info\": schema_k8sio_apimachinery_pkg_version_Info(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.Event\": schema_pkg_apis_audit_v1_Event(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.EventList\": schema_pkg_apis_audit_v1_EventList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.GroupResources\": schema_pkg_apis_audit_v1_GroupResources(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference\": schema_pkg_apis_audit_v1_ObjectReference(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.Policy\": schema_pkg_apis_audit_v1_Policy(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.PolicyList\": schema_pkg_apis_audit_v1_PolicyList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule\": schema_pkg_apis_audit_v1_PolicyRule(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event\": schema_pkg_apis_audit_v1alpha1_Event(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.EventList\": schema_pkg_apis_audit_v1alpha1_EventList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources\": schema_pkg_apis_audit_v1alpha1_GroupResources(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference\": schema_pkg_apis_audit_v1alpha1_ObjectReference(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy\": schema_pkg_apis_audit_v1alpha1_Policy(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyList\": schema_pkg_apis_audit_v1alpha1_PolicyList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule\": schema_pkg_apis_audit_v1alpha1_PolicyRule(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.Event\": schema_pkg_apis_audit_v1beta1_Event(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.EventList\": schema_pkg_apis_audit_v1beta1_EventList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources\": schema_pkg_apis_audit_v1beta1_GroupResources(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference\": schema_pkg_apis_audit_v1beta1_ObjectReference(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy\": schema_pkg_apis_audit_v1beta1_Policy(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyList\": schema_pkg_apis_audit_v1beta1_PolicyList(ref), \"k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule\": schema_pkg_apis_audit_v1beta1_PolicyRule(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster\": schema_pkg_apis_clientauthentication_v1_Cluster(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredential\": schema_pkg_apis_clientauthentication_v1_ExecCredential(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec\": schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus\": schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredential\": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec\": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus\": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response\": schema_pkg_apis_clientauthentication_v1alpha1_Response(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster\": schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredential\": schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec\": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus\": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), \"k8s.io/cloud-provider/config/v1alpha1.CloudControllerManagerConfiguration\": schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref), \"k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration\": schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref), \"k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration\": schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref), \"k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration\": schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref), \"k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration\": schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), \"k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration\": schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref), \"k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration\": schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref), \"k8s.io/controller-manager/config/v1beta1.LeaderMigrationConfiguration\": schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService\": schema_pkg_apis_apiregistration_v1_APIService(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition\": schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceList\": schema_pkg_apis_apiregistration_v1_APIServiceList(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec\": schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus\": schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference\": schema_pkg_apis_apiregistration_v1_ServiceReference(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService\": schema_pkg_apis_apiregistration_v1beta1_APIService(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition\": schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceList\": schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec\": schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus\": schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference\": schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.GroupResource\": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.KubeControllerManagerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), \"k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration\": schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyConfiguration\": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration\": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration\": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration\": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration\": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), \"k8s.io/kube-scheduler/config/v1beta2.DefaultPreemptionArgs\": schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.Extender\": schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref), \"k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource\": schema_k8sio_kube_scheduler_config_v1beta2_ExtenderManagedResource(ref), \"k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig\": schema_k8sio_kube_scheduler_config_v1beta2_ExtenderTLSConfig(ref), \"k8s.io/kube-scheduler/config/v1beta2.InterPodAffinityArgs\": schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerConfiguration\": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref), \"k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile\": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref), \"k8s.io/kube-scheduler/config/v1beta2.NodeAffinityArgs\": schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.NodeResourcesBalancedAllocationArgs\": schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.NodeResourcesFitArgs\": schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.Plugin\": schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref), \"k8s.io/kube-scheduler/config/v1beta2.PluginConfig\": schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref), \"k8s.io/kube-scheduler/config/v1beta2.PluginSet\": schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref), \"k8s.io/kube-scheduler/config/v1beta2.Plugins\": schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref), \"k8s.io/kube-scheduler/config/v1beta2.PodTopologySpreadArgs\": schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref), \"k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam\": schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref), \"k8s.io/kube-scheduler/config/v1beta2.ResourceSpec\": schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref), \"k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy\": schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref), \"k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint\": schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref), \"k8s.io/kube-scheduler/config/v1beta2.VolumeBindingArgs\": schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.DefaultPreemptionArgs\": schema_k8sio_kube_scheduler_config_v1beta3_DefaultPreemptionArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.Extender\": schema_k8sio_kube_scheduler_config_v1beta3_Extender(ref), \"k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource\": schema_k8sio_kube_scheduler_config_v1beta3_ExtenderManagedResource(ref), \"k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig\": schema_k8sio_kube_scheduler_config_v1beta3_ExtenderTLSConfig(ref), \"k8s.io/kube-scheduler/config/v1beta3.InterPodAffinityArgs\": schema_k8sio_kube_scheduler_config_v1beta3_InterPodAffinityArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerConfiguration\": schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerConfiguration(ref), \"k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile\": schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerProfile(ref), \"k8s.io/kube-scheduler/config/v1beta3.NodeAffinityArgs\": schema_k8sio_kube_scheduler_config_v1beta3_NodeAffinityArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.NodeResourcesBalancedAllocationArgs\": schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesBalancedAllocationArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.NodeResourcesFitArgs\": schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesFitArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.Plugin\": schema_k8sio_kube_scheduler_config_v1beta3_Plugin(ref), \"k8s.io/kube-scheduler/config/v1beta3.PluginConfig\": schema_k8sio_kube_scheduler_config_v1beta3_PluginConfig(ref), \"k8s.io/kube-scheduler/config/v1beta3.PluginSet\": schema_k8sio_kube_scheduler_config_v1beta3_PluginSet(ref), \"k8s.io/kube-scheduler/config/v1beta3.Plugins\": schema_k8sio_kube_scheduler_config_v1beta3_Plugins(ref), \"k8s.io/kube-scheduler/config/v1beta3.PodTopologySpreadArgs\": schema_k8sio_kube_scheduler_config_v1beta3_PodTopologySpreadArgs(ref), \"k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam\": schema_k8sio_kube_scheduler_config_v1beta3_RequestedToCapacityRatioParam(ref), \"k8s.io/kube-scheduler/config/v1beta3.ResourceSpec\": schema_k8sio_kube_scheduler_config_v1beta3_ResourceSpec(ref), \"k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy\": schema_k8sio_kube_scheduler_config_v1beta3_ScoringStrategy(ref), \"k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint\": schema_k8sio_kube_scheduler_config_v1beta3_UtilizationShapePoint(ref), \"k8s.io/kube-scheduler/config/v1beta3.VolumeBindingArgs\": schema_k8sio_kube_scheduler_config_v1beta3_VolumeBindingArgs(ref), \"k8s.io/kubelet/config/v1alpha1.CredentialProvider\": schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref), \"k8s.io/kubelet/config/v1alpha1.CredentialProviderConfig\": schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref), \"k8s.io/kubelet/config/v1alpha1.ExecEnvVar\": schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref), \"k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication\": schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), \"k8s.io/kubelet/config/v1beta1.KubeletAuthentication\": schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), \"k8s.io/kubelet/config/v1beta1.KubeletAuthorization\": schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), \"k8s.io/kubelet/config/v1beta1.KubeletConfiguration\": schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), \"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication\": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), \"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization\": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), \"k8s.io/kubelet/config/v1beta1.KubeletX509Authentication\": schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), \"k8s.io/kubelet/config/v1beta1.MemoryReservation\": schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref), \"k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration\": schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref), \"k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource\": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), \"k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority\": schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref), \"k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy\": schema_pkg_apis_abac_v1beta1_Policy(ref), \"k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec\": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions\": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue\": schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValueList\": schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier\": schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricListOptions\": schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue\": schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValueList\": schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), \"k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue\": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), \"k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValueList\": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics\": schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics\": schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetricsList\": schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics\": schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetricsList\": schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), \"k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics\": schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics\": schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetricsList\": schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), \"k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics\": schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), \"k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetricsList\": schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), } } func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhook describes an admission webhook and the resources and operations it applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConfig defines how to communicate with the hook. Required\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.WebhookClientConfig\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.RuleWithOperations\"), }, }, }, }, }, \"failurePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.\", Type: []string{\"string\"}, Format: \"\", }, }, \"matchPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".nn- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.nn- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.nnDefaults to \"Equivalent\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.nnFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"runlevel\",n \"operator\": \"NotIn\",n \"values\": [n \"0\",n \"1\"n ]n }n ]n}nnIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"environment\",n \"operator\": \"In\",n \"values\": [n \"prod\",n \"staging\"n ]n }n ]n}nnSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.nnDefault to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"objectSelector\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"sideEffects\": { SchemaProps: spec.SchemaProps{ Description: \"SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.\", Type: []string{\"string\"}, Format: \"\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"admissionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"reinvocationPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".nnNever: the webhook will not be called more than once in a single admission evaluation.nnIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.nnDefaults to \"Never\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"clientConfig\", \"sideEffects\", \"admissionReviewVersions\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.RuleWithOperations\", \"k8s.io/api/admissionregistration/v1.WebhookClientConfig\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"webhooks\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Webhooks is a list of webhooks and the affected resources and operations.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.MutatingWebhook\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.MutatingWebhook\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of MutatingWebhookConfiguration.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiVersions\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnDepending on the enclosing object, subresources might not be allowed. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"operations\": { SchemaProps: spec.SchemaProps{ Description: \"Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiVersions\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnDepending on the enclosing object, subresources might not be allowed. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_admissionregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"`namespace` is the namespace of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"`path` is an optional URL path which will be sent in any request to this service.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhook describes an admission webhook and the resources and operations it applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConfig defines how to communicate with the hook. Required\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.WebhookClientConfig\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.RuleWithOperations\"), }, }, }, }, }, \"failurePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.\", Type: []string{\"string\"}, Format: \"\", }, }, \"matchPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".nn- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.nn- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.nnDefaults to \"Equivalent\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.nnFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"runlevel\",n \"operator\": \"NotIn\",n \"values\": [n \"0\",n \"1\"n ]n }n ]n}nnIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"environment\",n \"operator\": \"In\",n \"values\": [n \"prod\",n \"staging\"n ]n }n ]n}nnSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.nnDefault to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"objectSelector\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"sideEffects\": { SchemaProps: spec.SchemaProps{ Description: \"SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.\", Type: []string{\"string\"}, Format: \"\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"admissionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"name\", \"clientConfig\", \"sideEffects\", \"admissionReviewVersions\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.RuleWithOperations\", \"k8s.io/api/admissionregistration/v1.WebhookClientConfig\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"webhooks\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Webhooks is a list of webhooks and the affected resources and operations.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.ValidatingWebhook\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.ValidatingWebhook\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ValidatingWebhookConfiguration.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WebhookClientConfig contains the information to make a TLS connection with the webhook\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"url\": { SchemaProps: spec.SchemaProps{ Description: \"`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.nnThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.nnPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.nnThe scheme must be \"https\"; the URL must begin with \"https://\".nnA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.nnAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.\", Type: []string{\"string\"}, Format: \"\", }, }, \"service\": { SchemaProps: spec.SchemaProps{ Description: \"`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.nnIf the webhook is running within the cluster, then you should use `service`.\", Ref: ref(\"k8s.io/api/admissionregistration/v1.ServiceReference\"), }, }, \"caBundle\": { SchemaProps: spec.SchemaProps{ Description: \"`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1.ServiceReference\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhook describes an admission webhook and the resources and operations it applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConfig defines how to communicate with the hook. Required\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.RuleWithOperations\"), }, }, }, }, }, \"failurePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.\", Type: []string{\"string\"}, Format: \"\", }, }, \"matchPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".nn- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.nn- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.nnDefaults to \"Exact\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.nnFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"runlevel\",n \"operator\": \"NotIn\",n \"values\": [n \"0\",n \"1\"n ]n }n ]n}nnIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"environment\",n \"operator\": \"In\",n \"values\": [n \"prod\",n \"staging\"n ]n }n ]n}nnSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.nnDefault to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"objectSelector\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"sideEffects\": { SchemaProps: spec.SchemaProps{ Description: \"SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.\", Type: []string{\"string\"}, Format: \"\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"admissionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"reinvocationPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".nnNever: the webhook will not be called more than once in a single admission evaluation.nnIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.nnDefaults to \"Never\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"clientConfig\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.RuleWithOperations\", \"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"webhooks\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Webhooks is a list of webhooks and the affected resources and operations.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.MutatingWebhook\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.MutatingWebhook\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of MutatingWebhookConfiguration.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiVersions\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnDepending on the enclosing object, subresources might not be allowed. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"operations\": { SchemaProps: spec.SchemaProps{ Description: \"Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiVersions\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnDepending on the enclosing object, subresources might not be allowed. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"`namespace` is the namespace of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"`path` is an optional URL path which will be sent in any request to this service.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhook describes an admission webhook and the resources and operations it applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConfig defines how to communicate with the hook. Required\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.RuleWithOperations\"), }, }, }, }, }, \"failurePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.\", Type: []string{\"string\"}, Format: \"\", }, }, \"matchPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".nn- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.nn- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.nnDefaults to \"Exact\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.nnFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"runlevel\",n \"operator\": \"NotIn\",n \"values\": [n \"0\",n \"1\"n ]n }n ]n}nnIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {n \"matchExpressions\": [n {n \"key\": \"environment\",n \"operator\": \"In\",n \"values\": [n \"prod\",n \"staging\"n ]n }n ]n}nnSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.nnDefault to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"objectSelector\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"sideEffects\": { SchemaProps: spec.SchemaProps{ Description: \"SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.\", Type: []string{\"string\"}, Format: \"\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"admissionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"name\", \"clientConfig\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.RuleWithOperations\", \"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"webhooks\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Webhooks is a list of webhooks and the affected resources and operations.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ValidatingWebhookConfiguration.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WebhookClientConfig contains the information to make a TLS connection with the webhook\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"url\": { SchemaProps: spec.SchemaProps{ Description: \"`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.nnThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.nnPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.nnThe scheme must be \"https\"; the URL must begin with \"https://\".nnA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.nnAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.\", Type: []string{\"string\"}, Format: \"\", }, }, \"service\": { SchemaProps: spec.SchemaProps{ Description: \"`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.nnIf the webhook is running within the cluster, then you should use `service`.\", Ref: ref(\"k8s.io/api/admissionregistration/v1beta1.ServiceReference\"), }, }, \"caBundle\": { SchemaProps: spec.SchemaProps{ Description: \"`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/admissionregistration/v1beta1.ServiceReference\"}, } } func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiServerID\": { SchemaProps: spec.SchemaProps{ Description: \"The ID of the reporting API server.\", Type: []string{\"string\"}, Format: \"\", }, }, \"encodingVersion\": { SchemaProps: spec.SchemaProps{ Description: \"The API server encodes the object to this version when persisting it in the backend (e.g., etcd).\", Type: []string{\"string\"}, Format: \"\", }, }, \"decodableVersions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"n Storage version of a specific resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"The name is ..\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is an empty spec. It is here to comply with Kubernetes API style.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"API server instances report the version they can decode and the version they encode objects to when persisting objects in the backend.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus\"), }, }, }, Required: []string{\"spec\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec\", \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Describes the state of the storageVersion at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of the condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"If set, this represents the .metadata.generation that the condition was set based upon.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\", \"reason\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A list of StorageVersions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items holds a list of StorageVersion\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apiserverinternal/v1alpha1.StorageVersion\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersion\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StorageVersionSpec is an empty spec.\", Type: []string{\"object\"}, }, }, } } func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"storageVersions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"apiServerID\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The reported versions per API server instance.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion\"), }, }, }, }, }, \"commonEncodingVersion\": { SchemaProps: spec.SchemaProps{ Description: \"If all API server instances agree on the same encoding storage version, then this field is set to that version. Otherwise this field is left empty. API servers should finish updating its storageVersionStatus entry before serving write operations, so that this field will be in sync with the reality.\", Type: []string{\"string\"}, Format: \"\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The latest available observations of the storageVersion's state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion\", \"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition\"}, } } func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data is the serialized representation of the state.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"Revision indicates the revision of the state represented by Data.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"revision\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerRevisionList is a resource containing a list of ControllerRevision objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of ControllerRevisions\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.ControllerRevision\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.ControllerRevision\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSet represents the configuration of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DaemonSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DaemonSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DaemonSetSpec\", \"k8s.io/api/apps/v1.DaemonSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetCondition describes the state of a DaemonSet at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of DaemonSet condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetList is a collection of daemon sets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"A list of daemon sets.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DaemonSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DaemonSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetSpec is the specification of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"An update strategy to replace existing DaemonSet pods with new pods.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DaemonSetUpdateStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"selector\", \"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DaemonSetUpdateStrategy\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetStatus represents the current status of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"currentNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberMisscheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberReady\": { SchemaProps: spec.SchemaProps{ Description: \"numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The most recent generation observed by the daemon set controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"updatedNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that are running updated daemon pod\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberAvailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a DaemonSet's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DaemonSetCondition\"), }, }, }, }, }, }, Required: []string{\"currentNumberScheduled\", \"numberMisscheduled\", \"desiredNumberScheduled\", \"numberReady\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DaemonSetCondition\"}, } } func schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.nnPossible enum values:n - `\"OnDelete\"` Replace the old daemons only when it's killedn - `\"RollingUpdate\"` Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"OnDelete\", \"RollingUpdate\"}}, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if type = \"RollingUpdate\".\", Ref: ref(\"k8s.io/api/apps/v1.RollingUpdateDaemonSet\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.RollingUpdateDaemonSet\"}, } } func schema_k8sio_api_apps_v1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Deployment enables declarative updates for Pods and ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DeploymentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DeploymentStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DeploymentSpec\", \"k8s.io/api/apps/v1.DeploymentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentCondition describes the state of a deployment at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time this condition was updated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentList is a list of Deployments.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Deployments.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.Deployment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.Deployment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentSpec is the specification of the desired behavior of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template describes the pods that will be created.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"strategy\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"retainKeys\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The deployment strategy to use to replace existing pods with new ones.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DeploymentStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"paused\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the deployment is paused.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"progressDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"selector\", \"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DeploymentStrategy\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStatus is the most recently observed status of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The generation observed by the deployment controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment (their labels match the selector).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment that have the desired template spec.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"unavailableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a deployment's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.DeploymentCondition\"), }, }, }, }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.DeploymentCondition\"}, } } func schema_k8sio_api_apps_v1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStrategy describes how to replace existing pods with new ones.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.nnPossible enum values:n - `\"Recreate\"` Kill all existing pods before creating new ones.n - `\"RollingUpdate\"` Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Recreate\", \"RollingUpdate\"}}, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.\", Ref: ref(\"k8s.io/api/apps/v1.RollingUpdateDeployment\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.RollingUpdateDeployment\"}, } } func schema_k8sio_api_apps_v1_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSet ensures that a specified number of pod replicas are running at any given time.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.ReplicaSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.ReplicaSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.ReplicaSetSpec\", \"k8s.io/api/apps/v1.ReplicaSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetCondition describes the state of a replica set at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of replica set condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetList is a collection of ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.ReplicaSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.ReplicaSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetSpec is the specification of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, }, Required: []string{\"selector\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetStatus represents the current status of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"fullyLabeledReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods that have labels matching the labels of the pod template of the replicaset.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of available replicas (ready for at least minReadySeconds) for this replica set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"ObservedGeneration reflects the generation of the most recently observed ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a replica set's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.ReplicaSetCondition\"), }, }, }, }, }, }, Required: []string{\"replicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.ReplicaSetCondition\"}, } } func schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of daemon set rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"partition\": { SchemaProps: spec.SchemaProps{ Description: \"Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSet represents a set of pods with consistent identities. Identities are defined as:n - Network: A single stable DNS and hostname.n - Storage: As many VolumeClaims as requested.nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the desired identities of pods in this set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.StatefulSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.StatefulSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.StatefulSetSpec\", \"k8s.io/api/apps/v1.StatefulSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetCondition describes the state of a statefulset at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of statefulset condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetList is a collection of StatefulSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of stateful sets.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.StatefulSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.StatefulSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"whenDeleted\": { SchemaProps: spec.SchemaProps{ Description: \"WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"whenScaled\": { SchemaProps: spec.SchemaProps{ Description: \"WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A StatefulSetSpec is the specification of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"volumeClaimTemplates\": { SchemaProps: spec.SchemaProps{ Description: \"volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaim\"), }, }, }, }, }, \"serviceName\": { SchemaProps: spec.SchemaProps{ Description: \"serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"podManagementPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.nnPossible enum values:n - `\"OrderedReady\"` will create pods in strictly increasing order on scale up and strictly decreasing order on scale down, progressing only when the previous pod is ready or terminated. At most one pod will be changed at any time.n - `\"Parallel\"` will create and delete pods as soon as the stateful set replica count is changed, and will not wait for pods to be ready or complete termination.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"OrderedReady\", \"Parallel\"}}, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.StatefulSetUpdateStrategy\"), }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"persistentVolumeClaimRetentionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. +optional\", Ref: ref(\"k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy\"), }, }, }, Required: []string{\"selector\", \"template\", \"serviceName\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy\", \"k8s.io/api/apps/v1.StatefulSetUpdateStrategy\", \"k8s.io/api/core/v1.PersistentVolumeClaim\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetStatus represents the current state of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the number of Pods created by the StatefulSet controller.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods created for this StatefulSet with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentRevision\": { SchemaProps: spec.SchemaProps{ Description: \"currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).\", Type: []string{\"string\"}, Format: \"\", }, }, \"updateRevision\": { SchemaProps: spec.SchemaProps{ Description: \"updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)\", Type: []string{\"string\"}, Format: \"\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a statefulset's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1.StatefulSetCondition\"), }, }, }, }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"replicas\", \"availableReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.StatefulSetCondition\"}, } } func schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.nnPossible enum values:n - `\"OnDelete\"` triggers the legacy behavior. Version tracking and ordered rolling restarts are disabled. Pods are recreated from the StatefulSetSpec when they are manually deleted. When a scale operation is performed with this strategy,specification version indicated by the StatefulSet's currentRevision.n - `\"RollingUpdate\"` indicates that update will be applied to all Pods in the StatefulSet with respect to the StatefulSet ordering constraints. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"OnDelete\", \"RollingUpdate\"}}, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.\", Ref: ref(\"k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy\"}, } } func schema_k8sio_api_apps_v1beta1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data is the serialized representation of the state.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"Revision indicates the revision of the state represented by Data.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"revision\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerRevisionList is a resource containing a list of ControllerRevision objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of ControllerRevisions\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.ControllerRevision\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.ControllerRevision\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.DeploymentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.DeploymentStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.DeploymentSpec\", \"k8s.io/api/apps/v1beta1.DeploymentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentCondition describes the state of a deployment at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time this condition was updated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentList is a list of Deployments.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Deployments.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.Deployment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.Deployment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Required: This must match the Name of a deployment.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"updatedAnnotations\": { SchemaProps: spec.SchemaProps{ Description: \"The annotations to be updated to a deployment\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"rollbackTo\": { SchemaProps: spec.SchemaProps{ Description: \"The config of this deployment rollback.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.RollbackConfig\"), }, }, }, Required: []string{\"name\", \"rollbackTo\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.RollbackConfig\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentSpec is the specification of the desired behavior of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template describes the pods that will be created.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"strategy\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"retainKeys\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The deployment strategy to use to replace existing pods with new ones.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.DeploymentStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"paused\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the deployment is paused.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"rollbackTo\": { SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.\", Ref: ref(\"k8s.io/api/apps/v1beta1.RollbackConfig\"), }, }, \"progressDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.DeploymentStrategy\", \"k8s.io/api/apps/v1beta1.RollbackConfig\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStatus is the most recently observed status of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The generation observed by the deployment controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment (their labels match the selector).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment that have the desired template spec.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"unavailableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a deployment's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.DeploymentCondition\"), }, }, }, }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.DeploymentCondition\"}, } } func schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStrategy describes how to replace existing pods with new ones.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.\", Ref: ref(\"k8s.io/api/apps/v1beta1.RollingUpdateDeployment\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.RollingUpdateDeployment\"}, } } func schema_k8sio_api_apps_v1beta1_RollbackConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"The revision to rollback to. If set to 0, rollback to the last revision.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"partition\": { SchemaProps: spec.SchemaProps{ Description: \"Partition indicates the ordinal at which the StatefulSet should be partitioned.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scale represents a scaling request for a resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.ScaleSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.ScaleStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.ScaleSpec\", \"k8s.io/api/apps/v1beta1.ScaleStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleSpec describes the attributes of a scale subresource\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"desired number of instances for the scaled object.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleStatus represents the current status of a scale subresource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"actual number of observed instances of the scaled object.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"targetSelector\": { SchemaProps: spec.SchemaProps{ Description: \"label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"replicas\"}, }, }, } } func schema_k8sio_api_apps_v1beta1_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:n - Network: A single stable DNS and hostname.n - Storage: As many VolumeClaims as requested.nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the desired identities of pods in this set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.StatefulSetSpec\", \"k8s.io/api/apps/v1beta1.StatefulSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetCondition describes the state of a statefulset at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of statefulset condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetList is a collection of StatefulSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.StatefulSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"whenDeleted\": { SchemaProps: spec.SchemaProps{ Description: \"WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"whenScaled\": { SchemaProps: spec.SchemaProps{ Description: \"WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A StatefulSetSpec is the specification of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"volumeClaimTemplates\": { SchemaProps: spec.SchemaProps{ Description: \"volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaim\"), }, }, }, }, }, \"serviceName\": { SchemaProps: spec.SchemaProps{ Description: \"serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"podManagementPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.\", Type: []string{\"string\"}, Format: \"\", }, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy\"), }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"persistentVolumeClaimRetentionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.\", Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy\"), }, }, }, Required: []string{\"template\", \"serviceName\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy\", \"k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy\", \"k8s.io/api/core/v1.PersistentVolumeClaim\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetStatus represents the current state of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the number of Pods created by the StatefulSet controller.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentRevision\": { SchemaProps: spec.SchemaProps{ Description: \"currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).\", Type: []string{\"string\"}, Format: \"\", }, }, \"updateRevision\": { SchemaProps: spec.SchemaProps{ Description: \"updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)\", Type: []string{\"string\"}, Format: \"\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a statefulset's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta1.StatefulSetCondition\"), }, }, }, }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"replicas\", \"availableReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.StatefulSetCondition\"}, } } func schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type indicates the type of the StatefulSetUpdateStrategy.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.\", Ref: ref(\"k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy\"}, } } func schema_k8sio_api_apps_v1beta2_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data is the serialized representation of the state.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"Revision indicates the revision of the state represented by Data.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"revision\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerRevisionList is a resource containing a list of ControllerRevision objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of ControllerRevisions\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ControllerRevision\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.ControllerRevision\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DaemonSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DaemonSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DaemonSetSpec\", \"k8s.io/api/apps/v1beta2.DaemonSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetCondition describes the state of a DaemonSet at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of DaemonSet condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetList is a collection of daemon sets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"A list of daemon sets.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DaemonSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DaemonSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetSpec is the specification of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"An update strategy to replace existing DaemonSet pods with new pods.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"selector\", \"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetStatus represents the current status of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"currentNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberMisscheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberReady\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition by passing the readinessProbe.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The most recent generation observed by the daemon set controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"updatedNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that are running updated daemon pod\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberAvailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a DaemonSet's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DaemonSetCondition\"), }, }, }, }, }, }, Required: []string{\"currentNumberScheduled\", \"numberMisscheduled\", \"desiredNumberScheduled\", \"numberReady\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DaemonSetCondition\"}, } } func schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if type = \"RollingUpdate\".\", Ref: ref(\"k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet\"}, } } func schema_k8sio_api_apps_v1beta2_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DeploymentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DeploymentStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DeploymentSpec\", \"k8s.io/api/apps/v1beta2.DeploymentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentCondition describes the state of a deployment at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time this condition was updated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentList is a list of Deployments.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Deployments.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.Deployment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.Deployment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentSpec is the specification of the desired behavior of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template describes the pods that will be created.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"strategy\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"retainKeys\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The deployment strategy to use to replace existing pods with new ones.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DeploymentStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"paused\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the deployment is paused.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"progressDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"selector\", \"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DeploymentStrategy\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStatus is the most recently observed status of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The generation observed by the deployment controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment (their labels match the selector).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment that have the desired template spec.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"unavailableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a deployment's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.DeploymentCondition\"), }, }, }, }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.DeploymentCondition\"}, } } func schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStrategy describes how to replace existing pods with new ones.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.\", Ref: ref(\"k8s.io/api/apps/v1beta2.RollingUpdateDeployment\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.RollingUpdateDeployment\"}, } } func schema_k8sio_api_apps_v1beta2_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ReplicaSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ReplicaSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.ReplicaSetSpec\", \"k8s.io/api/apps/v1beta2.ReplicaSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetCondition describes the state of a replica set at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of replica set condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetList is a collection of ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ReplicaSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.ReplicaSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetSpec is the specification of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, }, Required: []string{\"selector\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetStatus represents the current status of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"fullyLabeledReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods that have labels matching the labels of the pod template of the replicaset.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of available replicas (ready for at least minReadySeconds) for this replica set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"ObservedGeneration reflects the generation of the most recently observed ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a replica set's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ReplicaSetCondition\"), }, }, }, }, }, }, Required: []string{\"replicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.ReplicaSetCondition\"}, } } func schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of daemon set rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"partition\": { SchemaProps: spec.SchemaProps{ Description: \"Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta2_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scale represents a scaling request for a resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ScaleSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.ScaleStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.ScaleSpec\", \"k8s.io/api/apps/v1beta2.ScaleStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta2_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleSpec describes the attributes of a scale subresource\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"desired number of instances for the scaled object.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta2_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleStatus represents the current status of a scale subresource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"actual number of observed instances of the scaled object.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"targetSelector\": { SchemaProps: spec.SchemaProps{ Description: \"label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"replicas\"}, }, }, } } func schema_k8sio_api_apps_v1beta2_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:n - Network: A single stable DNS and hostname.n - Storage: As many VolumeClaims as requested.nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the desired identities of pods in this set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.StatefulSetSpec\", \"k8s.io/api/apps/v1beta2.StatefulSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetCondition describes the state of a statefulset at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of statefulset condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetList is a collection of StatefulSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.StatefulSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"whenDeleted\": { SchemaProps: spec.SchemaProps{ Description: \"WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"whenScaled\": { SchemaProps: spec.SchemaProps{ Description: \"WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A StatefulSetSpec is the specification of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"volumeClaimTemplates\": { SchemaProps: spec.SchemaProps{ Description: \"volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaim\"), }, }, }, }, }, \"serviceName\": { SchemaProps: spec.SchemaProps{ Description: \"serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"podManagementPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.\", Type: []string{\"string\"}, Format: \"\", }, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy\"), }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"persistentVolumeClaimRetentionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.\", Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy\"), }, }, }, Required: []string{\"selector\", \"template\", \"serviceName\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy\", \"k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy\", \"k8s.io/api/core/v1.PersistentVolumeClaim\", \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetStatus represents the current state of a StatefulSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"replicas is the number of Pods created by the StatefulSet controller.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentRevision\": { SchemaProps: spec.SchemaProps{ Description: \"currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).\", Type: []string{\"string\"}, Format: \"\", }, }, \"updateRevision\": { SchemaProps: spec.SchemaProps{ Description: \"updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)\", Type: []string{\"string\"}, Format: \"\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a statefulset's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/apps/v1beta2.StatefulSetCondition\"), }, }, }, }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"replicas\", \"availableReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.StatefulSetCondition\"}, } } func schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.\", Ref: ref(\"k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy\"}, } } func schema_k8sio_api_authentication_v1_BoundObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"BoundObjectReference is a reference to an object that a token is bound to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent. Valid kinds are 'Pod' and 'Secret'.\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID of the referent.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authentication_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenRequest requests a token for a given service account.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.TokenRequestSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the token can be authenticated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.TokenRequestStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.TokenRequestSpec\", \"k8s.io/api/authentication/v1.TokenRequestStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenRequestSpec contains client provided parameters of a token request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"audiences\": { SchemaProps: spec.SchemaProps{ Description: \"Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"boundObjectRef\": { SchemaProps: spec.SchemaProps{ Description: \"BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.\", Ref: ref(\"k8s.io/api/authentication/v1.BoundObjectReference\"), }, }, }, Required: []string{\"audiences\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.BoundObjectReference\"}, } } func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenRequestStatus is the result of a token request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is the opaque bearer token.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationTimestamp is the time of expiration of the returned token.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, Required: []string{\"token\", \"expirationTimestamp\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_authentication_v1_TokenReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.TokenReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request can be authenticated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.TokenReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.TokenReviewSpec\", \"k8s.io/api/authentication/v1.TokenReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authentication_v1_TokenReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReviewSpec is a description of the token authentication request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is the opaque bearer token.\", Type: []string{\"string\"}, Format: \"\", }, }, \"audiences\": { SchemaProps: spec.SchemaProps{ Description: \"Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReviewStatus is the result of the token authentication request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"authenticated\": { SchemaProps: spec.SchemaProps{ Description: \"Authenticated indicates that the token was associated with a known user.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is the UserInfo associated with the provided token.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"audiences\": { SchemaProps: spec.SchemaProps{ Description: \"Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"error\": { SchemaProps: spec.SchemaProps{ Description: \"Error indicates that the token couldn't be checked\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.UserInfo\"}, } } func schema_k8sio_api_authentication_v1_UserInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UserInfo holds the information about the user needed to implement the user.Info interface.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"username\": { SchemaProps: spec.SchemaProps{ Description: \"The name that uniquely identifies this user among all active users.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { SchemaProps: spec.SchemaProps{ Description: \"The names of groups this user is a part of.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"Any additional information provided by the authenticator.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, }, }, }, } } func schema_k8sio_api_authentication_v1beta1_TokenReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1beta1.TokenReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the token can be authenticated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1beta1.TokenReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1beta1.TokenReviewSpec\", \"k8s.io/api/authentication/v1beta1.TokenReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReviewSpec is a description of the token authentication request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is the opaque bearer token.\", Type: []string{\"string\"}, Format: \"\", }, }, \"audiences\": { SchemaProps: spec.SchemaProps{ Description: \"Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenReviewStatus is the result of the token authentication request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"authenticated\": { SchemaProps: spec.SchemaProps{ Description: \"Authenticated indicates that the token was associated with a known user.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is the UserInfo associated with the provided token.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1beta1.UserInfo\"), }, }, \"audiences\": { SchemaProps: spec.SchemaProps{ Description: \"Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"error\": { SchemaProps: spec.SchemaProps{ Description: \"Error indicates that the token couldn't be checked\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1beta1.UserInfo\"}, } } func schema_k8sio_api_authentication_v1beta1_UserInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UserInfo holds the information about the user needed to implement the user.Info interface.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"username\": { SchemaProps: spec.SchemaProps{ Description: \"The name that uniquely identifies this user among all active users.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { SchemaProps: spec.SchemaProps{ Description: \"The names of groups this user is a part of.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"Any additional information provided by the authenticator.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, }, }, }, } } func schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.SubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1_NonResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is the URL path of the request\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is the standard HTTP verb\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1_NonResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourceRule holds information that describes a rule for the non-resource\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_authorization_v1_ResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the API Group of the Resource. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"Version is the API Version of the Resource. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is one of the existing resource types. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Description: \"Subresource is one of the existing resource types. \"\" means none.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated. user and groups must be empty\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceAuthorizationAttributes describes information for a resource access request\", Ref: ref(\"k8s.io/api/authorization/v1.ResourceAttributes\"), }, }, \"nonResourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes describes information for a non-resource access request\", Ref: ref(\"k8s.io/api/authorization/v1.NonResourceAttributes\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.NonResourceAttributes\", \"k8s.io/api/authorization/v1.ResourceAttributes\"}, } } func schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates the set of actions a user can perform.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectRulesReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec\", \"k8s.io/api/authorization/v1.SubjectRulesReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace to evaluate rules for. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1_SubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReview checks whether or not a user or group can perform an action.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.SubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceAuthorizationAttributes describes information for a resource access request\", Ref: ref(\"k8s.io/api/authorization/v1.ResourceAttributes\"), }, }, \"nonResourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes describes information for a non-resource access request\", Ref: ref(\"k8s.io/api/authorization/v1.NonResourceAttributes\"), }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { SchemaProps: spec.SchemaProps{ Description: \"Groups is the groups you're testing for.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID information about the requesting user.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.NonResourceAttributes\", \"k8s.io/api/authorization/v1.ResourceAttributes\"}, } } func schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReviewStatus\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"allowed\": { SchemaProps: spec.SchemaProps{ Description: \"Allowed is required. True if the action would be allowed, false otherwise.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"denied\": { SchemaProps: spec.SchemaProps{ Description: \"Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Reason is optional. It indicates why a request was allowed or denied.\", Type: []string{\"string\"}, Format: \"\", }, }, \"evaluationError\": { SchemaProps: spec.SchemaProps{ Description: \"EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"allowed\"}, }, }, } } func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceRules\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.ResourceRule\"), }, }, }, }, }, \"nonResourceRules\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1.NonResourceRule\"), }, }, }, }, }, \"incomplete\": { SchemaProps: spec.SchemaProps{ Description: \"Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"evaluationError\": { SchemaProps: spec.SchemaProps{ Description: \"EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"resourceRules\", \"nonResourceRules\", \"incomplete\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1.NonResourceRule\", \"k8s.io/api/authorization/v1.ResourceRule\"}, } } func schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is the URL path of the request\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is the standard HTTP verb\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourceRule holds information that describes a rule for the non-resource\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the API Group of the Resource. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"Version is the API Version of the Resource. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is one of the existing resource types. \"*\" means all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Description: \"Subresource is one of the existing resource types. \"\" means none.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated. user and groups must be empty\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceAuthorizationAttributes describes information for a resource access request\", Ref: ref(\"k8s.io/api/authorization/v1beta1.ResourceAttributes\"), }, }, \"nonResourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes describes information for a non-resource access request\", Ref: ref(\"k8s.io/api/authorization/v1beta1.NonResourceAttributes\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.NonResourceAttributes\", \"k8s.io/api/authorization/v1beta1.ResourceAttributes\"}, } } func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates the set of actions a user can perform.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec\", \"k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace to evaluate rules for. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReview checks whether or not a user or group can perform an action.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the request being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the server and indicates whether the request is allowed or not\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec\", \"k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceAuthorizationAttributes describes information for a resource access request\", Ref: ref(\"k8s.io/api/authorization/v1beta1.ResourceAttributes\"), }, }, \"nonResourceAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceAttributes describes information for a non-resource access request\", Ref: ref(\"k8s.io/api/authorization/v1beta1.NonResourceAttributes\"), }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Groups is the groups you're testing for.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID information about the requesting user.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.NonResourceAttributes\", \"k8s.io/api/authorization/v1beta1.ResourceAttributes\"}, } } func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectAccessReviewStatus\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"allowed\": { SchemaProps: spec.SchemaProps{ Description: \"Allowed is required. True if the action would be allowed, false otherwise.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"denied\": { SchemaProps: spec.SchemaProps{ Description: \"Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Reason is optional. It indicates why a request was allowed or denied.\", Type: []string{\"string\"}, Format: \"\", }, }, \"evaluationError\": { SchemaProps: spec.SchemaProps{ Description: \"EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"allowed\"}, }, }, } } func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resourceRules\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.ResourceRule\"), }, }, }, }, }, \"nonResourceRules\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authorization/v1beta1.NonResourceRule\"), }, }, }, }, }, \"incomplete\": { SchemaProps: spec.SchemaProps{ Description: \"Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"evaluationError\": { SchemaProps: spec.SchemaProps{ Description: \"EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"resourceRules\", \"nonResourceRules\", \"incomplete\"}, }, }, Dependencies: []string{ \"k8s.io/api/authorization/v1beta1.NonResourceRule\", \"k8s.io/api/authorization/v1beta1.ResourceRule\"}, } } func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in the requests and limits, describing a single container in each of the pods of the current scale target(e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built into Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling target.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling taget\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"currentAverageValue\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CrossVersionObjectReference contains enough information to let you identify the referred resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricSelector\": { SchemaProps: spec.SchemaProps{ Description: \"metricSelector is used to identify a specific time series within a given metric.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"targetValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"metricName\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of a metric used for autoscaling in metric system.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricSelector\": { SchemaProps: spec.SchemaProps{ Description: \"metricSelector is used to identify a specific time series within a given metric.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"currentValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentValue is the current value of the metric (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of metric averaged over autoscaled pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"metricName\", \"currentValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"configuration of a horizontal pod autoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"current information about the autoscaler.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec\", \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type describes the current condition\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition (True, False, Unknown)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the last time the condition transitioned from one status to another\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is the reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable explanation containing details about the transition\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"list of horizontal pod autoscaler objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"list of horizontal pod autoscaler objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"specification of a horizontal pod autoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleTargetRef\": { SchemaProps: spec.SchemaProps{ Description: \"reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\"), }, }, \"minReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"maxReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetCPUUtilizationPercentage\": { SchemaProps: spec.SchemaProps{ Description: \"target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"scaleTargetRef\", \"maxReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\"}, } } func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"current status of a horizontal pod autoscaler\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"most recent generation observed by this autoscaler.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastScaleTime\": { SchemaProps: spec.SchemaProps{ Description: \"last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"current number of replicas of pods managed by this autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"desired number of replicas of pods managed by this autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentCPUUtilizationPercentage\": { SchemaProps: spec.SchemaProps{ Description: \"current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"currentReplicas\", \"desiredReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enablednnPossible enum values:n - `\"ContainerResource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).n - `\"External\"` is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).n - `\"Object\"` is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).n - `\"Pods\"` is a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.n - `\"Resource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ContainerResource\", \"External\", \"Object\", \"Pods\", \"Resource\"}}, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v1.ObjectMetricSource\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v1.PodsMetricSource\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v1.ResourceMetricSource\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.\", Ref: ref(\"k8s.io/api/autoscaling/v1.ContainerResourceMetricSource\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v1.ExternalMetricSource\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.ContainerResourceMetricSource\", \"k8s.io/api/autoscaling/v1.ExternalMetricSource\", \"k8s.io/api/autoscaling/v1.ObjectMetricSource\", \"k8s.io/api/autoscaling/v1.PodsMetricSource\", \"k8s.io/api/autoscaling/v1.ResourceMetricSource\"}, } } func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricStatus describes the last-read state of a single metric.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enablednnPossible enum values:n - `\"ContainerResource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).n - `\"External\"` is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).n - `\"Object\"` is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).n - `\"Pods\"` is a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.n - `\"Resource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ContainerResource\", \"External\", \"Object\", \"Pods\", \"Resource\"}}, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v1.ObjectMetricStatus\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v1.PodsMetricStatus\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v1.ResourceMetricStatus\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v1.ExternalMetricStatus\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus\", \"k8s.io/api/autoscaling/v1.ExternalMetricStatus\", \"k8s.io/api/autoscaling/v1.ObjectMetricStatus\", \"k8s.io/api/autoscaling/v1.PodsMetricStatus\", \"k8s.io/api/autoscaling/v1.ResourceMetricStatus\"}, } } func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target is the described Kubernetes object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\"), }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetValue is the target value of the metric (as a quantity).\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"target\", \"metricName\", \"targetValue\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target is the described Kubernetes object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\"), }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentValue is the current value of the metric (as a quantity).\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"target\", \"metricName\", \"currentValue\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.CrossVersionObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"metricName\", \"targetAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"metricName\", \"currentAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"name\", \"currentAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scale represents a scaling request for a resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.ScaleSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v1.ScaleStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v1.ScaleSpec\", \"k8s.io/api/autoscaling/v1.ScaleStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_autoscaling_v1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleSpec describes the attributes of a scale subresource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"desired number of instances for the scaled object.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleStatus represents the current status of a scale subresource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"actual number of observed instances of the scaled object.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"replicas\"}, }, }, } } func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricTarget\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"target\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricValueStatus\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"Container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"current\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CrossVersionObjectReference contains enough information to let you identify the referred resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricTarget\"), }, }, }, Required: []string{\"metric\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricValueStatus\"), }, }, }, Required: []string{\"metric\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HPAScalingPolicy is a single policy which must hold true for a specified past interval.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is used to specify the scaling policy.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"Value contains the amount of change which is permitted by the policy. It must be greater than zero\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"periodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"type\", \"value\", \"periodSeconds\"}, }, }, } } func schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"stabilizationWindowSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selectPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"policies\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.HPAScalingPolicy\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.HPAScalingPolicy\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the current information about the autoscaler.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec\", \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleUp\": { SchemaProps: spec.SchemaProps{ Description: \"scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:n * increase no more than 4 pods per 60 secondsn * double the number of pods per 60 secondsnNo stabilization is used.\", Ref: ref(\"k8s.io/api/autoscaling/v2.HPAScalingRules\"), }, }, \"scaleDown\": { SchemaProps: spec.SchemaProps{ Description: \"scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).\", Ref: ref(\"k8s.io/api/autoscaling/v2.HPAScalingRules\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.HPAScalingRules\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type describes the current condition\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition (True, False, Unknown)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the last time the condition transitioned from one status to another\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is the reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable explanation containing details about the transition\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of horizontal pod autoscaler objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleTargetRef\": { SchemaProps: spec.SchemaProps{ Description: \"scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\"), }, }, \"minReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"maxReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"metrics\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricSpec\"), }, }, }, }, }, \"behavior\": { SchemaProps: spec.SchemaProps{ Description: \"behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.\", Ref: ref(\"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior\"), }, }, }, Required: []string{\"scaleTargetRef\", \"maxReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior\", \"k8s.io/api/autoscaling/v2.MetricSpec\"}, } } func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed by this autoscaler.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastScaleTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentMetrics\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"currentMetrics is the last read state of the metrics used by this autoscaler.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricStatus\"), }, }, }, }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition\"), }, }, }, }, }, }, Required: []string{\"desiredReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition\", \"k8s.io/api/autoscaling/v2.MetricStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricIdentifier defines the name and optionally selector for a metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the given metric\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2.ObjectMetricSource\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2.PodsMetricSource\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2.ResourceMetricSource\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.\", Ref: ref(\"k8s.io/api/autoscaling/v2.ContainerResourceMetricSource\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2.ExternalMetricSource\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.ContainerResourceMetricSource\", \"k8s.io/api/autoscaling/v2.ExternalMetricSource\", \"k8s.io/api/autoscaling/v2.ObjectMetricSource\", \"k8s.io/api/autoscaling/v2.PodsMetricSource\", \"k8s.io/api/autoscaling/v2.ResourceMetricSource\"}, } } func schema_k8sio_api_autoscaling_v2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricStatus describes the last-read state of a single metric.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2.ObjectMetricStatus\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2.PodsMetricStatus\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2.ResourceMetricStatus\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2.ExternalMetricStatus\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus\", \"k8s.io/api/autoscaling/v2.ExternalMetricStatus\", \"k8s.io/api/autoscaling/v2.ObjectMetricStatus\", \"k8s.io/api/autoscaling/v2.PodsMetricStatus\", \"k8s.io/api/autoscaling/v2.ResourceMetricStatus\"}, } } func schema_k8sio_api_autoscaling_v2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricTarget defines the target value, average value, or average utilization of a specific metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type represents whether the metric type is Utilization, Value, or AverageValue\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"value is the target value of the metric (as a quantity).\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValueStatus holds the current value for a metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"value\": { SchemaProps: spec.SchemaProps{ Description: \"value is the current value of the metric (as a quantity).\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"describedObject\": { SchemaProps: spec.SchemaProps{ Description: \"describedObject specifies the descriptions of a object,such as kind,name apiVersion\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricTarget\"), }, }, \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, }, Required: []string{\"describedObject\", \"target\", \"metric\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricValueStatus\"), }, }, \"describedObject\": { SchemaProps: spec.SchemaProps{ Description: \"DescribedObject specifies the descriptions of a object,such as kind,name apiVersion\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\"), }, }, }, Required: []string{\"metric\", \"current\", \"describedObject\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricTarget\"), }, }, }, Required: []string{\"metric\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricValueStatus\"), }, }, }, Required: []string{\"metric\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricTarget\"), }, }, }, Required: []string{\"name\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2.MetricValueStatus\"), }, }, }, Required: []string{\"name\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"currentAverageValue\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CrossVersionObjectReference contains enough information to let you identify the referred resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricSelector\": { SchemaProps: spec.SchemaProps{ Description: \"metricSelector is used to identify a specific time series within a given metric.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"targetValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"metricName\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of a metric used for autoscaling in metric system.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricSelector\": { SchemaProps: spec.SchemaProps{ Description: \"metricSelector is used to identify a specific time series within a given metric.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"currentValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentValue is the current value of the metric (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of metric averaged over autoscaled pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"metricName\", \"currentValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the current information about the autoscaler.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec\", \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type describes the current condition\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition (True, False, Unknown)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the last time the condition transitioned from one status to another\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is the reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable explanation containing details about the transition\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of horizontal pod autoscaler objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleTargetRef\": { SchemaProps: spec.SchemaProps{ Description: \"scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\"), }, }, \"minReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"maxReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"metrics\": { SchemaProps: spec.SchemaProps{ Description: \"metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.MetricSpec\"), }, }, }, }, }, }, Required: []string{\"scaleTargetRef\", \"maxReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2beta1.MetricSpec\"}, } } func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed by this autoscaler.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastScaleTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentMetrics\": { SchemaProps: spec.SchemaProps{ Description: \"currentMetrics is the last read state of the metrics used by this autoscaler.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.MetricStatus\"), }, }, }, }, }, \"conditions\": { SchemaProps: spec.SchemaProps{ Description: \"conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition\"), }, }, }, }, }, }, Required: []string{\"currentReplicas\", \"desiredReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition\", \"k8s.io/api/autoscaling/v2beta1.MetricStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ObjectMetricSource\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.PodsMetricSource\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ResourceMetricSource\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ExternalMetricSource\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource\", \"k8s.io/api/autoscaling/v2beta1.ExternalMetricSource\", \"k8s.io/api/autoscaling/v2beta1.ObjectMetricSource\", \"k8s.io/api/autoscaling/v2beta1.PodsMetricSource\", \"k8s.io/api/autoscaling/v2beta1.ResourceMetricSource\"}, } } func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricStatus describes the last-read state of a single metric.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.PodsMetricStatus\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus\", \"k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus\", \"k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus\", \"k8s.io/api/autoscaling/v2beta1.PodsMetricStatus\", \"k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target is the described Kubernetes object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\"), }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetValue is the target value of the metric (as a quantity).\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"target\", \"metricName\", \"targetValue\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target is the described Kubernetes object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\"), }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentValue is the current value of the metric (as a quantity).\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"target\", \"metricName\", \"currentValue\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"metricName\", \"targetAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"metricName is the name of the metric in question\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"metricName\", \"currentAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"currentAverageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentAverageValue\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"name\", \"currentAverageValue\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricTarget\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"target\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"), }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"Container is the name of the container in the pods of the scaling target\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"current\", \"container\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CrossVersionObjectReference contains enough information to let you identify the referred resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricTarget\"), }, }, }, Required: []string{\"metric\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"), }, }, }, Required: []string{\"metric\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HPAScalingPolicy is a single policy which must hold true for a specified past interval.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is used to specify the scaling policy.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"Value contains the amount of change which is permitted by the policy. It must be greater than zero\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"periodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"type\", \"value\", \"periodSeconds\"}, }, }, } } func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"stabilizationWindowSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selectPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"policies\": { SchemaProps: spec.SchemaProps{ Description: \"policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the current information about the autoscaler.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec\", \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleUp\": { SchemaProps: spec.SchemaProps{ Description: \"scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:n * increase no more than 4 pods per 60 secondsn * double the number of pods per 60 secondsnNo stabilization is used.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HPAScalingRules\"), }, }, \"scaleDown\": { SchemaProps: spec.SchemaProps{ Description: \"scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HPAScalingRules\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.HPAScalingRules\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type describes the current condition\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition (True, False, Unknown)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the last time the condition transitioned from one status to another\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is the reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable explanation containing details about the transition\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata is the standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of horizontal pod autoscaler objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scaleTargetRef\": { SchemaProps: spec.SchemaProps{ Description: \"scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\"), }, }, \"minReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"maxReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"metrics\": { SchemaProps: spec.SchemaProps{ Description: \"metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricSpec\"), }, }, }, }, }, \"behavior\": { SchemaProps: spec.SchemaProps{ Description: \"behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior\"), }, }, }, Required: []string{\"scaleTargetRef\", \"maxReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior\", \"k8s.io/api/autoscaling/v2beta2.MetricSpec\"}, } } func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration is the most recent generation observed by this autoscaler.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastScaleTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"currentReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentMetrics\": { SchemaProps: spec.SchemaProps{ Description: \"currentMetrics is the last read state of the metrics used by this autoscaler.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricStatus\"), }, }, }, }, }, \"conditions\": { SchemaProps: spec.SchemaProps{ Description: \"conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition\"), }, }, }, }, }, }, Required: []string{\"currentReplicas\", \"desiredReplicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition\", \"k8s.io/api/autoscaling/v2beta2.MetricStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricIdentifier defines the name and optionally selector for a metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the given metric\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ObjectMetricSource\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.PodsMetricSource\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ResourceMetricSource\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ExternalMetricSource\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource\", \"k8s.io/api/autoscaling/v2beta2.ExternalMetricSource\", \"k8s.io/api/autoscaling/v2beta2.ObjectMetricSource\", \"k8s.io/api/autoscaling/v2beta2.PodsMetricSource\", \"k8s.io/api/autoscaling/v2beta2.ResourceMetricSource\"}, } } func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricStatus describes the last-read state of a single metric.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus\"), }, }, \"pods\": { SchemaProps: spec.SchemaProps{ Description: \"pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.PodsMetricStatus\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus\"), }, }, \"containerResource\": { SchemaProps: spec.SchemaProps{ Description: \"container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus\"), }, }, \"external\": { SchemaProps: spec.SchemaProps{ Description: \"external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\", Ref: ref(\"k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus\", \"k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus\", \"k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus\", \"k8s.io/api/autoscaling/v2beta2.PodsMetricStatus\", \"k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricTarget defines the target value, average value, or average utilization of a specific metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type represents whether the metric type is Utilization, Value, or AverageValue\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"value is the target value of the metric (as a quantity).\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the target value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValueStatus holds the current value for a metric\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"value\": { SchemaProps: spec.SchemaProps{ Description: \"value is the current value of the metric (as a quantity).\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageValue\": { SchemaProps: spec.SchemaProps{ Description: \"averageValue is the current value of the average of the metric across all relevant pods (as a quantity)\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"averageUtilization\": { SchemaProps: spec.SchemaProps{ Description: \"currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"describedObject\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricTarget\"), }, }, \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, }, Required: []string{\"describedObject\", \"target\", \"metric\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"), }, }, \"describedObject\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\"), }, }, }, Required: []string{\"metric\", \"current\", \"describedObject\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference\", \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricTarget\"), }, }, }, Required: []string{\"metric\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metric\": { SchemaProps: spec.SchemaProps{ Description: \"metric identifies the target metric by name and selector\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\"), }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"), }, }, }, Required: []string{\"metric\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricIdentifier\", \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"target specifies the target value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricTarget\"), }, }, }, Required: []string{\"name\", \"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricTarget\"}, } } func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the resource in question.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"current\": { SchemaProps: spec.SchemaProps{ Description: \"current contains the current value for the given metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"), }, }, }, Required: []string{\"name\", \"current\"}, }, }, Dependencies: []string{ \"k8s.io/api/autoscaling/v2beta2.MetricValueStatus\"}, } } func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJob represents the configuration of a single cron job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.CronJobSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.CronJobStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.CronJobSpec\", \"k8s.io/api/batch/v1.CronJobStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobList is a collection of cron jobs.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CronJobs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.CronJob\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.CronJob\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobSpec describes how the job execution will look like and when it will actually run.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"schedule\": { SchemaProps: spec.SchemaProps{ Description: \"The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"startingDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"concurrencyPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new onennPossible enum values:n - `\"Allow\"` allows CronJobs to run concurrently.n - `\"Forbid\"` forbids concurrent runs, skipping next run if previous hasn't finished yet.n - `\"Replace\"` cancels currently running job and replaces it with a new one.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Allow\", \"Forbid\", \"Replace\"}}, }, \"suspend\": { SchemaProps: spec.SchemaProps{ Description: \"This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"jobTemplate\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the job that will be created when executing a CronJob.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobTemplateSpec\"), }, }, \"successfulJobsHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"failedJobsHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"schedule\", \"jobTemplate\"}, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.JobTemplateSpec\"}, } } func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobStatus represents the current state of a cron job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"active\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"A list of pointers to currently running jobs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, }, }, \"lastScheduleTime\": { SchemaProps: spec.SchemaProps{ Description: \"Information when was the last time the job was successfully scheduled.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastSuccessfulTime\": { SchemaProps: spec.SchemaProps{ Description: \"Information when was the last time the job successfully completed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Job represents the configuration of a single job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.JobSpec\", \"k8s.io/api/batch/v1.JobStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobCondition describes current state of a job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of job condition, Complete or Failed.nnPossible enum values:n - `\"Complete\"` means the job has completed its execution.n - `\"Failed\"` means the job has failed its execution.n - `\"Suspended\"` means the job has been suspended.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Complete\", \"Failed\", \"Suspended\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastProbeTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition was checked.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transit from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobList is a collection of jobs.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of Jobs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.Job\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.Job\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobSpec describes how the job execution will look like.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"parallelism\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"completions\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"activeDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"backoffLimit\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the number of retries before marking this job failed. Defaults to 6\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"manualSelector\": { SchemaProps: spec.SchemaProps{ Description: \"manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"ttlSecondsAfterFinished\": { SchemaProps: spec.SchemaProps{ Description: \"ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"completionMode\": { SchemaProps: spec.SchemaProps{ Description: \"CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.nn`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.nn`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.nnThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.\", Type: []string{\"string\"}, Format: \"\", }, }, \"suspend\": { SchemaProps: spec.SchemaProps{ Description: \"Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobStatus represents the current state of a Job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobCondition\"), }, }, }, }, }, \"startTime\": { SchemaProps: spec.SchemaProps{ Description: \"Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"completionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"active\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pending and running pods.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"succeeded\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods which reached phase Succeeded.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"failed\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods which reached phase Failed.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"completedIndexes\": { SchemaProps: spec.SchemaProps{ Description: \"CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"uncountedTerminatedPods\": { SchemaProps: spec.SchemaProps{ Description: \"UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.nnThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the correspondingn counter.nnThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.\", Ref: ref(\"k8s.io/api/batch/v1.UncountedTerminatedPods\"), }, }, \"ready\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods which have a Ready condition.nnThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.JobCondition\", \"k8s.io/api/batch/v1.UncountedTerminatedPods\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_batch_v1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobTemplateSpec describes the data a Job should have when created from a template\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.JobSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"succeeded\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Succeeded holds UIDs of succeeded Pods.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"failed\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Failed holds UIDs of failed Pods.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJob represents the configuration of a single cron job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1beta1.CronJobSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1beta1.CronJobStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1beta1.CronJobSpec\", \"k8s.io/api/batch/v1beta1.CronJobStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobList is a collection of cron jobs.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CronJobs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1beta1.CronJob\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1beta1.CronJob\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobSpec describes how the job execution will look like and when it will actually run.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"schedule\": { SchemaProps: spec.SchemaProps{ Description: \"The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"startingDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"concurrencyPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one\", Type: []string{\"string\"}, Format: \"\", }, }, \"suspend\": { SchemaProps: spec.SchemaProps{ Description: \"This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"jobTemplate\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the job that will be created when executing a CronJob.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1beta1.JobTemplateSpec\"), }, }, \"successfulJobsHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"failedJobsHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"schedule\", \"jobTemplate\"}, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1beta1.JobTemplateSpec\"}, } } func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobStatus represents the current state of a cron job.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"active\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"A list of pointers to currently running jobs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, }, }, \"lastScheduleTime\": { SchemaProps: spec.SchemaProps{ Description: \"Information when was the last time the job was successfully scheduled.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastSuccessfulTime\": { SchemaProps: spec.SchemaProps{ Description: \"Information when was the last time the job successfully completed.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_batch_v1beta1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobTemplate describes a template for creating copies of a predefined pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1beta1.JobTemplateSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1beta1.JobTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobTemplateSpec describes the data a Job should have when created from a template\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/batch/v1.JobSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/batch/v1.JobSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.nnKubelets use this API to obtain:n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).nnThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1.CertificateSigningRequestSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1.CertificateSigningRequestStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1.CertificateSigningRequestSpec\", \"k8s.io/api/certificates/v1.CertificateSigningRequestStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".nnAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.nnA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.nnA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.nnApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.nnOnly one condition of a given type is allowed.nnPossible enum values:n - `\"Approved\"` Approved indicates the request was approved and should be issued by the signer.n - `\"Denied\"` Denied indicates the request was denied and should not be issued by the signer.n - `\"Failed\"` Failed indicates the signer failed to issue the certificate.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Approved\", \"Denied\", \"Failed\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason indicates a brief reason for the request state\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message contains a human readable message with details about the request state\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastUpdateTime is the time of the last update to this condition\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequestList is a collection of CertificateSigningRequest objects\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a collection of CertificateSigningRequest objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1.CertificateSigningRequest\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1.CertificateSigningRequest\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequestSpec contains the certificate request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"request\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"signerName\": { SchemaProps: spec.SchemaProps{ Description: \"signerName indicates the requested signer, and is a qualified name.nnList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.nnWell-known Kubernetes signers are:n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.nnMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signersnnCustom signerNames can also be specified. The signer defines:n 1. Trust distribution: how trust (CA bundles) are distributed.n 2. Permitted subjects: and behavior when a disallowed subject is requested.n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.n 4. Required, permitted, or forbidden key usages / extended key usages.n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.n 6. Whether or not requests for CA certificates are allowed.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.nnThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.nnCertificate signers may not honor this field for various reasons:nn 1. Old signer that is unaware of the field (such as the in-treen implementations prior to v1.22)n 2. Signer whose configured maximum is shorter than the requested durationn 3. Signer whose configured minimum is longer than the requested durationnnThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.nnAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"usages\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"usages specifies a set of key usages requested in the issued certificate.nnRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".nnRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".nnValid values are:n \"signing\", \"digital signature\", \"content commitment\",n \"key encipherment\", \"key agreement\", \"data encipherment\",n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",n \"server auth\", \"client auth\",n \"code signing\", \"email protection\", \"s/mime\",n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"username\": { SchemaProps: spec.SchemaProps{ Description: \"username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, }, Required: []string{\"request\", \"signerName\"}, }, }, } } func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1.CertificateSigningRequestCondition\"), }, }, }, }, }, \"certificate\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.nnIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.nnValidation requirements:n 1. certificate must contain one or more PEM blocks.n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded datan must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,n to allow for explanatory text as described in section 5.2 of RFC7468.nnIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.nnThe certificate is encoded in PEM format.nnWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:nn base64(n -----BEGIN CERTIFICATE-----n ...n -----END CERTIFICATE-----n )\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1.CertificateSigningRequestCondition\"}, } } func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Describes a certificate signing request\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Derived information about the request.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec\", \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"brief reason for the request state\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"human readable message with details about the request state\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"timestamp for the last update to this condition\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1beta1.CertificateSigningRequest\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1beta1.CertificateSigningRequest\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CertificateSigningRequestSpec contains the certificate request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"request\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Base64-encoded PKCS#10 CSR data\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"signerName\": { SchemaProps: spec.SchemaProps{ Description: \"Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:n 1. If it's a kubelet client certificate, it is assignedn \"kubernetes.io/kube-apiserver-client-kubelet\".n 2. If it's a kubelet serving certificate, it is assignedn \"kubernetes.io/kubelet-serving\".n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.nnThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.nnCertificate signers may not honor this field for various reasons:nn 1. Old signer that is unaware of the field (such as the in-treen implementations prior to v1.22)n 2. Signer whose configured maximum is shorter than the requested durationn 3. Signer whose configured minimum is longer than the requested durationnnThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.nnAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"usages\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3n https://tools.ietf.org/html/rfc5280#section-4.2.1.12nValid values are:n \"signing\",n \"digital signature\",n \"content commitment\",n \"key encipherment\",n \"key agreement\",n \"data encipherment\",n \"cert sign\",n \"crl sign\",n \"encipher only\",n \"decipher only\",n \"any\",n \"server auth\",n \"client auth\",n \"code signing\",n \"email protection\",n \"s/mime\",n \"ipsec end system\",n \"ipsec tunnel\",n \"ipsec user\",n \"timestamping\",n \"ocsp signing\",n \"microsoft sgc\",n \"netscape sgc\"\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"username\": { SchemaProps: spec.SchemaProps{ Description: \"Information about the requesting user. See user.Info interface for details.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID information about the requesting user. See user.Info interface for details.\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Group information about the requesting user. See user.Info interface for details.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"extra\": { SchemaProps: spec.SchemaProps{ Description: \"Extra information about the requesting user. See user.Info interface for details.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, }, Required: []string{\"request\"}, }, }, } } func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Conditions applied to the request, such as approval or denial.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition\"), }, }, }, }, }, \"certificate\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"If request was approved, the controller will place the issued certificate here.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition\"}, } } func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Lease defines a lease concept.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/coordination/v1.LeaseSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/coordination/v1.LeaseSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaseList is a list of Lease objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/coordination/v1.Lease\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/coordination/v1.Lease\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaseSpec is a specification of a Lease.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"holderIdentity\": { SchemaProps: spec.SchemaProps{ Description: \"holderIdentity contains the identity of the holder of a current lease.\", Type: []string{\"string\"}, Format: \"\", }, }, \"leaseDurationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"acquireTime\": { SchemaProps: spec.SchemaProps{ Description: \"acquireTime is a time when the current lease was acquired.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"renewTime\": { SchemaProps: spec.SchemaProps{ Description: \"renewTime is a time when the current holder of a lease has last updated the lease.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"leaseTransitions\": { SchemaProps: spec.SchemaProps{ Description: \"leaseTransitions is the number of transitions of a lease between holders.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"}, } } func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Lease defines a lease concept.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/coordination/v1beta1.LeaseSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/coordination/v1beta1.LeaseSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaseList is a list of Lease objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/coordination/v1beta1.Lease\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/coordination/v1beta1.Lease\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaseSpec is a specification of a Lease.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"holderIdentity\": { SchemaProps: spec.SchemaProps{ Description: \"holderIdentity contains the identity of the holder of a current lease.\", Type: []string{\"string\"}, Format: \"\", }, }, \"leaseDurationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"acquireTime\": { SchemaProps: spec.SchemaProps{ Description: \"acquireTime is a time when the current lease was acquired.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"renewTime\": { SchemaProps: spec.SchemaProps{ Description: \"renewTime is a time when the current holder of a lease has last updated the lease.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"leaseTransitions\": { SchemaProps: spec.SchemaProps{ Description: \"leaseTransitions is the number of transitions of a lease between holders.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"}, } } func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Persistent Disk resource in AWS.nnAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeID\": { SchemaProps: spec.SchemaProps{ Description: \"volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Type: []string{\"string\"}, Format: \"\", }, }, \"partition\": { SchemaProps: spec.SchemaProps{ Description: \"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"volumeID\"}, }, }, } } func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Affinity is a group of affinity scheduling rules.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nodeAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"Describes node affinity scheduling rules for the pod.\", Ref: ref(\"k8s.io/api/core/v1.NodeAffinity\"), }, }, \"podAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\", Ref: ref(\"k8s.io/api/core/v1.PodAffinity\"), }, }, \"podAntiAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\", Ref: ref(\"k8s.io/api/core/v1.PodAntiAffinity\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeAffinity\", \"k8s.io/api/core/v1.PodAffinity\", \"k8s.io/api/core/v1.PodAntiAffinity\"}, } } func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AttachedVolume describes a volume attached to a node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the attached volume\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"devicePath\": { SchemaProps: spec.SchemaProps{ Description: \"DevicePath represents the device path where the volume should be available\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"devicePath\"}, }, }, } } func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"preferAvoidPods\": { SchemaProps: spec.SchemaProps{ Description: \"Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PreferAvoidPodsEntry\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PreferAvoidPodsEntry\"}, } } func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"diskName\": { SchemaProps: spec.SchemaProps{ Description: \"diskName is the Name of the data disk in the blob storage\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"diskURI\": { SchemaProps: spec.SchemaProps{ Description: \"diskURI is the URI of data disk in the blob storage\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"cachingMode\": { SchemaProps: spec.SchemaProps{ Description: \"cachingMode is the Host Caching mode: None, Read Only, Read Write.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"diskName\", \"diskURI\"}, }, }, } } func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"secretName is the name of secret that contains Azure Storage Account Name and Key\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"shareName\": { SchemaProps: spec.SchemaProps{ Description: \"shareName is the azure Share Name\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretNamespace\": { SchemaProps: spec.SchemaProps{ Description: \"secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"secretName\", \"shareName\"}, }, }, } } func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"secretName is the name of secret that contains Azure Storage Account Name and Key\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"shareName\": { SchemaProps: spec.SchemaProps{ Description: \"shareName is the azure share Name\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"secretName\", \"shareName\"}, }, }, } } func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"target\": { SchemaProps: spec.SchemaProps{ Description: \"The target object that you want to bind to the standard object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, Required: []string{\"target\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents storage that is managed by an external CSI volume driver (Beta feature)\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the driver to use for this volume. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeHandle\": { SchemaProps: spec.SchemaProps{ Description: \"volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"volumeAttributes of the volume to publish.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"controllerPublishSecretRef\": { SchemaProps: spec.SchemaProps{ Description: \"controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"nodeStageSecretRef\": { SchemaProps: spec.SchemaProps{ Description: \"nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"nodePublishSecretRef\": { SchemaProps: spec.SchemaProps{ Description: \"nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"controllerExpandSecretRef\": { SchemaProps: spec.SchemaProps{ Description: \"controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, }, Required: []string{\"driver\", \"volumeHandle\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a source location of a volume to mount, managed by an external CSI driver\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeAttributes\": { SchemaProps: spec.SchemaProps{ Description: \"volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nodePublishSecretRef\": { SchemaProps: spec.SchemaProps{ Description: \"nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, }, Required: []string{\"driver\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Adds and removes POSIX capabilities from running containers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"add\": { SchemaProps: spec.SchemaProps{ Description: \"Added capabilities\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"drop\": { SchemaProps: spec.SchemaProps{ Description: \"Removed capabilities\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"monitors\": { SchemaProps: spec.SchemaProps{ Description: \"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"user is Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretFile\": { SchemaProps: spec.SchemaProps{ Description: \"secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"monitors\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"monitors\": { SchemaProps: spec.SchemaProps{ Description: \"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretFile\": { SchemaProps: spec.SchemaProps{ Description: \"secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"monitors\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeID\": { SchemaProps: spec.SchemaProps{ Description: \"volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, }, Required: []string{\"volumeID\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeID\": { SchemaProps: spec.SchemaProps{ Description: \"volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, }, Required: []string{\"volumeID\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClientIPConfig represents the configurations of Client IP based session affinity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Information about the condition of a component.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of condition for a component. Valid value: \"Healthy\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Message about the condition for a component. For example, information about a health check.\", Type: []string{\"string\"}, Format: \"\", }, }, \"error\": { SchemaProps: spec.SchemaProps{ Description: \"Condition error code for a component. For example, a health check error code.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, } } func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of component conditions observed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ComponentCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ComponentCondition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ComponentStatus objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ComponentStatus\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ComponentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConfigMap holds configuration data for pods to consume.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"immutable\": { SchemaProps: spec.SchemaProps{ Description: \"Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"binaryData\": { SchemaProps: spec.SchemaProps{ Description: \"BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.nnThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"Specify whether the ConfigMap must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Selects a key from a ConfigMap.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"key\": { SchemaProps: spec.SchemaProps{ Description: \"The key to select.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"Specify whether the ConfigMap or its key must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"key\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConfigMapList is a resource containing a list of ConfigMap objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of ConfigMaps.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ConfigMap\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ConfigMap\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.\", Type: []string{\"string\"}, Format: \"\", }, }, \"kubeletConfigKey\": { SchemaProps: spec.SchemaProps{ Description: \"KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"namespace\", \"name\", \"kubeletConfigKey\"}, }, }, } } func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Adapts a ConfigMap into a projected volume.nnThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.KeyToPath\"), }, }, }, }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"optional specify whether the ConfigMap or its keys must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.KeyToPath\"}, } } func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Adapts a ConfigMap into a volume.nnThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.KeyToPath\"), }, }, }, }, }, \"defaultMode\": { SchemaProps: spec.SchemaProps{ Description: \"defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"optional specify whether the ConfigMap or its keys must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.KeyToPath\"}, } } func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A single application container that you want to run within a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.\", Type: []string{\"string\"}, Format: \"\", }, }, \"command\": { SchemaProps: spec.SchemaProps{ Description: \"Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"workingDir\": { SchemaProps: spec.SchemaProps{ Description: \"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"containerPort\", \"protocol\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"containerPort\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerPort\"), }, }, }, }, }, \"envFrom\": { SchemaProps: spec.SchemaProps{ Description: \"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvFromSource\"), }, }, }, }, }, \"env\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of environment variables to set in the container. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvVar\"), }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceRequirements\"), }, }, \"volumeMounts\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"mountPath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Pod volumes to mount into the container's filesystem. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeMount\"), }, }, }, }, }, \"volumeDevices\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"devicePath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"volumeDevices is the list of block devices to be used by the container.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeDevice\"), }, }, }, }, }, \"livenessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"readinessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"startupProbe\": { SchemaProps: spec.SchemaProps{ Description: \"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"lifecycle\": { SchemaProps: spec.SchemaProps{ Description: \"Actions that the management system should take in response to container lifecycle events. Cannot be updated.\", Ref: ref(\"k8s.io/api/core/v1.Lifecycle\"), }, }, \"terminationMessagePath\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"terminationMessagePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.nnPossible enum values:n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"FallbackToLogsOnError\", \"File\"}}, }, \"imagePullPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-imagesnnPossible enum values:n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Always\", \"IfNotPresent\", \"Never\"}}, }, \"securityContext\": { SchemaProps: spec.SchemaProps{ Description: \"SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\", Ref: ref(\"k8s.io/api/core/v1.SecurityContext\"), }, }, \"stdin\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stdinOnce\": { SchemaProps: spec.SchemaProps{ Description: \"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tty\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerPort\", \"k8s.io/api/core/v1.EnvFromSource\", \"k8s.io/api/core/v1.EnvVar\", \"k8s.io/api/core/v1.Lifecycle\", \"k8s.io/api/core/v1.Probe\", \"k8s.io/api/core/v1.ResourceRequirements\", \"k8s.io/api/core/v1.SecurityContext\", \"k8s.io/api/core/v1.VolumeDevice\", \"k8s.io/api/core/v1.VolumeMount\"}, } } func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Describe a container image\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"names\": { SchemaProps: spec.SchemaProps{ Description: \"Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"sizeBytes\": { SchemaProps: spec.SchemaProps{ Description: \"The size of the image in bytes.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerPort represents a network port in a single container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostPort\": { SchemaProps: spec.SchemaProps{ Description: \"Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"containerPort\": { SchemaProps: spec.SchemaProps{ Description: \"Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".nnPossible enum values:n - `\"SCTP\"` is the SCTP protocol.n - `\"TCP\"` is the TCP protocol.n - `\"UDP\"` is the UDP protocol.\", Default: \"TCP\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"SCTP\", \"TCP\", \"UDP\"}}, }, \"hostIP\": { SchemaProps: spec.SchemaProps{ Description: \"What host IP to bind the external port to.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"containerPort\"}, }, }, } } func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"waiting\": { SchemaProps: spec.SchemaProps{ Description: \"Details about a waiting container\", Ref: ref(\"k8s.io/api/core/v1.ContainerStateWaiting\"), }, }, \"running\": { SchemaProps: spec.SchemaProps{ Description: \"Details about a running container\", Ref: ref(\"k8s.io/api/core/v1.ContainerStateRunning\"), }, }, \"terminated\": { SchemaProps: spec.SchemaProps{ Description: \"Details about a terminated container\", Ref: ref(\"k8s.io/api/core/v1.ContainerStateTerminated\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerStateRunning\", \"k8s.io/api/core/v1.ContainerStateTerminated\", \"k8s.io/api/core/v1.ContainerStateWaiting\"}, } } func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerStateRunning is a running state of a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"startedAt\": { SchemaProps: spec.SchemaProps{ Description: \"Time at which the container was last (re-)started\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerStateTerminated is a terminated state of a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"exitCode\": { SchemaProps: spec.SchemaProps{ Description: \"Exit status from the last termination of the container\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"signal\": { SchemaProps: spec.SchemaProps{ Description: \"Signal from the last termination of the container\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) reason from the last termination of the container\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Message regarding the last termination of the container\", Type: []string{\"string\"}, Format: \"\", }, }, \"startedAt\": { SchemaProps: spec.SchemaProps{ Description: \"Time at which previous execution of the container started\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"finishedAt\": { SchemaProps: spec.SchemaProps{ Description: \"Time at which the container last terminated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"containerID\": { SchemaProps: spec.SchemaProps{ Description: \"Container's ID in the format '://'\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"exitCode\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerStateWaiting is a waiting state of a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) reason the container is not yet running.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Message regarding why the container is not yet running.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerStatus contains details for the current status of this container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"state\": { SchemaProps: spec.SchemaProps{ Description: \"Details about the container's current condition.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerState\"), }, }, \"lastState\": { SchemaProps: spec.SchemaProps{ Description: \"Details about the container's last termination condition.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerState\"), }, }, \"ready\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies whether the container has passed its readiness probe.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"restartCount\": { SchemaProps: spec.SchemaProps{ Description: \"The number of times the container has been restarted.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"imageID\": { SchemaProps: spec.SchemaProps{ Description: \"ImageID of the container's image.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"containerID\": { SchemaProps: spec.SchemaProps{ Description: \"Container's ID in the format '://'.\", Type: []string{\"string\"}, Format: \"\", }, }, \"started\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"ready\", \"restartCount\", \"image\", \"imageID\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerState\"}, } } func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonEndpoint contains information about a single Daemon endpoint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Port\": { SchemaProps: spec.SchemaProps{ Description: \"Port number of the given endpoint.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"Port\"}, }, }, } } func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of DownwardAPIVolume file\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.DownwardAPIVolumeFile\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.DownwardAPIVolumeFile\"}, } } func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DownwardAPIVolumeFile represents information to create the file containing the pod field\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldRef\": { SchemaProps: spec.SchemaProps{ Description: \"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.\", Ref: ref(\"k8s.io/api/core/v1.ObjectFieldSelector\"), }, }, \"resourceFieldRef\": { SchemaProps: spec.SchemaProps{ Description: \"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.\", Ref: ref(\"k8s.io/api/core/v1.ResourceFieldSelector\"), }, }, \"mode\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"path\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectFieldSelector\", \"k8s.io/api/core/v1.ResourceFieldSelector\"}, } } func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of downward API volume file\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.DownwardAPIVolumeFile\"), }, }, }, }, }, \"defaultMode\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.DownwardAPIVolumeFile\"}, } } func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"medium\": { SchemaProps: spec.SchemaProps{ Description: \"medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\", Type: []string{\"string\"}, Format: \"\", }, }, \"sizeLimit\": { SchemaProps: spec.SchemaProps{ Description: \"sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointAddress is a tuple that describes single IP address.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ip\": { SchemaProps: spec.SchemaProps{ Description: \"The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostname\": { SchemaProps: spec.SchemaProps{ Description: \"The Hostname of this endpoint\", Type: []string{\"string\"}, Format: \"\", }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetRef\": { SchemaProps: spec.SchemaProps{ Description: \"Reference to object providing the endpoint.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, Required: []string{\"ip\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\"}, } } func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointPort is a tuple that describes a single port.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port number of the endpoint.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.nnPossible enum values:n - `\"SCTP\"` is the SCTP protocol.n - `\"TCP\"` is the TCP protocol.n - `\"UDP\"` is the UDP protocol.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"SCTP\", \"TCP\", \"UDP\"}}, }, \"appProtocol\": { SchemaProps: spec.SchemaProps{ Description: \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"port\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:n {n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]n }nThe resulting set of endpoints can be viewed as:n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],n b: [ 10.10.1.1:309, 10.10.2.2:309 ]\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"addresses\": { SchemaProps: spec.SchemaProps{ Description: \"IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EndpointAddress\"), }, }, }, }, }, \"notReadyAddresses\": { SchemaProps: spec.SchemaProps{ Description: \"IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EndpointAddress\"), }, }, }, }, }, \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"Port numbers available on the related IP addresses.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EndpointPort\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EndpointAddress\", \"k8s.io/api/core/v1.EndpointPort\"}, } } func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Endpoints is a collection of endpoints that implement the actual service. Example:n Name: \"mysvc\",n Subsets: [n {n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]n },n {n Addresses: [{\"ip\": \"10.10.3.3\"}],n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]n },n ]\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subsets\": { SchemaProps: spec.SchemaProps{ Description: \"The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EndpointSubset\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EndpointSubset\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointsList is a list of endpoints.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of endpoints.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Endpoints\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Endpoints\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EnvFromSource represents the source of a set of ConfigMaps\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"prefix\": { SchemaProps: spec.SchemaProps{ Description: \"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.\", Type: []string{\"string\"}, Format: \"\", }, }, \"configMapRef\": { SchemaProps: spec.SchemaProps{ Description: \"The ConfigMap to select from\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapEnvSource\"), }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"The Secret to select from\", Ref: ref(\"k8s.io/api/core/v1.SecretEnvSource\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ConfigMapEnvSource\", \"k8s.io/api/core/v1.SecretEnvSource\"}, } } func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EnvVar represents an environment variable present in a Container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the environment variable. Must be a C_IDENTIFIER.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"valueFrom\": { SchemaProps: spec.SchemaProps{ Description: \"Source for the environment variable's value. Cannot be used if value is not empty.\", Ref: ref(\"k8s.io/api/core/v1.EnvVarSource\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EnvVarSource\"}, } } func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EnvVarSource represents a source for the value of an EnvVar.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"fieldRef\": { SchemaProps: spec.SchemaProps{ Description: \"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\", Ref: ref(\"k8s.io/api/core/v1.ObjectFieldSelector\"), }, }, \"resourceFieldRef\": { SchemaProps: spec.SchemaProps{ Description: \"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.\", Ref: ref(\"k8s.io/api/core/v1.ResourceFieldSelector\"), }, }, \"configMapKeyRef\": { SchemaProps: spec.SchemaProps{ Description: \"Selects a key of a ConfigMap.\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapKeySelector\"), }, }, \"secretKeyRef\": { SchemaProps: spec.SchemaProps{ Description: \"Selects a key of a secret in the pod's namespace\", Ref: ref(\"k8s.io/api/core/v1.SecretKeySelector\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ConfigMapKeySelector\", \"k8s.io/api/core/v1.ObjectFieldSelector\", \"k8s.io/api/core/v1.ResourceFieldSelector\", \"k8s.io/api/core/v1.SecretKeySelector\"}, } } func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.nnTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.nnThis is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images\", Type: []string{\"string\"}, Format: \"\", }, }, \"command\": { SchemaProps: spec.SchemaProps{ Description: \"Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"workingDir\": { SchemaProps: spec.SchemaProps{ Description: \"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"containerPort\", \"protocol\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"containerPort\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Ports are not allowed for ephemeral containers.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerPort\"), }, }, }, }, }, \"envFrom\": { SchemaProps: spec.SchemaProps{ Description: \"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvFromSource\"), }, }, }, }, }, \"env\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of environment variables to set in the container. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvVar\"), }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceRequirements\"), }, }, \"volumeMounts\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"mountPath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeMount\"), }, }, }, }, }, \"volumeDevices\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"devicePath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"volumeDevices is the list of block devices to be used by the container.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeDevice\"), }, }, }, }, }, \"livenessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"readinessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"startupProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"lifecycle\": { SchemaProps: spec.SchemaProps{ Description: \"Lifecycle is not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Lifecycle\"), }, }, \"terminationMessagePath\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"terminationMessagePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.nnPossible enum values:n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"FallbackToLogsOnError\", \"File\"}}, }, \"imagePullPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-imagesnnPossible enum values:n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Always\", \"IfNotPresent\", \"Never\"}}, }, \"securityContext\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.\", Ref: ref(\"k8s.io/api/core/v1.SecurityContext\"), }, }, \"stdin\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stdinOnce\": { SchemaProps: spec.SchemaProps{ Description: \"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tty\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"targetContainerName\": { SchemaProps: spec.SchemaProps{ Description: \"If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.nnThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerPort\", \"k8s.io/api/core/v1.EnvFromSource\", \"k8s.io/api/core/v1.EnvVar\", \"k8s.io/api/core/v1.Lifecycle\", \"k8s.io/api/core/v1.Probe\", \"k8s.io/api/core/v1.ResourceRequirements\", \"k8s.io/api/core/v1.SecurityContext\", \"k8s.io/api/core/v1.VolumeDevice\", \"k8s.io/api/core/v1.VolumeMount\"}, } } func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images\", Type: []string{\"string\"}, Format: \"\", }, }, \"command\": { SchemaProps: spec.SchemaProps{ Description: \"Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"workingDir\": { SchemaProps: spec.SchemaProps{ Description: \"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"containerPort\", \"protocol\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"containerPort\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Ports are not allowed for ephemeral containers.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerPort\"), }, }, }, }, }, \"envFrom\": { SchemaProps: spec.SchemaProps{ Description: \"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvFromSource\"), }, }, }, }, }, \"env\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of environment variables to set in the container. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EnvVar\"), }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceRequirements\"), }, }, \"volumeMounts\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"mountPath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeMount\"), }, }, }, }, }, \"volumeDevices\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"devicePath\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"volumeDevices is the list of block devices to be used by the container.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeDevice\"), }, }, }, }, }, \"livenessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"readinessProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"startupProbe\": { SchemaProps: spec.SchemaProps{ Description: \"Probes are not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Probe\"), }, }, \"lifecycle\": { SchemaProps: spec.SchemaProps{ Description: \"Lifecycle is not allowed for ephemeral containers.\", Ref: ref(\"k8s.io/api/core/v1.Lifecycle\"), }, }, \"terminationMessagePath\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"terminationMessagePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.nnPossible enum values:n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"FallbackToLogsOnError\", \"File\"}}, }, \"imagePullPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-imagesnnPossible enum values:n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Always\", \"IfNotPresent\", \"Never\"}}, }, \"securityContext\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.\", Ref: ref(\"k8s.io/api/core/v1.SecurityContext\"), }, }, \"stdin\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stdinOnce\": { SchemaProps: spec.SchemaProps{ Description: \"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tty\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerPort\", \"k8s.io/api/core/v1.EnvFromSource\", \"k8s.io/api/core/v1.EnvVar\", \"k8s.io/api/core/v1.Lifecycle\", \"k8s.io/api/core/v1.Probe\", \"k8s.io/api/core/v1.ResourceRequirements\", \"k8s.io/api/core/v1.SecurityContext\", \"k8s.io/api/core/v1.VolumeDevice\", \"k8s.io/api/core/v1.VolumeMount\"}, } } func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents an ephemeral volume that is handled by a normal storage driver.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeClaimTemplate\": { SchemaProps: spec.SchemaProps{ Description: \"Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).nnAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.nnThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.nnRequired, must not be nil.\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimTemplate\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeClaimTemplate\"}, } } func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"involvedObject\": { SchemaProps: spec.SchemaProps{ Description: \"The object that this event is about.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"This should be a short, machine understandable string that gives the reason for the transition into the object's current status.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human-readable description of the status of this operation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"source\": { SchemaProps: spec.SchemaProps{ Description: \"The component reporting this event. Should be a short machine understandable string.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EventSource\"), }, }, \"firstTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The time at which the most recent occurrence of this event was recorded.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"count\": { SchemaProps: spec.SchemaProps{ Description: \"The number of times this event has occurred.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of this event (Normal, Warning), new types could be added in the future\", Type: []string{\"string\"}, Format: \"\", }, }, \"eventTime\": { SchemaProps: spec.SchemaProps{ Description: \"Time when this Event was first observed.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"series\": { SchemaProps: spec.SchemaProps{ Description: \"Data about the Event series this event represents or nil if it's a singleton Event.\", Ref: ref(\"k8s.io/api/core/v1.EventSeries\"), }, }, \"action\": { SchemaProps: spec.SchemaProps{ Description: \"What action was taken/failed regarding to the Regarding object.\", Type: []string{\"string\"}, Format: \"\", }, }, \"related\": { SchemaProps: spec.SchemaProps{ Description: \"Optional secondary object for more complex actions.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"reportingComponent\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"reportingInstance\": { SchemaProps: spec.SchemaProps{ Description: \"ID of the controller instance, e.g. `kubelet-xyzf`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"metadata\", \"involvedObject\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EventSeries\", \"k8s.io/api/core/v1.EventSource\", \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of events.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of events\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Event\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"count\": { SchemaProps: spec.SchemaProps{ Description: \"Number of occurrences in this series up to the last heartbeat time\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"lastObservedTime\": { SchemaProps: spec.SchemaProps{ Description: \"Time of the last occurrence observed\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"}, } } func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventSource contains information for an event.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"component\": { SchemaProps: spec.SchemaProps{ Description: \"Component from which the event is generated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Node name on which the event is generated.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecAction describes a \"run in container\" action.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"command\": { SchemaProps: spec.SchemaProps{ Description: \"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"targetWWNs\": { SchemaProps: spec.SchemaProps{ Description: \"targetWWNs is Optional: FC target worldwide names (WWNs)\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"lun\": { SchemaProps: spec.SchemaProps{ Description: \"lun is Optional: FC target lun number\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"wwids\": { SchemaProps: spec.SchemaProps{ Description: \"wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the driver to use for this volume.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"options\": { SchemaProps: spec.SchemaProps{ Description: \"options is Optional: this field holds extra command options if any.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"driver\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the driver to use for this volume.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"options\": { SchemaProps: spec.SchemaProps{ Description: \"options is Optional: this field holds extra command options if any.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"driver\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"datasetName\": { SchemaProps: spec.SchemaProps{ Description: \"datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated\", Type: []string{\"string\"}, Format: \"\", }, }, \"datasetUUID\": { SchemaProps: spec.SchemaProps{ Description: \"datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Persistent Disk resource in Google Compute Engine.nnA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"pdName\": { SchemaProps: spec.SchemaProps{ Description: \"pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Type: []string{\"string\"}, Format: \"\", }, }, \"partition\": { SchemaProps: spec.SchemaProps{ Description: \"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"pdName\"}, }, }, } } func schema_k8sio_api_core_v1_GRPCAction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"port\": { SchemaProps: spec.SchemaProps{ Description: \"Port number of the gRPC service. Number must be in the range 1 to 65535.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"service\": { SchemaProps: spec.SchemaProps{ Description: \"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).nnIf this is not specified, the default behavior is defined by gRPC.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"port\"}, }, }, } } func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.nnDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"repository\": { SchemaProps: spec.SchemaProps{ Description: \"repository is the URL\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"revision is the commit hash for the specified revision.\", Type: []string{\"string\"}, Format: \"\", }, }, \"directory\": { SchemaProps: spec.SchemaProps{ Description: \"directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"repository\"}, }, }, } } func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"endpoints\": { SchemaProps: spec.SchemaProps{ Description: \"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"endpointsNamespace\": { SchemaProps: spec.SchemaProps{ Description: \"endpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"endpoints\", \"path\"}, }, }, } } func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"endpoints\": { SchemaProps: spec.SchemaProps{ Description: \"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"endpoints\", \"path\"}, }, }, } } func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPGetAction describes an action based on HTTP Get requests.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path to access on the HTTP server.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.\", Type: []string{\"string\"}, Format: \"\", }, }, \"scheme\": { SchemaProps: spec.SchemaProps{ Description: \"Scheme to use for connecting to the host. Defaults to HTTP.nnPossible enum values:n - `\"HTTP\"` means that the scheme used will be http://n - `\"HTTPS\"` means that the scheme used will be https://\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"HTTP\", \"HTTPS\"}}, }, \"httpHeaders\": { SchemaProps: spec.SchemaProps{ Description: \"Custom headers to set in the request. HTTP allows repeated headers.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.HTTPHeader\"), }, }, }, }, }, }, Required: []string{\"port\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.HTTPHeader\", \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPHeader describes a custom header to be used in HTTP probes\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The header field name\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"The header field value\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"value\"}, }, }, } } func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ip\": { SchemaProps: spec.SchemaProps{ Description: \"IP address of the host file entry.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostnames\": { SchemaProps: spec.SchemaProps{ Description: \"Hostnames for the above IP address.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"path\"}, }, }, } } func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"targetPortal\": { SchemaProps: spec.SchemaProps{ Description: \"targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"iqn\": { SchemaProps: spec.SchemaProps{ Description: \"iqn is Target iSCSI Qualified Name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lun\": { SchemaProps: spec.SchemaProps{ Description: \"lun is iSCSI Target Lun number.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"iscsiInterface\": { SchemaProps: spec.SchemaProps{ Description: \"iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"portals\": { SchemaProps: spec.SchemaProps{ Description: \"portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"chapAuthDiscovery\": { SchemaProps: spec.SchemaProps{ Description: \"chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"chapAuthSession\": { SchemaProps: spec.SchemaProps{ Description: \"chapAuthSession defines whether support iSCSI Session CHAP authentication\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is the CHAP Secret for iSCSI target and initiator authentication\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"initiatorName\": { SchemaProps: spec.SchemaProps{ Description: \"initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"targetPortal\", \"iqn\", \"lun\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"targetPortal\": { SchemaProps: spec.SchemaProps{ Description: \"targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"iqn\": { SchemaProps: spec.SchemaProps{ Description: \"iqn is the target iSCSI Qualified Name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lun\": { SchemaProps: spec.SchemaProps{ Description: \"lun represents iSCSI Target Lun number.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"iscsiInterface\": { SchemaProps: spec.SchemaProps{ Description: \"iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"portals\": { SchemaProps: spec.SchemaProps{ Description: \"portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"chapAuthDiscovery\": { SchemaProps: spec.SchemaProps{ Description: \"chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"chapAuthSession\": { SchemaProps: spec.SchemaProps{ Description: \"chapAuthSession defines whether support iSCSI Session CHAP authentication\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is the CHAP Secret for iSCSI target and initiator authentication\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, \"initiatorName\": { SchemaProps: spec.SchemaProps{ Description: \"initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"targetPortal\", \"iqn\", \"lun\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Maps a string key to a path within a volume.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { SchemaProps: spec.SchemaProps{ Description: \"key is the key to project.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"mode\": { SchemaProps: spec.SchemaProps{ Description: \"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"key\", \"path\"}, }, }, } } func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"postStart\": { SchemaProps: spec.SchemaProps{ Description: \"PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\", Ref: ref(\"k8s.io/api/core/v1.LifecycleHandler\"), }, }, \"preStop\": { SchemaProps: spec.SchemaProps{ Description: \"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\", Ref: ref(\"k8s.io/api/core/v1.LifecycleHandler\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LifecycleHandler\"}, } } func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"exec\": { SchemaProps: spec.SchemaProps{ Description: \"Exec specifies the action to take.\", Ref: ref(\"k8s.io/api/core/v1.ExecAction\"), }, }, \"httpGet\": { SchemaProps: spec.SchemaProps{ Description: \"HTTPGet specifies the http request to perform.\", Ref: ref(\"k8s.io/api/core/v1.HTTPGetAction\"), }, }, \"tcpSocket\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.\", Ref: ref(\"k8s.io/api/core/v1.TCPSocketAction\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ExecAction\", \"k8s.io/api/core/v1.HTTPGetAction\", \"k8s.io/api/core/v1.TCPSocketAction\"}, } } func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitRange sets resource usage limits for each kind of resource in a Namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LimitRangeSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LimitRangeSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitRangeItem defines a min/max usage limit for any resource that matches on kind.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of resource that this limit applies to.nnPossible enum values:n - `\"Container\"` Limit that applies to all containers in a namespacen - `\"PersistentVolumeClaim\"` Limit that applies to all persistent volume claims in a namespacen - `\"Pod\"` Limit that applies to all pods in a namespace\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Container\", \"PersistentVolumeClaim\", \"Pod\"}}, }, \"max\": { SchemaProps: spec.SchemaProps{ Description: \"Max usage constraints on this kind by resource name.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"min\": { SchemaProps: spec.SchemaProps{ Description: \"Min usage constraints on this kind by resource name.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"default\": { SchemaProps: spec.SchemaProps{ Description: \"Default resource requirement limit value by resource name if resource limit is omitted.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"defaultRequest\": { SchemaProps: spec.SchemaProps{ Description: \"DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"maxLimitRequestRatio\": { SchemaProps: spec.SchemaProps{ Description: \"MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"type\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitRangeList is a list of LimitRange items.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LimitRange\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LimitRange\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitRangeSpec defines a min/max usage limit for resources that match on kind.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"limits\": { SchemaProps: spec.SchemaProps{ Description: \"Limits is the list of LimitRangeItem objects that are enforced.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LimitRangeItem\"), }, }, }, }, }, }, Required: []string{\"limits\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LimitRangeItem\"}, } } func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"List holds a list of objects, which may not be known by the server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ip\": { SchemaProps: spec.SchemaProps{ Description: \"IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostname\": { SchemaProps: spec.SchemaProps{ Description: \"Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)\", Type: []string{\"string\"}, Format: \"\", }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Ports is a list of records of service ports If used, every port defined in the service should have an entry in it\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PortStatus\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PortStatus\"}, } } func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LoadBalancerStatus represents the status of a load-balancer.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ingress\": { SchemaProps: spec.SchemaProps{ Description: \"Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LoadBalancerIngress\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LoadBalancerIngress\"}, } } func schema_k8sio_api_core_v1_LocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Local represents directly-attached storage with node affinity (Beta feature)\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"path\"}, }, }, } } func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"server\": { SchemaProps: spec.SchemaProps{ Description: \"server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"server\", \"path\"}, }, }, } } func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Namespace provides a scope for Names. Use of multiple namespaces is optional.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NamespaceSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NamespaceStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NamespaceSpec\", \"k8s.io/api/core/v1.NamespaceStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NamespaceCondition contains details about state of namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of namespace controller condition.nnPossible enum values:n - `\"NamespaceContentRemaining\"` contains information about resources remaining in a namespace.n - `\"NamespaceDeletionContentFailure\"` contains information about namespace deleter errors during deletion of resources.n - `\"NamespaceDeletionDiscoveryFailure\"` contains information about namespace deleter errors during resource discovery.n - `\"NamespaceDeletionGroupVersionParsingFailure\"` contains information about namespace deleter errors parsing GV for legacy types.n - `\"NamespaceFinalizersRemaining\"` contains information about which finalizers are on resources remaining in a namespace.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"NamespaceContentRemaining\", \"NamespaceDeletionContentFailure\", \"NamespaceDeletionDiscoveryFailure\", \"NamespaceDeletionGroupVersionParsingFailure\", \"NamespaceFinalizersRemaining\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NamespaceList is a list of Namespaces.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Namespace\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Namespace\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_NamespaceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NamespaceSpec describes the attributes on a Namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"finalizers\": { SchemaProps: spec.SchemaProps{ Description: \"Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NamespaceStatus is information about the current status of a Namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"phase\": { SchemaProps: spec.SchemaProps{ Description: \"Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/nnPossible enum values:n - `\"Active\"` means the namespace is available for use in the systemn - `\"Terminating\"` means the namespace is undergoing graceful termination\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Active\", \"Terminating\"}}, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a namespace's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NamespaceCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NamespaceCondition\"}, } } func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSpec\", \"k8s.io/api/core/v1.NodeStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeAddress contains information for the node's address.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Node address type, one of Hostname, ExternalIP or InternalIP.nnPossible enum values:n - `\"ExternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeExternalIP. The IP it resolves to may or may not be a listed NodeExternalIP address.n - `\"ExternalIP\"` identifies an IP address which is, in some way, intended to be more usable from outside the cluster then an internal IP, though no specific semantics are defined. It may be a globally routable IP, though it is not required to be. External IPs may be assigned directly to an interface on the node, like a NodeInternalIP, or alternatively, packets sent to the external IP may be NAT'ed to an internal node IP rather than being delivered directly (making the IP less efficient for node-to-node traffic than a NodeInternalIP).n - `\"Hostname\"` identifies a name of the node. Although every node can be assumed to have a NodeAddress of this type, its exact syntax and semantics are not defined, and are not consistent between different clusters.n - `\"InternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeInternalIP. The IP it resolves to may or may not be a listed NodeInternalIP address.n - `\"InternalIP\"` identifies an IP address which is assigned to one of the node's network interfaces. Every node should have at least one address of this type. An internal IP is normally expected to be reachable from every other node, but may not be visible to hosts outside the cluster. By default it is assumed that kube-apiserver can reach node internal IPs, though it is possible to configure clusters where this is not the case. NodeInternalIP is the default type of node IP, and does not necessarily imply that the IP is ONLY reachable internally. If a node has multiple internal IPs, no specific semantics are assigned to the additional IPs.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ExternalDNS\", \"ExternalIP\", \"Hostname\", \"InternalDNS\", \"InternalIP\"}}, }, \"address\": { SchemaProps: spec.SchemaProps{ Description: \"The node address.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"address\"}, }, }, } } func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Node affinity is a group of node affinity scheduling rules.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"requiredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\", Ref: ref(\"k8s.io/api/core/v1.NodeSelector\"), }, }, \"preferredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PreferredSchedulingTerm\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSelector\", \"k8s.io/api/core/v1.PreferredSchedulingTerm\"}, } } func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeCondition contains condition information for a node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of node condition.nnPossible enum values:n - `\"DiskPressure\"` means the kubelet is under pressure due to insufficient available disk.n - `\"MemoryPressure\"` means the kubelet is under pressure due to insufficient available memory.n - `\"NetworkUnavailable\"` means that network for the node is not correctly configured.n - `\"PIDPressure\"` means the kubelet is under pressure due to insufficient available PID.n - `\"Ready\"` means kubelet is healthy and ready to accept pods.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"DiskPressure\", \"MemoryPressure\", \"NetworkUnavailable\", \"PIDPressure\", \"Ready\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastHeartbeatTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time we got an update on a given condition.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transit from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"configMap\": { SchemaProps: spec.SchemaProps{ Description: \"ConfigMap is a reference to a Node's ConfigMap\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapNodeConfigSource\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ConfigMapNodeConfigSource\"}, } } func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"assigned\": { SchemaProps: spec.SchemaProps{ Description: \"Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.\", Ref: ref(\"k8s.io/api/core/v1.NodeConfigSource\"), }, }, \"active\": { SchemaProps: spec.SchemaProps{ Description: \"Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.\", Ref: ref(\"k8s.io/api/core/v1.NodeConfigSource\"), }, }, \"lastKnownGood\": { SchemaProps: spec.SchemaProps{ Description: \"LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.\", Ref: ref(\"k8s.io/api/core/v1.NodeConfigSource\"), }, }, \"error\": { SchemaProps: spec.SchemaProps{ Description: \"Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeConfigSource\"}, } } func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeDaemonEndpoints lists ports opened by daemons running on the Node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kubeletEndpoint\": { SchemaProps: spec.SchemaProps{ Description: \"Endpoint on which Kubelet is listening.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.DaemonEndpoint\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.DaemonEndpoint\"}, } } func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeList is the whole list of all Nodes which have been registered with master.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of nodes\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Node\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Node\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_NodeProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeProxyOptions is the query options to a Node's proxy call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is the URL path to use for the current proxy request to node.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Capacity\": { SchemaProps: spec.SchemaProps{ Description: \"Capacity represents the available resources of a node\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"Capacity\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nodeSelectorTerms\": { SchemaProps: spec.SchemaProps{ Description: \"Required. A list of node selector terms. The terms are ORed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSelectorTerm\"), }, }, }, }, }, }, Required: []string{\"nodeSelectorTerms\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSelectorTerm\"}, } } func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { SchemaProps: spec.SchemaProps{ Description: \"The label key that the selector applies to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"operator\": { SchemaProps: spec.SchemaProps{ Description: \"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.nnPossible enum values:n - `\"DoesNotExist\"`n - `\"Exists\"`n - `\"Gt\"`n - `\"In\"`n - `\"Lt\"`n - `\"NotIn\"`\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"DoesNotExist\", \"Exists\", \"Gt\", \"In\", \"Lt\", \"NotIn\"}}, }, \"values\": { SchemaProps: spec.SchemaProps{ Description: \"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"key\", \"operator\"}, }, }, } } func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"matchExpressions\": { SchemaProps: spec.SchemaProps{ Description: \"A list of node selector requirements by node's labels.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSelectorRequirement\"), }, }, }, }, }, \"matchFields\": { SchemaProps: spec.SchemaProps{ Description: \"A list of node selector requirements by node's fields.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSelectorRequirement\"), }, }, }, }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSelectorRequirement\"}, } } func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeSpec describes the attributes that a node is created with.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"PodCIDR represents the pod IP range assigned to the node.\", Type: []string{\"string\"}, Format: \"\", }, }, \"podCIDRs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"providerID\": { SchemaProps: spec.SchemaProps{ Description: \"ID of the node assigned by the cloud provider in the format: ://\", Type: []string{\"string\"}, Format: \"\", }, }, \"unschedulable\": { SchemaProps: spec.SchemaProps{ Description: \"Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"taints\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the node's taints.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Taint\"), }, }, }, }, }, \"configSource\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed from Kubelets as of 1.24 and will be fully removed in 1.26.\", Ref: ref(\"k8s.io/api/core/v1.NodeConfigSource\"), }, }, \"externalID\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeConfigSource\", \"k8s.io/api/core/v1.Taint\"}, } } func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeStatus is information about the current status of a node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"capacity\": { SchemaProps: spec.SchemaProps{ Description: \"Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"allocatable\": { SchemaProps: spec.SchemaProps{ Description: \"Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"phase\": { SchemaProps: spec.SchemaProps{ Description: \"NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.nnPossible enum values:n - `\"Pending\"` means the node has been created/added by the system, but not configured.n - `\"Running\"` means the node has been configured and has Kubernetes components running.n - `\"Terminated\"` means the node has been removed from the cluster.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Pending\", \"Running\", \"Terminated\"}}, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeCondition\"), }, }, }, }, }, \"addresses\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeAddress\"), }, }, }, }, }, \"daemonEndpoints\": { SchemaProps: spec.SchemaProps{ Description: \"Endpoints of daemons running on the Node.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeDaemonEndpoints\"), }, }, \"nodeInfo\": { SchemaProps: spec.SchemaProps{ Description: \"Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSystemInfo\"), }, }, \"images\": { SchemaProps: spec.SchemaProps{ Description: \"List of container images on this node\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerImage\"), }, }, }, }, }, \"volumesInUse\": { SchemaProps: spec.SchemaProps{ Description: \"List of attachable volumes in use (mounted) by the node.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"volumesAttached\": { SchemaProps: spec.SchemaProps{ Description: \"List of volumes that are attached to the node.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.AttachedVolume\"), }, }, }, }, }, \"config\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the config assigned to the node via the dynamic Kubelet config feature.\", Ref: ref(\"k8s.io/api/core/v1.NodeConfigStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.AttachedVolume\", \"k8s.io/api/core/v1.ContainerImage\", \"k8s.io/api/core/v1.NodeAddress\", \"k8s.io/api/core/v1.NodeCondition\", \"k8s.io/api/core/v1.NodeConfigStatus\", \"k8s.io/api/core/v1.NodeDaemonEndpoints\", \"k8s.io/api/core/v1.NodeSystemInfo\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeSystemInfo is a set of ids/uuids to uniquely identify the node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"machineID\": { SchemaProps: spec.SchemaProps{ Description: \"MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"systemUUID\": { SchemaProps: spec.SchemaProps{ Description: \"SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"bootID\": { SchemaProps: spec.SchemaProps{ Description: \"Boot ID reported by the node.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kernelVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"osImage\": { SchemaProps: spec.SchemaProps{ Description: \"OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"containerRuntimeVersion\": { SchemaProps: spec.SchemaProps{ Description: \"ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kubeletVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Kubelet Version reported by the node.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kubeProxyVersion\": { SchemaProps: spec.SchemaProps{ Description: \"KubeProxy Version reported by the node.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"operatingSystem\": { SchemaProps: spec.SchemaProps{ Description: \"The Operating System reported by the node\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"architecture\": { SchemaProps: spec.SchemaProps{ Description: \"The Architecture reported by the node\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"machineID\", \"systemUUID\", \"bootID\", \"kernelVersion\", \"osImage\", \"containerRuntimeVersion\", \"kubeletVersion\", \"kubeProxyVersion\", \"operatingSystem\", \"architecture\"}, }, }, } } func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectFieldSelector selects an APIVersioned field of an object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldPath\": { SchemaProps: spec.SchemaProps{ Description: \"Path of the field to select in the specified API version.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"fieldPath\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectReference contains enough information to let you inspect or modify the referred object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldPath\": { SchemaProps: spec.SchemaProps{ Description: \"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeSpec\", \"k8s.io/api/core/v1.PersistentVolumeStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaim is a user's request for and claim to a persistent volume\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeClaimSpec\", \"k8s.io/api/core/v1.PersistentVolumeClaimStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimCondition contails details about state of pvc\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"nnnPossible enum values:n - `\"FileSystemResizePending\"` - controller resize is finished and a file system resize is pending on noden - `\"Resizing\"` - a user trigger resize of pvc has been started\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"FileSystemResizePending\", \"Resizing\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastProbeTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastProbeTime is the time we probed the condition.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is the human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimList is a list of PersistentVolumeClaim items.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaim\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeClaim\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"accessModes\": { SchemaProps: spec.SchemaProps{ Description: \"accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector is a label query over volumes to consider for binding.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceRequirements\"), }, }, \"volumeName\": { SchemaProps: spec.SchemaProps{ Description: \"volumeName is the binding reference to the PersistentVolume backing this claim.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storageClassName\": { SchemaProps: spec.SchemaProps{ Description: \"storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeMode\": { SchemaProps: spec.SchemaProps{ Description: \"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.\", Type: []string{\"string\"}, Format: \"\", }, }, \"dataSource\": { SchemaProps: spec.SchemaProps{ Description: \"dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.\", Ref: ref(\"k8s.io/api/core/v1.TypedLocalObjectReference\"), }, }, \"dataSourceRef\": { SchemaProps: spec.SchemaProps{ Description: \"dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRefn allows any non-core object, as well as PersistentVolumeClaim objects.n* While DataSource ignores disallowed values (dropping them), DataSourceRefn preserves all values, and generates an error if a disallowed value isn specified.n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.\", Ref: ref(\"k8s.io/api/core/v1.TypedLocalObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ResourceRequirements\", \"k8s.io/api/core/v1.TypedLocalObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimStatus is the current status of a persistent volume claim.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"phase\": { SchemaProps: spec.SchemaProps{ Description: \"phase represents the current phase of PersistentVolumeClaim.nnPossible enum values:n - `\"Bound\"` used for PersistentVolumeClaims that are boundn - `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost.n - `\"Pending\"` used for PersistentVolumeClaims that are not yet bound\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Bound\", \"Lost\", \"Pending\"}}, }, \"accessModes\": { SchemaProps: spec.SchemaProps{ Description: \"accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"capacity\": { SchemaProps: spec.SchemaProps{ Description: \"capacity represents the actual resources of the underlying volume.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimCondition\"), }, }, }, }, }, \"allocatedResources\": { SchemaProps: spec.SchemaProps{ Description: \"allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"resizeStatus\": { SchemaProps: spec.SchemaProps{ Description: \"resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeClaimCondition\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeClaimSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"claimName\": { SchemaProps: spec.SchemaProps{ Description: \"claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly Will force the ReadOnly setting in VolumeMounts. Default false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"claimName\"}, }, }, } } func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeList is a list of PersistentVolume items.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PersistentVolume\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolume\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"gcePersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Ref: ref(\"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\"), }, }, \"awsElasticBlockStore\": { SchemaProps: spec.SchemaProps{ Description: \"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Ref: ref(\"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\"), }, }, \"hostPath\": { SchemaProps: spec.SchemaProps{ Description: \"hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Ref: ref(\"k8s.io/api/core/v1.HostPathVolumeSource\"), }, }, \"glusterfs\": { SchemaProps: spec.SchemaProps{ Description: \"glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md\", Ref: ref(\"k8s.io/api/core/v1.GlusterfsPersistentVolumeSource\"), }, }, \"nfs\": { SchemaProps: spec.SchemaProps{ Description: \"nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Ref: ref(\"k8s.io/api/core/v1.NFSVolumeSource\"), }, }, \"rbd\": { SchemaProps: spec.SchemaProps{ Description: \"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md\", Ref: ref(\"k8s.io/api/core/v1.RBDPersistentVolumeSource\"), }, }, \"iscsi\": { SchemaProps: spec.SchemaProps{ Description: \"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.\", Ref: ref(\"k8s.io/api/core/v1.ISCSIPersistentVolumeSource\"), }, }, \"cinder\": { SchemaProps: spec.SchemaProps{ Description: \"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Ref: ref(\"k8s.io/api/core/v1.CinderPersistentVolumeSource\"), }, }, \"cephfs\": { SchemaProps: spec.SchemaProps{ Description: \"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.CephFSPersistentVolumeSource\"), }, }, \"fc\": { SchemaProps: spec.SchemaProps{ Description: \"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\", Ref: ref(\"k8s.io/api/core/v1.FCVolumeSource\"), }, }, \"flocker\": { SchemaProps: spec.SchemaProps{ Description: \"flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running\", Ref: ref(\"k8s.io/api/core/v1.FlockerVolumeSource\"), }, }, \"flexVolume\": { SchemaProps: spec.SchemaProps{ Description: \"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\", Ref: ref(\"k8s.io/api/core/v1.FlexPersistentVolumeSource\"), }, }, \"azureFile\": { SchemaProps: spec.SchemaProps{ Description: \"azureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureFilePersistentVolumeSource\"), }, }, \"vsphereVolume\": { SchemaProps: spec.SchemaProps{ Description: \"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"), }, }, \"quobyte\": { SchemaProps: spec.SchemaProps{ Description: \"quobyte represents a Quobyte mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.QuobyteVolumeSource\"), }, }, \"azureDisk\": { SchemaProps: spec.SchemaProps{ Description: \"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureDiskVolumeSource\"), }, }, \"photonPersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\"), }, }, \"portworxVolume\": { SchemaProps: spec.SchemaProps{ Description: \"portworxVolume represents a portworx volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PortworxVolumeSource\"), }, }, \"scaleIO\": { SchemaProps: spec.SchemaProps{ Description: \"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.ScaleIOPersistentVolumeSource\"), }, }, \"local\": { SchemaProps: spec.SchemaProps{ Description: \"local represents directly-attached storage with node affinity\", Ref: ref(\"k8s.io/api/core/v1.LocalVolumeSource\"), }, }, \"storageos\": { SchemaProps: spec.SchemaProps{ Description: \"storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md\", Ref: ref(\"k8s.io/api/core/v1.StorageOSPersistentVolumeSource\"), }, }, \"csi\": { SchemaProps: spec.SchemaProps{ Description: \"csi represents storage that is handled by an external CSI driver (Beta feature).\", Ref: ref(\"k8s.io/api/core/v1.CSIPersistentVolumeSource\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\", \"k8s.io/api/core/v1.AzureDiskVolumeSource\", \"k8s.io/api/core/v1.AzureFilePersistentVolumeSource\", \"k8s.io/api/core/v1.CSIPersistentVolumeSource\", \"k8s.io/api/core/v1.CephFSPersistentVolumeSource\", \"k8s.io/api/core/v1.CinderPersistentVolumeSource\", \"k8s.io/api/core/v1.FCVolumeSource\", \"k8s.io/api/core/v1.FlexPersistentVolumeSource\", \"k8s.io/api/core/v1.FlockerVolumeSource\", \"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.GlusterfsPersistentVolumeSource\", \"k8s.io/api/core/v1.HostPathVolumeSource\", \"k8s.io/api/core/v1.ISCSIPersistentVolumeSource\", \"k8s.io/api/core/v1.LocalVolumeSource\", \"k8s.io/api/core/v1.NFSVolumeSource\", \"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.PortworxVolumeSource\", \"k8s.io/api/core/v1.QuobyteVolumeSource\", \"k8s.io/api/core/v1.RBDPersistentVolumeSource\", \"k8s.io/api/core/v1.ScaleIOPersistentVolumeSource\", \"k8s.io/api/core/v1.StorageOSPersistentVolumeSource\", \"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeSpec is the specification of a persistent volume.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"capacity\": { SchemaProps: spec.SchemaProps{ Description: \"capacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"gcePersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Ref: ref(\"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\"), }, }, \"awsElasticBlockStore\": { SchemaProps: spec.SchemaProps{ Description: \"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Ref: ref(\"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\"), }, }, \"hostPath\": { SchemaProps: spec.SchemaProps{ Description: \"hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Ref: ref(\"k8s.io/api/core/v1.HostPathVolumeSource\"), }, }, \"glusterfs\": { SchemaProps: spec.SchemaProps{ Description: \"glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md\", Ref: ref(\"k8s.io/api/core/v1.GlusterfsPersistentVolumeSource\"), }, }, \"nfs\": { SchemaProps: spec.SchemaProps{ Description: \"nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Ref: ref(\"k8s.io/api/core/v1.NFSVolumeSource\"), }, }, \"rbd\": { SchemaProps: spec.SchemaProps{ Description: \"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md\", Ref: ref(\"k8s.io/api/core/v1.RBDPersistentVolumeSource\"), }, }, \"iscsi\": { SchemaProps: spec.SchemaProps{ Description: \"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.\", Ref: ref(\"k8s.io/api/core/v1.ISCSIPersistentVolumeSource\"), }, }, \"cinder\": { SchemaProps: spec.SchemaProps{ Description: \"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Ref: ref(\"k8s.io/api/core/v1.CinderPersistentVolumeSource\"), }, }, \"cephfs\": { SchemaProps: spec.SchemaProps{ Description: \"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.CephFSPersistentVolumeSource\"), }, }, \"fc\": { SchemaProps: spec.SchemaProps{ Description: \"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\", Ref: ref(\"k8s.io/api/core/v1.FCVolumeSource\"), }, }, \"flocker\": { SchemaProps: spec.SchemaProps{ Description: \"flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running\", Ref: ref(\"k8s.io/api/core/v1.FlockerVolumeSource\"), }, }, \"flexVolume\": { SchemaProps: spec.SchemaProps{ Description: \"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\", Ref: ref(\"k8s.io/api/core/v1.FlexPersistentVolumeSource\"), }, }, \"azureFile\": { SchemaProps: spec.SchemaProps{ Description: \"azureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureFilePersistentVolumeSource\"), }, }, \"vsphereVolume\": { SchemaProps: spec.SchemaProps{ Description: \"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"), }, }, \"quobyte\": { SchemaProps: spec.SchemaProps{ Description: \"quobyte represents a Quobyte mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.QuobyteVolumeSource\"), }, }, \"azureDisk\": { SchemaProps: spec.SchemaProps{ Description: \"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureDiskVolumeSource\"), }, }, \"photonPersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\"), }, }, \"portworxVolume\": { SchemaProps: spec.SchemaProps{ Description: \"portworxVolume represents a portworx volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PortworxVolumeSource\"), }, }, \"scaleIO\": { SchemaProps: spec.SchemaProps{ Description: \"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.ScaleIOPersistentVolumeSource\"), }, }, \"local\": { SchemaProps: spec.SchemaProps{ Description: \"local represents directly-attached storage with node affinity\", Ref: ref(\"k8s.io/api/core/v1.LocalVolumeSource\"), }, }, \"storageos\": { SchemaProps: spec.SchemaProps{ Description: \"storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md\", Ref: ref(\"k8s.io/api/core/v1.StorageOSPersistentVolumeSource\"), }, }, \"csi\": { SchemaProps: spec.SchemaProps{ Description: \"csi represents storage that is handled by an external CSI driver (Beta feature).\", Ref: ref(\"k8s.io/api/core/v1.CSIPersistentVolumeSource\"), }, }, \"accessModes\": { SchemaProps: spec.SchemaProps{ Description: \"accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"claimRef\": { SchemaProps: spec.SchemaProps{ Description: \"claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"persistentVolumeReclaimPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaimingnnPossible enum values:n - `\"Delete\"` means the volume will be deleted from Kubernetes on release from its claim. The volume plugin must support Deletion.n - `\"Recycle\"` means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim. The volume plugin must support Recycling.n - `\"Retain\"` means the volume will be left in its current phase (Released) for manual reclamation by the administrator. The default policy is Retain.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Delete\", \"Recycle\", \"Retain\"}}, }, \"storageClassName\": { SchemaProps: spec.SchemaProps{ Description: \"storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.\", Type: []string{\"string\"}, Format: \"\", }, }, \"mountOptions\": { SchemaProps: spec.SchemaProps{ Description: \"mountOptions is the list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"volumeMode\": { SchemaProps: spec.SchemaProps{ Description: \"volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.\", Type: []string{\"string\"}, Format: \"\", }, }, \"nodeAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.\", Ref: ref(\"k8s.io/api/core/v1.VolumeNodeAffinity\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\", \"k8s.io/api/core/v1.AzureDiskVolumeSource\", \"k8s.io/api/core/v1.AzureFilePersistentVolumeSource\", \"k8s.io/api/core/v1.CSIPersistentVolumeSource\", \"k8s.io/api/core/v1.CephFSPersistentVolumeSource\", \"k8s.io/api/core/v1.CinderPersistentVolumeSource\", \"k8s.io/api/core/v1.FCVolumeSource\", \"k8s.io/api/core/v1.FlexPersistentVolumeSource\", \"k8s.io/api/core/v1.FlockerVolumeSource\", \"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.GlusterfsPersistentVolumeSource\", \"k8s.io/api/core/v1.HostPathVolumeSource\", \"k8s.io/api/core/v1.ISCSIPersistentVolumeSource\", \"k8s.io/api/core/v1.LocalVolumeSource\", \"k8s.io/api/core/v1.NFSVolumeSource\", \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.PortworxVolumeSource\", \"k8s.io/api/core/v1.QuobyteVolumeSource\", \"k8s.io/api/core/v1.RBDPersistentVolumeSource\", \"k8s.io/api/core/v1.ScaleIOPersistentVolumeSource\", \"k8s.io/api/core/v1.StorageOSPersistentVolumeSource\", \"k8s.io/api/core/v1.VolumeNodeAffinity\", \"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeStatus is the current status of a persistent volume.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"phase\": { SchemaProps: spec.SchemaProps{ Description: \"phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phasennPossible enum values:n - `\"Available\"` used for PersistentVolumes that are not yet bound Available volumes are held by the binder and matched to PersistentVolumeClaimsn - `\"Bound\"` used for PersistentVolumes that are boundn - `\"Failed\"` used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claimn - `\"Pending\"` used for PersistentVolumes that are not availablen - `\"Released\"` used for PersistentVolumes where the bound PersistentVolumeClaim was deleted released volumes must be recycled before becoming available again this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Available\", \"Bound\", \"Failed\", \"Pending\", \"Released\"}}, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable message indicating details about why the volume is in this state.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Photon Controller persistent disk resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"pdID\": { SchemaProps: spec.SchemaProps{ Description: \"pdID is the ID that identifies Photon Controller persistent disk\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"pdID\"}, }, }, } } func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodSpec\", \"k8s.io/api/core/v1.PodStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Pod affinity is a group of inter pod affinity scheduling rules.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"requiredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodAffinityTerm\"), }, }, }, }, }, \"preferredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.WeightedPodAffinityTerm\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodAffinityTerm\", \"k8s.io/api/core/v1.WeightedPodAffinityTerm\"}, } } func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"labelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over a set of resources, in this case pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"namespaces\": { SchemaProps: spec.SchemaProps{ Description: \"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"topologyKey\": { SchemaProps: spec.SchemaProps{ Description: \"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"topologyKey\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Pod anti affinity is a group of inter pod anti affinity scheduling rules.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"requiredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodAffinityTerm\"), }, }, }, }, }, \"preferredDuringSchedulingIgnoredDuringExecution\": { SchemaProps: spec.SchemaProps{ Description: \"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.WeightedPodAffinityTerm\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodAffinityTerm\", \"k8s.io/api/core/v1.WeightedPodAffinityTerm\"}, } } func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodAttachOptions is the query options to a Pod's remote attach call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"stdin\": { SchemaProps: spec.SchemaProps{ Description: \"Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stdout\": { SchemaProps: spec.SchemaProps{ Description: \"Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stderr\": { SchemaProps: spec.SchemaProps{ Description: \"Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tty\": { SchemaProps: spec.SchemaProps{ Description: \"TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"The container in which to execute the command. Defaults to only container if there is only one container in the pod.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodCondition contains details for the current condition of this pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditionsnnPossible enum values:n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.n - `\"Initialized\"` means that all init containers in the pod have started successfully.n - `\"PodScheduled\"` represents status of the scheduling process for this pod.n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ContainersReady\", \"Initialized\", \"PodScheduled\", \"Ready\"}}, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastProbeTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time we probed the condition.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nameservers\": { SchemaProps: spec.SchemaProps{ Description: \"A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"searches\": { SchemaProps: spec.SchemaProps{ Description: \"A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"options\": { SchemaProps: spec.SchemaProps{ Description: \"A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodDNSConfigOption\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodDNSConfigOption\"}, } } func schema_k8sio_api_core_v1_PodDNSConfigOption(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDNSConfigOption defines DNS resolver options of a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodExecOptions is the query options to a Pod's remote exec call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"stdin\": { SchemaProps: spec.SchemaProps{ Description: \"Redirect the standard input stream of the pod for this call. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stdout\": { SchemaProps: spec.SchemaProps{ Description: \"Redirect the standard output stream of the pod for this call.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"stderr\": { SchemaProps: spec.SchemaProps{ Description: \"Redirect the standard error stream of the pod for this call.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tty\": { SchemaProps: spec.SchemaProps{ Description: \"TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"Container in which to execute the command. Defaults to only container if there is only one container in the pod.\", Type: []string{\"string\"}, Format: \"\", }, }, \"command\": { SchemaProps: spec.SchemaProps{ Description: \"Command is the remote command to execute. argv array. Not executed within a shell.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"command\"}, }, }, } } func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IP address information for entries in the (plural) PodIPs field. Each entry includes:n IP: An IP address allocated to the pod. Routable at least within the cluster.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ip\": { SchemaProps: spec.SchemaProps{ Description: \"ip is an IP address (IPv4 or IPv6) assigned to the pod\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodList is a list of Pods.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Pod\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Pod\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodLogOptions is the query options for a Pod's logs REST call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"container\": { SchemaProps: spec.SchemaProps{ Description: \"The container for which to stream logs. Defaults to only container if there is one container in the pod.\", Type: []string{\"string\"}, Format: \"\", }, }, \"follow\": { SchemaProps: spec.SchemaProps{ Description: \"Follow the log stream of the pod. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"previous\": { SchemaProps: spec.SchemaProps{ Description: \"Return previous terminated container logs. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"sinceSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"sinceTime\": { SchemaProps: spec.SchemaProps{ Description: \"An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"timestamps\": { SchemaProps: spec.SchemaProps{ Description: \"If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tailLines\": { SchemaProps: spec.SchemaProps{ Description: \"If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"limitBytes\": { SchemaProps: spec.SchemaProps{ Description: \"If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"insecureSkipTLSVerifyBackend\": { SchemaProps: spec.SchemaProps{ Description: \"insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_PodOS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodOS defines the OS parameters of a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"List of ports to forward Required when using WebSockets\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_PodProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodProxyOptions is the query options to a Pod's proxy call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is the URL path to use for the current proxy request to pod.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodReadinessGate contains the reference to a pod condition\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditionType\": { SchemaProps: spec.SchemaProps{ Description: \"ConditionType refers to a condition in the pod's condition list with matching type.nnPossible enum values:n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.n - `\"Initialized\"` means that all init containers in the pod have started successfully.n - `\"PodScheduled\"` represents status of the scheduling process for this pod.n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ContainersReady\", \"Initialized\", \"PodScheduled\", \"Ready\"}}, }, }, Required: []string{\"conditionType\"}, }, }, } } func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"seLinuxOptions\": { SchemaProps: spec.SchemaProps{ Description: \"The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.\", Ref: ref(\"k8s.io/api/core/v1.SELinuxOptions\"), }, }, \"windowsOptions\": { SchemaProps: spec.SchemaProps{ Description: \"The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.\", Ref: ref(\"k8s.io/api/core/v1.WindowsSecurityContextOptions\"), }, }, \"runAsUser\": { SchemaProps: spec.SchemaProps{ Description: \"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"runAsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"runAsNonRoot\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"supplementalGroups\": { SchemaProps: spec.SchemaProps{ Description: \"A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, \"fsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:nn1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----nnIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"sysctls\": { SchemaProps: spec.SchemaProps{ Description: \"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Sysctl\"), }, }, }, }, }, \"fsGroupChangePolicy\": { SchemaProps: spec.SchemaProps{ Description: \"fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"string\"}, Format: \"\", }, }, \"seccompProfile\": { SchemaProps: spec.SchemaProps{ Description: \"The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.\", Ref: ref(\"k8s.io/api/core/v1.SeccompProfile\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SELinuxOptions\", \"k8s.io/api/core/v1.SeccompProfile\", \"k8s.io/api/core/v1.Sysctl\", \"k8s.io/api/core/v1.WindowsSecurityContextOptions\"}, } } func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Describes the class of pods that should avoid this node. Exactly one field should be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podController\": { SchemaProps: spec.SchemaProps{ Description: \"Reference to controller whose pods should avoid this node.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference\"}, } } func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSpec is a description of a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumes\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge,retainKeys\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Volume\"), }, }, }, }, }, \"initContainers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Container\"), }, }, }, }, }, \"containers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Container\"), }, }, }, }, }, \"ephemeralContainers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EphemeralContainer\"), }, }, }, }, }, \"restartPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policynnPossible enum values:n - `\"Always\"`n - `\"Never\"`n - `\"OnFailure\"`\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Always\", \"Never\", \"OnFailure\"}}, }, \"terminationGracePeriodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"activeDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"dnsPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.nnPossible enum values:n - `\"ClusterFirst\"` indicates that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings.n - `\"ClusterFirstWithHostNet\"` indicates that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings.n - `\"Default\"` indicates that the pod should use the default (as determined by kubelet) DNS settings.n - `\"None\"` indicates that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ClusterFirst\", \"ClusterFirstWithHostNet\", \"Default\", \"None\"}}, }, \"nodeSelector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"serviceAccountName\": { SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/\", Type: []string{\"string\"}, Format: \"\", }, }, \"serviceAccount\": { SchemaProps: spec.SchemaProps{ Description: \"DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.\", Type: []string{\"string\"}, Format: \"\", }, }, \"automountServiceAccountToken\": { SchemaProps: spec.SchemaProps{ Description: \"AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostNetwork\": { SchemaProps: spec.SchemaProps{ Description: \"Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostPID\": { SchemaProps: spec.SchemaProps{ Description: \"Use the host's pid namespace. Optional: Default to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostIPC\": { SchemaProps: spec.SchemaProps{ Description: \"Use the host's ipc namespace. Optional: Default to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"shareProcessNamespace\": { SchemaProps: spec.SchemaProps{ Description: \"Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"securityContext\": { SchemaProps: spec.SchemaProps{ Description: \"SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.\", Ref: ref(\"k8s.io/api/core/v1.PodSecurityContext\"), }, }, \"imagePullSecrets\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, }, }, }, \"hostname\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.\", Type: []string{\"string\"}, Format: \"\", }, }, \"subdomain\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.\", Type: []string{\"string\"}, Format: \"\", }, }, \"affinity\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the pod's scheduling constraints\", Ref: ref(\"k8s.io/api/core/v1.Affinity\"), }, }, \"schedulerName\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.\", Type: []string{\"string\"}, Format: \"\", }, }, \"tolerations\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the pod's tolerations.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Toleration\"), }, }, }, }, }, \"hostAliases\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"ip\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.HostAlias\"), }, }, }, }, }, \"priorityClassName\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.\", Type: []string{\"string\"}, Format: \"\", }, }, \"priority\": { SchemaProps: spec.SchemaProps{ Description: \"The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"dnsConfig\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.\", Ref: ref(\"k8s.io/api/core/v1.PodDNSConfig\"), }, }, \"readinessGates\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodReadinessGate\"), }, }, }, }, }, \"runtimeClassName\": { SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableServiceLinks\": { SchemaProps: spec.SchemaProps{ Description: \"EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"preemptionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.\", Type: []string{\"string\"}, Format: \"\", }, }, \"overhead\": { SchemaProps: spec.SchemaProps{ Description: \"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"topologySpreadConstraints\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"topologyKey\", \"whenUnsatisfiable\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"topologyKey\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySpreadConstraint\"), }, }, }, }, }, \"setHostnameAsFQDN\": { SchemaProps: spec.SchemaProps{ Description: \"If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"os\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.nnIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptionsnnIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature\", Ref: ref(\"k8s.io/api/core/v1.PodOS\"), }, }, }, Required: []string{\"containers\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Affinity\", \"k8s.io/api/core/v1.Container\", \"k8s.io/api/core/v1.EphemeralContainer\", \"k8s.io/api/core/v1.HostAlias\", \"k8s.io/api/core/v1.LocalObjectReference\", \"k8s.io/api/core/v1.PodDNSConfig\", \"k8s.io/api/core/v1.PodOS\", \"k8s.io/api/core/v1.PodReadinessGate\", \"k8s.io/api/core/v1.PodSecurityContext\", \"k8s.io/api/core/v1.Toleration\", \"k8s.io/api/core/v1.TopologySpreadConstraint\", \"k8s.io/api/core/v1.Volume\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"phase\": { SchemaProps: spec.SchemaProps{ Description: \"The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:nnPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.nnMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phasennPossible enum values:n - `\"Failed\"` means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system).n - `\"Pending\"` means the pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host.n - `\"Running\"` means the pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted.n - `\"Succeeded\"` means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers.n - `\"Unknown\"` means that for some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095)\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Failed\", \"Pending\", \"Running\", \"Succeeded\", \"Unknown\"}}, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodCondition\"), }, }, }, }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about why the pod is in this condition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'\", Type: []string{\"string\"}, Format: \"\", }, }, \"nominatedNodeName\": { SchemaProps: spec.SchemaProps{ Description: \"nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostIP\": { SchemaProps: spec.SchemaProps{ Description: \"IP address of the host to which the pod is assigned. Empty if not yet scheduled.\", Type: []string{\"string\"}, Format: \"\", }, }, \"podIP\": { SchemaProps: spec.SchemaProps{ Description: \"IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"podIPs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"ip\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodIP\"), }, }, }, }, }, \"startTime\": { SchemaProps: spec.SchemaProps{ Description: \"RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"initContainerStatuses\": { SchemaProps: spec.SchemaProps{ Description: \"The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerStatus\"), }, }, }, }, }, \"containerStatuses\": { SchemaProps: spec.SchemaProps{ Description: \"The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerStatus\"), }, }, }, }, }, \"qosClass\": { SchemaProps: spec.SchemaProps{ Description: \"The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.mdnnPossible enum values:n - `\"BestEffort\"` is the BestEffort qos class.n - `\"Burstable\"` is the Burstable qos class.n - `\"Guaranteed\"` is the Guaranteed qos class.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"BestEffort\", \"Burstable\", \"Guaranteed\"}}, }, \"ephemeralContainerStatuses\": { SchemaProps: spec.SchemaProps{ Description: \"Status for any ephemeral containers that have run in this pod. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ContainerStatus\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ContainerStatus\", \"k8s.io/api/core/v1.PodCondition\", \"k8s.io/api/core/v1.PodIP\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodTemplate describes a template for creating copies of a predefined pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodTemplateList is a list of PodTemplates.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of pod templates\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplate\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplate\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodTemplateSpec describes the data a pod should have when created from a template\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"port\": { SchemaProps: spec.SchemaProps{ Description: \"Port is the port number of the service port of which status is recorded here\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"nnPossible enum values:n - `\"SCTP\"` is the SCTP protocol.n - `\"TCP\"` is the TCP protocol.n - `\"UDP\"` is the UDP protocol.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"SCTP\", \"TCP\", \"UDP\"}}, }, \"error\": { SchemaProps: spec.SchemaProps{ Description: \"Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall usen CamelCase namesn- cloud provider specific error values must have names that comply with then format foo.example.com/CamelCase.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"port\", \"protocol\"}, }, }, } } func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PortworxVolumeSource represents a Portworx volume resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeID\": { SchemaProps: spec.SchemaProps{ Description: \"volumeID uniquely identifies a Portworx volume\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"volumeID\"}, }, }, } } func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Describes a class of pods that should avoid this node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podSignature\": { SchemaProps: spec.SchemaProps{ Description: \"The class of pods.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodSignature\"), }, }, \"evictionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Time at which this entry was added to the list.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) reason why this entry was added to the list.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human readable message indicating why this entry was added to the list.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"podSignature\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodSignature\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"preference\": { SchemaProps: spec.SchemaProps{ Description: \"A node selector term, associated with the corresponding weight.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeSelectorTerm\"), }, }, }, Required: []string{\"weight\", \"preference\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSelectorTerm\"}, } } func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"exec\": { SchemaProps: spec.SchemaProps{ Description: \"Exec specifies the action to take.\", Ref: ref(\"k8s.io/api/core/v1.ExecAction\"), }, }, \"httpGet\": { SchemaProps: spec.SchemaProps{ Description: \"HTTPGet specifies the http request to perform.\", Ref: ref(\"k8s.io/api/core/v1.HTTPGetAction\"), }, }, \"tcpSocket\": { SchemaProps: spec.SchemaProps{ Description: \"TCPSocket specifies an action involving a TCP port.\", Ref: ref(\"k8s.io/api/core/v1.TCPSocketAction\"), }, }, \"grpc\": { SchemaProps: spec.SchemaProps{ Description: \"GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.\", Ref: ref(\"k8s.io/api/core/v1.GRPCAction\"), }, }, \"initialDelaySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"periodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"successThreshold\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"failureThreshold\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"terminationGracePeriodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ExecAction\", \"k8s.io/api/core/v1.GRPCAction\", \"k8s.io/api/core/v1.HTTPGetAction\", \"k8s.io/api/core/v1.TCPSocketAction\"}, } } func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ProbeHandler defines a specific action that should be taken in a probe. One and only one of the fields must be specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"exec\": { SchemaProps: spec.SchemaProps{ Description: \"Exec specifies the action to take.\", Ref: ref(\"k8s.io/api/core/v1.ExecAction\"), }, }, \"httpGet\": { SchemaProps: spec.SchemaProps{ Description: \"HTTPGet specifies the http request to perform.\", Ref: ref(\"k8s.io/api/core/v1.HTTPGetAction\"), }, }, \"tcpSocket\": { SchemaProps: spec.SchemaProps{ Description: \"TCPSocket specifies an action involving a TCP port.\", Ref: ref(\"k8s.io/api/core/v1.TCPSocketAction\"), }, }, \"grpc\": { SchemaProps: spec.SchemaProps{ Description: \"GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.\", Ref: ref(\"k8s.io/api/core/v1.GRPCAction\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ExecAction\", \"k8s.io/api/core/v1.GRPCAction\", \"k8s.io/api/core/v1.HTTPGetAction\", \"k8s.io/api/core/v1.TCPSocketAction\"}, } } func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a projected volume source\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"sources\": { SchemaProps: spec.SchemaProps{ Description: \"sources is the list of volume projections\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.VolumeProjection\"), }, }, }, }, }, \"defaultMode\": { SchemaProps: spec.SchemaProps{ Description: \"defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.VolumeProjection\"}, } } func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"registry\": { SchemaProps: spec.SchemaProps{ Description: \"registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"volume\": { SchemaProps: spec.SchemaProps{ Description: \"volume is a string that references an already created Quobyte volume by name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"user to map volume access to Defaults to serivceaccount user\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"group to map volume access to Default is no group\", Type: []string{\"string\"}, Format: \"\", }, }, \"tenant\": { SchemaProps: spec.SchemaProps{ Description: \"tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"registry\", \"volume\"}, }, }, } } func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"monitors\": { SchemaProps: spec.SchemaProps{ Description: \"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd\", Type: []string{\"string\"}, Format: \"\", }, }, \"pool\": { SchemaProps: spec.SchemaProps{ Description: \"pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"keyring\": { SchemaProps: spec.SchemaProps{ Description: \"keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"monitors\", \"image\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"monitors\": { SchemaProps: spec.SchemaProps{ Description: \"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"image\": { SchemaProps: spec.SchemaProps{ Description: \"image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd\", Type: []string{\"string\"}, Format: \"\", }, }, \"pool\": { SchemaProps: spec.SchemaProps{ Description: \"pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"keyring\": { SchemaProps: spec.SchemaProps{ Description: \"keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"monitors\", \"image\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RangeAllocation is not a public type.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"range\": { SchemaProps: spec.SchemaProps{ Description: \"Range is string that identifies the range represented by 'data'.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data is a bit array containing all allocated addresses in the previous segment.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, Required: []string{\"range\", \"data\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationController represents the configuration of a replication controller.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ReplicationControllerSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ReplicationControllerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ReplicationControllerSpec\", \"k8s.io/api/core/v1.ReplicationControllerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerCondition describes the state of a replication controller at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of replication controller condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerList is a collection of replication controllers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ReplicationController\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ReplicationController\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerSpec is the specification of a replication controller.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\"}, } } func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerStatus represents the current status of a replication controller.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"fullyLabeledReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods that have labels matching the labels of the pod template of the replication controller.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of ready replicas for this replication controller.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of available replicas (ready for at least minReadySeconds) for this replication controller.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"ObservedGeneration reflects the generation of the most recently observed replication controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a replication controller's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ReplicationControllerCondition\"), }, }, }, }, }, }, Required: []string{\"replicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ReplicationControllerCondition\"}, } } func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceFieldSelector represents container resources (cpu, memory) and their output format\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"containerName\": { SchemaProps: spec.SchemaProps{ Description: \"Container name: required for volumes, optional for env vars\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Required: resource to select\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"divisor\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the output format of the exposed resources, defaults to \"1\"\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"resource\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceQuota sets aggregate quota restrictions enforced per namespace\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceQuotaSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceQuotaStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ResourceQuotaSpec\", \"k8s.io/api/core/v1.ResourceQuotaStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceQuotaList is a list of ResourceQuota items.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ResourceQuota\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ResourceQuota\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceQuotaSpec defines the desired hard limits to enforce for Quota.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hard\": { SchemaProps: spec.SchemaProps{ Description: \"hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"scopes\": { SchemaProps: spec.SchemaProps{ Description: \"A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scopeSelector\": { SchemaProps: spec.SchemaProps{ Description: \"scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.\", Ref: ref(\"k8s.io/api/core/v1.ScopeSelector\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ScopeSelector\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceQuotaStatus defines the enforced hard limits and observed use.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hard\": { SchemaProps: spec.SchemaProps{ Description: \"Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"used\": { SchemaProps: spec.SchemaProps{ Description: \"Used is the current observed total usage of the resource in the namespace.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceRequirements describes the compute resource requirements.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"limits\": { SchemaProps: spec.SchemaProps{ Description: \"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, \"requests\": { SchemaProps: spec.SchemaProps{ Description: \"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_core_v1_SELinuxOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SELinuxOptions are the labels to be applied to the container\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is a SELinux user label that applies to the container.\", Type: []string{\"string\"}, Format: \"\", }, }, \"role\": { SchemaProps: spec.SchemaProps{ Description: \"Role is a SELinux role label that applies to the container.\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is a SELinux type label that applies to the container.\", Type: []string{\"string\"}, Format: \"\", }, }, \"level\": { SchemaProps: spec.SchemaProps{ Description: \"Level is SELinux level label that applies to the container.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"gateway\": { SchemaProps: spec.SchemaProps{ Description: \"gateway is the host address of the ScaleIO API Gateway.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"system\": { SchemaProps: spec.SchemaProps{ Description: \"system is the name of the storage system as configured in ScaleIO.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.\", Ref: ref(\"k8s.io/api/core/v1.SecretReference\"), }, }, \"sslEnabled\": { SchemaProps: spec.SchemaProps{ Description: \"sslEnabled is the flag to enable/disable SSL communication with Gateway, default false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"protectionDomain\": { SchemaProps: spec.SchemaProps{ Description: \"protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storagePool\": { SchemaProps: spec.SchemaProps{ Description: \"storagePool is the ScaleIO Storage Pool associated with the protection domain.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storageMode\": { SchemaProps: spec.SchemaProps{ Description: \"storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeName\": { SchemaProps: spec.SchemaProps{ Description: \"volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"gateway\", \"system\", \"secretRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SecretReference\"}, } } func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScaleIOVolumeSource represents a persistent ScaleIO volume\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"gateway\": { SchemaProps: spec.SchemaProps{ Description: \"gateway is the host address of the ScaleIO API Gateway.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"system\": { SchemaProps: spec.SchemaProps{ Description: \"system is the name of the storage system as configured in ScaleIO.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, \"sslEnabled\": { SchemaProps: spec.SchemaProps{ Description: \"sslEnabled Flag enable/disable SSL communication with Gateway, default false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"protectionDomain\": { SchemaProps: spec.SchemaProps{ Description: \"protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storagePool\": { SchemaProps: spec.SchemaProps{ Description: \"storagePool is the ScaleIO Storage Pool associated with the protection domain.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storageMode\": { SchemaProps: spec.SchemaProps{ Description: \"storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeName\": { SchemaProps: spec.SchemaProps{ Description: \"volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"gateway\", \"system\", \"secretRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"matchExpressions\": { SchemaProps: spec.SchemaProps{ Description: \"A list of scope selector requirements by scope of the resources.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ScopedResourceSelectorRequirement\"), }, }, }, }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ScopedResourceSelectorRequirement\"}, } } func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"scopeName\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the scope that the selector applies to.nnPossible enum values:n - `\"BestEffort\"` Match all pod objects that have best effort quality of servicen - `\"CrossNamespacePodAffinity\"` Match all pod objects that have cross-namespace pod (anti)affinity mentioned.n - `\"NotBestEffort\"` Match all pod objects that do not have best effort quality of servicen - `\"NotTerminating\"` Match all pod objects where spec.activeDeadlineSeconds is niln - `\"PriorityClass\"` Match all pod objects that have priority class mentionedn - `\"Terminating\"` Match all pod objects where spec.activeDeadlineSeconds >=0\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"BestEffort\", \"CrossNamespacePodAffinity\", \"NotBestEffort\", \"NotTerminating\", \"PriorityClass\", \"Terminating\"}}, }, \"operator\": { SchemaProps: spec.SchemaProps{ Description: \"Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.nnPossible enum values:n - `\"DoesNotExist\"`n - `\"Exists\"`n - `\"In\"`n - `\"NotIn\"`\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"DoesNotExist\", \"Exists\", \"In\", \"NotIn\"}}, }, \"values\": { SchemaProps: spec.SchemaProps{ Description: \"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"scopeName\", \"operator\"}, }, }, } } func schema_k8sio_api_core_v1_SeccompProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type indicates which kind of seccomp profile will be applied. Valid options are:nnLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.nnPossible enum values:n - `\"Localhost\"` indicates a profile defined in a file on the node should be used. The file's location relative to /seccomp.n - `\"RuntimeDefault\"` represents the default container runtime seccomp profile.n - `\"Unconfined\"` indicates no seccomp profile is applied (A.K.A. unconfined).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Localhost\", \"RuntimeDefault\", \"Unconfined\"}}, }, \"localhostProfile\": { SchemaProps: spec.SchemaProps{ Description: \"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"localhostProfile\": \"LocalhostProfile\", }, }, }, }, }, }, } } func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"immutable\": { SchemaProps: spec.SchemaProps{ Description: \"Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"data\": { SchemaProps: spec.SchemaProps{ Description: \"Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, \"stringData\": { SchemaProps: spec.SchemaProps{ Description: \"stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_SecretEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SecretEnvSource selects a Secret to populate the environment variables with.nnThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"Specify whether the Secret must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SecretKeySelector selects a key of a Secret.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"key\": { SchemaProps: spec.SchemaProps{ Description: \"The key of the secret to select from. Must be a valid secret key.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"Specify whether the Secret or its key must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"key\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SecretList is a list of Secret.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Secret\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Secret\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Adapts a secret into a projected volume.nnThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.KeyToPath\"), }, }, }, }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"optional field specify whether the Secret or its key must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.KeyToPath\"}, } } func schema_k8sio_api_core_v1_SecretReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is unique within a namespace to reference a secret resource.\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"namespace defines the space within which the secret name must be unique.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Adapts a Secret into a volume.nnThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret\", Type: []string{\"string\"}, Format: \"\", }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.KeyToPath\"), }, }, }, }, }, \"defaultMode\": { SchemaProps: spec.SchemaProps{ Description: \"defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"optional\": { SchemaProps: spec.SchemaProps{ Description: \"optional field specify whether the Secret or its keys must be defined\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.KeyToPath\"}, } } func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"capabilities\": { SchemaProps: spec.SchemaProps{ Description: \"The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.\", Ref: ref(\"k8s.io/api/core/v1.Capabilities\"), }, }, \"privileged\": { SchemaProps: spec.SchemaProps{ Description: \"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"seLinuxOptions\": { SchemaProps: spec.SchemaProps{ Description: \"The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.\", Ref: ref(\"k8s.io/api/core/v1.SELinuxOptions\"), }, }, \"windowsOptions\": { SchemaProps: spec.SchemaProps{ Description: \"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.\", Ref: ref(\"k8s.io/api/core/v1.WindowsSecurityContextOptions\"), }, }, \"runAsUser\": { SchemaProps: spec.SchemaProps{ Description: \"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"runAsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"runAsNonRoot\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"readOnlyRootFilesystem\": { SchemaProps: spec.SchemaProps{ Description: \"Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowPrivilegeEscalation\": { SchemaProps: spec.SchemaProps{ Description: \"AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"procMount\": { SchemaProps: spec.SchemaProps{ Description: \"procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.\", Type: []string{\"string\"}, Format: \"\", }, }, \"seccompProfile\": { SchemaProps: spec.SchemaProps{ Description: \"The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.\", Ref: ref(\"k8s.io/api/core/v1.SeccompProfile\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Capabilities\", \"k8s.io/api/core/v1.SELinuxOptions\", \"k8s.io/api/core/v1.SeccompProfile\", \"k8s.io/api/core/v1.WindowsSecurityContextOptions\"}, } } func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SerializedReference is a reference to serialized object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"reference\": { SchemaProps: spec.SchemaProps{ Description: \"The reference to an object in the system.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\"}, } } func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ServiceSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ServiceStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ServiceSpec\", \"k8s.io/api/core/v1.ServiceStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"secrets\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, }, }, \"imagePullSecrets\": { SchemaProps: spec.SchemaProps{ Description: \"ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, }, }, }, \"automountServiceAccountToken\": { SchemaProps: spec.SchemaProps{ Description: \"AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\", \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountList is a list of ServiceAccount objects\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ServiceAccount\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ServiceAccount\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"audience\": { SchemaProps: spec.SchemaProps{ Description: \"audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is the path relative to the mount point of the file to project the token into.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"path\"}, }, }, } } func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceList holds a list of services.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of services\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Service\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Service\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServicePort contains information on service's port.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.\", Type: []string{\"string\"}, Format: \"\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.nnPossible enum values:n - `\"SCTP\"` is the SCTP protocol.n - `\"TCP\"` is the TCP protocol.n - `\"UDP\"` is the UDP protocol.\", Default: \"TCP\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"SCTP\", \"TCP\", \"UDP\"}}, }, \"appProtocol\": { SchemaProps: spec.SchemaProps{ Description: \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port that will be exposed by this service.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"targetPort\": { SchemaProps: spec.SchemaProps{ Description: \"Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"nodePort\": { SchemaProps: spec.SchemaProps{ Description: \"The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"port\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_core_v1_ServiceProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceProxyOptions is the query options to a Service's proxy call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceSpec describes the attributes that a user creates on a service.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"port\", \"protocol\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"port\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ServicePort\"), }, }, }, }, }, \"selector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"clusterIP\": { SchemaProps: spec.SchemaProps{ Description: \"clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies\", Type: []string{\"string\"}, Format: \"\", }, }, \"clusterIPs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.nnThis field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-typesnnPossible enum values:n - `\"ClusterIP\"` means a service will only be accessible inside the cluster, via the cluster IP.n - `\"ExternalName\"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved.n - `\"LoadBalancer\"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type.n - `\"NodePort\"` means a service will be exposed on one port of every node, in addition to 'ClusterIP' type.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ClusterIP\", \"ExternalName\", \"LoadBalancer\", \"NodePort\"}}, }, \"externalIPs\": { SchemaProps: spec.SchemaProps{ Description: \"externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"sessionAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxiesnnPossible enum values:n - `\"ClientIP\"` is the Client IP based.n - `\"None\"` - no session affinity.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"ClientIP\", \"None\"}}, }, \"loadBalancerIP\": { SchemaProps: spec.SchemaProps{ Description: \"Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.\", Type: []string{\"string\"}, Format: \"\", }, }, \"loadBalancerSourceRanges\": { SchemaProps: spec.SchemaProps{ Description: \"If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"externalName\": { SchemaProps: spec.SchemaProps{ Description: \"externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"externalTrafficPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.nnPossible enum values:n - `\"Cluster\"` specifies node-global (legacy) behavior.n - `\"Local\"` specifies node-local endpoints behavior.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Cluster\", \"Local\"}}, }, \"healthCheckNodePort\": { SchemaProps: spec.SchemaProps{ Description: \"healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"publishNotReadyAddresses\": { SchemaProps: spec.SchemaProps{ Description: \"publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"sessionAffinityConfig\": { SchemaProps: spec.SchemaProps{ Description: \"sessionAffinityConfig contains the configurations of session affinity.\", Ref: ref(\"k8s.io/api/core/v1.SessionAffinityConfig\"), }, }, \"ipFamilies\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.nnThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"ipFamilyPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.\", Type: []string{\"string\"}, Format: \"\", }, }, \"allocateLoadBalancerNodePorts\": { SchemaProps: spec.SchemaProps{ Description: \"allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"loadBalancerClass\": { SchemaProps: spec.SchemaProps{ Description: \"loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.\", Type: []string{\"string\"}, Format: \"\", }, }, \"internalTrafficPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ServicePort\", \"k8s.io/api/core/v1.SessionAffinityConfig\"}, } } func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceStatus represents the current status of a service.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"loadBalancer\": { SchemaProps: spec.SchemaProps{ Description: \"LoadBalancer contains the current status of the load-balancer, if one is present.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LoadBalancerStatus\"), }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Current service state\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LoadBalancerStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\"}, } } func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SessionAffinityConfig represents the configurations of session affinity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clientIP\": { SchemaProps: spec.SchemaProps{ Description: \"clientIP contains the configurations of Client IP based session affinity.\", Ref: ref(\"k8s.io/api/core/v1.ClientIPConfig\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ClientIPConfig\"}, } } func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a StorageOS persistent volume resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeName\": { SchemaProps: spec.SchemaProps{ Description: \"volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeNamespace\": { SchemaProps: spec.SchemaProps{ Description: \"volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\"}, } } func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a StorageOS persistent volume resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumeName\": { SchemaProps: spec.SchemaProps{ Description: \"volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.\", Type: []string{\"string\"}, Format: \"\", }, }, \"volumeNamespace\": { SchemaProps: spec.SchemaProps{ Description: \"volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"secretRef\": { SchemaProps: spec.SchemaProps{ Description: \"secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.\", Ref: ref(\"k8s.io/api/core/v1.LocalObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LocalObjectReference\"}, } } func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Sysctl defines a kernel parameter to be set\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of a property to set\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"Value of a property to set\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"value\"}, }, }, } } func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TCPSocketAction describes an action based on opening a socket\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"port\": { SchemaProps: spec.SchemaProps{ Description: \"Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Optional: Host name to connect to, defaults to the pod IP.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"port\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { SchemaProps: spec.SchemaProps{ Description: \"Required. The taint key to be applied to a node.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"The taint value corresponding to the taint key.\", Type: []string{\"string\"}, Format: \"\", }, }, \"effect\": { SchemaProps: spec.SchemaProps{ Description: \"Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.nnPossible enum values:n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"NoExecute\", \"NoSchedule\", \"PreferNoSchedule\"}}, }, \"timeAdded\": { SchemaProps: spec.SchemaProps{ Description: \"TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, Required: []string{\"key\", \"effect\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { SchemaProps: spec.SchemaProps{ Description: \"Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.\", Type: []string{\"string\"}, Format: \"\", }, }, \"operator\": { SchemaProps: spec.SchemaProps{ Description: \"Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.nnPossible enum values:n - `\"Equal\"`n - `\"Exists\"`\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"Equal\", \"Exists\"}}, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.\", Type: []string{\"string\"}, Format: \"\", }, }, \"effect\": { SchemaProps: spec.SchemaProps{ Description: \"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.nnPossible enum values:n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"NoExecute\", \"NoSchedule\", \"PreferNoSchedule\"}}, }, \"tolerationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, } } func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { SchemaProps: spec.SchemaProps{ Description: \"The label key that the selector applies to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"values\": { SchemaProps: spec.SchemaProps{ Description: \"An array of string values. One value must match the label to be selected. Each entry in Values is ORed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"key\", \"values\"}, }, }, } } func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"matchLabelExpressions\": { SchemaProps: spec.SchemaProps{ Description: \"A list of topology selector requirements by labels.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySelectorLabelRequirement\"), }, }, }, }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TopologySelectorLabelRequirement\"}, } } func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TopologySpreadConstraint specifies how to spread matching pods among the given topology.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxSkew\": { SchemaProps: spec.SchemaProps{ Description: \"MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"topologyKey\": { SchemaProps: spec.SchemaProps{ Description: \"TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"whenUnsatisfiable\": { SchemaProps: spec.SchemaProps{ Description: \"WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,n but giving higher precedence to topologies that would help reduce then skew.nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.nnPossible enum values:n - `\"DoNotSchedule\"` instructs the scheduler not to schedule the pod when constraints are not satisfied.n - `\"ScheduleAnyway\"` instructs the scheduler to schedule the pod even if constraints are not satisfied.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"DoNotSchedule\", \"ScheduleAnyway\"}}, }, \"labelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"maxSkew\", \"topologyKey\", \"whenUnsatisfiable\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Volume represents a named volume in a pod that may be accessed by any container in the pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostPath\": { SchemaProps: spec.SchemaProps{ Description: \"hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Ref: ref(\"k8s.io/api/core/v1.HostPathVolumeSource\"), }, }, \"emptyDir\": { SchemaProps: spec.SchemaProps{ Description: \"emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\", Ref: ref(\"k8s.io/api/core/v1.EmptyDirVolumeSource\"), }, }, \"gcePersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Ref: ref(\"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\"), }, }, \"awsElasticBlockStore\": { SchemaProps: spec.SchemaProps{ Description: \"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Ref: ref(\"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\"), }, }, \"gitRepo\": { SchemaProps: spec.SchemaProps{ Description: \"gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.\", Ref: ref(\"k8s.io/api/core/v1.GitRepoVolumeSource\"), }, }, \"secret\": { SchemaProps: spec.SchemaProps{ Description: \"secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret\", Ref: ref(\"k8s.io/api/core/v1.SecretVolumeSource\"), }, }, \"nfs\": { SchemaProps: spec.SchemaProps{ Description: \"nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Ref: ref(\"k8s.io/api/core/v1.NFSVolumeSource\"), }, }, \"iscsi\": { SchemaProps: spec.SchemaProps{ Description: \"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md\", Ref: ref(\"k8s.io/api/core/v1.ISCSIVolumeSource\"), }, }, \"glusterfs\": { SchemaProps: spec.SchemaProps{ Description: \"glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md\", Ref: ref(\"k8s.io/api/core/v1.GlusterfsVolumeSource\"), }, }, \"persistentVolumeClaim\": { SchemaProps: spec.SchemaProps{ Description: \"persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource\"), }, }, \"rbd\": { SchemaProps: spec.SchemaProps{ Description: \"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md\", Ref: ref(\"k8s.io/api/core/v1.RBDVolumeSource\"), }, }, \"flexVolume\": { SchemaProps: spec.SchemaProps{ Description: \"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\", Ref: ref(\"k8s.io/api/core/v1.FlexVolumeSource\"), }, }, \"cinder\": { SchemaProps: spec.SchemaProps{ Description: \"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Ref: ref(\"k8s.io/api/core/v1.CinderVolumeSource\"), }, }, \"cephfs\": { SchemaProps: spec.SchemaProps{ Description: \"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.CephFSVolumeSource\"), }, }, \"flocker\": { SchemaProps: spec.SchemaProps{ Description: \"flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running\", Ref: ref(\"k8s.io/api/core/v1.FlockerVolumeSource\"), }, }, \"downwardAPI\": { SchemaProps: spec.SchemaProps{ Description: \"downwardAPI represents downward API about the pod that should populate this volume\", Ref: ref(\"k8s.io/api/core/v1.DownwardAPIVolumeSource\"), }, }, \"fc\": { SchemaProps: spec.SchemaProps{ Description: \"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\", Ref: ref(\"k8s.io/api/core/v1.FCVolumeSource\"), }, }, \"azureFile\": { SchemaProps: spec.SchemaProps{ Description: \"azureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureFileVolumeSource\"), }, }, \"configMap\": { SchemaProps: spec.SchemaProps{ Description: \"configMap represents a configMap that should populate this volume\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapVolumeSource\"), }, }, \"vsphereVolume\": { SchemaProps: spec.SchemaProps{ Description: \"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"), }, }, \"quobyte\": { SchemaProps: spec.SchemaProps{ Description: \"quobyte represents a Quobyte mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.QuobyteVolumeSource\"), }, }, \"azureDisk\": { SchemaProps: spec.SchemaProps{ Description: \"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureDiskVolumeSource\"), }, }, \"photonPersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\"), }, }, \"projected\": { SchemaProps: spec.SchemaProps{ Description: \"projected items for all in one resources secrets, configmaps, and downward API\", Ref: ref(\"k8s.io/api/core/v1.ProjectedVolumeSource\"), }, }, \"portworxVolume\": { SchemaProps: spec.SchemaProps{ Description: \"portworxVolume represents a portworx volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PortworxVolumeSource\"), }, }, \"scaleIO\": { SchemaProps: spec.SchemaProps{ Description: \"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.ScaleIOVolumeSource\"), }, }, \"storageos\": { SchemaProps: spec.SchemaProps{ Description: \"storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.StorageOSVolumeSource\"), }, }, \"csi\": { SchemaProps: spec.SchemaProps{ Description: \"csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).\", Ref: ref(\"k8s.io/api/core/v1.CSIVolumeSource\"), }, }, \"ephemeral\": { SchemaProps: spec.SchemaProps{ Description: \"ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.nnUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacityn tracking are needed,nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning throughn a PersistentVolumeClaim (see EphemeralVolumeSource for moren information on the connection between this volume typen and PersistentVolumeClaim).nnUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.nnUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.nnA pod can use both types of ephemeral volumes and persistent volumes at the same time.\", Ref: ref(\"k8s.io/api/core/v1.EphemeralVolumeSource\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\", \"k8s.io/api/core/v1.AzureDiskVolumeSource\", \"k8s.io/api/core/v1.AzureFileVolumeSource\", \"k8s.io/api/core/v1.CSIVolumeSource\", \"k8s.io/api/core/v1.CephFSVolumeSource\", \"k8s.io/api/core/v1.CinderVolumeSource\", \"k8s.io/api/core/v1.ConfigMapVolumeSource\", \"k8s.io/api/core/v1.DownwardAPIVolumeSource\", \"k8s.io/api/core/v1.EmptyDirVolumeSource\", \"k8s.io/api/core/v1.EphemeralVolumeSource\", \"k8s.io/api/core/v1.FCVolumeSource\", \"k8s.io/api/core/v1.FlexVolumeSource\", \"k8s.io/api/core/v1.FlockerVolumeSource\", \"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.GitRepoVolumeSource\", \"k8s.io/api/core/v1.GlusterfsVolumeSource\", \"k8s.io/api/core/v1.HostPathVolumeSource\", \"k8s.io/api/core/v1.ISCSIVolumeSource\", \"k8s.io/api/core/v1.NFSVolumeSource\", \"k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource\", \"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.PortworxVolumeSource\", \"k8s.io/api/core/v1.ProjectedVolumeSource\", \"k8s.io/api/core/v1.QuobyteVolumeSource\", \"k8s.io/api/core/v1.RBDVolumeSource\", \"k8s.io/api/core/v1.ScaleIOVolumeSource\", \"k8s.io/api/core/v1.SecretVolumeSource\", \"k8s.io/api/core/v1.StorageOSVolumeSource\", \"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"}, } } func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"volumeDevice describes a mapping of a raw block device within a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name must match the name of a persistentVolumeClaim in the pod\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"devicePath\": { SchemaProps: spec.SchemaProps{ Description: \"devicePath is the path inside of the container that the device will be mapped to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"devicePath\"}, }, }, } } func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeMount describes a mounting of a Volume within a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"This must match the Name of a Volume.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"mountPath\": { SchemaProps: spec.SchemaProps{ Description: \"Path within the container at which the volume should be mounted. Must not contain ':'.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"subPath\": { SchemaProps: spec.SchemaProps{ Description: \"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).\", Type: []string{\"string\"}, Format: \"\", }, }, \"mountPropagation\": { SchemaProps: spec.SchemaProps{ Description: \"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.\", Type: []string{\"string\"}, Format: \"\", }, }, \"subPathExpr\": { SchemaProps: spec.SchemaProps{ Description: \"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"mountPath\"}, }, }, } } func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"required\": { SchemaProps: spec.SchemaProps{ Description: \"required specifies hard node constraints that must be met.\", Ref: ref(\"k8s.io/api/core/v1.NodeSelector\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeSelector\"}, } } func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Projection that may be projected along with other supported volume types\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"secret\": { SchemaProps: spec.SchemaProps{ Description: \"secret information about the secret data to project\", Ref: ref(\"k8s.io/api/core/v1.SecretProjection\"), }, }, \"downwardAPI\": { SchemaProps: spec.SchemaProps{ Description: \"downwardAPI information about the downwardAPI data to project\", Ref: ref(\"k8s.io/api/core/v1.DownwardAPIProjection\"), }, }, \"configMap\": { SchemaProps: spec.SchemaProps{ Description: \"configMap information about the configMap data to project\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapProjection\"), }, }, \"serviceAccountToken\": { SchemaProps: spec.SchemaProps{ Description: \"serviceAccountToken is information about the serviceAccountToken data to project\", Ref: ref(\"k8s.io/api/core/v1.ServiceAccountTokenProjection\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ConfigMapProjection\", \"k8s.io/api/core/v1.DownwardAPIProjection\", \"k8s.io/api/core/v1.SecretProjection\", \"k8s.io/api/core/v1.ServiceAccountTokenProjection\"}, } } func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents the source of a volume to mount. Only one of its members may be specified.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hostPath\": { SchemaProps: spec.SchemaProps{ Description: \"hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\", Ref: ref(\"k8s.io/api/core/v1.HostPathVolumeSource\"), }, }, \"emptyDir\": { SchemaProps: spec.SchemaProps{ Description: \"emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\", Ref: ref(\"k8s.io/api/core/v1.EmptyDirVolumeSource\"), }, }, \"gcePersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\", Ref: ref(\"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\"), }, }, \"awsElasticBlockStore\": { SchemaProps: spec.SchemaProps{ Description: \"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\", Ref: ref(\"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\"), }, }, \"gitRepo\": { SchemaProps: spec.SchemaProps{ Description: \"gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.\", Ref: ref(\"k8s.io/api/core/v1.GitRepoVolumeSource\"), }, }, \"secret\": { SchemaProps: spec.SchemaProps{ Description: \"secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret\", Ref: ref(\"k8s.io/api/core/v1.SecretVolumeSource\"), }, }, \"nfs\": { SchemaProps: spec.SchemaProps{ Description: \"nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\", Ref: ref(\"k8s.io/api/core/v1.NFSVolumeSource\"), }, }, \"iscsi\": { SchemaProps: spec.SchemaProps{ Description: \"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md\", Ref: ref(\"k8s.io/api/core/v1.ISCSIVolumeSource\"), }, }, \"glusterfs\": { SchemaProps: spec.SchemaProps{ Description: \"glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md\", Ref: ref(\"k8s.io/api/core/v1.GlusterfsVolumeSource\"), }, }, \"persistentVolumeClaim\": { SchemaProps: spec.SchemaProps{ Description: \"persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource\"), }, }, \"rbd\": { SchemaProps: spec.SchemaProps{ Description: \"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md\", Ref: ref(\"k8s.io/api/core/v1.RBDVolumeSource\"), }, }, \"flexVolume\": { SchemaProps: spec.SchemaProps{ Description: \"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\", Ref: ref(\"k8s.io/api/core/v1.FlexVolumeSource\"), }, }, \"cinder\": { SchemaProps: spec.SchemaProps{ Description: \"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md\", Ref: ref(\"k8s.io/api/core/v1.CinderVolumeSource\"), }, }, \"cephfs\": { SchemaProps: spec.SchemaProps{ Description: \"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.CephFSVolumeSource\"), }, }, \"flocker\": { SchemaProps: spec.SchemaProps{ Description: \"flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running\", Ref: ref(\"k8s.io/api/core/v1.FlockerVolumeSource\"), }, }, \"downwardAPI\": { SchemaProps: spec.SchemaProps{ Description: \"downwardAPI represents downward API about the pod that should populate this volume\", Ref: ref(\"k8s.io/api/core/v1.DownwardAPIVolumeSource\"), }, }, \"fc\": { SchemaProps: spec.SchemaProps{ Description: \"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\", Ref: ref(\"k8s.io/api/core/v1.FCVolumeSource\"), }, }, \"azureFile\": { SchemaProps: spec.SchemaProps{ Description: \"azureFile represents an Azure File Service mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureFileVolumeSource\"), }, }, \"configMap\": { SchemaProps: spec.SchemaProps{ Description: \"configMap represents a configMap that should populate this volume\", Ref: ref(\"k8s.io/api/core/v1.ConfigMapVolumeSource\"), }, }, \"vsphereVolume\": { SchemaProps: spec.SchemaProps{ Description: \"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"), }, }, \"quobyte\": { SchemaProps: spec.SchemaProps{ Description: \"quobyte represents a Quobyte mount on the host that shares a pod's lifetime\", Ref: ref(\"k8s.io/api/core/v1.QuobyteVolumeSource\"), }, }, \"azureDisk\": { SchemaProps: spec.SchemaProps{ Description: \"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\", Ref: ref(\"k8s.io/api/core/v1.AzureDiskVolumeSource\"), }, }, \"photonPersistentDisk\": { SchemaProps: spec.SchemaProps{ Description: \"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\"), }, }, \"projected\": { SchemaProps: spec.SchemaProps{ Description: \"projected items for all in one resources secrets, configmaps, and downward API\", Ref: ref(\"k8s.io/api/core/v1.ProjectedVolumeSource\"), }, }, \"portworxVolume\": { SchemaProps: spec.SchemaProps{ Description: \"portworxVolume represents a portworx volume attached and mounted on kubelets host machine\", Ref: ref(\"k8s.io/api/core/v1.PortworxVolumeSource\"), }, }, \"scaleIO\": { SchemaProps: spec.SchemaProps{ Description: \"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.ScaleIOVolumeSource\"), }, }, \"storageos\": { SchemaProps: spec.SchemaProps{ Description: \"storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.\", Ref: ref(\"k8s.io/api/core/v1.StorageOSVolumeSource\"), }, }, \"csi\": { SchemaProps: spec.SchemaProps{ Description: \"csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).\", Ref: ref(\"k8s.io/api/core/v1.CSIVolumeSource\"), }, }, \"ephemeral\": { SchemaProps: spec.SchemaProps{ Description: \"ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.nnUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacityn tracking are needed,nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning throughn a PersistentVolumeClaim (see EphemeralVolumeSource for moren information on the connection between this volume typen and PersistentVolumeClaim).nnUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.nnUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.nnA pod can use both types of ephemeral volumes and persistent volumes at the same time.\", Ref: ref(\"k8s.io/api/core/v1.EphemeralVolumeSource\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource\", \"k8s.io/api/core/v1.AzureDiskVolumeSource\", \"k8s.io/api/core/v1.AzureFileVolumeSource\", \"k8s.io/api/core/v1.CSIVolumeSource\", \"k8s.io/api/core/v1.CephFSVolumeSource\", \"k8s.io/api/core/v1.CinderVolumeSource\", \"k8s.io/api/core/v1.ConfigMapVolumeSource\", \"k8s.io/api/core/v1.DownwardAPIVolumeSource\", \"k8s.io/api/core/v1.EmptyDirVolumeSource\", \"k8s.io/api/core/v1.EphemeralVolumeSource\", \"k8s.io/api/core/v1.FCVolumeSource\", \"k8s.io/api/core/v1.FlexVolumeSource\", \"k8s.io/api/core/v1.FlockerVolumeSource\", \"k8s.io/api/core/v1.GCEPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.GitRepoVolumeSource\", \"k8s.io/api/core/v1.GlusterfsVolumeSource\", \"k8s.io/api/core/v1.HostPathVolumeSource\", \"k8s.io/api/core/v1.ISCSIVolumeSource\", \"k8s.io/api/core/v1.NFSVolumeSource\", \"k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource\", \"k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource\", \"k8s.io/api/core/v1.PortworxVolumeSource\", \"k8s.io/api/core/v1.ProjectedVolumeSource\", \"k8s.io/api/core/v1.QuobyteVolumeSource\", \"k8s.io/api/core/v1.RBDVolumeSource\", \"k8s.io/api/core/v1.ScaleIOVolumeSource\", \"k8s.io/api/core/v1.SecretVolumeSource\", \"k8s.io/api/core/v1.StorageOSVolumeSource\", \"k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource\"}, } } func schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Represents a vSphere volume resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"volumePath\": { SchemaProps: spec.SchemaProps{ Description: \"volumePath is the path that identifies vSphere volume vmdk\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fsType\": { SchemaProps: spec.SchemaProps{ Description: \"fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storagePolicyName\": { SchemaProps: spec.SchemaProps{ Description: \"storagePolicyName is the storage Policy Based Management (SPBM) profile name.\", Type: []string{\"string\"}, Format: \"\", }, }, \"storagePolicyID\": { SchemaProps: spec.SchemaProps{ Description: \"storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"volumePath\"}, }, }, } } func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"podAffinityTerm\": { SchemaProps: spec.SchemaProps{ Description: \"Required. A pod affinity term, associated with the corresponding weight.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodAffinityTerm\"), }, }, }, Required: []string{\"weight\", \"podAffinityTerm\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodAffinityTerm\"}, } } func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WindowsSecurityContextOptions contain Windows-specific options and credentials.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"gmsaCredentialSpecName\": { SchemaProps: spec.SchemaProps{ Description: \"GMSACredentialSpecName is the name of the GMSA credential spec to use.\", Type: []string{\"string\"}, Format: \"\", }, }, \"gmsaCredentialSpec\": { SchemaProps: spec.SchemaProps{ Description: \"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.\", Type: []string{\"string\"}, Format: \"\", }, }, \"runAsUserName\": { SchemaProps: spec.SchemaProps{ Description: \"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostProcess\": { SchemaProps: spec.SchemaProps{ Description: \"HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Endpoint represents a single logical \"backend\" implementing a service.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"addresses\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"conditions\": { SchemaProps: spec.SchemaProps{ Description: \"conditions contains information about the current status of the endpoint.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1.EndpointConditions\"), }, }, \"hostname\": { SchemaProps: spec.SchemaProps{ Description: \"hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetRef\": { SchemaProps: spec.SchemaProps{ Description: \"targetRef is a reference to a Kubernetes object that represents this endpoint.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"deprecatedTopology\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"zone\": { SchemaProps: spec.SchemaProps{ Description: \"zone is the name of the Zone this endpoint exists in.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hints\": { SchemaProps: spec.SchemaProps{ Description: \"hints contains information associated with how an endpoint should be consumed.\", Ref: ref(\"k8s.io/api/discovery/v1.EndpointHints\"), }, }, }, Required: []string{\"addresses\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/api/discovery/v1.EndpointConditions\", \"k8s.io/api/discovery/v1.EndpointHints\"}, } } func schema_k8sio_api_discovery_v1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointConditions represents the current condition of an endpoint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ready\": { SchemaProps: spec.SchemaProps{ Description: \"ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"serving\": { SchemaProps: spec.SchemaProps{ Description: \"serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"terminating\": { SchemaProps: spec.SchemaProps{ Description: \"terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_discovery_v1_EndpointHints(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointHints provides hints describing how an endpoint should be consumed.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"forZones\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1.ForZone\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1.ForZone\"}, } } func schema_k8sio_api_discovery_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointPort represents a Port used by an EndpointSlice\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.\", Type: []string{\"string\"}, Format: \"\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"appProtocol\": { SchemaProps: spec.SchemaProps{ Description: \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"addressType\": { SchemaProps: spec.SchemaProps{ Description: \"addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.nnPossible enum values:n - `\"FQDN\"` represents a FQDN.n - `\"IPv4\"` represents an IPv4 Address.n - `\"IPv6\"` represents an IPv6 Address.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", Enum: []interface{}{\"FQDN\", \"IPv4\", \"IPv6\"}}, }, \"endpoints\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1.Endpoint\"), }, }, }, }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1.EndpointPort\"), }, }, }, }, }, }, Required: []string{\"addressType\", \"endpoints\"}, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1.Endpoint\", \"k8s.io/api/discovery/v1.EndpointPort\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_discovery_v1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceList represents a list of endpoint slices\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of endpoint slices\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1.EndpointSlice\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1.EndpointSlice\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_discovery_v1_ForZone(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ForZone provides information about which zones should consume this endpoint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name represents the name of the zone.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Endpoint represents a single logical \"backend\" implementing a service.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"addresses\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"conditions\": { SchemaProps: spec.SchemaProps{ Description: \"conditions contains information about the current status of the endpoint.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1beta1.EndpointConditions\"), }, }, \"hostname\": { SchemaProps: spec.SchemaProps{ Description: \"hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"targetRef\": { SchemaProps: spec.SchemaProps{ Description: \"targetRef is a reference to a Kubernetes object that represents this endpoint.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"topology\": { SchemaProps: spec.SchemaProps{ Description: \"topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the noden where the endpoint is located. This should match the correspondingn node label.n* topology.kubernetes.io/zone: the value indicates the zone where then endpoint is located. This should match the corresponding node label.n* topology.kubernetes.io/region: the value indicates the region where then endpoint is located. This should match the corresponding node label.nThis field is deprecated and will be removed in future api versions.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"hints\": { SchemaProps: spec.SchemaProps{ Description: \"hints contains information associated with how an endpoint should be consumed.\", Ref: ref(\"k8s.io/api/discovery/v1beta1.EndpointHints\"), }, }, }, Required: []string{\"addresses\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/api/discovery/v1beta1.EndpointConditions\", \"k8s.io/api/discovery/v1beta1.EndpointHints\"}, } } func schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointConditions represents the current condition of an endpoint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ready\": { SchemaProps: spec.SchemaProps{ Description: \"ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"serving\": { SchemaProps: spec.SchemaProps{ Description: \"serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"terminating\": { SchemaProps: spec.SchemaProps{ Description: \"terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_discovery_v1beta1_EndpointHints(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointHints provides hints describing how an endpoint should be consumed.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"forZones\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1beta1.ForZone\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1beta1.ForZone\"}, } } func schema_k8sio_api_discovery_v1beta1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointPort represents a Port used by an EndpointSlice\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.\", Type: []string{\"string\"}, Format: \"\", }, }, \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"appProtocol\": { SchemaProps: spec.SchemaProps{ Description: \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"addressType\": { SchemaProps: spec.SchemaProps{ Description: \"addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"endpoints\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1beta1.Endpoint\"), }, }, }, }, }, \"ports\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1beta1.EndpointPort\"), }, }, }, }, }, }, Required: []string{\"addressType\", \"endpoints\"}, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1beta1.Endpoint\", \"k8s.io/api/discovery/v1beta1.EndpointPort\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceList represents a list of endpoint slices\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of endpoint slices\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/discovery/v1beta1.EndpointSlice\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/discovery/v1beta1.EndpointSlice\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_discovery_v1beta1_ForZone(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ForZone provides information about which zones should consume this endpoint.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name represents the name of the zone.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"eventTime\": { SchemaProps: spec.SchemaProps{ Description: \"eventTime is the time when this Event was first observed. It is required.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"series\": { SchemaProps: spec.SchemaProps{ Description: \"series is data about the Event series this event represents or nil if it's a singleton Event.\", Ref: ref(\"k8s.io/api/events/v1.EventSeries\"), }, }, \"reportingController\": { SchemaProps: spec.SchemaProps{ Description: \"reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reportingInstance\": { SchemaProps: spec.SchemaProps{ Description: \"reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"action\": { SchemaProps: spec.SchemaProps{ Description: \"action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"regarding\": { SchemaProps: spec.SchemaProps{ Description: \"regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"related\": { SchemaProps: spec.SchemaProps{ Description: \"related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"note\": { SchemaProps: spec.SchemaProps{ Description: \"note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.\", Type: []string{\"string\"}, Format: \"\", }, }, \"deprecatedSource\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EventSource\"), }, }, \"deprecatedFirstTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deprecatedLastTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deprecatedCount\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"eventTime\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EventSource\", \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/api/events/v1.EventSeries\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_events_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of Event objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/events/v1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/events/v1.Event\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_events_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"count\": { SchemaProps: spec.SchemaProps{ Description: \"count is the number of occurrences in this series up to the last heartbeat time.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"lastObservedTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastObservedTime is the time when last Event from the series was seen before last heartbeat.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, }, Required: []string{\"count\", \"lastObservedTime\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"}, } } func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"eventTime\": { SchemaProps: spec.SchemaProps{ Description: \"eventTime is the time when this Event was first observed. It is required.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"series\": { SchemaProps: spec.SchemaProps{ Description: \"series is data about the Event series this event represents or nil if it's a singleton Event.\", Ref: ref(\"k8s.io/api/events/v1beta1.EventSeries\"), }, }, \"reportingController\": { SchemaProps: spec.SchemaProps{ Description: \"reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reportingInstance\": { SchemaProps: spec.SchemaProps{ Description: \"reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"action\": { SchemaProps: spec.SchemaProps{ Description: \"action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is why the action was taken. It is human-readable. This field can have at most 128 characters.\", Type: []string{\"string\"}, Format: \"\", }, }, \"regarding\": { SchemaProps: spec.SchemaProps{ Description: \"regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"related\": { SchemaProps: spec.SchemaProps{ Description: \"related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.\", Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"note\": { SchemaProps: spec.SchemaProps{ Description: \"note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.\", Type: []string{\"string\"}, Format: \"\", }, }, \"deprecatedSource\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.EventSource\"), }, }, \"deprecatedFirstTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deprecatedLastTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deprecatedCount\": { SchemaProps: spec.SchemaProps{ Description: \"deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"eventTime\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.EventSource\", \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/api/events/v1beta1.EventSeries\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of Event objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/events/v1beta1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/events/v1beta1.Event\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_events_v1beta1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"count\": { SchemaProps: spec.SchemaProps{ Description: \"count is the number of occurrences in this series up to the last heartbeat time.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"lastObservedTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastObservedTime is the time when last Event from the series was seen before last heartbeat.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, }, Required: []string{\"count\", \"lastObservedTime\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"}, } } func schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the registered name of the CSI driver\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the Flexvolume driver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"driver\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"pathPrefix\": { SchemaProps: spec.SchemaProps{ Description: \"pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.nnExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_extensions_v1beta1_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DaemonSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DaemonSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.DaemonSetSpec\", \"k8s.io/api/extensions/v1beta1.DaemonSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetCondition describes the state of a DaemonSet at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of DaemonSet condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetList is a collection of daemon sets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"A list of daemon sets.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DaemonSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.DaemonSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetSpec is the specification of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"updateStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"An update strategy to replace existing DaemonSet pods with new pods.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"templateGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetStatus represents the current status of a daemon set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"currentNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberMisscheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberReady\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The most recent generation observed by the daemon set controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"updatedNumberScheduled\": { SchemaProps: spec.SchemaProps{ Description: \"The total number of nodes that are running updated daemon pod\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberAvailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"numberUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a DaemonSet's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DaemonSetCondition\"), }, }, }, }, }, }, Required: []string{\"currentNumberScheduled\", \"numberMisscheduled\", \"desiredNumberScheduled\", \"numberReady\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.DaemonSetCondition\"}, } } func schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetUpdateStrategy indicates the strategy that the DaemonSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if type = \"RollingUpdate\".\", Ref: ref(\"k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet\"}, } } func schema_k8sio_api_extensions_v1beta1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DeploymentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the Deployment.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DeploymentStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.DeploymentSpec\", \"k8s.io/api/extensions/v1beta1.DeploymentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentCondition describes the state of a deployment at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastUpdateTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time this condition was updated.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentList is a list of Deployments.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Deployments.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.Deployment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.Deployment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Required: This must match the Name of a deployment.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"updatedAnnotations\": { SchemaProps: spec.SchemaProps{ Description: \"The annotations to be updated to a deployment\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"rollbackTo\": { SchemaProps: spec.SchemaProps{ Description: \"The config of this deployment rollback.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.RollbackConfig\"), }, }, }, Required: []string{\"name\", \"rollbackTo\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.RollbackConfig\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentSpec is the specification of the desired behavior of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template describes the pods that will be created.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, \"strategy\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"retainKeys\", }, }, SchemaProps: spec.SchemaProps{ Description: \"The deployment strategy to use to replace existing pods with new ones.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DeploymentStrategy\"), }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"revisionHistoryLimit\": { SchemaProps: spec.SchemaProps{ Description: \"The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old ReplicaSets\".\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"paused\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates that the deployment is paused and will not be processed by the deployment controller.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"rollbackTo\": { SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.RollbackConfig\"), }, }, \"progressDeadlineSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"no deadline\".\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"template\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/api/extensions/v1beta1.DeploymentStrategy\", \"k8s.io/api/extensions/v1beta1.RollbackConfig\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStatus is the most recently observed status of the Deployment.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"The generation observed by the deployment controller.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment (their labels match the selector).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"updatedReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of non-terminated pods targeted by this deployment that have the desired template spec.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of ready pods targeted by this deployment.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"unavailableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a deployment's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.DeploymentCondition\"), }, }, }, }, }, \"collisionCount\": { SchemaProps: spec.SchemaProps{ Description: \"Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.DeploymentCondition\"}, } } func schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentStrategy describes how to replace existing pods with new ones.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\", Type: []string{\"string\"}, Format: \"\", }, }, \"rollingUpdate\": { SchemaProps: spec.SchemaProps{ Description: \"Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.RollingUpdateDeployment\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.RollingUpdateDeployment\"}, } } func schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate what FSGroup is used in the SecurityContext.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IDRange\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IDRange\"}, } } func schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.\", Type: []string{\"string\"}, Format: \"\", }, }, \"pathType\": { SchemaProps: spec.SchemaProps{ Description: \"PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching isn done on a path element by element basis. A path element refers is then list of labels in the path split by the '/' separator. A request is an match for path p if every p is an element-wise prefix of p of then request path. Note that if the last element of the path is a substringn of the last element in request path, it is not a match (e.g. /foo/barn matches /foo/bar/baz, but does not match /foo/barbaz).n* ImplementationSpecific: Interpretation of the Path matching is up ton the IngressClass. Implementations can treat this as a separate PathTypen or treat it identically to Prefix or Exact path types.nImplementations are required to support all path types. Defaults to ImplementationSpecific.\", Type: []string{\"string\"}, Format: \"\", }, }, \"backend\": { SchemaProps: spec.SchemaProps{ Description: \"Backend defines the referenced service endpoint to which the traffic will be forwarded to.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressBackend\"), }, }, }, Required: []string{\"backend\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IngressBackend\"}, } } func schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"paths\": { SchemaProps: spec.SchemaProps{ Description: \"A collection of paths that map requests to backends.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.HTTPIngressPath\"), }, }, }, }, }, }, Required: []string{\"paths\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.HTTPIngressPath\"}, } } func schema_k8sio_api_extensions_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. Deprecated: use HostPortRange from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"min\": { SchemaProps: spec.SchemaProps{ Description: \"min is the start of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"max\": { SchemaProps: spec.SchemaProps{ Description: \"max is the end of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"min\", \"max\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"min\": { SchemaProps: spec.SchemaProps{ Description: \"min is the start of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, \"max\": { SchemaProps: spec.SchemaProps{ Description: \"max is the end of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"min\", \"max\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cidr\": { SchemaProps: spec.SchemaProps{ Description: \"CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"except\": { SchemaProps: spec.SchemaProps{ Description: \"Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"cidr\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IngressSpec\", \"k8s.io/api/extensions/v1beta1.IngressStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressBackend describes all endpoints for a given service and port.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"serviceName\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the name of the referenced service.\", Type: []string{\"string\"}, Format: \"\", }, }, \"servicePort\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the port of the referenced service.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.\", Ref: ref(\"k8s.io/api/core/v1.TypedLocalObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TypedLocalObjectReference\", \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressList is a collection of Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Ingress.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.Ingress\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.Ingress\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply ton the IP in the Spec of the parent Ingress.n2. The `:` delimiter is not respected because ports are not allowed.nt Currently the port of an Ingress is implicitly :80 for http andnt :443 for https.nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.nnHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.\", Type: []string{\"string\"}, Format: \"\", }, }, \"http\": { SchemaProps: spec.SchemaProps{ Description: \"http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"http\": { SchemaProps: spec.SchemaProps{ Description: \"http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressSpec describes the Ingress the user wishes to exist.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ingressClassName\": { SchemaProps: spec.SchemaProps{ Description: \"IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"backend\": { SchemaProps: spec.SchemaProps{ Description: \"A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressBackend\"), }, }, \"tls\": { SchemaProps: spec.SchemaProps{ Description: \"TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressTLS\"), }, }, }, }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IngressRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IngressBackend\", \"k8s.io/api/extensions/v1beta1.IngressRule\", \"k8s.io/api/extensions/v1beta1.IngressTLS\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressStatus describe the current state of the Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"loadBalancer\": { SchemaProps: spec.SchemaProps{ Description: \"LoadBalancer contains the current status of the load-balancer.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LoadBalancerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LoadBalancerStatus\"}, } } func schema_k8sio_api_extensions_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressTLS describes the transport layer security associated with an Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hosts\": { SchemaProps: spec.SchemaProps{ Description: \"Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior for this NetworkPolicy.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicySpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.NetworkPolicySpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyPort\"), }, }, }, }, }, \"to\": { SchemaProps: spec.SchemaProps{ Description: \"List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyPeer\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.NetworkPolicyPeer\", \"k8s.io/api/extensions/v1beta1.NetworkPolicyPort\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyPort\"), }, }, }, }, }, \"from\": { SchemaProps: spec.SchemaProps{ Description: \"List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyPeer\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.NetworkPolicyPeer\", \"k8s.io/api/extensions/v1beta1.NetworkPolicyPort\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.NetworkPolicy\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podSelector\": { SchemaProps: spec.SchemaProps{ Description: \"This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.nnIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.nnIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"ipBlock\": { SchemaProps: spec.SchemaProps{ Description: \"IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.IPBlock\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IPBlock\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"Optional. The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"endPort\": { SchemaProps: spec.SchemaProps{ Description: \"If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podSelector\": { SchemaProps: spec.SchemaProps{ Description: \"Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"ingress\": { SchemaProps: spec.SchemaProps{ Description: \"List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule\"), }, }, }, }, }, \"egress\": { SchemaProps: spec.SchemaProps{ Description: \"List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule\"), }, }, }, }, }, \"policyTypes\": { SchemaProps: spec.SchemaProps{ Description: \"List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"podSelector\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule\", \"k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec defines the policy enforced.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.PodSecurityPolicy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.PodSecurityPolicy\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"privileged\": { SchemaProps: spec.SchemaProps{ Description: \"privileged determines if a pod can request to be run as privileged.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"defaultAddCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"requiredDropCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowedCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"volumes\": { SchemaProps: spec.SchemaProps{ Description: \"volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"hostNetwork\": { SchemaProps: spec.SchemaProps{ Description: \"hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostPorts\": { SchemaProps: spec.SchemaProps{ Description: \"hostPorts determines which host port ranges are allowed to be exposed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.HostPortRange\"), }, }, }, }, }, \"hostPID\": { SchemaProps: spec.SchemaProps{ Description: \"hostPID determines if the policy allows the use of HostPID in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostIPC\": { SchemaProps: spec.SchemaProps{ Description: \"hostIPC determines if the policy allows the use of HostIPC in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"seLinux\": { SchemaProps: spec.SchemaProps{ Description: \"seLinux is the strategy that will dictate the allowable labels that may be set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions\"), }, }, \"runAsUser\": { SchemaProps: spec.SchemaProps{ Description: \"runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions\"), }, }, \"runAsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions\"), }, }, \"supplementalGroups\": { SchemaProps: spec.SchemaProps{ Description: \"supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions\"), }, }, \"fsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions\"), }, }, \"readOnlyRootFilesystem\": { SchemaProps: spec.SchemaProps{ Description: \"readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"defaultAllowPrivilegeEscalation\": { SchemaProps: spec.SchemaProps{ Description: \"defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowPrivilegeEscalation\": { SchemaProps: spec.SchemaProps{ Description: \"allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowedHostPaths\": { SchemaProps: spec.SchemaProps{ Description: \"allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.AllowedHostPath\"), }, }, }, }, }, \"allowedFlexVolumes\": { SchemaProps: spec.SchemaProps{ Description: \"allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.AllowedFlexVolume\"), }, }, }, }, }, \"allowedCSIDrivers\": { SchemaProps: spec.SchemaProps{ Description: \"AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.AllowedCSIDriver\"), }, }, }, }, }, \"allowedUnsafeSysctls\": { SchemaProps: spec.SchemaProps{ Description: \"allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection.nnExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"forbiddenSysctls\": { SchemaProps: spec.SchemaProps{ Description: \"forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.nnExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowedProcMountTypes\": { SchemaProps: spec.SchemaProps{ Description: \"AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"runtimeClass\": { SchemaProps: spec.SchemaProps{ Description: \"runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.\", Ref: ref(\"k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions\"), }, }, }, Required: []string{\"seLinux\", \"runAsUser\", \"supplementalGroups\", \"fsGroup\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.AllowedCSIDriver\", \"k8s.io/api/extensions/v1beta1.AllowedFlexVolume\", \"k8s.io/api/extensions/v1beta1.AllowedHostPath\", \"k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions\", \"k8s.io/api/extensions/v1beta1.HostPortRange\", \"k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions\", \"k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions\", \"k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions\", \"k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions\", \"k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions\"}, } } func schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ReplicaSetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ReplicaSetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.ReplicaSetSpec\", \"k8s.io/api/extensions/v1beta1.ReplicaSetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetCondition describes the state of a replica set at a certain point.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of replica set condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"The last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"The reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human readable message indicating details about the transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetList is a collection of ReplicaSets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ReplicaSet\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.ReplicaSet\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetSpec is the specification of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minReadySeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"template\": { SchemaProps: spec.SchemaProps{ Description: \"Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.PodTemplateSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PodTemplateSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetStatus represents the current status of a ReplicaSet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"fullyLabeledReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of pods that have labels matching the labels of the pod template of the replicaset.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readyReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of ready replicas for this replica set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"availableReplicas\": { SchemaProps: spec.SchemaProps{ Description: \"The number of available replicas (ready for at least minReadySeconds) for this replica set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"ObservedGeneration reflects the generation of the most recently observed ReplicaSet.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Represents the latest available observations of a replica set's current state.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ReplicaSetCondition\"), }, }, }, }, }, }, Required: []string{\"replicas\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.ReplicaSetCondition\"}, } } func schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"revision\": { SchemaProps: spec.SchemaProps{ Description: \"The revision to rollback to. If set to 0, rollback to the last revision.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, } } func schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of daemon set rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Spec to control the desired behavior of rolling update.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"maxSurge\": { SchemaProps: spec.SchemaProps{ Description: \"The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable RunAsGroup values that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IDRange\"), }, }, }, }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IDRange\"}, } } func schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable RunAsUser values that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IDRange\"), }, }, }, }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IDRange\"}, } } func schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"allowedRuntimeClassNames\": { SchemaProps: spec.SchemaProps{ Description: \"allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"defaultRuntimeClassName\": { SchemaProps: spec.SchemaProps{ Description: \"defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"allowedRuntimeClassNames\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable labels that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"seLinuxOptions\": { SchemaProps: spec.SchemaProps{ Description: \"seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\", Ref: ref(\"k8s.io/api/core/v1.SELinuxOptions\"), }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SELinuxOptions\"}, } } func schema_k8sio_api_extensions_v1beta1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"represents a scaling request for a resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ScaleSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.ScaleStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.ScaleSpec\", \"k8s.io/api/extensions/v1beta1.ScaleStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"describes the attributes of a scale subresource\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"desired number of instances for the scaled object.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"represents the current status of a scale subresource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"replicas\": { SchemaProps: spec.SchemaProps{ Description: \"actual number of observed instances of the scaled object.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"selector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"targetSelector\": { SchemaProps: spec.SchemaProps{ Description: \"label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"replicas\"}, }, }, } } func schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/extensions/v1beta1.IDRange\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/extensions/v1beta1.IDRange\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowDistinguisherMethod specifies the method of a flow distinguisher.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec\", \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaCondition describes conditions for a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaList is a list of FlowSchema objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of FlowSchemas.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.FlowSchema\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.FlowSchema\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaSpec describes how the FlowSchema's specification looks like.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"priorityLevelConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference\"), }, }, \"matchingPrecedence\": { SchemaProps: spec.SchemaProps{ Description: \"`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"distinguisherMethod\": { SchemaProps: spec.SchemaProps{ Description: \"`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod\"), }, }, \"rules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects\"), }, }, }, }, }, }, Required: []string{\"priorityLevelConfiguration\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod\", \"k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects\", \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaStatus represents the current state of a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is a list of the current states of FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupSubject holds detailed information for group-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitResponse defines how to handle requests that can not be executed right now.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"queuing\": { SchemaProps: spec.SchemaProps{ Description: \"`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"queuing\": \"Queuing\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:n * How are requests for this priority level limited?n * What should be done with requests that exceed the limit?\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"assuredConcurrencyShares\": { SchemaProps: spec.SchemaProps{ Description: \"`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:nn ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )nnbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"limitResponse\": { SchemaProps: spec.SchemaProps{ Description: \"`limitResponse` indicates what to do with requests that can not be executed right now\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.LimitResponse\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.LimitResponse\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:n - \"/healthz\" is legaln - \"/hea*\" is illegaln - \"/hea\" is legal but matches nothingn - \"/hea/*\" also matches nothingn - \"/healthz/*\" matches all per-component health checks.n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"nonResourceURLs\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"subjects\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.Subject\"), }, }, }, }, }, \"resourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule\"), }, }, }, }, }, \"nonResourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule\"), }, }, }, }, }, }, Required: []string{\"subjects\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1alpha1.Subject\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfiguration represents the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec\", \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationCondition defines the condition of priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of request-priorities.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of the priority level configuration being referenced Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationSpec specifies the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"limited\": { SchemaProps: spec.SchemaProps{ Description: \"`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"limited\": \"Limited\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is the current state of \"request-priority\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"QueuingConfiguration holds the configuration parameters for queuing\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"queues\": { SchemaProps: spec.SchemaProps{ Description: \"`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"handSize\": { SchemaProps: spec.SchemaProps{ Description: \"`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"queueLengthLimit\": { SchemaProps: spec.SchemaProps{ Description: \"`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"clusterScope\": { SchemaProps: spec.SchemaProps{ Description: \"`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"namespaces\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"apiGroups\", \"resources\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountSubject holds detailed information for service-account-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"`namespace` is the namespace of matching ServiceAccount objects. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"`kind` indicates which one of the other fields is non-empty. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"`user` matches based on username.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.UserSubject\"), }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"`group` matches based on user group name.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.GroupSubject\"), }, }, \"serviceAccount\": { SchemaProps: spec.SchemaProps{ Description: \"`serviceAccount` matches ServiceAccounts.\", Ref: ref(\"k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject\"), }, }, }, Required: []string{\"kind\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"kind\", \"fields-to-discriminateBy\": map[string]interface{}{ \"group\": \"Group\", \"serviceAccount\": \"ServiceAccount\", \"user\": \"User\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1alpha1.GroupSubject\", \"k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject\", \"k8s.io/api/flowcontrol/v1alpha1.UserSubject\"}, } } func schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UserSubject holds detailed information for user-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the username that matches, or \"*\" to match all usernames. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowDistinguisherMethod specifies the method of a flow distinguisher.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec\", \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaCondition describes conditions for a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaList is a list of FlowSchema objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of FlowSchemas.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.FlowSchema\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.FlowSchema\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaSpec describes how the FlowSchema's specification looks like.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"priorityLevelConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference\"), }, }, \"matchingPrecedence\": { SchemaProps: spec.SchemaProps{ Description: \"`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"distinguisherMethod\": { SchemaProps: spec.SchemaProps{ Description: \"`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod\"), }, }, \"rules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects\"), }, }, }, }, }, }, Required: []string{\"priorityLevelConfiguration\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod\", \"k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects\", \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaStatus represents the current state of a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is a list of the current states of FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupSubject holds detailed information for group-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitResponse defines how to handle requests that can not be executed right now.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"queuing\": { SchemaProps: spec.SchemaProps{ Description: \"`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"queuing\": \"Queuing\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:n * How are requests for this priority level limited?n * What should be done with requests that exceed the limit?\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"assuredConcurrencyShares\": { SchemaProps: spec.SchemaProps{ Description: \"`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:nn ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )nnbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"limitResponse\": { SchemaProps: spec.SchemaProps{ Description: \"`limitResponse` indicates what to do with requests that can not be executed right now\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.LimitResponse\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.LimitResponse\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:n - \"/healthz\" is legaln - \"/hea*\" is illegaln - \"/hea\" is legal but matches nothingn - \"/hea/*\" also matches nothingn - \"/healthz/*\" matches all per-component health checks.n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"nonResourceURLs\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"subjects\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.Subject\"), }, }, }, }, }, \"resourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule\"), }, }, }, }, }, \"nonResourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule\"), }, }, }, }, }, }, Required: []string{\"subjects\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1beta1.Subject\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfiguration represents the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec\", \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationCondition defines the condition of priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of request-priorities.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of the priority level configuration being referenced Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationSpec specifies the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"limited\": { SchemaProps: spec.SchemaProps{ Description: \"`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"limited\": \"Limited\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is the current state of \"request-priority\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"QueuingConfiguration holds the configuration parameters for queuing\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"queues\": { SchemaProps: spec.SchemaProps{ Description: \"`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"handSize\": { SchemaProps: spec.SchemaProps{ Description: \"`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"queueLengthLimit\": { SchemaProps: spec.SchemaProps{ Description: \"`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"clusterScope\": { SchemaProps: spec.SchemaProps{ Description: \"`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"namespaces\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"apiGroups\", \"resources\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountSubject holds detailed information for service-account-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"`namespace` is the namespace of matching ServiceAccount objects. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"`kind` indicates which one of the other fields is non-empty. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"`user` matches based on username.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.UserSubject\"), }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"`group` matches based on user group name.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.GroupSubject\"), }, }, \"serviceAccount\": { SchemaProps: spec.SchemaProps{ Description: \"`serviceAccount` matches ServiceAccounts.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject\"), }, }, }, Required: []string{\"kind\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"kind\", \"fields-to-discriminateBy\": map[string]interface{}{ \"group\": \"Group\", \"serviceAccount\": \"ServiceAccount\", \"user\": \"User\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta1.GroupSubject\", \"k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject\", \"k8s.io/api/flowcontrol/v1beta1.UserSubject\"}, } } func schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UserSubject holds detailed information for user-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the username that matches, or \"*\" to match all usernames. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowDistinguisherMethod specifies the method of a flow distinguisher.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec\", \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaCondition describes conditions for a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaList is a list of FlowSchema objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of FlowSchemas.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.FlowSchema\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.FlowSchema\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaSpec describes how the FlowSchema's specification looks like.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"priorityLevelConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference\"), }, }, \"matchingPrecedence\": { SchemaProps: spec.SchemaProps{ Description: \"`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"distinguisherMethod\": { SchemaProps: spec.SchemaProps{ Description: \"`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod\"), }, }, \"rules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects\"), }, }, }, }, }, }, Required: []string{\"priorityLevelConfiguration\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod\", \"k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects\", \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FlowSchemaStatus represents the current state of a FlowSchema.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is a list of the current states of FlowSchema.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupSubject holds detailed information for group-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitResponse defines how to handle requests that can not be executed right now.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"queuing\": { SchemaProps: spec.SchemaProps{ Description: \"`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"queuing\": \"Queuing\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:n * How are requests for this priority level limited?n * What should be done with requests that exceed the limit?\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"assuredConcurrencyShares\": { SchemaProps: spec.SchemaProps{ Description: \"`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:nn ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )nnbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"limitResponse\": { SchemaProps: spec.SchemaProps{ Description: \"`limitResponse` indicates what to do with requests that can not be executed right now\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.LimitResponse\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.LimitResponse\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:n - \"/healthz\" is legaln - \"/hea*\" is illegaln - \"/hea\" is legal but matches nothingn - \"/hea/*\" also matches nothingn - \"/healthz/*\" matches all per-component health checks.n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"nonResourceURLs\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"subjects\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.Subject\"), }, }, }, }, }, \"resourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule\"), }, }, }, }, }, \"nonResourceRules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule\"), }, }, }, }, }, }, Required: []string{\"subjects\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule\", \"k8s.io/api/flowcontrol/v1beta2.Subject\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfiguration represents the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec\", \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationCondition defines the condition of priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` is the type of the condition. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"`status` is the status of the condition. Can be True, False, Unknown. Required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"`lastTransitionTime` is the last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"`reason` is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"`message` is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"`items` is a list of request-priorities.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of the priority level configuration being referenced Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationSpec specifies the configuration of a priority level.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"limited\": { SchemaProps: spec.SchemaProps{ Description: \"`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration\"), }, }, }, Required: []string{\"type\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"type\", \"fields-to-discriminateBy\": map[string]interface{}{ \"limited\": \"Limited\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`conditions` is the current state of \"request-priority\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"QueuingConfiguration holds the configuration parameters for queuing\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"queues\": { SchemaProps: spec.SchemaProps{ Description: \"`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"handSize\": { SchemaProps: spec.SchemaProps{ Description: \"`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"queueLengthLimit\": { SchemaProps: spec.SchemaProps{ Description: \"`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"clusterScope\": { SchemaProps: spec.SchemaProps{ Description: \"`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"namespaces\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\", \"apiGroups\", \"resources\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceAccountSubject holds detailed information for service-account-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"`namespace` is the namespace of matching ServiceAccount objects. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_k8sio_api_flowcontrol_v1beta2_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"`kind` indicates which one of the other fields is non-empty. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"`user` matches based on username.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.UserSubject\"), }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"`group` matches based on user group name.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.GroupSubject\"), }, }, \"serviceAccount\": { SchemaProps: spec.SchemaProps{ Description: \"`serviceAccount` matches ServiceAccounts.\", Ref: ref(\"k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject\"), }, }, }, Required: []string{\"kind\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-unions\": []interface{}{ map[string]interface{}{ \"discriminator\": \"kind\", \"fields-to-discriminateBy\": map[string]interface{}{ \"group\": \"Group\", \"serviceAccount\": \"ServiceAccount\", \"user\": \"User\", }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/flowcontrol/v1beta2.GroupSubject\", \"k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject\", \"k8s.io/api/flowcontrol/v1beta2.UserSubject\"}, } } func schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UserSubject holds detailed information for user-kind subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"`name` is the username that matches, or \"*\" to match all usernames. Required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ImageReview checks if the set of images in a pod are allowed.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information about the pod being evaluated\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the backend and indicates whether the pod should be allowed.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec\", \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ImageReviewContainerSpec is a description of a container within the pod creation request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"image\": { SchemaProps: spec.SchemaProps{ Description: \"This can be in the form image:tag or image@SHA:012345679abcdef.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ImageReviewSpec is a description of the pod creation request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"containers\": { SchemaProps: spec.SchemaProps{ Description: \"Containers is a list of a subset of the information in each container of the Pod being created.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec\"), }, }, }, }, }, \"annotations\": { SchemaProps: spec.SchemaProps{ Description: \"Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace the pod is being created in.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec\"}, } } func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ImageReviewStatus is the result of the review for the pod creation request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"allowed\": { SchemaProps: spec.SchemaProps{ Description: \"Allowed indicates that all images were allowed to be run.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.\", Type: []string{\"string\"}, Format: \"\", }, }, \"auditAnnotations\": { SchemaProps: spec.SchemaProps{ Description: \"AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"allowed\"}, }, }, } } func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"pathType\": { SchemaProps: spec.SchemaProps{ Description: \"PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching isn done on a path element by element basis. A path element refers is then list of labels in the path split by the '/' separator. A request is an match for path p if every p is an element-wise prefix of p of then request path. Note that if the last element of the path is a substringn of the last element in request path, it is not a match (e.g. /foo/barn matches /foo/bar/baz, but does not match /foo/barbaz).n* ImplementationSpecific: Interpretation of the Path matching is up ton the IngressClass. Implementations can treat this as a separate PathTypen or treat it identically to Prefix or Exact path types.nImplementations are required to support all path types.\", Type: []string{\"string\"}, Format: \"\", }, }, \"backend\": { SchemaProps: spec.SchemaProps{ Description: \"Backend defines the referenced service endpoint to which the traffic will be forwarded to.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressBackend\"), }, }, }, Required: []string{\"pathType\", \"backend\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressBackend\"}, } } func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"paths\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"A collection of paths that map requests to backends.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.HTTPIngressPath\"), }, }, }, }, }, }, Required: []string{\"paths\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.HTTPIngressPath\"}, } } func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cidr\": { SchemaProps: spec.SchemaProps{ Description: \"CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"except\": { SchemaProps: spec.SchemaProps{ Description: \"Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"cidr\"}, }, }, } } func schema_k8sio_api_networking_v1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressSpec\", \"k8s.io/api/networking/v1.IngressStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_networking_v1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressBackend describes all endpoints for a given service and port.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"service\": { SchemaProps: spec.SchemaProps{ Description: \"Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".\", Ref: ref(\"k8s.io/api/networking/v1.IngressServiceBackend\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".\", Ref: ref(\"k8s.io/api/core/v1.TypedLocalObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TypedLocalObjectReference\", \"k8s.io/api/networking/v1.IngressServiceBackend\"}, } } func schema_k8sio_api_networking_v1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressClassSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressClassSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassList is a collection of IngressClasses.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of IngressClasses.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_networking_v1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_networking_v1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassSpec provides information about the class of an Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"controller\": { SchemaProps: spec.SchemaProps{ Description: \"Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.\", Type: []string{\"string\"}, Format: \"\", }, }, \"parameters\": { SchemaProps: spec.SchemaProps{ Description: \"Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.\", Ref: ref(\"k8s.io/api/networking/v1.IngressClassParametersReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressClassParametersReference\"}, } } func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressList is a collection of Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Ingress.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.Ingress\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.Ingress\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_networking_v1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply ton the IP in the Spec of the parent Ingress.n2. The `:` delimiter is not respected because ports are not allowed.nt Currently the port of an Ingress is implicitly :80 for http andnt :443 for https.nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.nnHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.\", Type: []string{\"string\"}, Format: \"\", }, }, \"http\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/api/networking/v1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_networking_v1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"http\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/api/networking/v1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressServiceBackend references a Kubernetes Service as a Backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the referenced service. The service must exist in the same namespace as the Ingress object.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"Port of the referenced service. A port name or port number is required for a IngressServiceBackend.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.ServiceBackendPort\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.ServiceBackendPort\"}, } } func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressSpec describes the Ingress the user wishes to exist.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ingressClassName\": { SchemaProps: spec.SchemaProps{ Description: \"IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"defaultBackend\": { SchemaProps: spec.SchemaProps{ Description: \"DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.\", Ref: ref(\"k8s.io/api/networking/v1.IngressBackend\"), }, }, \"tls\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressTLS\"), }, }, }, }, }, \"rules\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.IngressRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IngressBackend\", \"k8s.io/api/networking/v1.IngressRule\", \"k8s.io/api/networking/v1.IngressTLS\"}, } } func schema_k8sio_api_networking_v1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressStatus describe the current state of the Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"loadBalancer\": { SchemaProps: spec.SchemaProps{ Description: \"LoadBalancer contains the current status of the load-balancer.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LoadBalancerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LoadBalancerStatus\"}, } } func schema_k8sio_api_networking_v1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressTLS describes the transport layer security associated with an Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hosts\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicy describes what network traffic is allowed for a set of Pods\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior for this NetworkPolicy.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicySpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.NetworkPolicySpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyPort\"), }, }, }, }, }, \"to\": { SchemaProps: spec.SchemaProps{ Description: \"List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyPeer\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.NetworkPolicyPeer\", \"k8s.io/api/networking/v1.NetworkPolicyPort\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ports\": { SchemaProps: spec.SchemaProps{ Description: \"List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyPort\"), }, }, }, }, }, \"from\": { SchemaProps: spec.SchemaProps{ Description: \"List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyPeer\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.NetworkPolicyPeer\", \"k8s.io/api/networking/v1.NetworkPolicyPort\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicyList is a list of NetworkPolicy objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.NetworkPolicy\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podSelector\": { SchemaProps: spec.SchemaProps{ Description: \"This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.nnIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"namespaceSelector\": { SchemaProps: spec.SchemaProps{ Description: \"Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.nnIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"ipBlock\": { SchemaProps: spec.SchemaProps{ Description: \"IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.\", Ref: ref(\"k8s.io/api/networking/v1.IPBlock\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.IPBlock\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicyPort describes a port to allow traffic on\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"protocol\": { SchemaProps: spec.SchemaProps{ Description: \"The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"endPort\": { SchemaProps: spec.SchemaProps{ Description: \"If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NetworkPolicySpec provides the specification of a NetworkPolicy\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podSelector\": { SchemaProps: spec.SchemaProps{ Description: \"Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"ingress\": { SchemaProps: spec.SchemaProps{ Description: \"List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyIngressRule\"), }, }, }, }, }, \"egress\": { SchemaProps: spec.SchemaProps{ Description: \"List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1.NetworkPolicyEgressRule\"), }, }, }, }, }, \"policyTypes\": { SchemaProps: spec.SchemaProps{ Description: \"List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"podSelector\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1.NetworkPolicyEgressRule\", \"k8s.io/api/networking/v1.NetworkPolicyIngressRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_networking_v1_ServiceBackendPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceBackendPort is the service port being referenced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"number\": { SchemaProps: spec.SchemaProps{ Description: \"Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"path\": { SchemaProps: spec.SchemaProps{ Description: \"Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"pathType\": { SchemaProps: spec.SchemaProps{ Description: \"PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching isn done on a path element by element basis. A path element refers is then list of labels in the path split by the '/' separator. A request is an match for path p if every p is an element-wise prefix of p of then request path. Note that if the last element of the path is a substringn of the last element in request path, it is not a match (e.g. /foo/barn matches /foo/bar/baz, but does not match /foo/barbaz).n* ImplementationSpecific: Interpretation of the Path matching is up ton the IngressClass. Implementations can treat this as a separate PathTypen or treat it identically to Prefix or Exact path types.nImplementations are required to support all path types. Defaults to ImplementationSpecific.\", Type: []string{\"string\"}, Format: \"\", }, }, \"backend\": { SchemaProps: spec.SchemaProps{ Description: \"Backend defines the referenced service endpoint to which the traffic will be forwarded to.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressBackend\"), }, }, }, Required: []string{\"backend\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressBackend\"}, } } func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"paths\": { SchemaProps: spec.SchemaProps{ Description: \"A collection of paths that map requests to backends.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.HTTPIngressPath\"), }, }, }, }, }, }, Required: []string{\"paths\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.HTTPIngressPath\"}, } } func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressSpec\", \"k8s.io/api/networking/v1beta1.IngressStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressBackend describes all endpoints for a given service and port.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"serviceName\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the name of the referenced service.\", Type: []string{\"string\"}, Format: \"\", }, }, \"servicePort\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the port of the referenced service.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.\", Ref: ref(\"k8s.io/api/core/v1.TypedLocalObjectReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TypedLocalObjectReference\", \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressClassSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressClassSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassList is a collection of IngressClasses.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of IngressClasses.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\", \"scope\"}, }, }, } } func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressClassSpec provides information about the class of an Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"controller\": { SchemaProps: spec.SchemaProps{ Description: \"Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.\", Type: []string{\"string\"}, Format: \"\", }, }, \"parameters\": { SchemaProps: spec.SchemaProps{ Description: \"Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.\", Ref: ref(\"k8s.io/api/networking/v1beta1.IngressClassParametersReference\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressClassParametersReference\"}, } } func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressList is a collection of Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of Ingress.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.Ingress\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.Ingress\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"host\": { SchemaProps: spec.SchemaProps{ Description: \"Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply ton the IP in the Spec of the parent Ingress.n2. The `:` delimiter is not respected because ports are not allowed.nt Currently the port of an Ingress is implicitly :80 for http andnt :443 for https.nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.nnHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.\", Type: []string{\"string\"}, Format: \"\", }, }, \"http\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/api/networking/v1beta1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"http\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/api/networking/v1beta1.HTTPIngressRuleValue\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.HTTPIngressRuleValue\"}, } } func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressSpec describes the Ingress the user wishes to exist.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ingressClassName\": { SchemaProps: spec.SchemaProps{ Description: \"IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"backend\": { SchemaProps: spec.SchemaProps{ Description: \"A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.\", Ref: ref(\"k8s.io/api/networking/v1beta1.IngressBackend\"), }, }, \"tls\": { SchemaProps: spec.SchemaProps{ Description: \"TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressTLS\"), }, }, }, }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/networking/v1beta1.IngressRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/networking/v1beta1.IngressBackend\", \"k8s.io/api/networking/v1beta1.IngressRule\", \"k8s.io/api/networking/v1beta1.IngressTLS\"}, } } func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressStatus describe the current state of the Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"loadBalancer\": { SchemaProps: spec.SchemaProps{ Description: \"LoadBalancer contains the current status of the load-balancer.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.LoadBalancerStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.LoadBalancerStatus\"}, } } func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IngressTLS describes the transport layer security associated with an Ingress.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"hosts\": { SchemaProps: spec.SchemaProps{ Description: \"Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"secretName\": { SchemaProps: spec.SchemaProps{ Description: \"SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Overhead structure represents the resource overhead associated with running a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podFixed\": { SchemaProps: spec.SchemaProps{ Description: \"PodFixed represents the fixed resource overhead associated with running a pod.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"handler\": { SchemaProps: spec.SchemaProps{ Description: \"Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"overhead\": { SchemaProps: spec.SchemaProps{ Description: \"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, seen https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.\", Ref: ref(\"k8s.io/api/node/v1.Overhead\"), }, }, \"scheduling\": { SchemaProps: spec.SchemaProps{ Description: \"Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.\", Ref: ref(\"k8s.io/api/node/v1.Scheduling\"), }, }, }, Required: []string{\"handler\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1.Overhead\", \"k8s.io/api/node/v1.Scheduling\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassList is a list of RuntimeClass objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/node/v1.RuntimeClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1.RuntimeClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nodeSelector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"tolerations\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Toleration\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Toleration\"}, } } func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Overhead structure represents the resource overhead associated with running a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podFixed\": { SchemaProps: spec.SchemaProps{ Description: \"PodFixed represents the fixed resource overhead associated with running a pod.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/node/v1alpha1.RuntimeClassSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1alpha1.RuntimeClassSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassList is a list of RuntimeClass objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/node/v1alpha1.RuntimeClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1alpha1.RuntimeClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"runtimeHandler\": { SchemaProps: spec.SchemaProps{ Description: \"RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"overhead\": { SchemaProps: spec.SchemaProps{ Description: \"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.\", Ref: ref(\"k8s.io/api/node/v1alpha1.Overhead\"), }, }, \"scheduling\": { SchemaProps: spec.SchemaProps{ Description: \"Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.\", Ref: ref(\"k8s.io/api/node/v1alpha1.Scheduling\"), }, }, }, Required: []string{\"runtimeHandler\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1alpha1.Overhead\", \"k8s.io/api/node/v1alpha1.Scheduling\"}, } } func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nodeSelector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"tolerations\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Toleration\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Toleration\"}, } } func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Overhead structure represents the resource overhead associated with running a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"podFixed\": { SchemaProps: spec.SchemaProps{ Description: \"PodFixed represents the fixed resource overhead associated with running a pod.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"handler\": { SchemaProps: spec.SchemaProps{ Description: \"Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"overhead\": { SchemaProps: spec.SchemaProps{ Description: \"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.\", Ref: ref(\"k8s.io/api/node/v1beta1.Overhead\"), }, }, \"scheduling\": { SchemaProps: spec.SchemaProps{ Description: \"Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.\", Ref: ref(\"k8s.io/api/node/v1beta1.Scheduling\"), }, }, }, Required: []string{\"handler\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1beta1.Overhead\", \"k8s.io/api/node/v1beta1.Scheduling\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassList is a list of RuntimeClass objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/node/v1beta1.RuntimeClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/node/v1beta1.RuntimeClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"nodeSelector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"tolerations\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Toleration\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Toleration\"}, } } func schema_k8sio_api_policy_v1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta describes the pod that is being evicted.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"deleteOptions\": { SchemaProps: spec.SchemaProps{ Description: \"DeleteOptions may be provided\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the PodDisruptionBudget.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1.PodDisruptionBudgetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the PodDisruptionBudget.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1.PodDisruptionBudgetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1.PodDisruptionBudgetSpec\", \"k8s.io/api/policy/v1.PodDisruptionBudgetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetList is a collection of PodDisruptionBudgets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of PodDisruptionBudgets\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1.PodDisruptionBudget\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1.PodDisruptionBudget\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"minAvailable\": { SchemaProps: spec.SchemaProps{ Description: \"An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"selector\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"replace\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\", \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"disruptedPods\": { SchemaProps: spec.SchemaProps{ Description: \"DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, }, }, \"disruptionsAllowed\": { SchemaProps: spec.SchemaProps{ Description: \"Number of pod disruptions that are currently allowed.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentHealthy\": { SchemaProps: spec.SchemaProps{ Description: \"current number of healthy pods\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredHealthy\": { SchemaProps: spec.SchemaProps{ Description: \"minimum desired number of healthy pods\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"expectedPods\": { SchemaProps: spec.SchemaProps{ Description: \"total number of pods counted by this disruption budget\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to computen the number of allowed disruptions. Therefore no disruptions aren allowed and the status of the condition will be False.n- InsufficientPods: The number of pods are either at or below the numbern required by the PodDisruptionBudget. No disruptions aren allowed and the status of the condition will be False.n- SufficientPods: There are more pods than required by the PodDisruptionBudget.n The condition will be True, and the number of allowedn disruptions are provided by the disruptionsAllowed property.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\"), }, }, }, }, }, }, Required: []string{\"disruptionsAllowed\", \"currentHealthy\", \"desiredHealthy\", \"expectedPods\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the registered name of the CSI driver\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedFlexVolume represents a single Flexvolume that is allowed to be used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"driver\": { SchemaProps: spec.SchemaProps{ Description: \"driver is the name of the Flexvolume driver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"driver\"}, }, }, } } func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"pathPrefix\": { SchemaProps: spec.SchemaProps{ Description: \"pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.nnExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`\", Type: []string{\"string\"}, Format: \"\", }, }, \"readOnly\": { SchemaProps: spec.SchemaProps{ Description: \"when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta describes the pod that is being evicted.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"deleteOptions\": { SchemaProps: spec.SchemaProps{ Description: \"DeleteOptions may be provided\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FSGroupStrategyOptions defines the strategy type and options used to create the strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate what FSGroup is used in the SecurityContext.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.IDRange\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.IDRange\"}, } } func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"min\": { SchemaProps: spec.SchemaProps{ Description: \"min is the start of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"max\": { SchemaProps: spec.SchemaProps{ Description: \"max is the end of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"min\", \"max\"}, }, }, } } func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IDRange provides a min/max of an allowed range of IDs.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"min\": { SchemaProps: spec.SchemaProps{ Description: \"min is the start of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, \"max\": { SchemaProps: spec.SchemaProps{ Description: \"max is the end of the range, inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"min\", \"max\"}, }, }, } } func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired behavior of the PodDisruptionBudget.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Most recently observed status of the PodDisruptionBudget.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec\", \"k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetList is a collection of PodDisruptionBudgets.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items list individual PodDisruptionBudget objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.PodDisruptionBudget\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.PodDisruptionBudget\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"minAvailable\": { SchemaProps: spec.SchemaProps{ Description: \"An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"maxUnavailable\": { SchemaProps: spec.SchemaProps{ Description: \"An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".\", Ref: ref(\"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\", \"k8s.io/apimachinery/pkg/util/intstr.IntOrString\"}, } } func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"disruptedPods\": { SchemaProps: spec.SchemaProps{ Description: \"DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, }, }, }, \"disruptionsAllowed\": { SchemaProps: spec.SchemaProps{ Description: \"Number of pod disruptions that are currently allowed.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"currentHealthy\": { SchemaProps: spec.SchemaProps{ Description: \"current number of healthy pods\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"desiredHealthy\": { SchemaProps: spec.SchemaProps{ Description: \"minimum desired number of healthy pods\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"expectedPods\": { SchemaProps: spec.SchemaProps{ Description: \"total number of pods counted by this disruption budget\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to computen the number of allowed disruptions. Therefore no disruptions aren allowed and the status of the condition will be False.n- InsufficientPods: The number of pods are either at or below the numbern required by the PodDisruptionBudget. No disruptions aren allowed and the status of the condition will be False.n- SufficientPods: There are more pods than required by the PodDisruptionBudget.n The condition will be True, and the number of allowedn disruptions are provided by the disruptionsAllowed property.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\"), }, }, }, }, }, }, Required: []string{\"disruptionsAllowed\", \"currentHealthy\", \"desiredHealthy\", \"expectedPods\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Condition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec defines the policy enforced.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.PodSecurityPolicySpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.PodSecurityPolicySpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicyList is a list of PodSecurityPolicy objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is a list of schema objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.PodSecurityPolicy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.PodSecurityPolicy\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodSecurityPolicySpec defines the policy enforced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"privileged\": { SchemaProps: spec.SchemaProps{ Description: \"privileged determines if a pod can request to be run as privileged.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"defaultAddCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"requiredDropCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowedCapabilities\": { SchemaProps: spec.SchemaProps{ Description: \"allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"volumes\": { SchemaProps: spec.SchemaProps{ Description: \"volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"hostNetwork\": { SchemaProps: spec.SchemaProps{ Description: \"hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostPorts\": { SchemaProps: spec.SchemaProps{ Description: \"hostPorts determines which host port ranges are allowed to be exposed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.HostPortRange\"), }, }, }, }, }, \"hostPID\": { SchemaProps: spec.SchemaProps{ Description: \"hostPID determines if the policy allows the use of HostPID in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"hostIPC\": { SchemaProps: spec.SchemaProps{ Description: \"hostIPC determines if the policy allows the use of HostIPC in the pod spec.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"seLinux\": { SchemaProps: spec.SchemaProps{ Description: \"seLinux is the strategy that will dictate the allowable labels that may be set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.SELinuxStrategyOptions\"), }, }, \"runAsUser\": { SchemaProps: spec.SchemaProps{ Description: \"runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions\"), }, }, \"runAsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.\", Ref: ref(\"k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions\"), }, }, \"supplementalGroups\": { SchemaProps: spec.SchemaProps{ Description: \"supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions\"), }, }, \"fsGroup\": { SchemaProps: spec.SchemaProps{ Description: \"fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.FSGroupStrategyOptions\"), }, }, \"readOnlyRootFilesystem\": { SchemaProps: spec.SchemaProps{ Description: \"readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"defaultAllowPrivilegeEscalation\": { SchemaProps: spec.SchemaProps{ Description: \"defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowPrivilegeEscalation\": { SchemaProps: spec.SchemaProps{ Description: \"allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowedHostPaths\": { SchemaProps: spec.SchemaProps{ Description: \"allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.AllowedHostPath\"), }, }, }, }, }, \"allowedFlexVolumes\": { SchemaProps: spec.SchemaProps{ Description: \"allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.AllowedFlexVolume\"), }, }, }, }, }, \"allowedCSIDrivers\": { SchemaProps: spec.SchemaProps{ Description: \"AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.AllowedCSIDriver\"), }, }, }, }, }, \"allowedUnsafeSysctls\": { SchemaProps: spec.SchemaProps{ Description: \"allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.nnExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"forbiddenSysctls\": { SchemaProps: spec.SchemaProps{ Description: \"forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.nnExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowedProcMountTypes\": { SchemaProps: spec.SchemaProps{ Description: \"AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"runtimeClass\": { SchemaProps: spec.SchemaProps{ Description: \"runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.\", Ref: ref(\"k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions\"), }, }, }, Required: []string{\"seLinux\", \"runAsUser\", \"supplementalGroups\", \"fsGroup\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.AllowedCSIDriver\", \"k8s.io/api/policy/v1beta1.AllowedFlexVolume\", \"k8s.io/api/policy/v1beta1.AllowedHostPath\", \"k8s.io/api/policy/v1beta1.FSGroupStrategyOptions\", \"k8s.io/api/policy/v1beta1.HostPortRange\", \"k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions\", \"k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions\", \"k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions\", \"k8s.io/api/policy/v1beta1.SELinuxStrategyOptions\", \"k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions\"}, } } func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable RunAsGroup values that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.IDRange\"), }, }, }, }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.IDRange\"}, } } func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable RunAsUser values that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.IDRange\"), }, }, }, }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.IDRange\"}, } } func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"allowedRuntimeClassNames\": { SchemaProps: spec.SchemaProps{ Description: \"allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"defaultRuntimeClassName\": { SchemaProps: spec.SchemaProps{ Description: \"defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"allowedRuntimeClassNames\"}, }, }, } } func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate the allowable labels that may be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"seLinuxOptions\": { SchemaProps: spec.SchemaProps{ Description: \"seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\", Ref: ref(\"k8s.io/api/core/v1.SELinuxOptions\"), }, }, }, Required: []string{\"rule\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.SELinuxOptions\"}, } } func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.\", Type: []string{\"string\"}, Format: \"\", }, }, \"ranges\": { SchemaProps: spec.SchemaProps{ Description: \"ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/policy/v1beta1.IDRange\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/policy/v1beta1.IDRange\"}, } } func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clusterRoleSelectors\": { SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this ClusterRole\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.PolicyRule\"), }, }, }, }, }, \"aggregationRule\": { SchemaProps: spec.SchemaProps{ Description: \"AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.\", Ref: ref(\"k8s.io/api/rbac/v1.AggregationRule\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.AggregationRule\", \"k8s.io/api/rbac/v1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.RoleRef\", \"k8s.io/api/rbac/v1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBindingList is a collection of ClusterRoleBindings\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.ClusterRoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.ClusterRoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleList is a collection of ClusterRoles\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.ClusterRole\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.ClusterRole\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to. '*' represents all resources.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this Role\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.PolicyRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.RoleRef\", \"k8s.io/api/rbac/v1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBindingList is a collection of RoleBindings\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of RoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.RoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.RoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleList is a collection of Roles\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of Roles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1.Role\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1.Role\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleRef contains information that points to the role being used\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"apiGroup\", \"kind\", \"name\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the object being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clusterRoleSelectors\": { SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this ClusterRole\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.PolicyRule\"), }, }, }, }, }, \"aggregationRule\": { SchemaProps: spec.SchemaProps{ Description: \"AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.\", Ref: ref(\"k8s.io/api/rbac/v1alpha1.AggregationRule\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.AggregationRule\", \"k8s.io/api/rbac/v1alpha1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.RoleRef\", \"k8s.io/api/rbac/v1alpha1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.ClusterRoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.ClusterRoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.ClusterRole\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.ClusterRole\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to. '*' represents all resources.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this Role\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.PolicyRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.RoleRef\", \"k8s.io/api/rbac/v1alpha1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of RoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.RoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.RoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of Roles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1alpha1.Role\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1alpha1.Role\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleRef contains information that points to the role being used\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"apiGroup\", \"kind\", \"name\"}, }, }, } } func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the object being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clusterRoleSelectors\": { SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this ClusterRole\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.PolicyRule\"), }, }, }, }, }, \"aggregationRule\": { SchemaProps: spec.SchemaProps{ Description: \"AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.\", Ref: ref(\"k8s.io/api/rbac/v1beta1.AggregationRule\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.AggregationRule\", \"k8s.io/api/rbac/v1beta1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.RoleRef\", \"k8s.io/api/rbac/v1beta1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.ClusterRoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.ClusterRoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of ClusterRoles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.ClusterRole\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.ClusterRole\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"apiGroups\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"verbs\"}, }, }, } } func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules holds all the PolicyRules for this Role\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.PolicyRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.PolicyRule\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"subjects\": { SchemaProps: spec.SchemaProps{ Description: \"Subjects holds references to the objects the role applies to.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.Subject\"), }, }, }, }, }, \"roleRef\": { SchemaProps: spec.SchemaProps{ Description: \"RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.RoleRef\"), }, }, }, Required: []string{\"roleRef\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.RoleRef\", \"k8s.io/api/rbac/v1beta1.Subject\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of RoleBindings\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.RoleBinding\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.RoleBinding\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is a list of Roles\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/rbac/v1beta1.Role\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/rbac/v1beta1.Role\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RoleRef contains information that points to the role being used\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the group for the resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is the type of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of resource being referenced\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"apiGroup\", \"kind\", \"name\"}, }, }, } } func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the object being referenced.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"kind\", \"name\"}, }, }, } } func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"globalDefault\": { SchemaProps: spec.SchemaProps{ Description: \"globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is an arbitrary string that usually provides guidelines on when this priority class should be used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"preemptionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"value\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityClassList is a collection of priority classes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of PriorityClasses\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/scheduling/v1.PriorityClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/scheduling/v1.PriorityClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"globalDefault\": { SchemaProps: spec.SchemaProps{ Description: \"globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is an arbitrary string that usually provides guidelines on when this priority class should be used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"preemptionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"value\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityClassList is a collection of priority classes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of PriorityClasses\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/scheduling/v1alpha1.PriorityClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/scheduling/v1alpha1.PriorityClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"globalDefault\": { SchemaProps: spec.SchemaProps{ Description: \"globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is an arbitrary string that usually provides guidelines on when this priority class should be used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"preemptionPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"value\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PriorityClassList is a collection of priority classes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of PriorityClasses\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/scheduling/v1beta1.PriorityClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/scheduling/v1beta1.PriorityClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the CSI Driver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.CSIDriverSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.CSIDriverSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriverList is a collection of CSIDriver objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CSIDriver\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.CSIDriver\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.CSIDriver\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriverSpec is the specification of a CSIDriver.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attachRequired\": { SchemaProps: spec.SchemaProps{ Description: \"attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.nnThis field is immutable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"podInfoOnMount\": { SchemaProps: spec.SchemaProps{ Description: \"If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volumen defined by a CSIVolumeSource, otherwise \"false\"nn\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.nnThis field is immutable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"volumeLifecycleModes\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.nnThis field is immutable.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"storageCapacity\": { SchemaProps: spec.SchemaProps{ Description: \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field was immutable in Kubernetes <= 1.22 and now is mutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"fsGroupPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.nnThis field is immutable.nnDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.\", Type: []string{\"string\"}, Format: \"\", }, }, \"tokenRequests\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {n \"\": {n \"token\": ,n \"expirationTimestamp\": ,n },n ...n}nnNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.TokenRequest\"), }, }, }, }, }, \"requiresRepublish\": { SchemaProps: spec.SchemaProps{ Description: \"RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.nnNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.TokenRequest\"}, } } func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata.name must be the Kubernetes node name.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec is the specification of CSINode\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.CSINodeSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.CSINodeSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeDriver holds information about the specification of one CSI driver installed on a node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"nodeID\": { SchemaProps: spec.SchemaProps{ Description: \"nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"topologyKeys\": { SchemaProps: spec.SchemaProps{ Description: \"topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allocatable\": { SchemaProps: spec.SchemaProps{ Description: \"allocatable represents the volume resources of a node that are available for scheduling. This field is beta.\", Ref: ref(\"k8s.io/api/storage/v1.VolumeNodeResources\"), }, }, }, Required: []string{\"name\", \"nodeID\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.VolumeNodeResources\"}, } } func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeList is a collection of CSINode objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CSINode\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.CSINode\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.CSINode\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeSpec holds information about the specification of all CSI drivers installed on a node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"drivers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.CSINodeDriver\"), }, }, }, }, }, }, Required: []string{\"drivers\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.CSINodeDriver\"}, } } func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.nnStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"provisioner\": { SchemaProps: spec.SchemaProps{ Description: \"Provisioner indicates the type of the provisioner.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"parameters\": { SchemaProps: spec.SchemaProps{ Description: \"Parameters holds the parameters for the provisioner that should create volumes of this storage class.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"reclaimPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.\", Type: []string{\"string\"}, Format: \"\", }, }, \"mountOptions\": { SchemaProps: spec.SchemaProps{ Description: \"Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowVolumeExpansion\": { SchemaProps: spec.SchemaProps{ Description: \"AllowVolumeExpansion shows whether the storage class allow volume expand\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"volumeBindingMode\": { SchemaProps: spec.SchemaProps{ Description: \"VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.\", Type: []string{\"string\"}, Format: \"\", }, }, \"allowedTopologies\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySelectorTerm\"), }, }, }, }, }, }, Required: []string{\"provisioner\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TopologySelectorTerm\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StorageClassList is a collection of storage classes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of StorageClasses\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.StorageClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.StorageClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenRequest contains parameters of a service account token.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"audience\": { SchemaProps: spec.SchemaProps{ Description: \"Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\".\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"audience\"}, }, }, } } func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.nnVolumeAttachment objects are non-namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.VolumeAttachmentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.VolumeAttachmentStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.VolumeAttachmentSpec\", \"k8s.io/api/storage/v1.VolumeAttachmentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentList is a collection of VolumeAttachment objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of VolumeAttachments\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.VolumeAttachment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.VolumeAttachment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"persistentVolumeName\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the persistent volume to attach.\", Type: []string{\"string\"}, Format: \"\", }, }, \"inlineVolumeSpec\": { SchemaProps: spec.SchemaProps{ Description: \"inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeSpec\"}, } } func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSpec is the specification of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attacher\": { SchemaProps: spec.SchemaProps{ Description: \"Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"source\": { SchemaProps: spec.SchemaProps{ Description: \"Source represents the volume that should be attached.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1.VolumeAttachmentSource\"), }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"The node that the volume should be attached to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"attacher\", \"source\", \"nodeName\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.VolumeAttachmentSource\"}, } } func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentStatus is the status of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attached\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"attachmentMetadata\": { SchemaProps: spec.SchemaProps{ Description: \"Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"attachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1.VolumeError\"), }, }, \"detachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1.VolumeError\"), }, }, }, Required: []string{\"attached\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1.VolumeError\"}, } } func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeError captures an error encountered during a volume operation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"time\": { SchemaProps: spec.SchemaProps{ Description: \"Time the error was encountered.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeNodeResources is a set of resource limits for scheduling of volumes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"count\": { SchemaProps: spec.SchemaProps{ Description: \"Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.nnFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"nnThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zeronnThe producer of these objects can decide which approach is more suitable.nnThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.nnObjects are namespaced.nnMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"nodeTopology\": { SchemaProps: spec.SchemaProps{ Description: \"NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"storageClassName\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"capacity\": { SchemaProps: spec.SchemaProps{ Description: \"Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.nnThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"maximumVolumeSize\": { SchemaProps: spec.SchemaProps{ Description: \"MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.nnThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"storageClassName\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIStorageCapacityList is a collection of CSIStorageCapacity objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Items is the list of CSIStorageCapacity objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1alpha1.CSIStorageCapacity\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1alpha1.CSIStorageCapacity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.nnVolumeAttachment objects are non-namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec\", \"k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentList is a collection of VolumeAttachment objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of VolumeAttachments\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeAttachment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1alpha1.VolumeAttachment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"persistentVolumeName\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the persistent volume to attach.\", Type: []string{\"string\"}, Format: \"\", }, }, \"inlineVolumeSpec\": { SchemaProps: spec.SchemaProps{ Description: \"inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeSpec\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSpec is the specification of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attacher\": { SchemaProps: spec.SchemaProps{ Description: \"Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"source\": { SchemaProps: spec.SchemaProps{ Description: \"Source represents the volume that should be attached.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeAttachmentSource\"), }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"The node that the volume should be attached to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"attacher\", \"source\", \"nodeName\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1alpha1.VolumeAttachmentSource\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentStatus is the status of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attached\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"attachmentMetadata\": { SchemaProps: spec.SchemaProps{ Description: \"Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"attachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeError\"), }, }, \"detachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1alpha1.VolumeError\"), }, }, }, Required: []string{\"attached\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1alpha1.VolumeError\"}, } } func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeError captures an error encountered during a volume operation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"time\": { SchemaProps: spec.SchemaProps{ Description: \"Time the error was encountered.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the CSI Driver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSIDriverSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSIDriverSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriverList is a collection of CSIDriver objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CSIDriver\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSIDriver\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSIDriver\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIDriverSpec is the specification of a CSIDriver.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attachRequired\": { SchemaProps: spec.SchemaProps{ Description: \"attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.nnThis field is immutable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"podInfoOnMount\": { SchemaProps: spec.SchemaProps{ Description: \"If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volumen defined by a CSIVolumeSource, otherwise \"false\"nn\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.nnThis field is immutable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"volumeLifecycleModes\": { SchemaProps: spec.SchemaProps{ Description: \"VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.nnThis field is immutable.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"storageCapacity\": { SchemaProps: spec.SchemaProps{ Description: \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field was immutable in Kubernetes <= 1.22 and now is mutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"fsGroupPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.nnThis field is immutable.nnDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.\", Type: []string{\"string\"}, Format: \"\", }, }, \"tokenRequests\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {n \"\": {n \"token\": ,n \"expirationTimestamp\": ,n },n ...n}nnNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.TokenRequest\"), }, }, }, }, }, \"requiresRepublish\": { SchemaProps: spec.SchemaProps{ Description: \"RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.nnNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.TokenRequest\"}, } } func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"metadata.name must be the Kubernetes node name.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec is the specification of CSINode\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSINodeSpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSINodeSpec\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeDriver holds information about the specification of one CSI driver installed on a node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"nodeID\": { SchemaProps: spec.SchemaProps{ Description: \"nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"topologyKeys\": { SchemaProps: spec.SchemaProps{ Description: \"topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allocatable\": { SchemaProps: spec.SchemaProps{ Description: \"allocatable represents the volume resources of a node that are available for scheduling.\", Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeNodeResources\"), }, }, }, Required: []string{\"name\", \"nodeID\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.VolumeNodeResources\"}, } } func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeList is a collection of CSINode objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items is the list of CSINode\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSINode\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSINode\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSINodeSpec holds information about the specification of all CSI drivers installed on a node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"drivers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSINodeDriver\"), }, }, }, }, }, }, Required: []string{\"drivers\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSINodeDriver\"}, } } func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.nnFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"nnThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zeronnThe producer of these objects can decide which approach is more suitable.nnThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.nnObjects are namespaced.nnMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"nodeTopology\": { SchemaProps: spec.SchemaProps{ Description: \"NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, \"storageClassName\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"capacity\": { SchemaProps: spec.SchemaProps{ Description: \"Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.nnThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"maximumVolumeSize\": { SchemaProps: spec.SchemaProps{ Description: \"MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.nnThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.\", Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"storageClassName\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSIStorageCapacityList is a collection of CSIStorageCapacity objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Items is the list of CSIStorageCapacity objects.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.CSIStorageCapacity\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.CSIStorageCapacity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.nnStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"provisioner\": { SchemaProps: spec.SchemaProps{ Description: \"Provisioner indicates the type of the provisioner.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"parameters\": { SchemaProps: spec.SchemaProps{ Description: \"Parameters holds the parameters for the provisioner that should create volumes of this storage class.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"reclaimPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.\", Type: []string{\"string\"}, Format: \"\", }, }, \"mountOptions\": { SchemaProps: spec.SchemaProps{ Description: \"Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowVolumeExpansion\": { SchemaProps: spec.SchemaProps{ Description: \"AllowVolumeExpansion shows whether the storage class allow volume expand\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"volumeBindingMode\": { SchemaProps: spec.SchemaProps{ Description: \"VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.\", Type: []string{\"string\"}, Format: \"\", }, }, \"allowedTopologies\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySelectorTerm\"), }, }, }, }, }, }, Required: []string{\"provisioner\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TopologySelectorTerm\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StorageClassList is a collection of storage classes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of StorageClasses\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.StorageClass\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.StorageClass\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TokenRequest contains parameters of a service account token.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"audience\": { SchemaProps: spec.SchemaProps{ Description: \"Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"expirationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\"\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"audience\"}, }, }, } } func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.nnVolumeAttachment objects are non-namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeAttachmentSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeAttachmentStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.VolumeAttachmentSpec\", \"k8s.io/api/storage/v1beta1.VolumeAttachmentStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentList is a collection of VolumeAttachment objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of VolumeAttachments\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeAttachment\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.VolumeAttachment\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"persistentVolumeName\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the persistent volume to attach.\", Type: []string{\"string\"}, Format: \"\", }, }, \"inlineVolumeSpec\": { SchemaProps: spec.SchemaProps{ Description: \"inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.\", Ref: ref(\"k8s.io/api/core/v1.PersistentVolumeSpec\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.PersistentVolumeSpec\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentSpec is the specification of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attacher\": { SchemaProps: spec.SchemaProps{ Description: \"Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"source\": { SchemaProps: spec.SchemaProps{ Description: \"Source represents the volume that should be attached.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeAttachmentSource\"), }, }, \"nodeName\": { SchemaProps: spec.SchemaProps{ Description: \"The node that the volume should be attached to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"attacher\", \"source\", \"nodeName\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.VolumeAttachmentSource\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeAttachmentStatus is the status of a VolumeAttachment request.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"attached\": { SchemaProps: spec.SchemaProps{ Description: \"Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"attachmentMetadata\": { SchemaProps: spec.SchemaProps{ Description: \"Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"attachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeError\"), }, }, \"detachError\": { SchemaProps: spec.SchemaProps{ Description: \"The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.\", Ref: ref(\"k8s.io/api/storage/v1beta1.VolumeError\"), }, }, }, Required: []string{\"attached\"}, }, }, Dependencies: []string{ \"k8s.io/api/storage/v1beta1.VolumeError\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeError captures an error encountered during a volume operation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"time\": { SchemaProps: spec.SchemaProps{ Description: \"Time the error was encountered.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeNodeResources is a set of resource limits for scheduling of volumes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"count\": { SchemaProps: spec.SchemaProps{ Description: \"Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionRequest describes the conversion request parameters.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"desiredAPIVersion\": { SchemaProps: spec.SchemaProps{ Description: \"desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"objects\": { SchemaProps: spec.SchemaProps{ Description: \"objects is the list of custom resource objects to be converted.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, }, Required: []string{\"uid\", \"desiredAPIVersion\", \"objects\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionResponse describes a conversion response.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"convertedObjects\": { SchemaProps: spec.SchemaProps{ Description: \"convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, \"result\": { SchemaProps: spec.SchemaProps{ Description: \"result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Status\"), }, }, }, Required: []string{\"uid\", \"convertedObjects\", \"result\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionReview describes a conversion request/response.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"request\": { SchemaProps: spec.SchemaProps{ Description: \"request describes the attributes for the conversion request.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest\"), }, }, \"response\": { SchemaProps: spec.SchemaProps{ Description: \"response describes the attributes for the conversion response.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceColumnDefinition specifies a column for server side printing.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is a human readable name for the column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"format\": { SchemaProps: spec.SchemaProps{ Description: \"format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\", Type: []string{\"string\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is a human readable description of this column.\", Type: []string{\"string\"}, Format: \"\", }, }, \"priority\": { SchemaProps: spec.SchemaProps{ Description: \"priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"jsonPath\": { SchemaProps: spec.SchemaProps{ Description: \"jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"type\", \"jsonPath\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceConversion describes how to convert different versions of a CR.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"strategy\": { SchemaProps: spec.SchemaProps{ Description: \"strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional informationn is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"webhook\": { SchemaProps: spec.SchemaProps{ Description: \"webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion\"), }, }, }, Required: []string{\"strategy\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec describes how the user wants the resources to appear\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status indicates the actual state of the CustomResourceDefinition\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionCondition contains details for the current condition of this pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of the condition. Types include Established, NamesAccepted and Terminating.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition. Can be True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionList is a list of CustomResourceDefinition objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items list individual CustomResourceDefinition objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"plural\": { SchemaProps: spec.SchemaProps{ Description: \"plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"singular\": { SchemaProps: spec.SchemaProps{ Description: \"singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.\", Type: []string{\"string\"}, Format: \"\", }, }, \"shortNames\": { SchemaProps: spec.SchemaProps{ Description: \"shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"listKind\": { SchemaProps: spec.SchemaProps{ Description: \"listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"categories\": { SchemaProps: spec.SchemaProps{ Description: \"categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"plural\", \"kind\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionSpec describes how a user wants their resource to appear\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Description: \"group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"names\": { SchemaProps: spec.SchemaProps{ Description: \"names specify the resource and kind names for the custom resource.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames\"), }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"versions\": { SchemaProps: spec.SchemaProps{ Description: \"versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion\"), }, }, }, }, }, \"conversion\": { SchemaProps: spec.SchemaProps{ Description: \"conversion defines conversion settings for the CRD.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion\"), }, }, \"preserveUnknownFields\": { SchemaProps: spec.SchemaProps{ Description: \"preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"names\", \"scope\", \"versions\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"conditions indicate state for particular aspects of a CustomResourceDefinition\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition\"), }, }, }, }, }, \"acceptedNames\": { SchemaProps: spec.SchemaProps{ Description: \"acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames\"), }, }, \"storedVersions\": { SchemaProps: spec.SchemaProps{ Description: \"storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionVersion describes a version for CRD.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"served\": { SchemaProps: spec.SchemaProps{ Description: \"served is a flag enabling/disabling this version from being served via REST APIs\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"storage\": { SchemaProps: spec.SchemaProps{ Description: \"storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"deprecated\": { SchemaProps: spec.SchemaProps{ Description: \"deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"deprecationWarning\": { SchemaProps: spec.SchemaProps{ Description: \"deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.\", Type: []string{\"string\"}, Format: \"\", }, }, \"schema\": { SchemaProps: spec.SchemaProps{ Description: \"schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation\"), }, }, \"subresources\": { SchemaProps: spec.SchemaProps{ Description: \"subresources specify what subresources this version of the defined custom resource have.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources\"), }, }, \"additionalPrinterColumns\": { SchemaProps: spec.SchemaProps{ Description: \"additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition\"), }, }, }, }, }, }, Required: []string{\"name\", \"served\", \"storage\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"specReplicasPath\": { SchemaProps: spec.SchemaProps{ Description: \"specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"statusReplicasPath\": { SchemaProps: spec.SchemaProps{ Description: \"statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"labelSelectorPath\": { SchemaProps: spec.SchemaProps{ Description: \"labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"specReplicasPath\", \"statusReplicasPath\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza\", Type: []string{\"object\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresources defines the status and scale subresources for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus\"), }, }, \"scale\": { SchemaProps: spec.SchemaProps{ Description: \"scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus\"}, } } func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceValidation is a list of validation methods for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"openAPIV3Schema\": { SchemaProps: spec.SchemaProps{ Description: \"openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"}, } } func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalDocumentation allows referencing an external resource for extended documentation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"description\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"url\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.\", Type: v1.JSON{}.OpenAPISchemaType(), Format: v1.JSON{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"id\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"$schema\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"$ref\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"format\": { SchemaProps: spec.SchemaProps{ Description: \"format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:nn- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35d{3})d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^d{3}[- ]?d{2}[- ]?d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.\", Type: []string{\"string\"}, Format: \"\", }, }, \"title\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"default\": { SchemaProps: spec.SchemaProps{ Description: \"default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON\"), }, }, \"maximum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"exclusiveMaximum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"minimum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"exclusiveMinimum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"maxLength\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minLength\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"pattern\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"maxItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"uniqueItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"multipleOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"enum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON\"), }, }, }, }, }, \"maxProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"required\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"items\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray\"), }, }, \"allOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"oneOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"anyOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"not\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, \"properties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"additionalProperties\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool\"), }, }, \"patternProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"dependencies\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray\"), }, }, }, }, }, \"additionalItems\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool\"), }, }, \"definitions\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\"), }, }, }, }, }, \"externalDocs\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation\"), }, }, \"example\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON\"), }, }, \"nullable\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-preserve-unknown-fields\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-embedded-resource\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-int-or-string\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:nn1) anyOf:n - type: integern - type: stringn2) allOf:n - anyOf:n - type: integern - type: stringn - ... zero or more\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-list-map-keys\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.nnThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).nnThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"x-kubernetes-list-type\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:nn1) `atomic`: the list is treated as a single entity, like a scalar.n Atomic lists will be entirely replaced when updated. This extensionn may be used on any type of list (struct, scalar, ...).n2) `set`:n Sets are lists that must not have multiple items with the same value. Eachn value must be a scalar, an object with x-kubernetes-map-type `atomic` or ann array with x-kubernetes-list-type `atomic`.n3) `map`:n These lists are like maps in that their elements have a non-index keyn used to identify them. Order is preserved upon merge. The map tagn must only be used on a list with elements of type object.nDefaults to atomic for arrays.\", Type: []string{\"string\"}, Format: \"\", }, }, \"x-kubernetes-map-type\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:nn1) `granular`:n These maps are actual maps (key-value pairs) and each fields are independentn from each other (they can each be manipulated by separate actors). This isn the default behaviour for all maps.n2) `atomic`: the list is treated as a single entity, like a scalar.n Atomic maps will be entirely replaced when updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"x-kubernetes-validations\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"rule\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"rule\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule\"}, } } func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.\", Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.\", Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.\", Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"namespace is the namespace of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is an optional URL path at which the webhook will be contacted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidationRule describes a validation rule written in the CEL expression language.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}nnIf the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}nnThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.nnUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:n - A schema with no type and x-kubernetes-preserve-unknown-fields set to truen - An array where the items schema is of an \"unknown type\"n - An object where the additionalProperties schema is of an \"unknown type\"nnOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:nt \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",nt \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".nExamples:n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}nnEquality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved andn non-intersecting elements in `Y` are appended, retaining their partial order.n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the valuesn are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` withn non-intersecting keys are appended, retaining their partial order.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"rule\"}, }, }, } } func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WebhookClientConfig contains the information to make a TLS connection with the webhook.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"url\": { SchemaProps: spec.SchemaProps{ Description: \"url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.nnThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.nnPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.nnThe scheme must be \"https\"; the URL must begin with \"https://\".nnA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.nnAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.\", Type: []string{\"string\"}, Format: \"\", }, }, \"service\": { SchemaProps: spec.SchemaProps{ Description: \"service is a reference to the service for this webhook. Either service or url must be specified.nnIf the webhook is running within the cluster, then you should use `service`.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference\"), }, }, \"caBundle\": { SchemaProps: spec.SchemaProps{ Description: \"caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference\"}, } } func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WebhookConversion describes how to call a conversion webhook\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig\"), }, }, \"conversionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"conversionReviewVersions\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig\"}, } } func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionRequest describes the conversion request parameters.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"desiredAPIVersion\": { SchemaProps: spec.SchemaProps{ Description: \"desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"objects\": { SchemaProps: spec.SchemaProps{ Description: \"objects is the list of custom resource objects to be converted.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, }, Required: []string{\"uid\", \"desiredAPIVersion\", \"objects\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionResponse describes a conversion response.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"convertedObjects\": { SchemaProps: spec.SchemaProps{ Description: \"convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, \"result\": { SchemaProps: spec.SchemaProps{ Description: \"result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Status\"), }, }, }, Required: []string{\"uid\", \"convertedObjects\", \"result\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ConversionReview describes a conversion request/response.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"request\": { SchemaProps: spec.SchemaProps{ Description: \"request describes the attributes for the conversion request.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest\"), }, }, \"response\": { SchemaProps: spec.SchemaProps{ Description: \"response describes the attributes for the conversion response.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceColumnDefinition specifies a column for server side printing.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is a human readable name for the column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"format\": { SchemaProps: spec.SchemaProps{ Description: \"format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\", Type: []string{\"string\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is a human readable description of this column.\", Type: []string{\"string\"}, Format: \"\", }, }, \"priority\": { SchemaProps: spec.SchemaProps{ Description: \"priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"JSONPath\": { SchemaProps: spec.SchemaProps{ Description: \"JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"type\", \"JSONPath\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceConversion describes how to convert different versions of a CR.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"strategy\": { SchemaProps: spec.SchemaProps{ Description: \"strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional informationn is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"webhookClientConfig\": { SchemaProps: spec.SchemaProps{ Description: \"webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig\"), }, }, \"conversionReviewVersions\": { SchemaProps: spec.SchemaProps{ Description: \"conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"strategy\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"spec describes how the user wants the resources to appear\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status indicates the actual state of the CustomResourceDefinition\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionCondition contains details for the current condition of this pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is the type of the condition. Types include Established, NamesAccepted and Terminating.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status is the status of the condition. Can be True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason is a unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionList is a list of CustomResourceDefinition objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items list individual CustomResourceDefinition objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"plural\": { SchemaProps: spec.SchemaProps{ Description: \"plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"singular\": { SchemaProps: spec.SchemaProps{ Description: \"singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.\", Type: []string{\"string\"}, Format: \"\", }, }, \"shortNames\": { SchemaProps: spec.SchemaProps{ Description: \"shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"listKind\": { SchemaProps: spec.SchemaProps{ Description: \"listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"categories\": { SchemaProps: spec.SchemaProps{ Description: \"categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"plural\", \"kind\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionSpec describes how a user wants their resource to appear\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Description: \"group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.\", Type: []string{\"string\"}, Format: \"\", }, }, \"names\": { SchemaProps: spec.SchemaProps{ Description: \"names specify the resource and kind names for the custom resource.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames\"), }, }, \"scope\": { SchemaProps: spec.SchemaProps{ Description: \"scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"validation\": { SchemaProps: spec.SchemaProps{ Description: \"validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation\"), }, }, \"subresources\": { SchemaProps: spec.SchemaProps{ Description: \"subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources\"), }, }, \"versions\": { SchemaProps: spec.SchemaProps{ Description: \"versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion\"), }, }, }, }, }, \"additionalPrinterColumns\": { SchemaProps: spec.SchemaProps{ Description: \"additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition\"), }, }, }, }, }, \"conversion\": { SchemaProps: spec.SchemaProps{ Description: \"conversion defines conversion settings for the CRD.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion\"), }, }, \"preserveUnknownFields\": { SchemaProps: spec.SchemaProps{ Description: \"preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"names\", \"scope\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"conditions indicate state for particular aspects of a CustomResourceDefinition\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition\"), }, }, }, }, }, \"acceptedNames\": { SchemaProps: spec.SchemaProps{ Description: \"acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames\"), }, }, \"storedVersions\": { SchemaProps: spec.SchemaProps{ Description: \"storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceDefinitionVersion describes a version for CRD.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"served\": { SchemaProps: spec.SchemaProps{ Description: \"served is a flag enabling/disabling this version from being served via REST APIs\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"storage\": { SchemaProps: spec.SchemaProps{ Description: \"storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"deprecated\": { SchemaProps: spec.SchemaProps{ Description: \"deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"deprecationWarning\": { SchemaProps: spec.SchemaProps{ Description: \"deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.\", Type: []string{\"string\"}, Format: \"\", }, }, \"schema\": { SchemaProps: spec.SchemaProps{ Description: \"schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation\"), }, }, \"subresources\": { SchemaProps: spec.SchemaProps{ Description: \"subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources\"), }, }, \"additionalPrinterColumns\": { SchemaProps: spec.SchemaProps{ Description: \"additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition\"), }, }, }, }, }, }, Required: []string{\"name\", \"served\", \"storage\"}, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"specReplicasPath\": { SchemaProps: spec.SchemaProps{ Description: \"specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"statusReplicasPath\": { SchemaProps: spec.SchemaProps{ Description: \"statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"labelSelectorPath\": { SchemaProps: spec.SchemaProps{ Description: \"labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"specReplicasPath\", \"statusReplicasPath\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza\", Type: []string{\"object\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceSubresources defines the status and scale subresources for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus\"), }, }, \"scale\": { SchemaProps: spec.SchemaProps{ Description: \"scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus\"}, } } func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CustomResourceValidation is a list of validation methods for CustomResources.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"openAPIV3Schema\": { SchemaProps: spec.SchemaProps{ Description: \"openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"}, } } func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalDocumentation allows referencing an external resource for extended documentation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"description\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"url\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.\", Type: v1beta1.JSON{}.OpenAPISchemaType(), Format: v1beta1.JSON{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"id\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"$schema\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"$ref\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"format\": { SchemaProps: spec.SchemaProps{ Description: \"format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:nn- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35d{3})d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^d{3}[- ]?d{2}[- ]?d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.\", Type: []string{\"string\"}, Format: \"\", }, }, \"title\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"default\": { SchemaProps: spec.SchemaProps{ Description: \"default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON\"), }, }, \"maximum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"exclusiveMaximum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"minimum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"exclusiveMinimum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"maxLength\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minLength\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"pattern\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"maxItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"uniqueItems\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"multipleOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"number\"}, Format: \"double\", }, }, \"enum\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON\"), }, }, }, }, }, \"maxProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"minProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"integer\"}, Format: \"int64\", }, }, \"required\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"items\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray\"), }, }, \"allOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"oneOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"anyOf\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"not\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, \"properties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"additionalProperties\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool\"), }, }, \"patternProperties\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"dependencies\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray\"), }, }, }, }, }, \"additionalItems\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool\"), }, }, \"definitions\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\"), }, }, }, }, }, \"externalDocs\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation\"), }, }, \"example\": { SchemaProps: spec.SchemaProps{ Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON\"), }, }, \"nullable\": { SchemaProps: spec.SchemaProps{ Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-preserve-unknown-fields\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-embedded-resource\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-int-or-string\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:nn1) anyOf:n - type: integern - type: stringn2) allOf:n - anyOf:n - type: integern - type: stringn - ... zero or more\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"x-kubernetes-list-map-keys\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.nnThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).nnThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"x-kubernetes-list-type\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:nn1) `atomic`: the list is treated as a single entity, like a scalar.n Atomic lists will be entirely replaced when updated. This extensionn may be used on any type of list (struct, scalar, ...).n2) `set`:n Sets are lists that must not have multiple items with the same value. Eachn value must be a scalar, an object with x-kubernetes-map-type `atomic` or ann array with x-kubernetes-list-type `atomic`.n3) `map`:n These lists are like maps in that their elements have a non-index keyn used to identify them. Order is preserved upon merge. The map tagn must only be used on a list with elements of type object.nDefaults to atomic for arrays.\", Type: []string{\"string\"}, Format: \"\", }, }, \"x-kubernetes-map-type\": { SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:nn1) `granular`:n These maps are actual maps (key-value pairs) and each fields are independentn from each other (they can each be manipulated by separate actors). This isn the default behaviour for all maps.n2) `atomic`: the list is treated as a single entity, like a scalar.n Atomic maps will be entirely replaced when updated.\", Type: []string{\"string\"}, Format: \"\", }, }, \"x-kubernetes-validations\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"rule\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"rule\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray\", \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule\"}, } } func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.\", Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.\", Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.\", Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"namespace is the namespace of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the service. Required\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"path\": { SchemaProps: spec.SchemaProps{ Description: \"path is an optional URL path at which the webhook will be contacted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"namespace\", \"name\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ValidationRule describes a validation rule written in the CEL expression language.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"rule\": { SchemaProps: spec.SchemaProps{ Description: \"Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}nnIf the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}nnThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.nnUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:n - A schema with no type and x-kubernetes-preserve-unknown-fields set to truen - An array where the items schema is of an \"unknown type\"n - An object where the additionalProperties schema is of an \"unknown type\"nnOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:nt \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",nt \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".nExamples:n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}nnEquality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved andn non-intersecting elements in `Y` are appended, retaining their partial order.n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the valuesn are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` withn non-intersecting keys are appended, retaining their partial order.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"rule\"}, }, }, } } func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"WebhookClientConfig contains the information to make a TLS connection with the webhook.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"url\": { SchemaProps: spec.SchemaProps{ Description: \"url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.nnThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.nnPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.nnThe scheme must be \"https\"; the URL must begin with \"https://\".nnA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.nnAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.\", Type: []string{\"string\"}, Format: \"\", }, }, \"service\": { SchemaProps: spec.SchemaProps{ Description: \"service is a reference to the service for this webhook. Either service or url must be specified.nnIf the webhook is running within the cluster, then you should use `service`.\", Ref: ref(\"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference\"), }, }, \"caBundle\": { SchemaProps: spec.SchemaProps{ Description: \"caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference\"}, } } func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.nnThe serialization format is:nn ::= n (Note that may be empty, from the \"\" case in .)n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ein (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)n ::= m | \"\" | k | M | G | T | P | En (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)n ::= \"e\" | \"E\" nnNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.nnWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.nnBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:n a. No precision is lostn b. No fractional digits will be emittedn c. The exponent (or suffix) is as large as possible.nThe sign will be omitted unless the number is negative.nnExamples:n 1.5 will be serialized as \"1500m\"n 1.5Gi will be serialized as \"1536Mi\"nnNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.nnNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)nnThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.\", Type: resource.Quantity{}.OpenAPISchemaType(), Format: resource.Quantity{}.OpenAPISchemaFormat(), }, }, } } func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"value\": { SchemaProps: spec.SchemaProps{ Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, \"scale\": { SchemaProps: spec.SchemaProps{ Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"value\", \"scale\"}, }, }, } } func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIGroup contains the name, the supported versions, and the preferred version of a group.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the group.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"versions\": { SchemaProps: spec.SchemaProps{ Description: \"versions are the versions supported in this group.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery\"), }, }, }, }, }, \"preferredVersion\": { SchemaProps: spec.SchemaProps{ Description: \"preferredVersion is the version preferred by the API server, which probably is the storage version.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery\"), }, }, \"serverAddressByClientCIDRs\": { SchemaProps: spec.SchemaProps{ Description: \"a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR\"), }, }, }, }, }, }, Required: []string{\"name\", \"versions\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR\"}, } } func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"groups\": { SchemaProps: spec.SchemaProps{ Description: \"groups is a list of APIGroup.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup\"), }, }, }, }, }, }, Required: []string{\"groups\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup\"}, } } func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIResource specifies the name of a resource and whether it is namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the plural name of the resource.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"singularName\": { SchemaProps: spec.SchemaProps{ Description: \"singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespaced\": { SchemaProps: spec.SchemaProps{ Description: \"namespaced indicates if a resource is namespaced or not.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"shortNames\": { SchemaProps: spec.SchemaProps{ Description: \"shortNames is a list of suggested short names of the resource.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"categories\": { SchemaProps: spec.SchemaProps{ Description: \"categories is a list of the grouped resources this resource belongs to (e.g. 'all')\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"storageVersionHash\": { SchemaProps: spec.SchemaProps{ Description: \"The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"singularName\", \"namespaced\", \"kind\", \"verbs\"}, }, }, } } func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"groupVersion\": { SchemaProps: spec.SchemaProps{ Description: \"groupVersion is the group and version this APIResourceList is for.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"resources contains the name of the resources and if they are namespaced.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.APIResource\"), }, }, }, }, }, }, Required: []string{\"groupVersion\", \"resources\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.APIResource\"}, } } func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"versions\": { SchemaProps: spec.SchemaProps{ Description: \"versions are the api versions that are available.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"serverAddressByClientCIDRs\": { SchemaProps: spec.SchemaProps{ Description: \"a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR\"), }, }, }, }, }, }, Required: []string{\"versions\", \"serverAddressByClientCIDRs\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR\"}, } } func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"dryRun\": { SchemaProps: spec.SchemaProps{ Description: \"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"force\": { SchemaProps: spec.SchemaProps{ Description: \"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"fieldManager\": { SchemaProps: spec.SchemaProps{ Description: \"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"force\", \"fieldManager\"}, }, }, } } func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Condition contains details for one aspect of the current state of this API Resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type of condition in CamelCase or in foo.example.com/CamelCase.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"observedGeneration\": { SchemaProps: spec.SchemaProps{ Description: \"observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"message is a human readable message indicating details about the transition. This may be an empty string.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\", \"lastTransitionTime\", \"reason\", \"message\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CreateOptions may be provided when creating an API object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"dryRun\": { SchemaProps: spec.SchemaProps{ Description: \"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"fieldManager\": { SchemaProps: spec.SchemaProps{ Description: \"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldValidation\": { SchemaProps: spec.SchemaProps{ Description: \"fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeleteOptions may be provided when deleting an API object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"gracePeriodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"preconditions\": { SchemaProps: spec.SchemaProps{ Description: \"Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions\"), }, }, \"orphanDependents\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"propagationPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\", Type: []string{\"string\"}, Format: \"\", }, }, \"dryRun\": { SchemaProps: spec.SchemaProps{ Description: \"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions\"}, } } func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.\", Type: metav1.Duration{}.OpenAPISchemaType(), Format: metav1.Duration{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.nnEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.nnThe exact format is defined in sigs.k8s.io/structured-merge-diff\", Type: []string{\"object\"}, }, }, } } func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GetOptions is the standard query options to the standard REST get call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.nnDefaults to unset\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"kind\"}, }, }, } } func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"resource\"}, }, }, } } func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"version\"}, }, }, } } func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"groupVersion\": { SchemaProps: spec.SchemaProps{ Description: \"groupVersion specifies the API group and version in the form \"group/version\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"groupVersion\", \"version\"}, }, }, } } func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"version\", \"kind\"}, }, }, } } func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"group\", \"version\", \"resource\"}, }, }, } } func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"InternalEvent makes watch.Event versioned\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Type\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"Object\": { SchemaProps: spec.SchemaProps{ Description: \"Object is:n * If Type is Added or Modified: the new state of the object.n * If Type is Deleted: the state of the object immediately before deletion.n * If Type is Bookmark: the object (instance of a type being watched) wheren only ResourceVersion field is set. On successful restart of watch from an bookmark resourceVersion, client is guaranteed to not get repeat eventn nor miss any events.n * If Type is Error: *api.Status is recommended; other types may make sensen depending on context.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Object\"), }, }, }, Required: []string{\"Type\", \"Object\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.Object\"}, } } func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"matchLabels\": { SchemaProps: spec.SchemaProps{ Description: \"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"matchExpressions\": { SchemaProps: spec.SchemaProps{ Description: \"matchExpressions is a list of label selector requirements. The requirements are ANDed.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement\"), }, }, }, }, }, }, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement\"}, } } func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"key\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"key\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"key is the label key that the selector applies to.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"operator\": { SchemaProps: spec.SchemaProps{ Description: \"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"values\": { SchemaProps: spec.SchemaProps{ Description: \"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"key\", \"operator\"}, }, }, } } func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"List holds a list of objects, which may not be known by the server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"selfLink\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", Type: []string{\"string\"}, Format: \"\", }, }, \"continue\": { SchemaProps: spec.SchemaProps{ Description: \"continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.\", Type: []string{\"string\"}, Format: \"\", }, }, \"remainingItemCount\": { SchemaProps: spec.SchemaProps{ Description: \"remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ListOptions is the query options to a standard REST list call.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"labelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned objects by their labels. Defaults to everything.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned objects by their fields. Defaults to everything.\", Type: []string{\"string\"}, Format: \"\", }, }, \"watch\": { SchemaProps: spec.SchemaProps{ Description: \"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"allowWatchBookmarks\": { SchemaProps: spec.SchemaProps{ Description: \"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.nnDefaults to unset\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersionMatch\": { SchemaProps: spec.SchemaProps{ Description: \"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.nnDefaults to unset\", Type: []string{\"string\"}, Format: \"\", }, }, \"timeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"limit\": { SchemaProps: spec.SchemaProps{ Description: \"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.nnThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"continue\": { SchemaProps: spec.SchemaProps{ Description: \"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".nnThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"manager\": { SchemaProps: spec.SchemaProps{ Description: \"Manager is an identifier of the workflow managing these fields.\", Type: []string{\"string\"}, Format: \"\", }, }, \"operation\": { SchemaProps: spec.SchemaProps{ Description: \"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"time\": { SchemaProps: spec.SchemaProps{ Description: \"Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"fieldsType\": { SchemaProps: spec.SchemaProps{ Description: \"FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldsV1\": { SchemaProps: spec.SchemaProps{ Description: \"FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1\"), }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Description: \"Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MicroTime is version of Time with microsecond level precision.\", Type: metav1.MicroTime{}.OpenAPISchemaType(), Format: metav1.MicroTime{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Type: []string{\"string\"}, Format: \"\", }, }, \"generateName\": { SchemaProps: spec.SchemaProps{ Description: \"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.nnIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).nnApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.nnMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces\", Type: []string{\"string\"}, Format: \"\", }, }, \"selfLink\": { SchemaProps: spec.SchemaProps{ Description: \"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.nnPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.nnPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\", Type: []string{\"string\"}, Format: \"\", }, }, \"generation\": { SchemaProps: spec.SchemaProps{ Description: \"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"creationTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.nnPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deletionTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.nnPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"deletionGracePeriodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"labels\": { SchemaProps: spec.SchemaProps{ Description: \"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"annotations\": { SchemaProps: spec.SchemaProps{ Description: \"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"ownerReferences\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-merge-key\": \"uid\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference\"), }, }, }, }, }, \"finalizers\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"clusterName\": { SchemaProps: spec.SchemaProps{ Description: \"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\", Type: []string{\"string\"}, Format: \"\", }, }, \"managedFields\": { SchemaProps: spec.SchemaProps{ Description: \"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry\", \"k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"API version of the referent.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"controller\": { SchemaProps: spec.SchemaProps{ Description: \"If true, this reference points to the managing controller.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"blockOwnerDeletion\": { SchemaProps: spec.SchemaProps{ Description: \"If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"apiVersion\", \"kind\", \"name\", \"uid\"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-map-type\": \"atomic\", }, }, }, } } func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"}, } } func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PartialObjectMetadataList contains a list of objects containing only their metadata\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items contains each of the included items.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata\"}, } } func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.\", Type: []string{\"object\"}, }, }, } } func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"dryRun\": { SchemaProps: spec.SchemaProps{ Description: \"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"force\": { SchemaProps: spec.SchemaProps{ Description: \"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"fieldManager\": { SchemaProps: spec.SchemaProps{ Description: \"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldValidation\": { SchemaProps: spec.SchemaProps{ Description: \"fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the target UID.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Specifies the target ResourceVersion\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"paths\": { SchemaProps: spec.SchemaProps{ Description: \"paths are the paths available at root.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"paths\"}, }, }, } } func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clientCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"The CIDR with which clients can match their IP to figure out the server address that they should use.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"serverAddress\": { SchemaProps: spec.SchemaProps{ Description: \"Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"clientCIDR\", \"serverAddress\"}, }, }, } } func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Status is a return value for calls that don't return other objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human-readable description of the status of this operation.\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.\", Type: []string{\"string\"}, Format: \"\", }, }, \"details\": { SchemaProps: spec.SchemaProps{ Description: \"Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails\"), }, }, \"code\": { SchemaProps: spec.SchemaProps{ Description: \"Suggested HTTP return code for this status, 0 if not set.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails\"}, } } func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"A machine-readable description of the cause of the error. If this value is empty there is no information available.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"A human-readable description of the cause of the error. This field may be presented as-is to a reader.\", Type: []string{\"string\"}, Format: \"\", }, }, \"field\": { SchemaProps: spec.SchemaProps{ Description: \"The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.nnExamples:n \"name\" - the field \"name\" on the current resourcen \"items[0].name\" - the field \"name\" on the first array entry in \"items\"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"The group attribute of the resource associated with the status StatusReason.\", Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Description: \"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids\", Type: []string{\"string\"}, Format: \"\", }, }, \"causes\": { SchemaProps: spec.SchemaProps{ Description: \"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause\"), }, }, }, }, }, \"retryAfterSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause\"}, } } func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"columnDefinitions\": { SchemaProps: spec.SchemaProps{ Description: \"columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition\"), }, }, }, }, }, \"rows\": { SchemaProps: spec.SchemaProps{ Description: \"rows is the list of items in the table.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.TableRow\"), }, }, }, }, }, }, Required: []string{\"columnDefinitions\", \"rows\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition\", \"k8s.io/apimachinery/pkg/apis/meta/v1.TableRow\"}, } } func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TableColumnDefinition contains information about a column returned in the Table.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is a human readable name for the column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"type\": { SchemaProps: spec.SchemaProps{ Description: \"type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"format\": { SchemaProps: spec.SchemaProps{ Description: \"format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"description\": { SchemaProps: spec.SchemaProps{ Description: \"description is a human readable description of this column.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"priority\": { SchemaProps: spec.SchemaProps{ Description: \"priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"name\", \"type\", \"format\", \"description\", \"priority\"}, }, }, } } func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TableOptions are used when a Table is requested by the caller.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"includeObject\": { SchemaProps: spec.SchemaProps{ Description: \"includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TableRow is an individual row in a table.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cells\": { SchemaProps: spec.SchemaProps{ Description: \"cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Format: \"\", }, }, }, }, }, \"conditions\": { SchemaProps: spec.SchemaProps{ Description: \"conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition\"), }, }, }, }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"cells\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition\", \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TableRowCondition allows a row to be marked with additional information.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status of the condition, one of True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"(brief) machine readable reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, } } func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.\", Type: metav1.Time{}.OpenAPISchemaType(), Format: metav1.Time{}.OpenAPISchemaFormat(), }, }, } } func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"seconds\": { SchemaProps: spec.SchemaProps{ Description: \"Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, \"nanos\": { SchemaProps: spec.SchemaProps{ Description: \"Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"seconds\", \"nanos\"}, }, }, } } func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"dryRun\": { SchemaProps: spec.SchemaProps{ Description: \"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"fieldManager\": { SchemaProps: spec.SchemaProps{ Description: \"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\", Type: []string{\"string\"}, Format: \"\", }, }, \"fieldValidation\": { SchemaProps: spec.SchemaProps{ Description: \"fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Event represents a single event to a watched resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"object\": { SchemaProps: spec.SchemaProps{ Description: \"Object is:n * If Type is Added or Modified: the new state of the object.n * If Type is Deleted: the state of the object immediately before deletion.n * If Type is Error: *Status is recommended; other types may make sensen depending on context.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"type\", \"object\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PartialObjectMetadataList contains a list of objects containing only their metadata.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"items contains each of the included items.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata\"}, } } func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RawExtension is used to hold extensions in external versions.nnTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.nn// Internal package: type MyAPIObject struct {ntruntime.TypeMeta `json:\",inline\"`ntMyPlugin runtime.Object `json:\"myPlugin\"`n} type PluginA struct {ntAOption string `json:\"aOption\"`n}nn// External package: type MyAPIObject struct {ntruntime.TypeMeta `json:\",inline\"`ntMyPlugin runtime.RawExtension `json:\"myPlugin\"`n} type PluginA struct {ntAOption string `json:\"aOption\"`n}nn// On the wire, the JSON will look something like this: {nt\"kind\":\"MyAPIObject\",nt\"apiVersion\":\"v1\",nt\"myPlugin\": {ntt\"kind\":\"PluginA\",ntt\"aOption\":\"foo\",nt},n}nnSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)\", Type: []string{\"object\"}, }, }, } } func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {n runtime.TypeMeta `json:\",inline\"`n ... // other fieldsn} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKindnnTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"apiVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"kind\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"Raw\": { SchemaProps: spec.SchemaProps{ Description: \"Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"ContentEncoding\": { SchemaProps: spec.SchemaProps{ Description: \"ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ContentType\": { SchemaProps: spec.SchemaProps{ Description: \"ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"Raw\", \"ContentEncoding\", \"ContentType\"}, }, }, } } func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.\", Type: intstr.IntOrString{}.OpenAPISchemaType(), Format: intstr.IntOrString{}.OpenAPISchemaFormat(), }, }, } } func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Info contains versioning information. how we'll want to distribute that information.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"major\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"minor\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"gitVersion\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"gitCommit\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"gitTreeState\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"buildDate\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"goVersion\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"compiler\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"platform\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"major\", \"minor\", \"gitVersion\", \"gitCommit\", \"gitTreeState\", \"buildDate\", \"goVersion\", \"compiler\", \"platform\"}, }, }, } } func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Event captures all the information that can be included in an API audit log.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"level\": { SchemaProps: spec.SchemaProps{ Description: \"AuditLevel at which event was generated\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"auditID\": { SchemaProps: spec.SchemaProps{ Description: \"Unique audit ID, generated for each request.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"stage\": { SchemaProps: spec.SchemaProps{ Description: \"Stage of the request handling when this event instance was generated.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"requestURI\": { SchemaProps: spec.SchemaProps{ Description: \"RequestURI is the request URI as sent by the client to a server.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"Authenticated user information.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"impersonatedUser\": { SchemaProps: spec.SchemaProps{ Description: \"Impersonated user information.\", Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"sourceIPs\": { SchemaProps: spec.SchemaProps{ Description: \"Source IPs, from where the request originated and intermediate proxies.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userAgent\": { SchemaProps: spec.SchemaProps{ Description: \"UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"objectRef\": { SchemaProps: spec.SchemaProps{ Description: \"Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.\", Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference\"), }, }, \"responseStatus\": { SchemaProps: spec.SchemaProps{ Description: \"The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Status\"), }, }, \"requestObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"responseObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"requestReceivedTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"stageTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached current audit stage.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"annotations\": { SchemaProps: spec.SchemaProps{ Description: \"Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"level\", \"auditID\", \"stage\", \"requestURI\", \"verb\", \"user\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.UserInfo\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\", \"k8s.io/apimachinery/pkg/runtime.Unknown\", \"k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference\"}, } } func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of audit Events.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1.Event\"}, } } func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupResources represents resource kinds in an API group.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the name of the API group that contains the resources. The empty string represents the core API group.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnAn empty list implies all resources and subresources in this API groups apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectReference contains enough information to let you inspect or modify the referred object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion is the version of the API group that contains the referred object.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Policy defines the configuration of audit logging, and the rules for how different request categories are logged.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is included for interoperability with API infrastructure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule\"), }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"rules\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule\"}, } } func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyList is a list of audit Policies.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1.Policy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1.Policy\"}, } } func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"level\": { SchemaProps: spec.SchemaProps{ Description: \"The Level that requests matching this rule are recorded at.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"users\": { SchemaProps: spec.SchemaProps{ Description: \"The users (by authenticated user name) this rule applies to. An empty list implies every user.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userGroups\": { SchemaProps: spec.SchemaProps{ Description: \"The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"The verbs that match this rule. An empty list implies every verb.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources that this rule matches. An empty list implies all kinds in all API groups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1.GroupResources\"), }, }, }, }, }, \"namespaces\": { SchemaProps: spec.SchemaProps{ Description: \"Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:n \"/metrics\" - Log requests for apiserver metricsn \"/healthz*\" - Log all health checks\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be includedn in the API audit lognNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"level\"}, }, }, Dependencies: []string{ \"k8s.io/apiserver/pkg/apis/audit/v1.GroupResources\"}, } } func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is included for interoperability with API infrastructure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"level\": { SchemaProps: spec.SchemaProps{ Description: \"AuditLevel at which event was generated\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"auditID\": { SchemaProps: spec.SchemaProps{ Description: \"Unique audit ID, generated for each request.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"stage\": { SchemaProps: spec.SchemaProps{ Description: \"Stage of the request handling when this event instance was generated.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"requestURI\": { SchemaProps: spec.SchemaProps{ Description: \"RequestURI is the request URI as sent by the client to a server.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"Authenticated user information.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"impersonatedUser\": { SchemaProps: spec.SchemaProps{ Description: \"Impersonated user information.\", Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"sourceIPs\": { SchemaProps: spec.SchemaProps{ Description: \"Source IPs, from where the request originated and intermediate proxies.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userAgent\": { SchemaProps: spec.SchemaProps{ Description: \"UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"objectRef\": { SchemaProps: spec.SchemaProps{ Description: \"Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.\", Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference\"), }, }, \"responseStatus\": { SchemaProps: spec.SchemaProps{ Description: \"The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Status\"), }, }, \"requestObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"responseObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"requestReceivedTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"stageTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached current audit stage.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"annotations\": { SchemaProps: spec.SchemaProps{ Description: \"Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"level\", \"timestamp\", \"auditID\", \"stage\", \"requestURI\", \"verb\", \"user\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.UserInfo\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\", \"k8s.io/apimachinery/pkg/runtime.Unknown\", \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference\"}, } } func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of audit Events.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event\"}, } } func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupResources represents resource kinds in an API group.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the name of the API group that contains the resources. The empty string represents the core API group.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnAn empty list implies all resources and subresources in this API groups apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectReference contains enough information to let you inspect or modify the referred object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is included for interoperability with API infrastructure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule\"), }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"rules\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule\"}, } } func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyList is a list of audit Policies.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy\"}, } } func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"level\": { SchemaProps: spec.SchemaProps{ Description: \"The Level that requests matching this rule are recorded at.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"users\": { SchemaProps: spec.SchemaProps{ Description: \"The users (by authenticated user name) this rule applies to. An empty list implies every user.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userGroups\": { SchemaProps: spec.SchemaProps{ Description: \"The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"The verbs that match this rule. An empty list implies every verb.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources that this rule matches. An empty list implies all kinds in all API groups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources\"), }, }, }, }, }, \"namespaces\": { SchemaProps: spec.SchemaProps{ Description: \"Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:n \"/metrics\" - Log requests for apiserver metricsn \"/healthz*\" - Log all health checks\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be includedn in the API audit lognNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"level\"}, }, }, Dependencies: []string{ \"k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources\"}, } } func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"level\": { SchemaProps: spec.SchemaProps{ Description: \"AuditLevel at which event was generated\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"auditID\": { SchemaProps: spec.SchemaProps{ Description: \"Unique audit ID, generated for each request.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"stage\": { SchemaProps: spec.SchemaProps{ Description: \"Stage of the request handling when this event instance was generated.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"requestURI\": { SchemaProps: spec.SchemaProps{ Description: \"RequestURI is the request URI as sent by the client to a server.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"verb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"user\": { SchemaProps: spec.SchemaProps{ Description: \"Authenticated user information.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"impersonatedUser\": { SchemaProps: spec.SchemaProps{ Description: \"Impersonated user information.\", Ref: ref(\"k8s.io/api/authentication/v1.UserInfo\"), }, }, \"sourceIPs\": { SchemaProps: spec.SchemaProps{ Description: \"Source IPs, from where the request originated and intermediate proxies.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userAgent\": { SchemaProps: spec.SchemaProps{ Description: \"UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.\", Type: []string{\"string\"}, Format: \"\", }, }, \"objectRef\": { SchemaProps: spec.SchemaProps{ Description: \"Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.\", Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference\"), }, }, \"responseStatus\": { SchemaProps: spec.SchemaProps{ Description: \"The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Status\"), }, }, \"requestObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"responseObject\": { SchemaProps: spec.SchemaProps{ Description: \"API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.\", Ref: ref(\"k8s.io/apimachinery/pkg/runtime.Unknown\"), }, }, \"requestReceivedTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"stageTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"Time the request reached current audit stage.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\"), }, }, \"annotations\": { SchemaProps: spec.SchemaProps{ Description: \"Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, Required: []string{\"level\", \"timestamp\", \"auditID\", \"stage\", \"requestURI\", \"verb\", \"user\"}, }, }, Dependencies: []string{ \"k8s.io/api/authentication/v1.UserInfo\", \"k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Status\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\", \"k8s.io/apimachinery/pkg/runtime.Unknown\", \"k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference\"}, } } func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EventList is a list of audit Events.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1beta1.Event\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1beta1.Event\"}, } } func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupResources represents resource kinds in an API group.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the name of the API group that contains the resources. The empty string represents the core API group.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources is a list of resources this rule applies to.nnFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.nnIf wildcard is present, the validation rule will ensure resources do not overlap with each other.nnAn empty list implies all resources and subresources in this API groups apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resourceNames\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, } } func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ObjectReference contains enough information to let you inspect or modify the referred object.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"resource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"uid\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion is the version of the API group that contains the referred object.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceVersion\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, \"subresource\": { SchemaProps: spec.SchemaProps{ Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"ObjectMeta is included for interoperability with API infrastructure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"rules\": { SchemaProps: spec.SchemaProps{ Description: \"Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule\"), }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"rules\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule\"}, } } func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyList is a list of audit Policies.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy\"}, } } func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"level\": { SchemaProps: spec.SchemaProps{ Description: \"The Level that requests matching this rule are recorded at.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"users\": { SchemaProps: spec.SchemaProps{ Description: \"The users (by authenticated user name) this rule applies to. An empty list implies every user.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"userGroups\": { SchemaProps: spec.SchemaProps{ Description: \"The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"verbs\": { SchemaProps: spec.SchemaProps{ Description: \"The verbs that match this rule. An empty list implies every verb.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"resources\": { SchemaProps: spec.SchemaProps{ Description: \"Resources that this rule matches. An empty list implies all kinds in all API groups.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources\"), }, }, }, }, }, \"namespaces\": { SchemaProps: spec.SchemaProps{ Description: \"Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"nonResourceURLs\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:n \"/metrics\" - Log requests for apiserver metricsn \"/healthz*\" - Log all health checks\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitStages\": { SchemaProps: spec.SchemaProps{ Description: \"OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"omitManagedFields\": { SchemaProps: spec.SchemaProps{ Description: \"OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be includedn in the API audit lognNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"level\"}, }, }, Dependencies: []string{ \"k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources\"}, } } func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.nnTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"server\": { SchemaProps: spec.SchemaProps{ Description: \"Server is the address of the kubernetes cluster (https://hostname:port).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"tls-server-name\": { SchemaProps: spec.SchemaProps{ Description: \"TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"insecure-skip-tls-verify\": { SchemaProps: spec.SchemaProps{ Description: \"InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"certificate-authority-data\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"proxy-url\": { SchemaProps: spec.SchemaProps{ Description: \"ProxyURL is the URL to the proxy to be used for all requests to this cluster.\", Type: []string{\"string\"}, Format: \"\", }, }, \"config\": { SchemaProps: spec.SchemaProps{ Description: \"Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.nnThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:nnclusters: - name: my-clustern cluster:n ...n extensions:n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec confign extension:n audience: 06e3fbd18de8 # arbitrary confignnIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"server\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information passed to the plugin by the transport.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec\", \"k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus\"}, } } func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialSpec holds request and runtime specific information provided by the transport.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cluster\": { SchemaProps: spec.SchemaProps{ Description: \"Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster\"), }, }, \"interactive\": { SchemaProps: spec.SchemaProps{ Description: \"Interactive declares whether stdin has been passed to this exec plugin.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"interactive\"}, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster\"}, } } func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialStatus holds credentials for the transport to use.nnToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"expirationTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationTimestamp indicates a time when the provided credentials expire.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is a bearer token used by the client for request authentication.\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientCertificateData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded client TLS certificates (including intermediates, if any).\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientKeyData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded private key for the above certificate.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec\", \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus\"}, } } func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialSpec holds request and runtime specific information provided by the transport.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"response\": { SchemaProps: spec.SchemaProps{ Description: \"Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response\"), }, }, \"interactive\": { SchemaProps: spec.SchemaProps{ Description: \"Interactive is true when the transport detects the command is being called from an interactive prompt.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response\"}, } } func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialStatus holds credentials for the transport to use.nnToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"expirationTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationTimestamp indicates a time when the provided credentials expire.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is a bearer token used by the client for request authentication.\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientCertificateData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded client TLS certificates (including intermediates, if any).\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientKeyData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded private key for the above certificate.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Response defines metadata about a failed request, including HTTP status code and response headers.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"header\": { SchemaProps: spec.SchemaProps{ Description: \"Header holds HTTP headers returned by the server.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, \"code\": { SchemaProps: spec.SchemaProps{ Description: \"Code is the HTTP status code returned by the server.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.nnTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"server\": { SchemaProps: spec.SchemaProps{ Description: \"Server is the address of the kubernetes cluster (https://hostname:port).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"tls-server-name\": { SchemaProps: spec.SchemaProps{ Description: \"TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"insecure-skip-tls-verify\": { SchemaProps: spec.SchemaProps{ Description: \"InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"certificate-authority-data\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"proxy-url\": { SchemaProps: spec.SchemaProps{ Description: \"ProxyURL is the URL to the proxy to be used for all requests to this cluster.\", Type: []string{\"string\"}, Format: \"\", }, }, \"config\": { SchemaProps: spec.SchemaProps{ Description: \"Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.nnThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:nnclusters: - name: my-clustern cluster:n ...n extensions:n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec confign extension:n audience: 06e3fbd18de8 # arbitrary confignnIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"server\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec holds information passed to the plugin by the transport.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec\", \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus\"}, } } func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialSpec holds request and runtime specific information provided by the transport.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cluster\": { SchemaProps: spec.SchemaProps{ Description: \"Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).\", Ref: ref(\"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster\"), }, }, \"interactive\": { SchemaProps: spec.SchemaProps{ Description: \"Interactive declares whether stdin has been passed to this exec plugin.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"interactive\"}, }, }, Dependencies: []string{ \"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster\"}, } } func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecCredentialStatus holds credentials for the transport to use.nnToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"expirationTimestamp\": { SchemaProps: spec.SchemaProps{ Description: \"ExpirationTimestamp indicates a time when the provided credentials expire.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"token\": { SchemaProps: spec.SchemaProps{ Description: \"Token is a bearer token used by the client for request authentication.\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientCertificateData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded client TLS certificates (including intermediates, if any).\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientKeyData\": { SchemaProps: spec.SchemaProps{ Description: \"PEM-encoded private key for the above certificate.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"Generic\": { SchemaProps: spec.SchemaProps{ Description: \"Generic holds configuration for a generic controller-manager\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration\"), }, }, \"KubeCloudShared\": { SchemaProps: spec.SchemaProps{ Description: \"KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration\"), }, }, \"ServiceController\": { SchemaProps: spec.SchemaProps{ Description: \"ServiceControllerConfiguration holds configuration for ServiceController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration\"), }, }, \"NodeStatusUpdateFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"Generic\", \"KubeCloudShared\", \"ServiceController\", \"NodeStatusUpdateFrequency\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration\", \"k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration\", \"k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration\"}, } } func schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CloudProviderConfiguration contains basically elements about cloud provider.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the provider for cloud services.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"CloudConfigFile\": { SchemaProps: spec.SchemaProps{ Description: \"cloudConfigFile is the path to the cloud provider configuration file.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"Name\", \"CloudConfigFile\"}, }, }, } } func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"CloudProvider\": { SchemaProps: spec.SchemaProps{ Description: \"CloudProviderConfiguration holds configuration for CloudProvider related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration\"), }, }, \"ExternalCloudVolumePlugin\": { SchemaProps: spec.SchemaProps{ Description: \"externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"UseServiceAccountCredentials\": { SchemaProps: spec.SchemaProps{ Description: \"useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"AllowUntaggedCloud\": { SchemaProps: spec.SchemaProps{ Description: \"run with untagged cloud instances\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"RouteReconciliationPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"NodeMonitorPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"ClusterName\": { SchemaProps: spec.SchemaProps{ Description: \"clusterName is the instance prefix for the cluster.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ClusterCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"clusterCIDR is CIDR Range for Pods in cluster.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"AllocateNodeCIDRs\": { SchemaProps: spec.SchemaProps{ Description: \"AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"CIDRAllocatorType\": { SchemaProps: spec.SchemaProps{ Description: \"CIDRAllocatorType determines what kind of pod CIDR allocator will be used.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ConfigureCloudRoutes\": { SchemaProps: spec.SchemaProps{ Description: \"configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"NodeSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"CloudProvider\", \"ExternalCloudVolumePlugin\", \"UseServiceAccountCredentials\", \"AllowUntaggedCloud\", \"RouteReconciliationPeriod\", \"NodeMonitorPeriod\", \"ClusterName\", \"ClusterCIDR\", \"AllocateNodeCIDRs\", \"CIDRAllocatorType\", \"ConfigureCloudRoutes\", \"NodeSyncPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration\"}, } } func schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerLeaderConfiguration provides the configuration for a migrating leader lock.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"component\": { SchemaProps: spec.SchemaProps{ Description: \"Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"component\"}, }, }, } } func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GenericControllerManagerConfiguration holds configuration for a generic controller-manager.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Port\": { SchemaProps: spec.SchemaProps{ Description: \"port is the port that the controller-manager's http service runs on.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"Address\": { SchemaProps: spec.SchemaProps{ Description: \"address is the IP address to serve on (set to 0.0.0.0 for all interfaces).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"MinResyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"ClientConnection\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\"), }, }, \"ControllerStartInterval\": { SchemaProps: spec.SchemaProps{ Description: \"How long to wait between starting controller managers\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"LeaderElection\": { SchemaProps: spec.SchemaProps{ Description: \"leaderElection defines the configuration of leader election client.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\"), }, }, \"Controllers\": { SchemaProps: spec.SchemaProps{ Description: \"Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"Debugging\": { SchemaProps: spec.SchemaProps{ Description: \"DebuggingConfiguration holds configuration for Debugging related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.DebuggingConfiguration\"), }, }, \"LeaderMigrationEnabled\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderMigrationEnabled indicates whether Leader Migration should be enabled for the controller manager.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"LeaderMigration\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderMigration holds the configuration for Leader Migration.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration\"), }, }, }, Required: []string{\"Port\", \"Address\", \"MinResyncPeriod\", \"ClientConnection\", \"ControllerStartInterval\", \"LeaderElection\", \"Controllers\", \"Debugging\", \"LeaderMigrationEnabled\", \"LeaderMigration\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\", \"k8s.io/component-base/config/v1alpha1.DebuggingConfiguration\", \"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\", \"k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration\"}, } } func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"leaderName\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceLock\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"controllerLeaders\": { SchemaProps: spec.SchemaProps{ Description: \"ControllerLeaders contains a list of migrating leader lock configurations\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration\"), }, }, }, }, }, }, Required: []string{\"leaderName\", \"resourceLock\", \"controllerLeaders\"}, }, }, Dependencies: []string{ \"k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration\"}, } } func schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ControllerLeaderConfiguration provides the configuration for a migrating leader lock.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"component\": { SchemaProps: spec.SchemaProps{ Description: \"Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"component\"}, }, }, } } func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"leaderName\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"resourceLock\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"controllerLeaders\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ControllerLeaders contains a list of migrating leader lock configurations\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration\"), }, }, }, }, }, }, Required: []string{\"leaderName\", \"resourceLock\", \"controllerLeaders\"}, }, }, Dependencies: []string{ \"k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration\"}, } } func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIService represents a server for a particular GroupVersion. Name must be \"version.group\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec contains information for locating and communicating with a server\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status contains derived information about an API server\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus\"}, } } func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceCondition describes the state of an APIService at a particular point\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is the type of the condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the status of the condition. Can be True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceList is a list of APIService objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of APIService\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService\"}, } } func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"service\": { SchemaProps: spec.SchemaProps{ Description: \"Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.\", Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference\"), }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the API group name this server hosts\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"Version is the API version this server hosts. For example, \"v1\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"insecureSkipTLSVerify\": { SchemaProps: spec.SchemaProps{ Description: \"InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"caBundle\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"groupPriorityMinimum\": { SchemaProps: spec.SchemaProps{ Description: \"GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"versionPriority\": { SchemaProps: spec.SchemaProps{ Description: \"VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"groupPriorityMinimum\", \"versionPriority\"}, }, }, Dependencies: []string{ \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference\"}, } } func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceStatus contains derived information about an API server\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Current service state of apiService.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition\"}, } } func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the service\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the service\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIService represents a server for a particular GroupVersion. Name must be \"version.group\".\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec contains information for locating and communicating with a server\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec\"), }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status contains derived information about an API server\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus\"}, } } func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceCondition describes the state of an APIService at a particular point\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type is the type of the condition.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"status\": { SchemaProps: spec.SchemaProps{ Description: \"Status is the status of the condition. Can be True, False, Unknown.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"lastTransitionTime\": { SchemaProps: spec.SchemaProps{ Description: \"Last time the condition transitioned from one status to another.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"reason\": { SchemaProps: spec.SchemaProps{ Description: \"Unique, one-word, CamelCase reason for the condition's last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, \"message\": { SchemaProps: spec.SchemaProps{ Description: \"Human-readable message indicating details about last transition.\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"type\", \"status\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceList is a list of APIService objects.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"Items is the list of APIService\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService\"}, } } func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"service\": { SchemaProps: spec.SchemaProps{ Description: \"Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.\", Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference\"), }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the API group name this server hosts\", Type: []string{\"string\"}, Format: \"\", }, }, \"version\": { SchemaProps: spec.SchemaProps{ Description: \"Version is the API version this server hosts. For example, \"v1\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"insecureSkipTLSVerify\": { SchemaProps: spec.SchemaProps{ Description: \"InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"caBundle\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"groupPriorityMinimum\": { SchemaProps: spec.SchemaProps{ Description: \"GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"versionPriority\": { SchemaProps: spec.SchemaProps{ Description: \"VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"groupPriorityMinimum\", \"versionPriority\"}, }, }, Dependencies: []string{ \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference\"}, } } func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"APIServiceStatus contains derived information about an API server\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"conditions\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"type\", }, \"x-kubernetes-list-type\": \"map\", \"x-kubernetes-patch-merge-key\": \"type\", \"x-kubernetes-patch-strategy\": \"merge\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Current service state of apiService.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition\"}, } } func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ServiceReference holds a reference to Service.legacy.k8s.io\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the namespace of the service\", Type: []string{\"string\"}, Format: \"\", }, }, \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the name of the service\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"AttachDetachControllerConfiguration contains elements describing AttachDetachController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"DisableAttachDetachReconcilerSync\": { SchemaProps: spec.SchemaProps{ Description: \"Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"ReconcilerSyncLoopPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"DisableAttachDetachReconcilerSync\", \"ReconcilerSyncLoopPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSRSigningConfiguration holds information about a particular CSR signer\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"CertFile\": { SchemaProps: spec.SchemaProps{ Description: \"certFile is the filename containing a PEM-encoded X509 CA certificate used to issue certificates\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"KeyFile\": { SchemaProps: spec.SchemaProps{ Description: \"keyFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue certificates\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"CertFile\", \"KeyFile\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CSRSigningControllerConfiguration contains elements describing CSRSigningController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ClusterSigningCertFile\": { SchemaProps: spec.SchemaProps{ Description: \"clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ClusterSigningKeyFile\": { SchemaProps: spec.SchemaProps{ Description: \"clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"KubeletServingSignerConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\"), }, }, \"KubeletClientSignerConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\"), }, }, \"KubeAPIServerClientSignerConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\"), }, }, \"LegacyUnknownSignerConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\"), }, }, \"ClusterSigningDuration\": { SchemaProps: spec.SchemaProps{ Description: \"clusterSigningDuration is the max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"ClusterSigningCertFile\", \"ClusterSigningKeyFile\", \"KubeletServingSignerConfiguration\", \"KubeletClientSignerConfiguration\", \"KubeAPIServerClientSignerConfiguration\", \"LegacyUnknownSignerConfiguration\", \"ClusterSigningDuration\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CronJobControllerConfiguration contains elements describing CrongJob2Controller.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentCronJobSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentCronJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentCronJobSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DaemonSetControllerConfiguration contains elements describing DaemonSetController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentDaemonSetSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentDaemonSetSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeploymentControllerConfiguration contains elements describing DeploymentController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentDeploymentSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"DeploymentControllerSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"deploymentControllerSyncPeriod is the period for syncing the deployments.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"ConcurrentDeploymentSyncs\", \"DeploymentControllerSyncPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DeprecatedControllerConfiguration contains elements be deprecated.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"DeletingPodsQPS\": { SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.\", Default: 0, Type: []string{\"number\"}, Format: \"float\", }, }, \"DeletingPodsBurst\": { SchemaProps: spec.SchemaProps{ Description: \"DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"RegisterRetryCount\": { SchemaProps: spec.SchemaProps{ Description: \"registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"DeletingPodsQPS\", \"DeletingPodsBurst\", \"RegisterRetryCount\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointControllerConfiguration contains elements describing EndpointController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentEndpointSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"EndpointUpdatesBatchPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"ConcurrentEndpointSyncs\", \"EndpointUpdatesBatchPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentServiceEndpointSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"MaxEndpointsPerSlice\": { SchemaProps: spec.SchemaProps{ Description: \"maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"EndpointUpdatesBatchPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"ConcurrentServiceEndpointSyncs\", \"MaxEndpointsPerSlice\", \"EndpointUpdatesBatchPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceMirroringControllerConfiguration contains elements describing EndpointSliceMirroringController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"MirroringConcurrentServiceEndpointSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"mirroringConcurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"MirroringMaxEndpointsPerSubset\": { SchemaProps: spec.SchemaProps{ Description: \"mirroringMaxEndpointsPerSubset is the maximum number of endpoints that will be mirrored to an EndpointSlice for an EndpointSubset.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"MirroringEndpointUpdatesBatchPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice updates. All updates triggered by EndpointSlice changes will be delayed by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the same Endpoints resource change in that period, they will be batched to a single EndpointSlice update. Default 0 value means that each Endpoints update triggers an EndpointSlice update.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"MirroringConcurrentServiceEndpointSyncs\", \"MirroringMaxEndpointsPerSubset\", \"MirroringEndpointUpdatesBatchPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"EphemeralVolumeControllerConfiguration contains elements describing EphemeralVolumeController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentEphemeralVolumeSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"ConcurrentEphemeralVolumeSyncseSyncs is the number of ephemeral volume syncing operations that will be done concurrently. Larger number = faster ephemeral volume updating, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentEphemeralVolumeSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"EnableGarbageCollector\": { SchemaProps: spec.SchemaProps{ Description: \"enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"ConcurrentGCSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"GCIgnoredResources\": { SchemaProps: spec.SchemaProps{ Description: \"gcIgnoredResources is the list of GroupResources that garbage collection should ignore.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.GroupResource\"), }, }, }, }, }, }, Required: []string{\"EnableGarbageCollector\", \"ConcurrentGCSyncs\", \"GCIgnoredResources\"}, }, }, Dependencies: []string{ \"k8s.io/kube-controller-manager/config/v1alpha1.GroupResource\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"GroupResource describes an group resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"Group\": { SchemaProps: spec.SchemaProps{ Description: \"group is the group portion of the GroupResource.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"Resource\": { SchemaProps: spec.SchemaProps{ Description: \"resource is the resource portion of the GroupResource.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"Group\", \"Resource\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"HPAControllerConfiguration contains elements describing HPAController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"HorizontalPodAutoscalerSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"HorizontalPodAutoscalerUpscaleForbiddenWindow\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"HorizontalPodAutoscalerDownscaleStabilizationWindow\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"HorizontalPodAutoscalerDownscaleForbiddenWindow\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"HorizontalPodAutoscalerTolerance\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling\", Default: 0, Type: []string{\"number\"}, Format: \"double\", }, }, \"HorizontalPodAutoscalerCPUInitializationPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"HorizontalPodAutoscalerInitialReadinessDelay\": { SchemaProps: spec.SchemaProps{ Description: \"HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"HorizontalPodAutoscalerSyncPeriod\", \"HorizontalPodAutoscalerUpscaleForbiddenWindow\", \"HorizontalPodAutoscalerDownscaleStabilizationWindow\", \"HorizontalPodAutoscalerDownscaleForbiddenWindow\", \"HorizontalPodAutoscalerTolerance\", \"HorizontalPodAutoscalerCPUInitializationPeriod\", \"HorizontalPodAutoscalerInitialReadinessDelay\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"JobControllerConfiguration contains elements describing JobController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentJobSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentJobSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeControllerManagerConfiguration contains elements describing kube-controller manager.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"Generic\": { SchemaProps: spec.SchemaProps{ Description: \"Generic holds configuration for a generic controller-manager\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration\"), }, }, \"KubeCloudShared\": { SchemaProps: spec.SchemaProps{ Description: \"KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration\"), }, }, \"AttachDetachController\": { SchemaProps: spec.SchemaProps{ Description: \"AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration\"), }, }, \"CSRSigningController\": { SchemaProps: spec.SchemaProps{ Description: \"CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration\"), }, }, \"DaemonSetController\": { SchemaProps: spec.SchemaProps{ Description: \"DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration\"), }, }, \"DeploymentController\": { SchemaProps: spec.SchemaProps{ Description: \"DeploymentControllerConfiguration holds configuration for DeploymentController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration\"), }, }, \"StatefulSetController\": { SchemaProps: spec.SchemaProps{ Description: \"StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration\"), }, }, \"DeprecatedController\": { SchemaProps: spec.SchemaProps{ Description: \"DeprecatedControllerConfiguration holds configuration for some deprecated features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration\"), }, }, \"EndpointController\": { SchemaProps: spec.SchemaProps{ Description: \"EndpointControllerConfiguration holds configuration for EndpointController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration\"), }, }, \"EndpointSliceController\": { SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration\"), }, }, \"EndpointSliceMirroringController\": { SchemaProps: spec.SchemaProps{ Description: \"EndpointSliceMirroringControllerConfiguration holds configuration for EndpointSliceMirroringController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration\"), }, }, \"EphemeralVolumeController\": { SchemaProps: spec.SchemaProps{ Description: \"EphemeralVolumeControllerConfiguration holds configuration for EphemeralVolumeController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration\"), }, }, \"GarbageCollectorController\": { SchemaProps: spec.SchemaProps{ Description: \"GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration\"), }, }, \"HPAController\": { SchemaProps: spec.SchemaProps{ Description: \"HPAControllerConfiguration holds configuration for HPAController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration\"), }, }, \"JobController\": { SchemaProps: spec.SchemaProps{ Description: \"JobControllerConfiguration holds configuration for JobController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration\"), }, }, \"CronJobController\": { SchemaProps: spec.SchemaProps{ Description: \"CronJobControllerConfiguration holds configuration for CronJobController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration\"), }, }, \"NamespaceController\": { SchemaProps: spec.SchemaProps{ Description: \"NamespaceControllerConfiguration holds configuration for NamespaceController related features. NamespaceControllerConfiguration holds configuration for NamespaceController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration\"), }, }, \"NodeIPAMController\": { SchemaProps: spec.SchemaProps{ Description: \"NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration\"), }, }, \"NodeLifecycleController\": { SchemaProps: spec.SchemaProps{ Description: \"NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration\"), }, }, \"PersistentVolumeBinderController\": { SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration\"), }, }, \"PodGCController\": { SchemaProps: spec.SchemaProps{ Description: \"PodGCControllerConfiguration holds configuration for PodGCController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration\"), }, }, \"ReplicaSetController\": { SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration\"), }, }, \"ReplicationController\": { SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerConfiguration holds configuration for ReplicationController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration\"), }, }, \"ResourceQuotaController\": { SchemaProps: spec.SchemaProps{ Description: \"ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration\"), }, }, \"SAController\": { SchemaProps: spec.SchemaProps{ Description: \"SAControllerConfiguration holds configuration for ServiceAccountController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration\"), }, }, \"ServiceController\": { SchemaProps: spec.SchemaProps{ Description: \"ServiceControllerConfiguration holds configuration for ServiceController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration\"), }, }, \"TTLAfterFinishedController\": { SchemaProps: spec.SchemaProps{ Description: \"TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration\"), }, }, }, Required: []string{\"Generic\", \"KubeCloudShared\", \"AttachDetachController\", \"CSRSigningController\", \"DaemonSetController\", \"DeploymentController\", \"StatefulSetController\", \"DeprecatedController\", \"EndpointController\", \"EndpointSliceController\", \"EndpointSliceMirroringController\", \"EphemeralVolumeController\", \"GarbageCollectorController\", \"HPAController\", \"JobController\", \"CronJobController\", \"NamespaceController\", \"NodeIPAMController\", \"NodeLifecycleController\", \"PersistentVolumeBinderController\", \"PodGCController\", \"ReplicaSetController\", \"ReplicationController\", \"ResourceQuotaController\", \"SAController\", \"ServiceController\", \"TTLAfterFinishedController\"}, }, }, Dependencies: []string{ \"k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration\", \"k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration\", \"k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration\", \"k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NamespaceControllerConfiguration contains elements describing NamespaceController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"NamespaceSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"namespaceSyncPeriod is the period for syncing namespace life-cycle updates.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"ConcurrentNamespaceSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"NamespaceSyncPeriod\", \"ConcurrentNamespaceSyncs\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeIPAMControllerConfiguration contains elements describing NodeIpamController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ServiceCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"serviceCIDR is CIDR Range for Services in cluster.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"SecondaryServiceCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"NodeCIDRMaskSize\": { SchemaProps: spec.SchemaProps{ Description: \"NodeCIDRMaskSize is the mask size for node cidr in cluster.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"NodeCIDRMaskSizeIPv4\": { SchemaProps: spec.SchemaProps{ Description: \"NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"NodeCIDRMaskSizeIPv6\": { SchemaProps: spec.SchemaProps{ Description: \"NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ServiceCIDR\", \"SecondaryServiceCIDR\", \"NodeCIDRMaskSize\", \"NodeCIDRMaskSizeIPv4\", \"NodeCIDRMaskSizeIPv6\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"EnableTaintManager\": { SchemaProps: spec.SchemaProps{ Description: \"If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"NodeEvictionRate\": { SchemaProps: spec.SchemaProps{ Description: \"nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy\", Default: 0, Type: []string{\"number\"}, Format: \"float\", }, }, \"SecondaryNodeEvictionRate\": { SchemaProps: spec.SchemaProps{ Description: \"secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy\", Default: 0, Type: []string{\"number\"}, Format: \"float\", }, }, \"NodeStartupGracePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"NodeMonitorGracePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"PodEvictionTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"podEvictionTimeout is the grace period for deleting pods on failed nodes.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"LargeClusterSizeThreshold\": { SchemaProps: spec.SchemaProps{ Description: \"secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"UnhealthyZoneThreshold\": { SchemaProps: spec.SchemaProps{ Description: \"Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady\", Default: 0, Type: []string{\"number\"}, Format: \"float\", }, }, }, Required: []string{\"EnableTaintManager\", \"NodeEvictionRate\", \"SecondaryNodeEvictionRate\", \"NodeStartupGracePeriod\", \"NodeMonitorGracePeriod\", \"PodEvictionTimeout\", \"LargeClusterSizeThreshold\", \"UnhealthyZoneThreshold\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"PVClaimBinderSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"VolumeConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"volumeConfiguration holds configuration for volume related features.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration\"), }, }, \"VolumeHostCIDRDenylist\": { SchemaProps: spec.SchemaProps{ Description: \"VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the controller from plugins.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"VolumeHostAllowLocalLoopback\": { SchemaProps: spec.SchemaProps{ Description: \"VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) should be allowed from plugins.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"PVClaimBinderSyncPeriod\", \"VolumeConfiguration\", \"VolumeHostCIDRDenylist\", \"VolumeHostAllowLocalLoopback\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"MaximumRetry\": { SchemaProps: spec.SchemaProps{ Description: \"maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"MinimumTimeoutNFS\": { SchemaProps: spec.SchemaProps{ Description: \"minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"PodTemplateFilePathNFS\": { SchemaProps: spec.SchemaProps{ Description: \"podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"IncrementTimeoutNFS\": { SchemaProps: spec.SchemaProps{ Description: \"incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"PodTemplateFilePathHostPath\": { SchemaProps: spec.SchemaProps{ Description: \"podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"MinimumTimeoutHostPath\": { SchemaProps: spec.SchemaProps{ Description: \"minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"IncrementTimeoutHostPath\": { SchemaProps: spec.SchemaProps{ Description: \"incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"MaximumRetry\", \"MinimumTimeoutNFS\", \"PodTemplateFilePathNFS\", \"IncrementTimeoutNFS\", \"PodTemplateFilePathHostPath\", \"MinimumTimeoutHostPath\", \"IncrementTimeoutHostPath\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodGCControllerConfiguration contains elements describing PodGCController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"TerminatedPodGCThreshold\": { SchemaProps: spec.SchemaProps{ Description: \"terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"TerminatedPodGCThreshold\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentRSSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentRSSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ReplicationControllerConfiguration contains elements describing ReplicationController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentRCSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentRCSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ResourceQuotaSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"ConcurrentResourceQuotaSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ResourceQuotaSyncPeriod\", \"ConcurrentResourceQuotaSyncs\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SAControllerConfiguration contains elements describing ServiceAccountController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ServiceAccountKeyFile\": { SchemaProps: spec.SchemaProps{ Description: \"serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ConcurrentSATokenSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"RootCAFile\": { SchemaProps: spec.SchemaProps{ Description: \"rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"ServiceAccountKeyFile\", \"ConcurrentSATokenSyncs\", \"RootCAFile\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"StatefulSetControllerConfiguration contains elements describing StatefulSetController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentStatefulSetSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentStatefulSetSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"ConcurrentTTLSyncs\": { SchemaProps: spec.SchemaProps{ Description: \"concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"ConcurrentTTLSyncs\"}, }, }, } } func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"EnableHostPathProvisioning\": { SchemaProps: spec.SchemaProps{ Description: \"enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"EnableDynamicProvisioning\": { SchemaProps: spec.SchemaProps{ Description: \"enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"PersistentVolumeRecyclerConfiguration\": { SchemaProps: spec.SchemaProps{ Description: \"persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration\"), }, }, \"FlexVolumePluginDir\": { SchemaProps: spec.SchemaProps{ Description: \"volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"EnableHostPathProvisioning\", \"EnableDynamicProvisioning\", \"PersistentVolumeRecyclerConfiguration\", \"FlexVolumePluginDir\"}, }, }, Dependencies: []string{ \"k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration\"}, } } func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"featureGates\": { SchemaProps: spec.SchemaProps{ Description: \"featureGates is a map of feature names to bools that enable or disable alpha/experimental features.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, \"bindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"healthzBindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricsBindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"bindAddressHardFail\": { SchemaProps: spec.SchemaProps{ Description: \"bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"enableProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"clusterCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"hostnameOverride\": { SchemaProps: spec.SchemaProps{ Description: \"hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clientConnection\": { SchemaProps: spec.SchemaProps{ Description: \"clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\"), }, }, \"iptables\": { SchemaProps: spec.SchemaProps{ Description: \"iptables contains iptables-related configuration options.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration\"), }, }, \"ipvs\": { SchemaProps: spec.SchemaProps{ Description: \"ipvs contains ipvs-related configuration options.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration\"), }, }, \"oomScoreAdj\": { SchemaProps: spec.SchemaProps{ Description: \"oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"mode\": { SchemaProps: spec.SchemaProps{ Description: \"mode specifies which proxy mode to use.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"portRange\": { SchemaProps: spec.SchemaProps{ Description: \"portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"udpIdleTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"conntrack\": { SchemaProps: spec.SchemaProps{ Description: \"conntrack contains conntrack-related configuration options.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration\"), }, }, \"configSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodePortAddresses\": { SchemaProps: spec.SchemaProps{ Description: \"nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"winkernel\": { SchemaProps: spec.SchemaProps{ Description: \"winkernel contains winkernel-related configuration options.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration\"), }, }, \"showHiddenMetricsForVersion\": { SchemaProps: spec.SchemaProps{ Description: \"ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"detectLocalMode\": { SchemaProps: spec.SchemaProps{ Description: \"DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"bindAddress\", \"healthzBindAddress\", \"metricsBindAddress\", \"bindAddressHardFail\", \"enableProfiling\", \"clusterCIDR\", \"hostnameOverride\", \"clientConnection\", \"iptables\", \"ipvs\", \"oomScoreAdj\", \"mode\", \"portRange\", \"udpIdleTimeout\", \"conntrack\", \"configSyncPeriod\", \"nodePortAddresses\", \"winkernel\", \"showHiddenMetricsForVersion\", \"detectLocalMode\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\", \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration\", \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration\", \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration\", \"k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration\"}, } } func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"maxPerCore\": { SchemaProps: spec.SchemaProps{ Description: \"maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"min\": { SchemaProps: spec.SchemaProps{ Description: \"min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"tcpEstablishedTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"tcpCloseWaitTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"maxPerCore\", \"min\", \"tcpEstablishedTimeout\", \"tcpCloseWaitTimeout\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"masqueradeBit\": { SchemaProps: spec.SchemaProps{ Description: \"masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"masqueradeAll\": { SchemaProps: spec.SchemaProps{ Description: \"masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"syncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"minSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"masqueradeBit\", \"masqueradeAll\", \"syncPeriod\", \"minSyncPeriod\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"syncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"minSyncPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"scheduler\": { SchemaProps: spec.SchemaProps{ Description: \"ipvs scheduler\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"excludeCIDRs\": { SchemaProps: spec.SchemaProps{ Description: \"excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"strictARP\": { SchemaProps: spec.SchemaProps{ Description: \"strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, \"tcpTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"tcpFinTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"udpTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.\", Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, Required: []string{\"syncPeriod\", \"minSyncPeriod\", \"scheduler\", \"excludeCIDRs\", \"strictARP\", \"tcpTimeout\", \"tcpFinTimeout\", \"udpTimeout\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"networkName\": { SchemaProps: spec.SchemaProps{ Description: \"networkName is the name of the network kube-proxy will use to create endpoints and policies\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"sourceVip\": { SchemaProps: spec.SchemaProps{ Description: \"sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableDSR\": { SchemaProps: spec.SchemaProps{ Description: \"enableDSR tells kube-proxy whether HNS policies should be created with DSR\", Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"networkName\", \"sourceVip\", \"enableDSR\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DefaultPreemptionArgs holds arguments used to configure the DefaultPreemption plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"minCandidateNodesPercentage\": { SchemaProps: spec.SchemaProps{ Description: \"MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if unspecified.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minCandidateNodesAbsolute\": { SchemaProps: spec.SchemaProps{ Description: \"MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) We say \"likely\" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least 0 nodes. Defaults to 100 nodes if unspecified.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"urlPrefix\": { SchemaProps: spec.SchemaProps{ Description: \"URLPrefix at which the extender is available\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"filterVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"preemptVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"prioritizeVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"bindVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableHTTPS\": { SchemaProps: spec.SchemaProps{ Description: \"EnableHTTPS specifies whether https should be used to communicate with the extender\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tlsConfig\": { SchemaProps: spec.SchemaProps{ Description: \"TLSConfig specifies the transport layer security config\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig\"), }, }, \"httpTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeCacheCapable\": { SchemaProps: spec.SchemaProps{ Description: \"NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"managedResources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bindn (if the extender is the binder) phases iff the pod requests at leastn one of the extended resources in this list. If empty or unspecified,n all pods will be sent to this extender.n- If IgnoredByScheduler is set to true for a resource, kube-schedulern will skip checking the resource in predicates.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource\"), }, }, }, }, }, \"ignorable\": { SchemaProps: spec.SchemaProps{ Description: \"Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"urlPrefix\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource\", \"k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExtenderManagedResource describes the arguments of extended resources managed by an extender.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the extended resource name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ignoredByScheduler\": { SchemaProps: spec.SchemaProps{ Description: \"IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExtenderTLSConfig contains settings to enable TLS with extender\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"insecure\": { SchemaProps: spec.SchemaProps{ Description: \"Server should be accessed without verifying the TLS certificate. For testing only.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"serverName\": { SchemaProps: spec.SchemaProps{ Description: \"ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"certFile\": { SchemaProps: spec.SchemaProps{ Description: \"Server requires TLS client certificate authentication\", Type: []string{\"string\"}, Format: \"\", }, }, \"keyFile\": { SchemaProps: spec.SchemaProps{ Description: \"Server requires TLS client certificate authentication\", Type: []string{\"string\"}, Format: \"\", }, }, \"caFile\": { SchemaProps: spec.SchemaProps{ Description: \"Trusted root certificates for server\", Type: []string{\"string\"}, Format: \"\", }, }, \"certData\": { SchemaProps: spec.SchemaProps{ Description: \"CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"keyData\": { SchemaProps: spec.SchemaProps{ Description: \"KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"caData\": { SchemaProps: spec.SchemaProps{ Description: \"CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"hardPodAffinityWeight\": { SchemaProps: spec.SchemaProps{ Description: \"HardPodAffinityWeight is the scoring weight for existing pods with a matching hard affinity to the incoming pod.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeSchedulerConfiguration configures a scheduler\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"parallelism\": { SchemaProps: spec.SchemaProps{ Description: \"Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"leaderElection\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderElection defines the configuration of leader election client.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\"), }, }, \"clientConnection\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\"), }, }, \"healthzBindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"Note: Both HealthzBindAddress and MetricsBindAddress fields are deprecated. Only empty address or port 0 is allowed. Anything else will fail validation. HealthzBindAddress is the IP address and port for the health check server to serve on.\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricsBindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"MetricsBindAddress is the IP address and port for the metrics server to serve on.\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableProfiling enables profiling via web interface host:port/debug/pprof/\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"enableContentionProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableContentionProfiling enables lock contention profiling, if enableProfiling is true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"percentageOfNodesToScore\": { SchemaProps: spec.SchemaProps{ Description: \"PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"podInitialBackoffSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"podMaxBackoffSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"profiles\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"schedulerName\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile\"), }, }, }, }, }, \"extenders\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.Extender\"), }, }, }, }, }, }, Required: []string{\"leaderElection\", \"clientConnection\"}, }, }, Dependencies: []string{ \"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\", \"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\", \"k8s.io/kube-scheduler/config/v1beta2.Extender\", \"k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeSchedulerProfile is a scheduling profile.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"schedulerName\": { SchemaProps: spec.SchemaProps{ Description: \"SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.\", Type: []string{\"string\"}, Format: \"\", }, }, \"plugins\": { SchemaProps: spec.SchemaProps{ Description: \"Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.Plugins\"), }, }, \"pluginConfig\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginConfig\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.PluginConfig\", \"k8s.io/kube-scheduler/config/v1beta2.Plugins\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"addedAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match a specific Node (such as Daemonset Pods) might remain unschedulable.\", Ref: ref(\"k8s.io/api/core/v1.NodeAffinity\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeAffinity\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Resources to be managed, the default is \"cpu\" and \"memory\" if not specified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.ResourceSpec\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.ResourceSpec\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"ignoredResources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"IgnoredResources is the list of resources that NodeResources fit filter should ignore. This doesn't apply to scoring.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"ignoredResourceGroups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. e.g. if group is [\"example.com\"], it will ignore all resource names that begin with \"example.com\", such as \"example.com/aaa\" and \"example.com/bbb\". A resource group name can't contain '/'. This doesn't apply to scoring.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scoringStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name defines the name of plugin\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"Weight defines the weight of plugin, only used for Score plugins.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name defines the name of plugin being configured\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"enabled\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. These are called after default plugins and in the same order specified here.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.Plugin\"), }, }, }, }, }, \"disabled\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.Plugin\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.Plugin\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"queueSort\": { SchemaProps: spec.SchemaProps{ Description: \"QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"preFilter\": { SchemaProps: spec.SchemaProps{ Description: \"PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"filter\": { SchemaProps: spec.SchemaProps{ Description: \"Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"postFilter\": { SchemaProps: spec.SchemaProps{ Description: \"PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"preScore\": { SchemaProps: spec.SchemaProps{ Description: \"PreScore is a list of plugins that are invoked before scoring.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"score\": { SchemaProps: spec.SchemaProps{ Description: \"Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"reserve\": { SchemaProps: spec.SchemaProps{ Description: \"Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"permit\": { SchemaProps: spec.SchemaProps{ Description: \"Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"preBind\": { SchemaProps: spec.SchemaProps{ Description: \"PreBind is a list of plugins that should be invoked before a pod is bound.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"bind\": { SchemaProps: spec.SchemaProps{ Description: \"Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"postBind\": { SchemaProps: spec.SchemaProps{ Description: \"PostBind is a list of plugins that should be invoked after a pod is successfully bound.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, \"multiPoint\": { SchemaProps: spec.SchemaProps{ Description: \"MultiPoint is a simplified config section to enable plugins for all valid extension points.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.PluginSet\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"defaultConstraints\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"DefaultConstraints defines topology spread constraints to be applied to Pods that don't define any in `pod.spec.topologySpreadConstraints`. `.defaultConstraints[*].labelSelectors` must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. When not empty, .defaultingType must be \"List\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySpreadConstraint\"), }, }, }, }, }, \"defaultingType\": { SchemaProps: spec.SchemaProps{ Description: \"DefaultingType determines how .defaultConstraints are deduced. Can be one of \"System\" or \"List\".nn- \"System\": Use kubernetes defined constraints that spread Pods amongn Nodes and Zones.n- \"List\": Use constraints defined in .defaultConstraints.nnDefaults to \"System\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TopologySpreadConstraint\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"shape\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Shape is a list of points defining the scoring function shape.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceSpec represents a single resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the resource.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"Weight of the resource.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScoringStrategy define ScoringStrategyType for node resource plugin\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type selects which strategy to run.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"topologyKey\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Resources to consider when scoring. The default resource set includes \"cpu\" and \"memory\" with an equal weight. Allowed weights go from 1 to 100. Weight defaults to 1 if not specified or explicitly set to 0.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.ResourceSpec\"), }, }, }, }, }, \"requestedToCapacityRatio\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments specific to RequestedToCapacityRatio strategy.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam\", \"k8s.io/kube-scheduler/config/v1beta2.ResourceSpec\"}, } } func schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UtilizationShapePoint represents single point of priority function shape.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"utilization\": { SchemaProps: spec.SchemaProps{ Description: \"Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"score\": { SchemaProps: spec.SchemaProps{ Description: \"Score assigned to given utilization (y axis). Valid values are 0 to 10.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"utilization\", \"score\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"bindTimeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value (600) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"shape\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. The default shape points are: 1) 0 for 0 utilization 2) 10 for 100 utilization All points must be sorted in increasing order by utilization.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"DefaultPreemptionArgs holds arguments used to configure the DefaultPreemption plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"minCandidateNodesPercentage\": { SchemaProps: spec.SchemaProps{ Description: \"MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if unspecified.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"minCandidateNodesAbsolute\": { SchemaProps: spec.SchemaProps{ Description: \"MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) We say \"likely\" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least 0 nodes. Defaults to 100 nodes if unspecified.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"urlPrefix\": { SchemaProps: spec.SchemaProps{ Description: \"URLPrefix at which the extender is available\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"filterVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"preemptVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"prioritizeVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"bindVerb\": { SchemaProps: spec.SchemaProps{ Description: \"Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableHTTPS\": { SchemaProps: spec.SchemaProps{ Description: \"EnableHTTPS specifies whether https should be used to communicate with the extender\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"tlsConfig\": { SchemaProps: spec.SchemaProps{ Description: \"TLSConfig specifies the transport layer security config\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig\"), }, }, \"httpTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeCacheCapable\": { SchemaProps: spec.SchemaProps{ Description: \"NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"managedResources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bindn (if the extender is the binder) phases iff the pod requests at leastn one of the extended resources in this list. If empty or unspecified,n all pods will be sent to this extender.n- If IgnoredByScheduler is set to true for a resource, kube-schedulern will skip checking the resource in predicates.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource\"), }, }, }, }, }, \"ignorable\": { SchemaProps: spec.SchemaProps{ Description: \"Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"urlPrefix\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource\", \"k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExtenderManagedResource describes the arguments of extended resources managed by an extender.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name is the extended resource name.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"ignoredByScheduler\": { SchemaProps: spec.SchemaProps{ Description: \"IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExtenderTLSConfig contains settings to enable TLS with extender\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"insecure\": { SchemaProps: spec.SchemaProps{ Description: \"Server should be accessed without verifying the TLS certificate. For testing only.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"serverName\": { SchemaProps: spec.SchemaProps{ Description: \"ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.\", Type: []string{\"string\"}, Format: \"\", }, }, \"certFile\": { SchemaProps: spec.SchemaProps{ Description: \"Server requires TLS client certificate authentication\", Type: []string{\"string\"}, Format: \"\", }, }, \"keyFile\": { SchemaProps: spec.SchemaProps{ Description: \"Server requires TLS client certificate authentication\", Type: []string{\"string\"}, Format: \"\", }, }, \"caFile\": { SchemaProps: spec.SchemaProps{ Description: \"Trusted root certificates for server\", Type: []string{\"string\"}, Format: \"\", }, }, \"certData\": { SchemaProps: spec.SchemaProps{ Description: \"CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"keyData\": { SchemaProps: spec.SchemaProps{ Description: \"KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, \"caData\": { SchemaProps: spec.SchemaProps{ Description: \"CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile\", Type: []string{\"string\"}, Format: \"byte\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"hardPodAffinityWeight\": { SchemaProps: spec.SchemaProps{ Description: \"HardPodAffinityWeight is the scoring weight for existing pods with a matching hard affinity to the incoming pod.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeSchedulerConfiguration configures a scheduler\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"parallelism\": { SchemaProps: spec.SchemaProps{ Description: \"Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"leaderElection\": { SchemaProps: spec.SchemaProps{ Description: \"LeaderElection defines the configuration of leader election client.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\"), }, }, \"clientConnection\": { SchemaProps: spec.SchemaProps{ Description: \"ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\"), }, }, \"enableProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableProfiling enables profiling via web interface host:port/debug/pprof/\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"enableContentionProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableContentionProfiling enables lock contention profiling, if enableProfiling is true.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"percentageOfNodesToScore\": { SchemaProps: spec.SchemaProps{ Description: \"PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"podInitialBackoffSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"podMaxBackoffSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"profiles\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"schedulerName\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile\"), }, }, }, }, }, \"extenders\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"set\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.Extender\"), }, }, }, }, }, }, Required: []string{\"leaderElection\", \"clientConnection\"}, }, }, Dependencies: []string{ \"k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration\", \"k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration\", \"k8s.io/kube-scheduler/config/v1beta3.Extender\", \"k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeSchedulerProfile is a scheduling profile.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"schedulerName\": { SchemaProps: spec.SchemaProps{ Description: \"SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.\", Type: []string{\"string\"}, Format: \"\", }, }, \"plugins\": { SchemaProps: spec.SchemaProps{ Description: \"Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.Plugins\"), }, }, \"pluginConfig\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginConfig\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.PluginConfig\", \"k8s.io/kube-scheduler/config/v1beta3.Plugins\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"addedAffinity\": { SchemaProps: spec.SchemaProps{ Description: \"AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match a specific Node (such as Daemonset Pods) might remain unschedulable.\", Ref: ref(\"k8s.io/api/core/v1.NodeAffinity\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeAffinity\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Resources to be managed, the default is \"cpu\" and \"memory\" if not specified.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.ResourceSpec\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.ResourceSpec\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"ignoredResources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"IgnoredResources is the list of resources that NodeResources fit filter should ignore. This doesn't apply to scoring.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"ignoredResourceGroups\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. e.g. if group is [\"example.com\"], it will ignore all resource names that begin with \"example.com\", such as \"example.com/aaa\" and \"example.com/bbb\". A resource group name can't contain '/'. This doesn't apply to scoring.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"scoringStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name defines the name of plugin\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"Weight defines the weight of plugin, only used for Score plugins.\", Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name defines the name of plugin being configured\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/runtime.RawExtension\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/runtime.RawExtension\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"enabled\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. These are called after default plugins and in the same order specified here.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.Plugin\"), }, }, }, }, }, \"disabled\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"name\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.Plugin\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.Plugin\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"queueSort\": { SchemaProps: spec.SchemaProps{ Description: \"QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"preFilter\": { SchemaProps: spec.SchemaProps{ Description: \"PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"filter\": { SchemaProps: spec.SchemaProps{ Description: \"Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"postFilter\": { SchemaProps: spec.SchemaProps{ Description: \"PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"preScore\": { SchemaProps: spec.SchemaProps{ Description: \"PreScore is a list of plugins that are invoked before scoring.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"score\": { SchemaProps: spec.SchemaProps{ Description: \"Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"reserve\": { SchemaProps: spec.SchemaProps{ Description: \"Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"permit\": { SchemaProps: spec.SchemaProps{ Description: \"Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"preBind\": { SchemaProps: spec.SchemaProps{ Description: \"PreBind is a list of plugins that should be invoked before a pod is bound.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"bind\": { SchemaProps: spec.SchemaProps{ Description: \"Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"postBind\": { SchemaProps: spec.SchemaProps{ Description: \"PostBind is a list of plugins that should be invoked after a pod is successfully bound.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, \"multiPoint\": { SchemaProps: spec.SchemaProps{ Description: \"MultiPoint is a simplified config section to enable plugins for all valid extension points. Plugins enabled through MultiPoint will automatically register for every individual extension point the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior. The same is true for disabling \"*\" through MultiPoint (no default plugins will be automatically registered). Plugins can still be disabled through their individual extension points.nnIn terms of precedence, plugin config follows this basic hierarchyn 1. Specific extension pointsn 2. Explicitly configured MultiPoint pluginsn 3. The set of default plugins, as MultiPoint pluginsnThis implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint. Explicitly user-configured plugins also take a higher precedence over default plugins. Within this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is set in both `multiPoint.Enabled` and `multiPoint.Disabled`, the plugin will be enabled. Similarly, including `multiPoint.Disabled = '*'` and `multiPoint.Enabled = pluginA` will still register that specific plugin through MultiPoint. This follows the same behavior as all other extension point configurations.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.PluginSet\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"defaultConstraints\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"DefaultConstraints defines topology spread constraints to be applied to Pods that don't define any in `pod.spec.topologySpreadConstraints`. `.defaultConstraints[*].labelSelectors` must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. When not empty, .defaultingType must be \"List\".\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.TopologySpreadConstraint\"), }, }, }, }, }, \"defaultingType\": { SchemaProps: spec.SchemaProps{ Description: \"DefaultingType determines how .defaultConstraints are deduced. Can be one of \"System\" or \"List\".nn- \"System\": Use kubernetes defined constraints that spread Pods amongn Nodes and Zones.n- \"List\": Use constraints defined in .defaultConstraints.nnDefaults to \"System\".\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.TopologySpreadConstraint\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"shape\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Shape is a list of points defining the scoring function shape.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ResourceSpec represents a single resource.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Name of the resource.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"weight\": { SchemaProps: spec.SchemaProps{ Description: \"Weight of the resource.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"name\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ScoringStrategy define ScoringStrategyType for node resource plugin\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"type\": { SchemaProps: spec.SchemaProps{ Description: \"Type selects which strategy to run.\", Type: []string{\"string\"}, Format: \"\", }, }, \"resources\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-map-keys\": []interface{}{ \"topologyKey\", }, \"x-kubernetes-list-type\": \"map\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Resources to consider when scoring. The default resource set includes \"cpu\" and \"memory\" with an equal weight. Allowed weights go from 1 to 100. Weight defaults to 1 if not specified or explicitly set to 0.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.ResourceSpec\"), }, }, }, }, }, \"requestedToCapacityRatio\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments specific to RequestedToCapacityRatio strategy.\", Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam\", \"k8s.io/kube-scheduler/config/v1beta3.ResourceSpec\"}, } } func schema_k8sio_kube_scheduler_config_v1beta3_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"UtilizationShapePoint represents single point of priority function shape.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"utilization\": { SchemaProps: spec.SchemaProps{ Description: \"Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"score\": { SchemaProps: spec.SchemaProps{ Description: \"Score assigned to given utilization (y axis). Valid values are 0 to 10.\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, }, Required: []string{\"utilization\", \"score\"}, }, }, } } func schema_k8sio_kube_scheduler_config_v1beta3_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"bindTimeoutSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value (600) will be used.\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"shape\": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ \"x-kubernetes-list-type\": \"atomic\", }, }, SchemaProps: spec.SchemaProps{ Description: \"Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. The default shape points are: 1) 0 for 0 utilization 2) 10 for 100 utilization All points must be sorted in increasing order by utilization.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint\"), }, }, }, }, }, }, }, }, Dependencies: []string{ \"k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint\"}, } } func schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only invoked when an image being pulled matches the images handled by the plugin (see matchImages).\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the required name of the credential provider. It must match the name of the provider executable as seen by the kubelet. The executable must be in the kubelet's bin directory (set by the --image-credential-provider-bin-dir flag).\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"matchImages\": { SchemaProps: spec.SchemaProps{ Description: \"matchImages is a required list of strings used to match against images in order to determine if this provider should be invoked. If one of the strings matches the requested image from the kubelet, the plugin will be invoked and given a chance to provide credentials. Images are expected to contain the registry domain and URL path.nnEach entry in matchImages is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match a single subdomain segment, so *.io does not match *.k8s.io.nnA match exists between an image and a matchImage when all of the below are true: - Both contain the same number of domain parts and each part matches. - The URL path of an imageMatch must be a prefix of the target image URL path. - If the imageMatch contains a port, then the port must match in the image as well.nnExample values of matchImages:n - 123456789.dkr.ecr.us-east-1.amazonaws.comn - *.azurecr.ion - gcr.ion - *.*.registry.ion - registry.io:8080/path\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"defaultCacheDuration\": { SchemaProps: spec.SchemaProps{ Description: \"defaultCacheDuration is the default duration the plugin will cache credentials in-memory if a cache duration is not provided in the plugin response. This field is required.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse MUST use the same encoding version as the input. Current supported values are: - credentialprovider.kubelet.k8s.io/v1alpha1\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"args\": { SchemaProps: spec.SchemaProps{ Description: \"Arguments to pass to the command when executing it.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"env\": { SchemaProps: spec.SchemaProps{ Description: \"Env defines additional environment variables to expose to the process. These are unioned with the host's environment, as well as variables client-go uses to pass argument to the plugin.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1alpha1.ExecEnvVar\"), }, }, }, }, }, }, Required: []string{\"name\", \"matchImages\", \"defaultCacheDuration\", \"apiVersion\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/kubelet/config/v1alpha1.ExecEnvVar\"}, } } func schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"CredentialProviderConfig is the configuration containing information about each exec credential provider. Kubelet reads this configuration from disk and enables each provider as specified by the CredentialProvider type.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"providers\": { SchemaProps: spec.SchemaProps{ Description: \"providers is a list of credential provider plugins that will be enabled by the kubelet. Multiple providers may match against a single image, in which case credentials from all providers will be returned to the kubelet. If multiple providers are called for a single image, the results are combined. If providers return overlapping auth keys, the value from the provider earlier in this list is used.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1alpha1.CredentialProvider\"), }, }, }, }, }, }, Required: []string{\"providers\"}, }, }, Dependencies: []string{ \"k8s.io/kubelet/config/v1alpha1.CredentialProvider\"}, } } func schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, Required: []string{\"name\", \"value\"}, }, }, } } func schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"enabled\": { SchemaProps: spec.SchemaProps{ Description: \"enabled allows anonymous requests to the kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of `system:anonymous`, and a group name of `system:unauthenticated`.\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"x509\": { SchemaProps: spec.SchemaProps{ Description: \"x509 contains settings related to x509 client certificate authentication.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletX509Authentication\"), }, }, \"webhook\": { SchemaProps: spec.SchemaProps{ Description: \"webhook contains settings related to webhook bearer token authentication.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication\"), }, }, \"anonymous\": { SchemaProps: spec.SchemaProps{ Description: \"anonymous contains settings related to anonymous authentication.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication\", \"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication\", \"k8s.io/kubelet/config/v1beta1.KubeletX509Authentication\"}, } } func schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"mode\": { SchemaProps: spec.SchemaProps{ Description: \"mode is the authorization mode to apply to requests to the kubelet server. Valid values are `AlwaysAllow` and `Webhook`. Webhook mode uses the SubjectAccessReview API to determine authorization.\", Type: []string{\"string\"}, Format: \"\", }, }, \"webhook\": { SchemaProps: spec.SchemaProps{ Description: \"webhook contains settings related to Webhook authorization.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization\"}, } } func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"KubeletConfiguration contains the configuration for the Kubelet\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"enableServer\": { SchemaProps: spec.SchemaProps{ Description: \"enableServer enables Kubelet's secured server. Note: Kubelet's insecure port is controlled by the readOnlyPort option. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"staticPodPath\": { SchemaProps: spec.SchemaProps{ Description: \"staticPodPath is the path to the directory containing local (static) pods to run, or the path to a single static pod file. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"syncFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"syncFrequency is the max period between synchronizing running containers and config. Default: \"1m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"fileCheckFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"fileCheckFrequency is the duration between checking config files for new data. Default: \"20s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"httpCheckFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"httpCheckFrequency is the duration between checking http for new data. Default: \"20s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"staticPodURL\": { SchemaProps: spec.SchemaProps{ Description: \"staticPodURL is the URL for accessing static pods to run. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"staticPodURLHeader\": { SchemaProps: spec.SchemaProps{ Description: \"staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, }, }, }, \"address\": { SchemaProps: spec.SchemaProps{ Description: \"address is the IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces). Default: \"0.0.0.0\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"port\": { SchemaProps: spec.SchemaProps{ Description: \"port is the port for the Kubelet to serve on. The port number must be between 1 and 65535, inclusive. Default: 10250\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"readOnlyPort\": { SchemaProps: spec.SchemaProps{ Description: \"readOnlyPort is the read-only port for the Kubelet to serve on with no authentication/authorization. The port number must be between 1 and 65535, inclusive. Setting this field to 0 disables the read-only service. Default: 0 (disabled)\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"tlsCertFile\": { SchemaProps: spec.SchemaProps{ Description: \"tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If tlsCertFile and tlsPrivateKeyFile are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to the Kubelet's --cert-dir flag. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"tlsPrivateKeyFile\": { SchemaProps: spec.SchemaProps{ Description: \"tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"tlsCipherSuites\": { SchemaProps: spec.SchemaProps{ Description: \"tlsCipherSuites is the list of allowed cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Default: nil\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"tlsMinVersion\": { SchemaProps: spec.SchemaProps{ Description: \"tlsMinVersion is the minimum TLS version supported. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"rotateCertificates\": { SchemaProps: spec.SchemaProps{ Description: \"rotateCertificates enables client certificate rotation. The Kubelet will request a new certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"serverTLSBootstrap\": { SchemaProps: spec.SchemaProps{ Description: \"serverTLSBootstrap enables server certificate bootstrap. Instead of self signing a serving certificate, the Kubelet will request a certificate from the 'certificates.k8s.io' API. This requires an approver to approve the certificate signing requests (CSR). The RotateKubeletServerCertificate feature must be enabled when setting this field. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"authentication\": { SchemaProps: spec.SchemaProps{ Description: \"authentication specifies how requests to the Kubelet's server are authenticated. Defaults:n anonymous:n enabled: falsen webhook:n enabled: truen cacheTTL: \"2m\"\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletAuthentication\"), }, }, \"authorization\": { SchemaProps: spec.SchemaProps{ Description: \"authorization specifies how requests to the Kubelet's server are authorized. Defaults:n mode: Webhookn webhook:n cacheAuthorizedTTL: \"5m\"n cacheUnauthorizedTTL: \"30s\"\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.KubeletAuthorization\"), }, }, \"registryPullQPS\": { SchemaProps: spec.SchemaProps{ Description: \"registryPullQPS is the limit of registry pulls per second. The value must not be a negative number. Setting it to 0 means no limit. Default: 5\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"registryBurst\": { SchemaProps: spec.SchemaProps{ Description: \"registryBurst is the maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registryPullQPS. The value must not be a negative number. Only used if registryPullQPS is greater than 0. Default: 10\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"eventRecordQPS\": { SchemaProps: spec.SchemaProps{ Description: \"eventRecordQPS is the maximum event creations per second. If 0, there is no limit enforced. The value cannot be a negative number. Default: 5\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"eventBurst\": { SchemaProps: spec.SchemaProps{ Description: \"eventBurst is the maximum size of a burst of event creations, temporarily allows event creations to burst to this number, while still not exceeding eventRecordQPS. This field canot be a negative number and it is only used when eventRecordQPS > 0. Default: 10\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"enableDebuggingHandlers\": { SchemaProps: spec.SchemaProps{ Description: \"enableDebuggingHandlers enables server endpoints for log access and local running of containers and commands, including the exec, attach, logs, and portforward features. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"enableContentionProfiling\": { SchemaProps: spec.SchemaProps{ Description: \"enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"healthzPort\": { SchemaProps: spec.SchemaProps{ Description: \"healthzPort is the port of the localhost healthz endpoint (set to 0 to disable). A valid number is between 1 and 65535. Default: 10248\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"healthzBindAddress\": { SchemaProps: spec.SchemaProps{ Description: \"healthzBindAddress is the IP address for the healthz server to serve on. Default: \"127.0.0.1\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"oomScoreAdj\": { SchemaProps: spec.SchemaProps{ Description: \"oomScoreAdj is The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. Default: -999\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"clusterDomain\": { SchemaProps: spec.SchemaProps{ Description: \"clusterDomain is the DNS domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"clusterDNS\": { SchemaProps: spec.SchemaProps{ Description: \"clusterDNS is a list of IP addresses for the cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution instead of the host's DNS servers. Default: nil\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"streamingConnectionIdleTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. Default: \"4h\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeStatusUpdateFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: \"10s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeStatusReportFrequency\": { SchemaProps: spec.SchemaProps{ Description: \"nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 5m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"5m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeLeaseDurationSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease. NodeLease provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. The field value must be greater than 0. Default: 40\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"imageMinimumGCAge\": { SchemaProps: spec.SchemaProps{ Description: \"imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. Default: \"2m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"imageGCHighThresholdPercent\": { SchemaProps: spec.SchemaProps{ Description: \"imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run. The percent is calculated by dividing this field value by 100, so this field must be between 0 and 100, inclusive. When specified, the value must be greater than imageGCLowThresholdPercent. Default: 85\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"imageGCLowThresholdPercent\": { SchemaProps: spec.SchemaProps{ Description: \"imageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated by dividing this field value by 100, so the field value must be between 0 and 100, inclusive. When specified, the value must be less than imageGCHighThresholdPercent. Default: 80\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"volumeStatsAggPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"volumeStatsAggPeriod is the frequency for calculating and caching volume disk usage for all pods. Default: \"1m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"kubeletCgroups\": { SchemaProps: spec.SchemaProps{ Description: \"kubeletCgroups is the absolute name of cgroups to isolate the kubelet in Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"systemCgroups\": { SchemaProps: spec.SchemaProps{ Description: \"systemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. The cgroupRoot must be specified if this field is not empty. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"cgroupRoot\": { SchemaProps: spec.SchemaProps{ Description: \"cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis.\", Type: []string{\"string\"}, Format: \"\", }, }, \"cgroupsPerQOS\": { SchemaProps: spec.SchemaProps{ Description: \"cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes and all Burstable and BestEffort Pods are brought up under their specific top level QoS CGroup. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"cgroupDriver\": { SchemaProps: spec.SchemaProps{ Description: \"cgroupDriver is the driver kubelet uses to manipulate CGroups on the host (cgroupfs or systemd). Default: \"cgroupfs\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"cpuManagerPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"cpuManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Default: \"None\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"cpuManagerPolicyOptions\": { SchemaProps: spec.SchemaProps{ Description: \"cpuManagerPolicyOptions is a set of key=value which tallows to set extra options to fine tune the behaviour of the cpu manager policies. Requires both the \"CPUManager\" and \"CPUManagerPolicyOptions\" feature gates to be enabled. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"cpuManagerReconcilePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Requires the CPUManager feature gate to be enabled. Default: \"10s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"memoryManagerPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"memoryManagerPolicy is the name of the policy to use by memory manager. Requires the MemoryManager feature gate to be enabled. Default: \"none\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"topologyManagerPolicy\": { SchemaProps: spec.SchemaProps{ Description: \"topologyManagerPolicy is the name of the topology manager policy to use. Valid values include:nn- `restricted`: kubelet only allows pods with optimal NUMA node alignment forn requested resources;n- `best-effort`: kubelet will favor pods with NUMA alignment of CPU and devicen resources;n- `none`: kubelet has no knowledge of NUMA alignment of a pod's CPU and device resources. - `single-numa-node`: kubelet only allows pods with a single NUMA alignmentn of CPU and device resources.nnPolicies other than \"none\" require the TopologyManager feature gate to be enabled. Default: \"none\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"topologyManagerScope\": { SchemaProps: spec.SchemaProps{ Description: \"topologyManagerScope represents the scope of topology hint generation that topology manager requests and hint providers generate. Valid values include:nn- `container`: topology policy is applied on a per-container basis. - `pod`: topology policy is applied on a per-pod basis.nn\"pod\" scope requires the TopologyManager feature gate to be enabled. Default: \"container\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"qosReserved\": { SchemaProps: spec.SchemaProps{ Description: \"qosReserved is a set of resource name to percentage pairs that specify the minimum percentage of a resource reserved for exclusive use by the guaranteed QoS tier. Currently supported resources: \"memory\" Requires the QOSReserved feature gate to be enabled. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"runtimeRequestTimeout\": { SchemaProps: spec.SchemaProps{ Description: \"runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. Default: \"2m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"hairpinMode\": { SchemaProps: spec.SchemaProps{ Description: \"hairpinMode specifies how the Kubelet should configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:nn- \"promiscuous-bridge\": make the container bridge promiscuous. - \"hairpin-veth\": set the hairpin flag on container veth interfaces. - \"none\": do nothing.nnGenerally, one must set `--hairpin-mode=hairpin-veth to` achieve hairpin NAT, because promiscuous-bridge assumes the existence of a container bridge named cbr0. Default: \"promiscuous-bridge\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"maxPods\": { SchemaProps: spec.SchemaProps{ Description: \"maxPods is the maximum number of Pods that can run on this Kubelet. The value must be a non-negative integer. Default: 110\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"podCIDR\": { SchemaProps: spec.SchemaProps{ Description: \"podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the control plane. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"podPidsLimit\": { SchemaProps: spec.SchemaProps{ Description: \"podPidsLimit is the maximum number of PIDs in any pod. Default: -1\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"resolvConf\": { SchemaProps: spec.SchemaProps{ Description: \"resolvConf is the resolver configuration file used as the basis for the container DNS resolution configuration. If set to the empty string, will override the default and effectively disable DNS lookups. Default: \"/etc/resolv.conf\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"runOnce\": { SchemaProps: spec.SchemaProps{ Description: \"runOnce causes the Kubelet to check the API server once for pods, run those in addition to the pods specified by static pod files, and exit. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"cpuCFSQuota\": { SchemaProps: spec.SchemaProps{ Description: \"cpuCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"cpuCFSQuotaPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`. The value must be between 1 us and 1 second, inclusive. Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled. Default: \"100ms\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"nodeStatusMaxImages\": { SchemaProps: spec.SchemaProps{ Description: \"nodeStatusMaxImages caps the number of images reported in Node.status.images. The value must be greater than -2. Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned. Default: 50\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"maxOpenFiles\": { SchemaProps: spec.SchemaProps{ Description: \"maxOpenFiles is Number of files that can be opened by Kubelet process. The value must be a non-negative number. Default: 1000000\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"contentType\": { SchemaProps: spec.SchemaProps{ Description: \"contentType is contentType of requests sent to apiserver. Default: \"application/vnd.kubernetes.protobuf\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kubeAPIQPS\": { SchemaProps: spec.SchemaProps{ Description: \"kubeAPIQPS is the QPS to use while talking with kubernetes apiserver. Default: 5\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"kubeAPIBurst\": { SchemaProps: spec.SchemaProps{ Description: \"kubeAPIBurst is the burst to allow while talking with kubernetes API server. This field cannot be a negative number. Default: 10\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"serializeImagePulls\": { SchemaProps: spec.SchemaProps{ Description: \"serializeImagePulls when enabled, tells the Kubelet to pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"evictionHard\": { SchemaProps: spec.SchemaProps{ Description: \"evictionHard is a map of signal names to quantities that defines hard eviction thresholds. For example: `{\"memory.available\": \"300Mi\"}`. To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. Default:n memory.available: \"100Mi\"n nodefs.available: \"10%\"n nodefs.inodesFree: \"5%\"n imagefs.available: \"15%\"\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"evictionSoft\": { SchemaProps: spec.SchemaProps{ Description: \"evictionSoft is a map of signal names to quantities that defines soft eviction thresholds. For example: `{\"memory.available\": \"300Mi\"}`. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"evictionSoftGracePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"evictionSoftGracePeriod is a map of signal names to quantities that defines grace periods for each soft eviction signal. For example: `{\"memory.available\": \"30s\"}`. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"evictionPressureTransitionPeriod\": { SchemaProps: spec.SchemaProps{ Description: \"evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. Default: \"5m\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"evictionMaxPodGracePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"evictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's terminationGracePeriodSeconds value during soft evictions. Note: Due to issue #64530, the behavior has a bug where this value currently just overrides the grace period during soft eviction, which can increase the grace period from what is set on the Pod. This bug will be fixed in a future release. Default: 0\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"evictionMinimumReclaim\": { SchemaProps: spec.SchemaProps{ Description: \"evictionMinimumReclaim is a map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure. For example: `{\"imagefs.available\": \"2Gi\"}`. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"podsPerCore\": { SchemaProps: spec.SchemaProps{ Description: \"podsPerCore is the maximum number of pods per core. Cannot exceed maxPods. The value must be a non-negative integer. If 0, there is no limit on the number of Pods. Default: 0\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"enableControllerAttachDetach\": { SchemaProps: spec.SchemaProps{ Description: \"enableControllerAttachDetach enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"protectKernelDefaults\": { SchemaProps: spec.SchemaProps{ Description: \"protectKernelDefaults, if true, causes the Kubelet to error if kernel flags are not as it expects. Otherwise the Kubelet will attempt to modify kernel flags to match its expectation. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"makeIPTablesUtilChains\": { SchemaProps: spec.SchemaProps{ Description: \"makeIPTablesUtilChains, if true, causes the Kubelet ensures a set of iptables rules are present on host. These rules will serve as utility rules for various components, e.g. kube-proxy. The rules will be created based on iptablesMasqueradeBit and iptablesDropBit. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"iptablesMasqueradeBit\": { SchemaProps: spec.SchemaProps{ Description: \"iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT. Values must be within the range [0, 31]. Must be different from other mark bits. Warning: Please match the value of the corresponding parameter in kube-proxy. Default: 14\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"iptablesDropBit\": { SchemaProps: spec.SchemaProps{ Description: \"iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. Values must be within the range [0, 31]. Must be different from other mark bits. Default: 15\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"featureGates\": { SchemaProps: spec.SchemaProps{ Description: \"featureGates is a map of feature names to bools that enable or disable experimental features. This field modifies piecemeal the built-in default values from \"k8s.io/kubernetes/pkg/features/kube_features.go\". Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: false, Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, \"failSwapOn\": { SchemaProps: spec.SchemaProps{ Description: \"failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"memorySwap\": { SchemaProps: spec.SchemaProps{ Description: \"memorySwap configures swap memory available to container workloads.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration\"), }, }, \"containerLogMaxSize\": { SchemaProps: spec.SchemaProps{ Description: \"containerLogMaxSize is a quantity defining the maximum size of the container log file before it is rotated. For example: \"5Mi\" or \"256Ki\". Default: \"10Mi\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"containerLogMaxFiles\": { SchemaProps: spec.SchemaProps{ Description: \"containerLogMaxFiles specifies the maximum number of container log files that can be present for a container. Default: 5\", Type: []string{\"integer\"}, Format: \"int32\", }, }, \"configMapAndSecretChangeDetectionStrategy\": { SchemaProps: spec.SchemaProps{ Description: \"configMapAndSecretChangeDetectionStrategy is a mode in which ConfigMap and Secret managers are running. Valid values include:nn- `Get`: kubelet fetches necessary objects directly from the API server; - `Cache`: kubelet uses TTL cache for object fetched from the API server; - `Watch`: kubelet uses watches to observe changes to objects that are in its interest.nnDefault: \"Watch\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"systemReserved\": { SchemaProps: spec.SchemaProps{ Description: \"systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"kubeReserved\": { SchemaProps: spec.SchemaProps{ Description: \"kubeReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local storage for root file system are supported. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more details. Default: nil\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"reservedSystemCPUs\": { SchemaProps: spec.SchemaProps{ Description: \"The reservedSystemCPUs option specifies the CPU list reserved for the host level system threads and kubernetes related threads. This provide a \"static\" CPU list rather than the \"dynamic\" list by systemReserved and kubeReserved. This option does not support systemReservedCgroup or kubeReservedCgroup.\", Type: []string{\"string\"}, Format: \"\", }, }, \"showHiddenMetricsForVersion\": { SchemaProps: spec.SchemaProps{ Description: \"showHiddenMetricsForVersion is the previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is `.`, e.g.: `1.16`. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"systemReservedCgroup\": { SchemaProps: spec.SchemaProps{ Description: \"systemReservedCgroup helps the kubelet identify absolute name of top level CGroup used to enforce `systemReserved` compute resource reservation for OS system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kubeReservedCgroup\": { SchemaProps: spec.SchemaProps{ Description: \"kubeReservedCgroup helps the kubelet identify absolute name of top level CGroup used to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"enforceNodeAllocatable\": { SchemaProps: spec.SchemaProps{ Description: \"This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. This flag accepts a list of options. Acceptable options are `none`, `pods`, `system-reserved` and `kube-reserved`. If `none` is specified, no other options may be specified. When `system-reserved` is in the list, systemReservedCgroup must be specified. When `kube-reserved` is in the list, kubeReservedCgroup must be specified. This field is supported only when `cgroupsPerQOS` is set to true. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) for more information. Default: [\"pods\"]\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"allowedUnsafeSysctls\": { SchemaProps: spec.SchemaProps{ Description: \"A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in `*`). Unsafe sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`, and `net.*`. For example: \"`kernel.msg*,net.ipv4.route.min_pmtu`\" Default: []\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"volumePluginDir\": { SchemaProps: spec.SchemaProps{ Description: \"volumePluginDir is the full path of the directory in which to search for additional third party volume plugins. Default: \"/usr/libexec/kubernetes/kubelet-plugins/volume/exec/\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"providerID\": { SchemaProps: spec.SchemaProps{ Description: \"providerID, if set, sets the unique ID of the instance that an external provider (i.e. cloudprovider) can use to identify a specific node. Default: \"\"\", Type: []string{\"string\"}, Format: \"\", }, }, \"kernelMemcgNotification\": { SchemaProps: spec.SchemaProps{ Description: \"kernelMemcgNotification, if set, instructs the the kubelet to integrate with the kernel memcg notification for determining if memory eviction thresholds are exceeded rather than polling. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"logging\": { SchemaProps: spec.SchemaProps{ Description: \"logging specifies the options of logging. Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. Default:n Format: text\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/component-base/config/v1alpha1.LoggingConfiguration\"), }, }, \"enableSystemLogHandler\": { SchemaProps: spec.SchemaProps{ Description: \"enableSystemLogHandler enables system logs via web interface host:port/logs/ Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"shutdownGracePeriod\": { SchemaProps: spec.SchemaProps{ Description: \"shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. Default: \"0s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"shutdownGracePeriodCriticalPods\": { SchemaProps: spec.SchemaProps{ Description: \"shutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than shutdownGracePeriod. For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods. Default: \"0s\"\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"shutdownGracePeriodByPodPriority\": { SchemaProps: spec.SchemaProps{ Description: \"shutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value. When a shutdown request is received, the Kubelet will initiate shutdown on all pods running on the node with a grace period that depends on the priority of the pod, and then wait for all pods to exit. Each entry in the array represents the graceful shutdown time a pod with a priority class value that lies in the range of that value and the next higher entry in the list when the node is shutting down. For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to shutdown, and all remaining pods 30s to shutdown.nnshutdownGracePeriodByPodPriority:n - priority: 2000000000n shutdownGracePeriodSeconds: 10n - priority: 10000n shutdownGracePeriodSeconds: 20n - priority: 0n shutdownGracePeriodSeconds: 30nnThe time the Kubelet will wait before exiting will at most be the maximum of all shutdownGracePeriodSeconds for each priority class range represented on the node. When all pods have exited or reached their grace periods, the Kubelet will release the shutdown inhibit lock. Requires the GracefulNodeShutdown feature gate to be enabled. This configuration must be empty if either ShutdownGracePeriod or ShutdownGracePeriodCriticalPods is set. Default: nil\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority\"), }, }, }, }, }, \"reservedMemory\": { SchemaProps: spec.SchemaProps{ Description: \"reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads. For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was specified to reserve 1Gi of memory at NUMA0, the memory manager will assume that only 9Gi is available for allocation. You can specify a different amount of NUMA node and memory types. You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes should be equal to the amount of memory specified by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable). If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node. Also, avoid specifying:nn1. Duplicates, the same NUMA node, and memory type, but with a different value. 2. zero limits for any memory type. 3. NUMAs nodes IDs that do not exist under the machine. 4. memory types except for memory and hugepages-nnDefault: nil\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubelet/config/v1beta1.MemoryReservation\"), }, }, }, }, }, \"enableProfilingHandler\": { SchemaProps: spec.SchemaProps{ Description: \"enableProfilingHandler enables profiling via web interface host:port/debug/pprof/ Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"enableDebugFlagsHandler\": { SchemaProps: spec.SchemaProps{ Description: \"enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"seccompDefault\": { SchemaProps: spec.SchemaProps{ Description: \"SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads. This requires the corresponding SeccompDefault feature gate to be enabled as well. Default: false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"memoryThrottlingFactor\": { SchemaProps: spec.SchemaProps{ Description: \"MemoryThrottlingFactor specifies the factor multiplied by the memory limit or node allocatable memory when setting the cgroupv2 memory.high value to enforce MemoryQoS. Decreasing this factor will set lower high limit for container cgroups and put heavier reclaim pressure while increasing will put less reclaim pressure. See http://kep.k8s.io/2570 for more details. Default: 0.8\", Type: []string{\"number\"}, Format: \"double\", }, }, \"registerWithTaints\": { SchemaProps: spec.SchemaProps{ Description: \"registerWithTaints are an array of taints to add to a node object when the kubelet registers itself. This only takes effect when registerNode is true and upon the initial registration of the node. Default: nil\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.Taint\"), }, }, }, }, }, \"registerNode\": { SchemaProps: spec.SchemaProps{ Description: \"registerNode enables automatic registration with the apiserver. Default: true\", Type: []string{\"boolean\"}, Format: \"\", }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.Taint\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/component-base/config/v1alpha1.LoggingConfiguration\", \"k8s.io/kubelet/config/v1beta1.KubeletAuthentication\", \"k8s.io/kubelet/config/v1beta1.KubeletAuthorization\", \"k8s.io/kubelet/config/v1beta1.MemoryReservation\", \"k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration\", \"k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority\"}, } } func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"enabled\": { SchemaProps: spec.SchemaProps{ Description: \"enabled allows bearer token authentication backed by the tokenreviews.authentication.k8s.io API.\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"cacheTTL\": { SchemaProps: spec.SchemaProps{ Description: \"cacheTTL enables caching of authentication results\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"cacheAuthorizedTTL\": { SchemaProps: spec.SchemaProps{ Description: \"cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"cacheUnauthorizedTTL\": { SchemaProps: spec.SchemaProps{ Description: \"cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"}, } } func schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"clientCAFile\": { SchemaProps: spec.SchemaProps{ Description: \"clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request presenting a client certificate signed by one of the authorities in the bundle is authenticated with a username corresponding to the CommonName, and groups corresponding to the Organization in the client certificate.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MemoryReservation specifies the memory reservation of different types for each NUMA node\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"numaNode\": { SchemaProps: spec.SchemaProps{ Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"limits\": { SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"numaNode\", \"limits\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"swapBehavior\": { SchemaProps: spec.SchemaProps{ Description: \"swapBehavior configures swap memory available to container workloads. May be one of \"\", \"LimitedSwap\": workload combined memory and swap usage cannot exceed pod memory limit \"UnlimitedSwap\": workloads can use unlimited swap, up to the allocatable limit.\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. This type is used internally by the Kubelet for tracking checkpointed dynamic configs. It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"source\": { SchemaProps: spec.SchemaProps{ Description: \"source is the source that we are serializing.\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.NodeConfigSource\"), }, }, }, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.NodeConfigSource\"}, } } func schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"priority\": { SchemaProps: spec.SchemaProps{ Description: \"priority is the priority value associated with the shutdown grace period\", Default: 0, Type: []string{\"integer\"}, Format: \"int32\", }, }, \"shutdownGracePeriodSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"shutdownGracePeriodSeconds is the shutdown grace period in seconds\", Default: 0, Type: []string{\"integer\"}, Format: \"int64\", }, }, }, Required: []string{\"priority\", \"shutdownGracePeriodSeconds\"}, }, }, } } func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"Policy contains a single ABAC policy rule\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"spec\": { SchemaProps: spec.SchemaProps{ Description: \"Spec describes the policy rule\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec\"), }, }, }, Required: []string{\"spec\"}, }, }, Dependencies: []string{ \"k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec\"}, } } func schema_pkg_apis_abac_v1beta1_PolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PolicySpec contains the attributes for a policy rule\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"user\": { SchemaProps: spec.SchemaProps{ Description: \"User is the username this rule applies to. Either user or group is required to match the request. \"*\" matches all users.\", Type: []string{\"string\"}, Format: \"\", }, }, \"group\": { SchemaProps: spec.SchemaProps{ Description: \"Group is the group this rule applies to. Either user or group is required to match the request. \"*\" matches all groups.\", Type: []string{\"string\"}, Format: \"\", }, }, \"readonly\": { SchemaProps: spec.SchemaProps{ Description: \"Readonly matches readonly requests when true, and all requests when false\", Type: []string{\"boolean\"}, Format: \"\", }, }, \"apiGroup\": { SchemaProps: spec.SchemaProps{ Description: \"APIGroup is the name of an API group. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all API groups\", Type: []string{\"string\"}, Format: \"\", }, }, \"resource\": { SchemaProps: spec.SchemaProps{ Description: \"Resource is the name of a resource. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"namespace\": { SchemaProps: spec.SchemaProps{ Description: \"Namespace is the name of a namespace. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all namespaces (including unnamespaced requests)\", Type: []string{\"string\"}, Format: \"\", }, }, \"nonResourcePath\": { SchemaProps: spec.SchemaProps{ Description: \"NonResourcePath matches non-resource request paths. \"*\" matches all paths \"/foo/*\" matches all subpaths of foo\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricListOptions is used to select metrics by their label selectors\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"labelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned objects by their labels. Defaults to everything.\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricLabelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned metrics by their labels\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValue is a metric value for some object\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"describedObject\": { SchemaProps: spec.SchemaProps{ Description: \"a reference to the described object\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"the name of the metric\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the time at which the metrics were produced\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"the value of the metric for this\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"describedObject\", \"metricName\", \"timestamp\", \"value\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValueList is a list of values for a given metric for some set of objects\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"the value of the metric across the described objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue\"}, } } func schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricIdentifier identifies a metric by name and, optionally, selector\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"name is the name of the given metric\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"selector\": { SchemaProps: spec.SchemaProps{ Description: \"selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.\", Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"), }, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector\"}, } } func schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricListOptions is used to select metrics by their label selectors\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"labelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned objects by their labels. Defaults to everything.\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricLabelSelector\": { SchemaProps: spec.SchemaProps{ Description: \"A selector to restrict the list of returned metrics by their labels\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, } } func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValue is the metric value for some object\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"describedObject\": { SchemaProps: spec.SchemaProps{ Description: \"a reference to the described object\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/api/core/v1.ObjectReference\"), }, }, \"metric\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier\"), }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the time at which the metrics were produced\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"windowSeconds\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"the value of the metric for this\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"describedObject\", \"metric\", \"timestamp\", \"value\"}, }, }, Dependencies: []string{ \"k8s.io/api/core/v1.ObjectReference\", \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\", \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier\"}, } } func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"MetricValueList is a list of values for a given metric for some set of objects\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"the value of the metric across the described objects\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue\"}, } } func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricValue is a metric value for external metric A single metric value is identified by metric name and a set of string labels. For one metric there can be multiple values with different sets of labels.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricName\": { SchemaProps: spec.SchemaProps{ Description: \"the name of the metric\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"metricLabels\": { SchemaProps: spec.SchemaProps{ Description: \"a set of labels that identify a single time series for the metric\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, }, }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the time at which the metrics were produced\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Description: \"indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).\", Type: []string{\"integer\"}, Format: \"int64\", }, }, \"value\": { SchemaProps: spec.SchemaProps{ Description: \"the value of the metric\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, Required: []string{\"metricName\", \"metricLabels\", \"timestamp\", \"value\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ExternalMetricValueList is a list of values for a given metric for some set labels\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"value of the metric matching a given set of labels\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue\"}, } } func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerMetrics sets resource usage metrics of a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Container name corresponding to the one from pod.spec.containers.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"usage\": { SchemaProps: spec.SchemaProps{ Description: \"The memory usage is the memory working set.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"name\", \"usage\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeMetrics sets resource usage metrics of a node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"usage\": { SchemaProps: spec.SchemaProps{ Description: \"The memory usage is the memory working set.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"timestamp\", \"window\", \"usage\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeMetricsList is a list of NodeMetrics.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of node metrics.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics\"}, } } func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodMetrics sets resource usage metrics of a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"containers\": { SchemaProps: spec.SchemaProps{ Description: \"Metrics for all containers are collected within the same time window.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics\"), }, }, }, }, }, }, Required: []string{\"timestamp\", \"window\", \"containers\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\", \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics\"}, } } func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodMetricsList is a list of PodMetrics.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of pod metrics.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics\"}, } } func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"ContainerMetrics sets resource usage metrics of a container.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"name\": { SchemaProps: spec.SchemaProps{ Description: \"Container name corresponding to the one from pod.spec.containers.\", Default: \"\", Type: []string{\"string\"}, Format: \"\", }, }, \"usage\": { SchemaProps: spec.SchemaProps{ Description: \"The memory usage is the memory working set.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"name\", \"usage\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\"}, } } func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeMetrics sets resource usage metrics of a node.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"usage\": { SchemaProps: spec.SchemaProps{ Description: \"The memory usage is the memory working set.\", Type: []string{\"object\"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/api/resource.Quantity\"), }, }, }, }, }, }, Required: []string{\"timestamp\", \"window\", \"usage\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/api/resource.Quantity\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"}, } } func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"NodeMetricsList is a list of NodeMetrics.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of node metrics.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics\"}, } } func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodMetrics sets resource usage metrics of a pod.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\"), }, }, \"timestamp\": { SchemaProps: spec.SchemaProps{ Description: \"The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Time\"), }, }, \"window\": { SchemaProps: spec.SchemaProps{ Default: 0, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\"), }, }, \"containers\": { SchemaProps: spec.SchemaProps{ Description: \"Metrics for all containers are collected within the same time window.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics\"), }, }, }, }, }, }, Required: []string{\"timestamp\", \"window\", \"containers\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.Duration\", \"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta\", \"k8s.io/apimachinery/pkg/apis/meta/v1.Time\", \"k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics\"}, } } func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: \"PodMetricsList is a list of PodMetrics.\", Type: []string{\"object\"}, Properties: map[string]spec.Schema{ \"kind\": { SchemaProps: spec.SchemaProps{ Description: \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Type: []string{\"string\"}, Format: \"\", }, }, \"apiVersion\": { SchemaProps: spec.SchemaProps{ Description: \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\", Type: []string{\"string\"}, Format: \"\", }, }, \"metadata\": { SchemaProps: spec.SchemaProps{ Description: \"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\", Default: map[string]interface{}{}, Ref: ref(\"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\"), }, }, \"items\": { SchemaProps: spec.SchemaProps{ Description: \"List of pod metrics.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, Ref: ref(\"k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics\"), }, }, }, }, }, }, Required: []string{\"items\"}, }, }, Dependencies: []string{ \"k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta\", \"k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics\"}, } } "} {"_id":"q-en-kubernetes-33bad4d67c765f2267bb77f00ef6c87bc458558744b18d9e6066a3f0d733687a","text":"} func (m *NsenterMounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(m, dir) return isNotMountPoint(m, dir) } func (*NsenterMounter) IsMountPointMatch(mp MountPoint, dir string) bool {"} {"_id":"q-en-kubernetes-342c9361c2e7d59880056f2a38de69224cce2ac350e8575c9d5f9dbbba6cff9c","text":"func (c *FakeNamespaces) Create(namespace *api.Namespace) (*api.Namespace, error) { c.Fake.Actions = append(c.Fake.Actions, FakeAction{Action: \"create-namespace\"}) return &api.Namespace{}, nil return &api.Namespace{}, c.Fake.Err } func (c *FakeNamespaces) Update(namespace *api.Namespace) (*api.Namespace, error) {"} {"_id":"q-en-kubernetes-347c4aab79cbcf5c19b48c2a9956694e5a66d40abaca408070600c2fcbf03d60","text":"if !skipAnyOf { for i := range v.AnyOf { allErrs = append(allErrs, validateNestedValueValidation(&v.AnyOf[i], false, false, fldPath.Child(\"anyOf\").Index(i))...) allErrs = append(allErrs, validateNestedValueValidation(&v.AnyOf[i], false, false, lvl, fldPath.Child(\"anyOf\").Index(i))...) } }"} {"_id":"q-en-kubernetes-348e0110b31fe4703f0242478c2963e2c01e10241cfc3c35c107a67fd8a226ad","text":"return err } if pod.Status.Phase != api.PodRunning { return fmt.Errorf(\"pod %s is not running and cannot execute commands; current phase is %s\", p.PodName, pod.Status.Phase) } containerName := p.ContainerName if len(containerName) == 0 { glog.V(4).Infof(\"defaulting container name to %s\", pod.Spec.Containers[0].Name)"} {"_id":"q-en-kubernetes-349c4d3109c7cd5f0628bf860c434cf7e60271e36f53499510fa881c6f84820e","text":"cadvisorapi \"github.com/google/cadvisor/info/v1\" cadvisorapiv2 \"github.com/google/cadvisor/info/v2\" \"github.com/stretchr/testify/assert\" \"k8s.io/kubernetes/pkg/api\" apierrors \"k8s.io/kubernetes/pkg/api/errors\" \"k8s.io/kubernetes/pkg/api/resource\""} {"_id":"q-en-kubernetes-34b1db609893c9db6feccc836b1756e6def8007e666ec7bfe8a4573f8598272a","text":"container_image( name = \"image\", base = \"@debian_jessie//image\", base = \"@distroless_base//image\", entrypoint = [\"/kubemark\"], files = [\"//cmd/kubemark\"], stamp = True,"} {"_id":"q-en-kubernetes-34dbcebdf6287f1b6b0c1cc12aa62454efb514a5a6304012604c04caca4d0571","text":"\"k8s.io/component-base/metrics\" \"k8s.io/klog/v2\" podutil \"k8s.io/kubernetes/pkg/api/v1/pod\" \"k8s.io/kubernetes/pkg/apis/apps\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\" \"k8s.io/kubernetes/pkg/kubelet/prober/results\" )"} {"_id":"q-en-kubernetes-34e02a5b7da66294cb151af0a44c835598af80991b68a79683dc0a8d48e622e2","text":"legacyregistry.MustRegister(DeprecatedEvictionStatsAge) legacyregistry.MustRegister(DeprecatedDevicePluginRegistrationCount) legacyregistry.MustRegister(DeprecatedDevicePluginAllocationLatency) legacyregistry.MustRegister(RunningContainerCount) legacyregistry.MustRegister(RunningPodCount) if utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { legacyregistry.MustRegister(AssignedConfig) legacyregistry.MustRegister(ActiveConfig)"} {"_id":"q-en-kubernetes-34eccb00d5bf9b5a048c81483bbb86767f3c72eff597896c1e51e280c35a75a3","text":"apiVersion: v1 metadata: name: etcd creationTimestamp: labels: name: etcd spec:"} {"_id":"q-en-kubernetes-34f37d15d7a8f3ca09b4bf1299978ea7cd33e88eb42c78341b1d5832db8a7f6b","text":"kubetypes.HTTPSource, &api.Pod{ ObjectMeta: api.ObjectMeta{ UID: \"111\", Name: \"foo\" + \"-\" + hostname, Namespace: \"default\", SelfLink: getSelfLink(\"foo-\"+hostname, kubetypes.NamespaceDefault), UID: \"111\", Name: \"foo\" + \"-\" + hostname, Namespace: \"default\", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: \"111\"}, SelfLink: getSelfLink(\"foo-\"+hostname, kubetypes.NamespaceDefault), }, Spec: api.PodSpec{ NodeName: hostname,"} {"_id":"q-en-kubernetes-35016b66d26f4ef184857bc4bd1bd7df6d843312248a0d521a249e285ec92d9b","text":"test.TestDynamicProvisioning() } // Run the last test with storage.k8s.io/v1beta1 on pvc if betaTest != nil { ginkgo.By(\"Testing \" + betaTest.Name + \" with beta volume provisioning\") betaClass := newBetaStorageClass(*betaTest, \"beta\") // create beta class manually betaClass, err := c.StorageV1beta1().StorageClasses().Create(context.TODO(), betaClass, metav1.CreateOptions{}) framework.ExpectNoError(err) defer deleteStorageClass(c, betaClass.Name) // fetch V1beta1 StorageClass as V1 object for the test class, err := c.StorageV1().StorageClasses().Get(context.TODO(), betaClass.Name, metav1.GetOptions{}) framework.ExpectNoError(err) betaTest.Client = c betaTest.Class = class betaTest.Claim = e2epv.MakePersistentVolumeClaim(e2epv.PersistentVolumeClaimConfig{ ClaimSize: betaTest.ClaimSize, StorageClassName: &class.Name, VolumeMode: &betaTest.VolumeMode, }, ns) betaTest.Claim.Spec.StorageClassName = &(class.Name) (*betaTest).TestDynamicProvisioning() } }) ginkgo.It(\"should provision storage with non-default reclaim policy Retain\", func() {"} {"_id":"q-en-kubernetes-3513f85dac3a7920903be8eb6fcef92ce620a6a8caea40b3e1d09f7ba9913fe2","text":"IP address. release: v1.9 file: test/e2e/common/pods.go - testname: Pods, completes the lifecycle of a Pod and the PodStatus codename: '[k8s.io] Pods should run through the lifecycle of Pods and PodStatus [Conformance]' description: A Pod is created with a static label which MUST succeed. It MUST succeed when patching the label and the pod data. When checking and replacing the PodStatus it MUST succeed. It MUST succeed when deleting the Pod. release: v1.20 file: test/e2e/common/pods.go - testname: Pods, remote command execution over websocket codename: '[k8s.io] Pods should support remote command execution over websockets [NodeConformance] [Conformance]'"} {"_id":"q-en-kubernetes-3542685ad49b859bacfd8519a0a49e179d869b194fda484b9e595a6bfcfb5c08","text":"fi } function kube::build::probe_address { # Apple has an ancient version of netcat with custom timeout flags. This is # the best way I (jbeda) could find to test for that. local netcat if nc 2>&1 | grep -e 'apple' >/dev/null ; then netcat=\"nc -G 1\" else netcat=\"nc -w 1\" fi function kube::build::rsync_probe { # Wait unil rsync is up and running. if ! which nc >/dev/null ; then V=6 kube::log::info \"netcat not installed, waiting for 1s\" sleep 1 return 0 fi local tries=10 local tries=20 while (( ${tries} > 0 )) ; do if ${netcat} -z \"$1\" \"$2\" 2> /dev/null ; then if rsync \"rsync://k8s@${1}:${2}/\" --password-file=\"${LOCAL_OUTPUT_BUILD_CONTEXT}/rsyncd.password\" &> /dev/null ; then return 0 fi tries=$(( ${tries} - 1))"} {"_id":"q-en-kubernetes-354db570601e13fc384cb5144ecf95810d7bef21f789346140998874cde1e22c","text":"echo \"ELASTICSEARCH_LOGGING_REPLICAS='${ELASTICSEARCH_LOGGING_REPLICAS:-1}'\" echo \"ENABLE_NODE_LOGGING='${ENABLE_NODE_LOGGING:-false}'\" echo \"ENABLE_CLUSTER_UI='${ENABLE_CLUSTER_UI}'\" echo \"ENABLE_HOSTPATH_PROVISIONER='${ENABLE_HOSTPATH_PROVISIONER:-false}'\" echo \"LOGGING_DESTINATION='${LOGGING_DESTINATION:-}'\" echo \"ENABLE_CLUSTER_DNS='${ENABLE_CLUSTER_DNS:-false}'\" echo \"DNS_SERVER_IP='${DNS_SERVER_IP:-}'\""} {"_id":"q-en-kubernetes-35b8fb491be5496ff5e6a1d48f7f003b5c1296fd37792a8c07020786e7b4989f","text":"// Never send a bookmark event if we did not see an event here, this is fine // because we don't provide any guarantees on sending bookmarks. if lastProcessedResourceVersion == 0 { // pop expired watchers in case there has been no update c.bookmarkWatchers.popExpiredWatchers() continue } bookmarkEvent := &watchCacheEvent{"} {"_id":"q-en-kubernetes-35e0a3b29594f9333b5e3817fc779e87008fca50794054005a061efef5be9903","text":"\"where N means number of retries allowed for kubelet to post node status.\") fs.Float32Var(&o.NodeEvictionRate, \"node-eviction-rate\", 0.1, \"Number of nodes per second on which pods are deleted in case of node failure when a zone is healthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters.\") fs.Float32Var(&o.SecondaryNodeEvictionRate, \"secondary-node-eviction-rate\", 0.01, \"Number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters. This value is implicitly overridden to 0 if the cluster size is smaller than --large-cluster-size-threshold.\") fs.Int32Var(&o.LargeClusterSizeThreshold, \"large-cluster-size-threshold\", 50, fmt.Sprintf(\"Number of nodes from which %s treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller.\", names.NodeLifecycleController)) fs.Int32Var(&o.LargeClusterSizeThreshold, \"large-cluster-size-threshold\", 50, fmt.Sprintf(\"Number of nodes from which %s treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller. Notice: If nodes reside in multiple zones, this threshold will be considered as zone node size threshold for each zone to determine node eviction rate independently.\", names.NodeLifecycleController)) fs.Float32Var(&o.UnhealthyZoneThreshold, \"unhealthy-zone-threshold\", 0.55, \"Fraction of Nodes in a zone which needs to be not Ready (minimum 3) for zone to be treated as unhealthy. \") }"} {"_id":"q-en-kubernetes-35eca94cde7b60ab94f4d26a9c3590c2010412ecc148af4691d36e859ee4183d","text":"// +optional optional string workingDir = 5; // List of ports to expose from the container. Exposing a port here gives // the system additional information about the network connections a // container uses, but is primarily informational. Not specifying a port here // List of ports to expose from the container. Not specifying a port here // DOES NOT prevent that port from being exposed. Any port which is // listening on the default \"0.0.0.0\" address inside a container will be // accessible from the network. // Modifying this array with strategic merge patch may corrupt the data. // For more information See https://github.com/kubernetes/kubernetes/issues/108255. // Cannot be updated. // +optional // +patchMergeKey=containerPort"} {"_id":"q-en-kubernetes-3655b8fce8ba29c712d6a02c9e002600bd6802c76355f66745da10b259bbd5fd","text":"} return ret } func getPodLabelName(pod *v1.Pod) string { podName := pod.Name if pod.GenerateName != \"\" { podNameSlice := strings.Split(pod.Name, \"-\") podName = strings.Join(podNameSlice[:len(podNameSlice)-1], \"-\") if label, ok := pod.GetLabels()[apps.DefaultDeploymentUniqueLabelKey]; ok { podName = strings.ReplaceAll(podName, fmt.Sprintf(\"-%s\", label), \"\") } } return podName } "} {"_id":"q-en-kubernetes-36749558b5c0ed53eedb28025a1643878495b1cbc4777220d6d4c9f133705299","text":"} // If the container logs directory does not exist, create it. if _, err := os.Stat(containerLogsDir); err != nil { if err := kl.os.MkdirAll(containerLogsDir, 0755); err != nil { glog.Errorf(\"Failed to create directory %q: %v\", containerLogsDir, err) if _, err := os.Stat(ContainerLogsDir); err != nil { if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { glog.Errorf(\"Failed to create directory %q: %v\", ContainerLogsDir, err) } }"} {"_id":"q-en-kubernetes-3695384e62b2baf2d31d13f6dc1f2f767082472ed5aecee1c63d18514ef36611","text":"// wait until new webhook is called the first time if err := wait.PollImmediate(time.Millisecond*5, wait.ForeverTestTimeout, func() (bool, error) { _, err = client.CoreV1().Pods(\"default\").Patch(reinvocationMarkerFixture.Name, types.JSONPatchType, []byte(\"[]\")) _, err = client.CoreV1().Pods(markerNs).Patch(marker.Name, types.JSONPatchType, []byte(\"[]\")) select { case <-upCh: return true, nil"} {"_id":"q-en-kubernetes-36cea03b6c0d18b42b316d857d137b1e6afbce0320660f7682c4e5fa621a10b0","text":" # Development Guide # Releases and Official Builds Official releases are built in Docker containers. Details are [here](build/README.md). You can do simple builds and development with just a local Docker installation. If want to build go locally outside of docker, please continue below. ## Go development environment Kubernetes is written in [Go](http://golang.org) programming language. If you haven't set up Go development environment, please follow [this instruction](http://golang.org/doc/code.html) to install go tool and set up GOPATH. Ensure your version of Go is at least 1.3. ## Put kubernetes into GOPATH We highly recommend to put kubernetes' code into your GOPATH. For example, the following commands will download kubernetes' code under the current user's GOPATH (Assuming there's only one directory in GOPATH.): ``` $ echo $GOPATH /home/user/goproj $ mkdir -p $GOPATH/src/github.com/GoogleCloudPlatform/ $ cd $GOPATH/src/github.com/GoogleCloudPlatform/ $ git clone git@github.com:GoogleCloudPlatform/kubernetes.git ``` The commands above will not work if there are more than one directory in ``$GOPATH``. (Obviously, clone your own fork of Kubernetes if you plan to do development.) ## godep and dependency management Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. It is not strictly required for building Kubernetes but it is required when managing dependencies under the Godeps/ tree, and is required by a number of the build and test scripts. Please make sure that ``godep`` is installed and in your ``$PATH``. ### Installing godep There are many ways to build and host go binaries. Here is an easy way to get utilities like ```godep``` installed: 1. Ensure that [mercurial](http://mercurial.selenic.com/wiki/Download) is installed on your system. (some of godep's dependencies use the mercurial source control system). Use ```apt-get install mercurial``` or ```yum install mercurial``` on Linux, or [brew.sh](http://brew.sh) on OS X, or download directly from mercurial. 2. Create a new GOPATH for your tools and install godep: ``` export GOPATH=$HOME/go-tools mkdir -p $GOPATH go get github.com/tools/godep ``` 3. Add $GOPATH/bin to your path. Typically you'd add this to your ~/.profile: ``` export GOPATH=$HOME/go-tools export PATH=$PATH:$GOPATH/bin ``` ### Using godep Here is a quick summary of `godep`. `godep` helps manage third party dependencies by copying known versions into Godeps/_workspace. You can use `godep` in three ways: 1. Use `godep` to call your `go` commands. For example: `godep go test ./...` 2. Use `godep` to modify your `$GOPATH` so that other tools know where to find the dependencies. Specifically: `export GOPATH=$GOPATH:$(godep path)` 3. Use `godep` to copy the saved versions of packages into your `$GOPATH`. This is done with `godep restore`. We recommend using options #1 or #2. ## Hooks Before committing any changes, please link/copy these hooks into your .git directory. This will keep you from accidentally committing non-gofmt'd go code. ``` cd kubernetes ln -s hooks/prepare-commit-msg .git/hooks/prepare-commit-msg ln -s hooks/commit-msg .git/hooks/commit-msg ``` ## Unit tests ``` cd kubernetes hack/test-go.sh ``` Alternatively, you could also run: ``` cd kubernetes godep go test ./... ``` If you only want to run unit tests in one package, you could run ``godep go test`` under the package directory. For example, the following commands will run all unit tests in package kubelet: ``` $ cd kubernetes # step into kubernetes' directory. $ cd pkg/kubelet $ godep go test # some output from unit tests PASS ok github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet 0.317s ``` ## Coverage ``` cd kubernetes godep go tool cover -html=target/c.out ``` ## Integration tests You need an etcd somewhere in your PATH. To install etcd, run: ``` cd kubernetes hack/install-etcd.sh sudo ln -s $(pwd)/third_party/etcd/bin/etcd /usr/bin/etcd ``` ``` cd kubernetes hack/test-integration.sh ``` ## End-to-End tests You can run an end-to-end test which will bring up a master and two minions, perform some tests, and then tear everything down. Make sure you have followed the getting started steps for your chosen cloud platform (which might involve changing the `KUBERNETES_PROVIDER` environment variable to something other than \"gce\". ``` cd kubernetes hack/e2e-test.sh ``` Pressing control-C should result in an orderly shutdown but if something goes wrong and you still have some VMs running you can force a cleanup with the magical incantation: ``` hack/e2e-test.sh 1 1 1 ``` ## Testing out flaky tests [Instructions here](docs/devel/flaky-tests.md) ## Add/Update dependencies Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. To add or update a package, please follow the instructions on [godep's document](https://github.com/tools/godep). To add a new package ``foo/bar``: - Make sure the kubernetes' root directory is in $GOPATH/github.com/GoogleCloudPlatform/kubernetes - Run ``godep restore`` to make sure you have all dependancies pulled. - Download foo/bar into the first directory in GOPATH: ``go get foo/bar``. - Change code in kubernetes to use ``foo/bar``. - Run ``godep save ./...`` under kubernetes' root directory. To update a package ``foo/bar``: - Make sure the kubernetes' root directory is in $GOPATH/github.com/GoogleCloudPlatform/kubernetes - Run ``godep restore`` to make sure you have all dependancies pulled. - Update the package with ``go get -u foo/bar``. - Change code in kubernetes accordingly if necessary. - Run ``godep update foo/bar`` under kubernetes' root directory. ## Keeping your development fork in sync One time after cloning your forked repo: ``` git remote add upstream https://github.com/GoogleCloudPlatform/kubernetes.git ``` Then each time you want to sync to upstream: ``` git fetch upstream git rebase upstream/master ``` ## Regenerating the API documentation ``` cd kubernetes/api sudo docker build -t kubernetes/raml2html . sudo docker run --name=\"docgen\" kubernetes/raml2html sudo docker cp docgen:/data/kubernetes.html . ``` View the API documentation using htmlpreview (works on your fork, too): ``` http://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/blob/master/api/kubernetes.html ``` "} {"_id":"q-en-kubernetes-36d1af981a2f7a57e56c0f0505737bcf02eee1720f902b1faa15386fba0c2527","text":"if err != nil { return false, fmt.Errorf(\"got error while getting pod events: %s\", err) } if len(events.Items) == 0 { return false, nil // no events have occurred yet for _, event := range events.Items { if strings.Contains(event.Message, msg) { return true, nil } } return strings.Contains(events.Items[0].Message, msg), nil return false, nil } }"} {"_id":"q-en-kubernetes-36e3f623834c614bf70acd6ed2b621083616835c0e9704cb88976cb15e57606b","text":"import ( \"bytes\" \"errors\" \"fmt\" \"math/rand\" \"net\""} {"_id":"q-en-kubernetes-36f70a1d19735cbd6842492ce413e1207ccb4738a607e1b0a168f1b3bd2a0b04","text":" //go:build !providerless // +build !providerless /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vsphere import ( \"testing\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime\" \"k8s.io/client-go/informers\" \"k8s.io/client-go/kubernetes/fake\" \"k8s.io/legacy-cloud-providers/vsphere/vclib\" ) // Annotation used to distinguish nodes in node cache / informer / API server const nodeAnnotation = \"test\" func getNode(annotation string) *v1.Node { return &v1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: \"node1\", Annotations: map[string]string{ nodeAnnotation: annotation, }, }, } } func TestGetNode(t *testing.T) { tests := []struct { name string cachedNodes []*v1.Node informerNodes []*v1.Node // \"nil\" means that the NodeManager has no nodeLister apiServerNodes []*v1.Node // \"nil\" means that the NodeManager has no nodeGetter expectedNodeAnnotation string expectNotFound bool }{ { name: \"No cached node anywhere\", cachedNodes: []*v1.Node{}, informerNodes: []*v1.Node{}, apiServerNodes: []*v1.Node{}, expectNotFound: true, }, { name: \"No lister & getter\", cachedNodes: []*v1.Node{}, informerNodes: nil, apiServerNodes: nil, expectNotFound: true, }, { name: \"cache is used first\", cachedNodes: []*v1.Node{getNode(\"cache\")}, informerNodes: []*v1.Node{getNode(\"informer\")}, apiServerNodes: []*v1.Node{getNode(\"apiserver\")}, expectedNodeAnnotation: \"cache\", }, { name: \"informer is used second\", cachedNodes: []*v1.Node{}, informerNodes: []*v1.Node{getNode(\"informer\")}, apiServerNodes: []*v1.Node{getNode(\"apiserver\")}, expectedNodeAnnotation: \"informer\", }, { name: \"API server is used last\", cachedNodes: []*v1.Node{}, informerNodes: []*v1.Node{}, apiServerNodes: []*v1.Node{getNode(\"apiserver\")}, expectedNodeAnnotation: \"apiserver\", }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { // local NodeManager cache cache := make(map[string]*v1.Node) for _, node := range test.cachedNodes { cache[node.Name] = node } // Client with apiServerNodes objs := []runtime.Object{} for _, node := range test.apiServerNodes { objs = append(objs, node) } client := fake.NewSimpleClientset(objs...) nodeGetter := client.CoreV1() // Informer + nodeLister. Despite the client already has apiServerNodes, they won't appear in the // nodeLister, because the informer is never started. factory := informers.NewSharedInformerFactory(client, 0 /* no resync */) nodeInformer := factory.Core().V1().Nodes() for _, node := range test.informerNodes { nodeInformer.Informer().GetStore().Add(node) } nodeLister := nodeInformer.Lister() nodeManager := NodeManager{ registeredNodes: cache, } if test.informerNodes != nil { nodeManager.SetNodeLister(nodeLister) } if test.apiServerNodes != nil { nodeManager.SetNodeGetter(nodeGetter) } node, err := nodeManager.GetNode(\"node1\") if test.expectNotFound && err != vclib.ErrNoVMFound { t.Errorf(\"Expected NotFound error, got: %v\", err) } if !test.expectNotFound && err != nil { t.Errorf(\"Unexpected error: %s\", err) } if test.expectedNodeAnnotation != \"\" { if node.Annotations == nil { t.Errorf(\"Expected node with annotation %q, got nil\", test.expectedNodeAnnotation) } else { if ann := node.Annotations[nodeAnnotation]; ann != test.expectedNodeAnnotation { t.Errorf(\"Expected node with annotation %q, got %q\", test.expectedNodeAnnotation, ann) } } } }) } } "} {"_id":"q-en-kubernetes-37080411293afd2ecb7943a7e88bfbc257be6cb9ad882a89e1b9bb9965229329","text":"nodeName k8stypes.NodeName, isAttached bool, asw cache.ActualStateOfWorld, timeout time.Duration, ) { result := false volumes := asw.GetVolumesToReportAttached(logger) for _, volume := range volumes[nodeName] { if volume.Name == volumeName { result = true var result bool var lastErr error err := wait.PollUntilContextTimeout(context.TODO(), 50*time.Millisecond, timeout, false, func(context.Context) (done bool, err error) { volumes := asw.GetVolumesToReportAttached(logger) for _, volume := range volumes[nodeName] { if volume.Name == volumeName { result = true } } } if result == isAttached { t.Logf(\"Volume <%v> is reported as attached to node <%v>: %v\", volumeName, nodeName, result) return if result == isAttached { t.Logf(\"Volume <%v> is reported as attached to node <%v>: %v\", volumeName, nodeName, result) return true, nil } lastErr = fmt.Errorf(\"Check volume <%v> is reported as attached to node <%v>, got %v, expected %v\", volumeName, nodeName, result, isAttached) return false, nil }) if err != nil { t.Fatalf(\"last error: %q, wait timeout: %q\", lastErr, err.Error()) } t.Fatalf(\"Check volume <%v> is reported as attached to node <%v>, got %v, expected %v\", volumeName, nodeName, result, isAttached) }"} {"_id":"q-en-kubernetes-3778c52dfb226afcaf17e6e0e1043e4b832633686daf9d1a355b0fa51e02215f","text":"\"github.com/google/go-cmp/cmp\" \"k8s.io/apimachinery/pkg/util/json\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/apimachinery/pkg/util/waitgroup\" auditinternal \"k8s.io/apiserver/pkg/apis/audit\" \"k8s.io/apiserver/pkg/audit\""} {"_id":"q-en-kubernetes-37c8ced5e63a4f696c6de8db5894c4c6f0c9cfcb540702a4305714dc4c1c4e1e","text":"// ExcludeMasterFromStandardLB excludes master nodes from standard load balancer. // If not set, it will be default to true. ExcludeMasterFromStandardLB *bool `json:\"excludeMasterFromStandardLB\" yaml:\"excludeMasterFromStandardLB\"` // DisableOutboundSNAT disables the outbound SNAT for public load balancer rules. // It should only be set when loadBalancerSku is standard. If not set, it will be default to false. DisableOutboundSNAT *bool `json:\"disableOutboundSNAT\" yaml:\"disableOutboundSNAT\"` // Maximum allowed LoadBalancer Rule Count is the limit enforced by Azure Load balancer MaximumLoadBalancerRuleCount int `json:\"maximumLoadBalancerRuleCount\" yaml:\"maximumLoadBalancerRuleCount\"`"} {"_id":"q-en-kubernetes-37cff65b112c33747f181640fcbeb47118d31e40bd87e396471f308759f26925","text":"# Clean up kubectl delete jobs pi \"${kube_flags[@]}\" # Post-condition: no pods exist. kube::test::get_object_assert pods \"{{range.items}}{{$id_field}}:{{end}}\" '' kube::test::wait_object_assert pods \"{{range.items}}{{$id_field}}:{{end}}\" '' # Pre-Condition: no Deployment exists kube::test::get_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" ''"} {"_id":"q-en-kubernetes-37dbeeb878bb011279b83d09f79af712fb3a9c48a142226d4c0440c3da688c97","text":"for _, testcase := range testcases { t.Run(testcase.name, func(t *testing.T) { buf := new(bytes.Buffer) errBuf := new(bytes.Buffer) buf := new(buffer) errBuf := new(buffer) klog.SetOutputBySeverity(\"INFO\", buf) klog.SetOutputBySeverity(\"WARNING\", errBuf)"} {"_id":"q-en-kubernetes-37ee218c2d0cf1f54b8408dd441addd7f7155f78ac20449befa997ed1cfeb60c","text":"// Flaky operation failures in an e2e test can be captured through this. flakeReport *FlakeReport // To make sure that this framework cleans up after itself, no matter what, // we install a Cleanup action before each test and clear it after. If we // should abort, the AfterSuite hook should run all Cleanup actions. cleanupHandle CleanupActionHandle // afterEaches is a map of name to function to be called after each test. These are not // cleared. The call order is randomized so that no dependencies can grow between // the various afterEaches"} {"_id":"q-en-kubernetes-3806e88f8ab49e330a5f7f92e14e75207b7a345413e95228a0fbbc0d8beff2f9","text":"if err != nil { t.Fatalf(\"Failed to create scheduler: %v\", err) } // Profiles profiles := make([]string, 0, len(s.Profiles)) for name := range s.Profiles { profiles = append(profiles, name)"} {"_id":"q-en-kubernetes-381713c312f40c36135bacc77b1a4d473f78153112d86c31d0cb2fe88e9b243f","text":"defaultPodResourcesPath = \"/var/lib/kubelet/pod-resources\" defaultPodResourcesTimeout = 10 * time.Second defaultPodResourcesMaxSize = 1024 * 1024 * 16 // 16 Mb kubeletReadOnlyPort = \"10255\" kubeletHealthCheckURL = \"http://127.0.0.1:\" + kubeletReadOnlyPort + \"/healthz\" ) func getNodeSummary() (*stats.Summary, error) {"} {"_id":"q-en-kubernetes-38c1787b9e947b3103f2ac63110da1c715d0e4c8c55286c2272fd404ab6fa3cc","text":"} // if we're trying to hit the kube-apiserver and there wasn't an explicit config, use the in-cluster config if server == \"kubernetes.default.svc\" { if target == \"kubernetes.default.svc\" { // if we can find an in-cluster-config use that. If we can't, fall through. inClusterConfig, err := rest.InClusterConfig() if err == nil {"} {"_id":"q-en-kubernetes-38f2c460b7a46178a2142071559a72fb71787feabe6626bc6205bfeb0a6cb934","text":"} } // printPodsMultiline prints multiple pods with a proper alignment. func printPodsMultiline(w PrefixWriter, title string, pods []api.Pod) { printPodsMultilineWithIndent(w, \"\", title, \"t\", pods) } // printPodsMultilineWithIndent prints multiple pods with a user-defined alignment. func printPodsMultilineWithIndent(w PrefixWriter, initialIndent, title, innerIndent string, pods []api.Pod) { w.Write(LEVEL_0, \"%s%s:%s\", initialIndent, title, innerIndent) if pods == nil || len(pods) == 0 { w.WriteLine(\"\") return } // to print pods in the sorted order sort.Slice(pods, func(i, j int) bool { cmpKey := func(pod api.Pod) string { return pod.Name } return cmpKey(pods[i]) < cmpKey(pods[j]) }) for i, pod := range pods { if i != 0 { w.Write(LEVEL_0, \"%s\", initialIndent) w.Write(LEVEL_0, \"%s\", innerIndent) } w.Write(LEVEL_0, \"%sn\", pod.Name) } } // printPodTolerationsMultiline prints multiple tolerations with a proper alignment. func printPodTolerationsMultiline(w PrefixWriter, title string, tolerations []api.Toleration) { printTolerationsMultilineWithIndent(w, \"\", title, \"t\", tolerations)"} {"_id":"q-en-kubernetes-393b8d4a6cf0a1c2d5e1445b62ca4abaead3cf19a0374773edaa69aaa28b5208","text":"NoSnatTestProxy = ImageConfig{e2eRegistry, \"no-snat-test-proxy\", \"1.0\", true} NWayHTTP = ImageConfig{e2eRegistry, \"n-way-http\", \"1.0\", true} // When these values are updated, also update cmd/kubelet/app/options/options.go Pause = ImageConfig{gcRegistry, \"pause\", \"3.0\", false} Pause = ImageConfig{gcRegistry, \"pause\", \"3.0\", true} Porter = ImageConfig{e2eRegistry, \"porter\", \"1.0\", true} PortForwardTester = ImageConfig{e2eRegistry, \"port-forward-tester\", \"1.0\", true} Redis = ImageConfig{e2eRegistry, \"redis\", \"1.0\", true}"} {"_id":"q-en-kubernetes-394a8c1e3ce153172bcb23873187ce34ec33a6a816d48ad429da941cf452e8fc","text":"import ( \"context\" \"fmt\" \"strconv\" \"os\" \"strings\" v1 \"k8s.io/api/core/v1\""} {"_id":"q-en-kubernetes-39b2deef9cd74f5120775ae32b4237153a265703e1e7d8cfc1723e83848a95a2","text":"// list all pods to include the pods that don't match the rc's selector // anymore but has the stale controller ref. // TODO: Do the List and Filter in a single pass, or use an index. pods, err := rm.podLister.Pods(rc.Namespace).List(labels.Everything()) allPods, err := rm.podLister.Pods(rc.Namespace).List(labels.Everything()) if err != nil { return err } // Ignore inactive pods. var filteredPods []*v1.Pod for _, pod := range pods { for _, pod := range allPods { if controller.IsPodActive(pod) { filteredPods = append(filteredPods, pod) }"} {"_id":"q-en-kubernetes-39c1f2263fc5373756b095b922f8162b1339e139e749d61369ea1a6ab93ddbcd","text":"\"time\" v1 \"k8s.io/api/core/v1\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime\" utilfeature \"k8s.io/apiserver/pkg/util/feature\""} {"_id":"q-en-kubernetes-39d4ac5cf7503e6c03ab41b7521cbe2c02fd6fc37cff0b6451766717059a7c8b","text":" # See the OWNERS docs at https://go.k8s.io/owners approvers: - lavalamp - smarterclayton - deads2k - sttts - liggitt - caesarxuchao reviewers: - thockin - lavalamp - smarterclayton - wojtek-t - deads2k - derekwaynecarr - caesarxuchao - cheftako - mikedanese - liggitt - gmarek - sttts - ncdc - logicalhan - tallclair labels: - sig/api-machinery No newline at end of file"} {"_id":"q-en-kubernetes-39deb8a05a025873f85f2a8ef0dcec1ce1fb5e65e9f08d5ccb45e1e63ac5087e","text":"kubectl get pods \"${kube_flags[@]}\" -lname=redis-master | grep -q 'redis-master' [ ! $(delete pods --all pods -l name=redis-master) ] # not --all and label selector together kubectl delete --all pods \"${kube_flags[@]}\" # --all remove all the pods kubectl create -f examples/guestbook/redis-master.json \"${kube_flags[@]}\" kubectl create -f examples/redis/redis-proxy.yaml \"${kube_flags[@]}\" kubectl get pods redis-master redis-proxy \"${kube_flags[@]}\" kubectl delete pods redis-master redis-proxy # delete multiple pods at once howmanypods=\"$(kubectl get pods -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" [ \"$howmanypods\" -eq 0 ] kubectl create -f examples/guestbook/redis-master.json \"${kube_flags[@]}\" kubectl create -f examples/redis/redis-proxy.yaml \"${kube_flags[@]}\" kubectl stop pods redis-master redis-proxy # stop multiple pods at once howmanypods=\"$(kubectl get pods -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" [ \"$howmanypods\" -eq 0 ]"} {"_id":"q-en-kubernetes-3a193e6556577f920437eec7801ca7a65a1d491f7fab01bae98e4115a12ccfe6","text":"func (c *connection) RemoveStreams(streams ...httpstream.Stream) { c.streamLock.Lock() for _, stream := range streams { delete(c.streams, stream.Identifier()) // It may be possible that the provided stream is nil if timed out. if stream != nil { delete(c.streams, stream.Identifier()) } } c.streamLock.Unlock() }"} {"_id":"q-en-kubernetes-3a27ae5ffaf72d35de3877969d9cfa5c9d4ad305dce1b4096d62d07ec6d41fd8","text":"return nil, fmt.Errorf(\"failed to start container %q: %v\", r.ContainerId, err) } ds.performPlatformSpecificContainerForContainer(r.ContainerId) return &runtimeapi.StartContainerResponse{}, nil }"} {"_id":"q-en-kubernetes-3a2f39f9abc333fc5d2af805bd7a4774965e2f6b5759e12c20950eedd1dd77f9","text":"import ( corev1 \"k8s.io/api/core/v1\" discovery \"k8s.io/api/discovery/v1alpha1\" apiequality \"k8s.io/apimachinery/pkg/api/equality\" \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" corev1client \"k8s.io/client-go/kubernetes/typed/core/v1\""} {"_id":"q-en-kubernetes-3a33e50c320c2799dac0f2feda2a80c9a674d75bc917c41c5d194a7c694e56ba","text":"fs.BoolVar(&o.config.IPVS.StrictARP, \"ipvs-strict-arp\", o.config.IPVS.StrictARP, \"Enable strict ARP by setting arp_ignore to 1 and arp_announce to 2\") fs.BoolVar(&o.config.IPTables.MasqueradeAll, \"masquerade-all\", o.config.IPTables.MasqueradeAll, \"If using the pure iptables proxy, SNAT all traffic sent via Service cluster IPs (this not commonly needed)\") fs.BoolVar(&o.config.EnableProfiling, \"profiling\", o.config.EnableProfiling, \"If true enables profiling via web interface on /debug/pprof handler.\") fs.BoolVar(&o.config.EnableProfiling, \"profiling\", o.config.EnableProfiling, \"If true enables profiling via web interface on /debug/pprof handler. This parameter is ignored if a config file is specified by --config.\") fs.Float32Var(&o.config.ClientConnection.QPS, \"kube-api-qps\", o.config.ClientConnection.QPS, \"QPS to use while talking with kubernetes apiserver\") fs.Var(&o.config.DetectLocalMode, \"detect-local-mode\", \"Mode to use to detect local traffic\") fs.Var(&o.config.DetectLocalMode, \"detect-local-mode\", \"Mode to use to detect local traffic. This parameter is ignored if a config file is specified by --config.\") } // NewOptions returns initialized Options"} {"_id":"q-en-kubernetes-3a82594211a06f6fec67d6eae9a610117792d864f482938a64a41e80434c9052","text":"package priorities import ( \"os/exec\" \"reflect\" \"sort\" \"strconv\""} {"_id":"q-en-kubernetes-3a8a687264efab730523d8ff5d11f9e6bbe8a9e26ff412babe5ee4238e3b7942","text":"opencontrail_kubernetes_tag: '$(echo \"$OPENCONTRAIL_KUBERNETES_TAG\" | sed -e \"s/'/''/g\")' opencontrail_public_subnet: '$(echo \"$OPENCONTRAIL_PUBLIC_SUBNET\" | sed -e \"s/'/''/g\")' e2e_storage_test_environment: '$(echo \"$E2E_STORAGE_TEST_ENVIRONMENT\" | sed -e \"s/'/''/g\")' enable_hostpath_provisioner: '$(echo \"$ENABLE_HOSTPATH_PROVISIONER\" | sed -e \"s/'/''/g\")' EOF cat </etc/salt/minion.d/log-level-debug.conf"} {"_id":"q-en-kubernetes-3a9e7acb7dceedac16a6506a18bbf04260c0eb4cb06fc96b5ad3cecdba2b2374","text":" {% if pillar.get('enable_node_autoscaler', '').lower() == 'true' %} {% set params = pillar['autoscaler_mig_config'] -%} { \"kind\": \"Pod\","} {"_id":"q-en-kubernetes-3ad5523a22e3455d08d1ac23d84b6067e349c6f2f6d45bade9d3a457d02dd2d1","text":"// newAgnhostPod returns a pod that uses the agnhost image. The image's binary supports various subcommands // that behave the same, no matter the underlying OS. func newAgnhostPod(name string, args ...string) *v1.Pod { zero := int64(0) return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ TerminationGracePeriodSeconds: &zero, Containers: []v1.Container{ { Name: \"agnhost\","} {"_id":"q-en-kubernetes-3b12bf71ae16e57a7c1429e8ec2d468ed17825171f76ecba39072154c3b92ceb","text":"// NewDelayingQueueWithCustomClock constructs a new named workqueue // with ability to inject real or fake clock for testing purposes func NewDelayingQueueWithCustomClock(clock clock.Clock, name string) DelayingInterface { return newDelayingQueue(clock, NewNamed(name), name) } func newDelayingQueue(clock clock.Clock, q Interface, name string) *delayingType { ret := &delayingType{ Interface: NewNamed(name), Interface: q, clock: clock, heartbeat: clock.NewTicker(maxWait), stopCh: make(chan struct{}),"} {"_id":"q-en-kubernetes-3b6e760c6f509a43eadf028db07d7cdc800d79358f98e1a3685d4a571ea0c1e1","text":"t.Errorf(\"Service must be namespace scoped\") } oldService := makeValidService() newService := makeValidService() oldService.Spec.Type = api.ServiceTypeLoadBalancer oldService.ResourceVersion = \"4\" newService.ResourceVersion = \"4\" oldService.Spec.SessionAffinity = \"None\" newService := oldService.DeepCopy() newService.Spec.SessionAffinity = \"ClientIP\" newService.Status = api.ServiceStatus{ LoadBalancer: api.LoadBalancerStatus{"} {"_id":"q-en-kubernetes-3b8c4a7104affd77fac16ec273320359966b6dffecfe83488f6fec70b718bb4e","text":"// +listType=map // +listMapKey=name // +optional Variables []Variable `json:\"variables\" patchStrategy:\"merge\" patchMergeKey:\"name\" protobuf:\"bytes,7,rep,name=variables\"` Variables []Variable `json:\"variables,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"name\" protobuf:\"bytes,7,rep,name=variables\"` } type MatchCondition v1.MatchCondition"} {"_id":"q-en-kubernetes-3bbba44e0b7a08df3a2efb9f94d643d4ab2d46844e3625755666c88a74a83d13","text":"}, }, { name: \"StorageCapacity changed\", name: \"TokenRequests invalidated\", modify: func(new *storage.CSIDriver) { new.Spec.StorageCapacity = ¬StorageCapacity new.Spec.TokenRequests = []storage.TokenRequest{{Audience: gcp}, {Audience: gcp}} }, }, { name: \"TokenRequests invalidated\", name: \"invalid nil StorageCapacity\", modify: func(new *storage.CSIDriver) { new.Spec.TokenRequests = []storage.TokenRequest{{Audience: gcp}, {Audience: gcp}} new.Spec.StorageCapacity = nil }, }, }"} {"_id":"q-en-kubernetes-3bcdf9ff834a20ba361c89b93741870f5fd805691865531ac7497c4c2873f372","text":"return iface.Name, nil } func setUpAllInterfaces() error { interfaces, err := net.Interfaces() if err != nil { return err } for _, netIf := range interfaces { setUpInterface(netIf.Name) // ignore errors } return nil } func setUpInterface(ifName string) error { glog.V(3).Infof(\"Enabling hairpin on interface %s\", ifName) ifPath := path.Join(sysfsNetPath, ifName)"} {"_id":"q-en-kubernetes-3c01eb06751621e0f9aae9af42a9f113e38258515fea56412a95357537722637","text":"} } // RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags { return ConfigOverrideFlags{ AuthOverrideFlags: RecommendedAuthOverrideFlags(prefix), ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix), ContextOverrideFlags: RecommendedContextOverrideFlags(prefix), CurrentContext: FlagInfo{prefix + FlagContext, \"\", \"\", \"The name of the kubeconfig context to use\"}, Timeout: FlagInfo{prefix + FlagTimeout, \"\", \"0\", \"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\"}, } } // RecommendedContextOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags { return ContextOverrideFlags{"} {"_id":"q-en-kubernetes-3c750decd1508e9c2b09c808bd1e2be32aaab25384b8a3029fad20fcdea5b3e9","text":"\"//vendor/golang.org/x/oauth2/google:go_default_library\", \"//vendor/google.golang.org/api/compute/v1:go_default_library\", \"//vendor/google.golang.org/api/dns/v1:go_default_library\", \"//vendor/google.golang.org/api/googleapi:go_default_library\", \"//vendor/gopkg.in/gcfg.v1:go_default_library\", ], )"} {"_id":"q-en-kubernetes-3d117c6d496fac083391cb647f0b228758dbef37d83526c8d013cf8dd88a84dd","text":"return ret } // continuousEcho() uses the same connection for multiple requests, made to run as a goroutine so that // manipulations can be made to the service and backend pods while a connection is ongoing // it starts by sending a series of packets to establish conntrack entries and waits for a signal to keep // sending packts. It returns an error if the number of failed attempts is >= 5 func continuousEcho(host string, port int, timeout time.Duration, maxAttempts int, signal chan struct{}, errorChannel chan error) { defer ginkgo.GinkgoRecover() const threshold = 10 // Sanity check inputs, because it has happened. These are the only things // that should hard fail the test - they are basically ASSERT()s. if host == \"\" { errorChannel <- fmt.Errorf(\"Got empty host for continuous echo (%s)\", host) return } if port == 0 { errorChannel <- fmt.Errorf(\"Got port ==0 for continuous echo (%d)\", port) return } hostPort := net.JoinHostPort(host, strconv.Itoa(port)) url := fmt.Sprintf(\"udp://%s\", hostPort) ret := UDPPokeResult{} con, err := net.Dial(\"udp\", hostPort) if err != nil { ret.Status = UDPError ret.Error = err errorChannel <- fmt.Errorf(\"Connection to %q failed: %v\", url, err) return } numErrors := 0 bufsize := len(strconv.Itoa(maxAttempts)) + 1 var buf = make([]byte, bufsize) for i := 0; i < maxAttempts; i++ { if i == threshold { framework.Logf(\"Continuous echo waiting for signal to continue\") <-signal if numErrors == threshold { errorChannel <- fmt.Errorf(\"continuous echo was not able to communicate with initial server pod\") return } } time.Sleep(1 * time.Second) err = con.SetDeadline(time.Now().Add(timeout)) if err != nil { ret.Status = UDPError ret.Error = err framework.Logf(\"Continuous echo (%q): %v\", url, err) numErrors++ continue } myRequest := fmt.Sprintf(\"echo %d\", i) _, err = con.Write([]byte(fmt.Sprintf(\"%sn\", myRequest))) if err != nil { ret.Error = err neterr, ok := err.(net.Error) if ok && neterr.Timeout() { ret.Status = UDPTimeout } else if strings.Contains(err.Error(), \"connection refused\") { ret.Status = UDPRefused } else { ret.Status = UDPError } numErrors++ framework.Logf(\"Continuous echo (%q): %v - %d errors seen so far\", url, err, numErrors) continue } err = con.SetDeadline(time.Now().Add(timeout)) if err != nil { ret.Status = UDPError ret.Error = err numErrors++ framework.Logf(\"Continuous echo (%q): %v - %d errors seen so far\", url, err, numErrors) continue } n, err := con.Read(buf) if err != nil { ret.Error = err neterr, ok := err.(net.Error) if ok && neterr.Timeout() { ret.Status = UDPTimeout } else if strings.Contains(err.Error(), \"connection refused\") { ret.Status = UDPRefused } else { ret.Status = UDPError } numErrors++ framework.Logf(\"Continuous echo (%q): %v - %d errors seen so far\", url, err, numErrors) continue } ret.Response = buf[0:n] if string(ret.Response) != fmt.Sprintf(\"%d\", i) { ret.Status = UDPBadResponse ret.Error = fmt.Errorf(\"response does not match expected string: %q\", string(ret.Response)) framework.Logf(\"Continuous echo (%q): %v\", url, ret.Error) numErrors++ continue } ret.Status = UDPSuccess framework.Logf(\"Continuous echo(%q): success\", url) } err = nil if numErrors >= threshold { err = fmt.Errorf(\"Too many Errors in continuous echo\") } errorChannel <- err } // testReachableUDP tests that the given host serves UDP on the given port. func testReachableUDP(host string, port int, timeout time.Duration) { pollfn := func() (bool, error) {"} {"_id":"q-en-kubernetes-3d36433b0a004468937813ba8af69af1e1388989dfb07a6b285f33a605bf1645","text":"return fmt.Errorf(\"waiting for kubelet timed out\") } func RestartApiserver(c discovery.ServerVersionInterface) error { func RestartApiserver(cs clientset.Interface) error { // TODO: Make it work for all providers. if !ProviderIs(\"gce\", \"gke\", \"aws\") { return fmt.Errorf(\"unsupported provider: %s\", TestContext.Provider) } if ProviderIs(\"gce\", \"aws\") { return sshRestartMaster() initialRestartCount, err := getApiserverRestartCount(cs) if err != nil { return fmt.Errorf(\"failed to get apiserver's restart count: %v\", err) } if err := sshRestartMaster(); err != nil { return fmt.Errorf(\"failed to restart apiserver: %v\", err) } return waitForApiserverRestarted(cs, initialRestartCount) } // GKE doesn't allow ssh access, so use a same-version master // upgrade to teardown/recreate master. v, err := c.ServerVersion() v, err := cs.Discovery().ServerVersion() if err != nil { return err }"} {"_id":"q-en-kubernetes-3d40c8dc2ec7ce64bce5466938a3d7137fc1e54a655d2f260d14f82f195e4d0a","text":"return nil } var redactedBytes []byte var ( redactedBytes []byte dataOmittedBytes []byte ) // Flatten redacts raw data entries from the config object for a human-readable view. func ShortenConfig(config *Config) {"} {"_id":"q-en-kubernetes-3d695f1d2efc90a7c2026f46d6f53493e20f2196e8244c9a0359cecda44d10b0","text":"// When specified, it should match one the container or initContainer // names in the pod template. // +optional ContainerName *string `json:\"containerName\" protobuf:\"bytes,1,opt,name=containerName\"` ContainerName *string `json:\"containerName,omitempty\" protobuf:\"bytes,1,opt,name=containerName\"` // Represents the relationship between the container exit code(s) and the // specified values. Containers completed with success (exit code 0) are"} {"_id":"q-en-kubernetes-3d74f0a7a8c59513c0cac67df0fb810473118531bd3df4167ad849cfad9788c3","text":"name = \"go_default_test\", size = \"large\", srcs = [ \"etcd_cross_group_test.go\", \"etcd_storage_path_test.go\", \"main_test.go\", ],"} {"_id":"q-en-kubernetes-3d7ade23bfc64d460b78da9a1a6a5c595815ef4a9c4754b2ea6e10bc4117d2b3","text":"Expect(curHistory).NotTo(BeNil()) return curHistory } func waitFailedDaemonPodDeleted(c clientset.Interface, pod *v1.Pod) func() (bool, error) { return func() (bool, error) { if _, err := c.CoreV1().Pods(pod.Namespace).Get(pod.Name, metav1.GetOptions{}); err != nil { if errors.IsNotFound(err) { return true, nil } return false, fmt.Errorf(\"failed to get failed daemon pod %q: %v\", pod.Name, err) } return false, nil } } "} {"_id":"q-en-kubernetes-3d801b95dd6099db09c59200bfe3796beafd992d73b09b769eed1e4056845101","text":"func init() { sDec, _ := base64.StdEncoding.DecodeString(\"REDACTED+\") redactedBytes = []byte(string(sDec)) sDec, _ = base64.StdEncoding.DecodeString(\"DATA+OMITTED\") dataOmittedBytes = []byte(string(sDec)) } // IsConfigEmpty returns true if the config is empty."} {"_id":"q-en-kubernetes-3d9cf579c9e68813b246a605d6a561681be986a6feaf37f91b57a31f1b9652db","text":"cachedService.service = service s.cache.set(namespacedName.String(), cachedService) case cache.Deleted: err := s.ensureLBDeleted(service) err := s.balancer.EnsureTCPLoadBalancerDeleted(s.loadBalancerName(service), s.zone.Region) if err != nil { return err, retryable }"} {"_id":"q-en-kubernetes-3dc125885958726fa1e684335d54312add4e2c1db78c2645b36de6ca09b2b7a4","text":"sleep 5 POD_LIST_1=$($KUBECFG '-template={{range.Items}}{{.Meta}} {{end}}' list pods) POD_LIST_1=$($KUBECFG '-template={{range.Items}}{{.Name}} {{end}}' list pods) echo \"Pods running: ${POD_LIST_1}\" $KUBECFG stop redisSlaveController"} {"_id":"q-en-kubernetes-3e05af29702d148db4e6a1545065167531fa6aee515b87110ce4a03a3b79ca57","text":"delete(objs, namespacedName) for _, w := range t.getWatches(gvr, ns) { w.Delete(obj) w.Delete(obj.DeepCopyObject()) } return nil }"} {"_id":"q-en-kubernetes-3e07fd49618edd8e3a295464c3f3471770a4315e885c875ebcb4c9a8abca3e56","text":"}) It(\"should write files of various sizes, verify size, validate content\", func() { fileSizes := []int64{1 * framework.MiB, 100 * framework.MiB} fileSizes := []int64{fileSizeSmall, fileSizeMedium} err := testVolumeIO(f, cs, config, volSource, nil /*no secContext*/, testFile, fileSizes) Expect(err).NotTo(HaveOccurred()) })"} {"_id":"q-en-kubernetes-3e474959bf65270473e4e43fabe22b08ac9be8145c1bf55d0993f4c76967fab5","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package codeinspector import ( \"fmt\" \"go/ast\" \"go/parser\" \"go/token\" \"io/ioutil\" \"strings\" \"unicode\" ) // GetPublicFunctions lists all public functions (not methods) from a golang source file. func GetPublicFunctions(filePath string) ([]string, error) { var functionNames []string // Create the AST by parsing src. fset := token.NewFileSet() // positions are relative to fset f, err := parser.ParseFile(fset, filePath, nil, 0) if err != nil { return nil, fmt.Errorf(\"failed parse file to list functions: %v\", err) } // Inspect the AST and print all identifiers and literals. ast.Inspect(f, func(n ast.Node) bool { var s string switch x := n.(type) { case *ast.FuncDecl: s = x.Name.Name // It's a function (not method), and is public, record it. if x.Recv == nil && isPublic(s) { functionNames = append(functionNames, s) } } return true }) return functionNames, nil } // isPublic checks if a given string is a public function name. func isPublic(myString string) bool { a := []rune(myString) a[0] = unicode.ToUpper(a[0]) return myString == string(a) } // GetSourceCodeFiles lists golang source code files from directory, excluding sub-directory and tests files. func GetSourceCodeFiles(dir string) ([]string, error) { files, err := ioutil.ReadDir(dir) if err != nil { return nil, err } var filenames []string for _, file := range files { if strings.HasSuffix(file.Name(), \".go\") && !strings.HasSuffix(file.Name(), \"_test.go\") { filenames = append(filenames, file.Name()) } } return filenames, nil } "} {"_id":"q-en-kubernetes-3e708e0786301606b2891ccc96a71d9fb3cf156b4bfd5e8f74ffeb0840ddfc86","text":"podSpec.EphemeralContainers = nil } if (!utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) || !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion)) && !subpathExprInUse(oldPodSpec) { // drop subpath env expansion from the pod if either of the subpath features is disabled and the old spec did not specify subpath env expansion if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) && !subpathExprInUse(oldPodSpec) { // drop subpath env expansion from the pod if subpath feature is disabled and the old spec did not specify subpath env expansion VisitContainers(podSpec, AllContainers, func(c *api.Container, containerType ContainerType) bool { for i := range c.VolumeMounts { c.VolumeMounts[i].SubPathExpr = \"\""} {"_id":"q-en-kubernetes-3e7d33285515beb71f378ee4f904a5296c7bf1f8132cad4902eb91b856a3e553","text":"}, { \"ImportPath\": \"github.com/json-iterator/go\", \"Rev\": \"f2b4162afba35581b6d4a50d3b8f34e33c144682\" \"Rev\": \"ab8a2e0c74be9d3be70b3184d9acc634935ded82\" }, { \"ImportPath\": \"github.com/mailru/easyjson/buffer\","} {"_id":"q-en-kubernetes-3e94399ce093f5d1fe1c51420304f430ba5eec86f56a6d0075a84d518ceff104","text":"} } // estimateMaxStringLengthPerRequest estimates the maximum string length (in characters) // that has a set of enum values. // The result of the estimation is the length of the longest possible value. func estimateMaxStringEnumLength(s Schema) int64 { var maxLength int64 for _, v := range s.Enum() { if s, ok := v.(string); ok && int64(len(s)) > maxLength { maxLength = int64(len(s)) } } return maxLength } // estimateMaxArrayItemsPerRequest estimates the maximum number of array items with // the provided minimum serialized size that can fit into a single request. func estimateMaxArrayItemsFromMinSize(minSize int64) int64 {"} {"_id":"q-en-kubernetes-3e96c220b5b5072c4585bf833eb74fd5f8444807684bd6bbc0ffdb95c6dfb606","text":"All bool Record bool ChangeCause string Local bool Cmd *cobra.Command Limits string"} {"_id":"q-en-kubernetes-3ea8e6a00150e14725ff3512f952ca375b1bb21babbe0d436c73d54e0d31ef44","text":"w.Flush() if trackingWriter.Written == 0 && !o.IgnoreNotFound && len(allErrs) == 0 { // if we wrote no output, and had no errors, and are not ignoring NotFound, be sure we output something noResourcesFoundFormat := fmt.Sprintf(\"No resources found in %s namespace.\", o.Namespace) fmt.Fprintln(o.ErrOut, noResourcesFoundFormat) if !o.AllNamespaces { fmt.Fprintln(o.ErrOut, fmt.Sprintf(\"No resources found in %s namespace.\", o.Namespace)) } else { fmt.Fprintln(o.ErrOut, fmt.Sprintf(\"No resources found\")) } } return utilerrors.NewAggregate(allErrs) }"} {"_id":"q-en-kubernetes-3ebddb250af4e3be9e84dac9f3f3534464994edef726cc88f9b1beb3d00a50f9","text":"podCopy := pod.DeepCopy() // NominatedNodeName is updated only if we are trying to set it, and the value is // different from the existing one. if !podutil.UpdatePodCondition(&podCopy.Status, condition) && pod.Status.NominatedNodeName == nominatedNode { if !podutil.UpdatePodCondition(&podCopy.Status, condition) && (len(nominatedNode) == 0 || pod.Status.NominatedNodeName == nominatedNode) { return nil } podCopy.Status.NominatedNodeName = nominatedNode if nominatedNode != \"\" { podCopy.Status.NominatedNodeName = nominatedNode } return patchPod(client, pod, podCopy) }"} {"_id":"q-en-kubernetes-3efd82158fb67c595278564e8dfeb1bbaf302933e6adc8d396834f3c58a8391f","text":" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\"

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version. The latest 1.0.x release of this document can be found [here](http://releases.k8s.io/release-1.0/docs/user-guide/kubectl-overview.md). Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). -- # kubectl overview **Table of Contents** - [kubectl overview](#kubectl-overview) - [Overview](#overview) - [Common Operations](#common-operations) - [Kubectl Operations](#kubectl-operations) - [Resource Types](#resource-types) This overview is intended for anyone who wants to use `kubectl` command line tool to interact with Kubernetes cluster. Please remember that it is built for quick started with `kubectl`; for complete and detailed information, please refer to [kubectl](kubectl/kubectl.md). TODO: auto-generate this file to stay up with `kubectl` changes. Please see [#14177](https://github.com/kubernetes/kubernetes/pull/14177). ## Overview `kubectl` controls the Kubernetes cluster manager. The synopsis is: ``` kubectl [command] [TYPE] [NAME] [flags] ``` This specifies: - `command` is a certain operation performed on a given resource(s), such as `create`, `get`, `describe`, `delete` etc. - `TYPE` is the type of resource(s). Both singular and plural forms are accepted. For example, `node(s)`, `namespace(s)`, `pod(s)`, `replicationcontroller(s)`, `service(s)` etc. - `NAME` is the name of resource(s). `TYPE NAME` can be specified as `TYPE name1 name2` or `TYPE/name1 TYPE/name2`. `TYPE NAME` can also be specified by one or more file arguments: `-f file1 -f file2 ...`, [use YAML rather than JSON](config-best-practices.md) since YAML tends to be more user-friendly for config. - `flags` are used to provide more control information when running a command. For example, you can use `-s` or `--server` to specify the address and port of the Kubernetes API server. Command line flags override their corresponding default values and environment variables. [Use short flags sparingly, only for the most frequently used options](../devel/kubectl-conventions.md). Please use `kubectl help [command]` for detailed information about a command. Please refer to [kubectl](kubectl/kubectl.md) for a complete list of available commands and flags. ## Common Operations For explanation, here I gave some mostly often used `kubectl` command examples. Please replace sample names with actual values if you would like to try these commands. 1. `kubectl create` - Create a resource by filename or stdin // Create a service using the data in example-service.yaml. $ kubectl create -f example-service.yaml // Create a replication controller using the data in example-controller.yaml. $ kubectl create -f example-controller.yaml // Create objects whose definitions are in a directory. This looks for config objects in all .yaml, .yml, and .json files in and passes them to create. $ kubectl create -f 2. `kubectl get` - Display one or many resources // List all pods in ps output format. $ kubectl get pods // List all pods in ps output format with more information (such as node name). $ kubectl get pods -o wide // List a single replication controller with specified name in ps output format. You can use the alias 'rc' instead of 'replicationcontroller'. $ kubectl get replicationcontroller // List all replication controllers and services together in ps output format. $ kubectl get rc,services 3. `kubectl describe` - Show details of a specific resource or group of resources // Describe a node $ kubectl describe nodes // Describe a pod $ kubectl describe pods/ // Describe all pods managed by the replication controller // (rc-created pods get the name of the rc as a prefix in the pod the name). $ kubectl describe pods 4. `kubectl delete` - Delete resources by filenames, stdin, resources and names, or by resources and label selector // Delete a pod using the type and name specified in pod.yaml. $ kubectl delete -f pod.yaml // Delete pods and services with label name=. $ kubectl delete pods,services -l name= // Delete all pods $ kubectl delete pods --all 5. `kubectl exec` - Execute a command in a container // Get output from running 'date' from pod , using the first container by default. $ kubectl exec date // Get output from running 'date' in from pod . $ kubectl exec -c date // Get an interactive tty and run /bin/bash from pod , using the first container by default. $ kubectl exec -ti /bin/bash 6. `kubectl logs` - Print the logs for a container in a pod. // Returns snapshot of logs from pod . $ kubectl logs // Starts streaming of logs from pod , it is something like 'tail -f'. $ kubectl logs -f ## Kubectl Operations The following table describes all `kubectl` operations and their general synopsis: Operation | Synopsis\t| Description -------------------- | -------------------- | -------------------- annotate\t| `kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]` | Update the annotations on a resource api-versions\t| `kubectl api-versions` | Print available API versions attach\t\t| `kubectl attach POD -c CONTAINER` | Attach to a running container cluster-info\t| `kubectl cluster-info` | Display cluster info config\t\t| `kubectl config SUBCOMMAND` | Modifies kubeconfig files create\t\t| `kubectl create -f FILENAME` | Create a resource by filename or stdin delete\t\t| `kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)])` | Delete resources by filenames, stdin, resources and names, or by resources and label selector describe\t| `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)` | Show details of a specific resource or group of resources edit\t\t| `kubectl edit (RESOURCE/NAME | -f FILENAME)` | Edit a resource on the server exec\t\t| `kubectl exec POD [-c CONTAINER] -- COMMAND [args...]` | Execute a command in a container expose\t\t| `kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [----external-ip=external-ip-of-service] [--type=type]` | Take a replication controller, service or pod and expose it as a new Kubernetes Service get\t\t| `kubectl get [(-o|--output=)json|yaml|wide|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE [NAME | -l label] | TYPE/NAME ...) [flags]` | Display one or many resources label\t\t| `kubectl label [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]` | Update the labels on a resource logs\t\t| `kubectl logs [-f] [-p] POD [-c CONTAINER]` | Print the logs for a container in a pod namespace\t| `kubectl namespace [namespace]` | SUPERSEDED: Set and view the current Kubernetes namespace patch\t\t| `kubectl patch (-f FILENAME | TYPE NAME) -p PATCH` | Update field(s) of a resource by stdin port-forward\t| `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]` | Forward one or more local ports to a pod proxy\t\t| `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix]` | Run a proxy to the Kubernetes API server replace\t\t| `kubectl replace -f FILENAME` | Replace a resource by filename or stdin rolling-update\t| `kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CONTAINER_IMAGE | -f NEW_CONTROLLER_SPEC)` | Perform a rolling update of the given ReplicationController run\t\t| `kubectl run NAME --image=image [--env=\"key=value\"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json]` | Run a particular image on the cluster scale\t\t| `kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT (-f FILENAME | TYPE NAME)` | Set a new size for a Replication Controller stop\t\t| `kubectl stop (-f FILENAME | TYPE (NAME | -l label | --all))` | Deprecated: Gracefully shut down a resource by name or filename version\t\t| `kubectl version` | Print the client and server version information ## Resource Types The `kubectl` supports the following resource types, and their abbreviated aliases: Resource Type\t| Abbreviated Alias -------------------- | -------------------- componentstatuses\t|\tcs events\t|\tev endpoints\t|\tep horizontalpodautoscalers\t|\thpa limitranges\t|\tlimits nodes\t|\tno namespaces\t|\tns pods\t|\tpo persistentvolumes\t|\tpv persistentvolumeclaims\t|\tpvc resourcequotas\t|\tquota replicationcontrollers\t|\trc daemonsets\t|\tds services\t|\tsvc [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl-overview.md?pixel)]()
"} {"_id":"q-en-kubernetes-3efdca3d7f3f8a011b4c9c0e64c2312418fac47ef7639a403c56b324c2c90619","text":"memoryUsage, err := strconv.ParseFloat(lines[0], 64) framework.ExpectNoError(err) var rssToken, inactiveFileToken string if isCgroupV2 { // Use Anon memory for RSS as cAdvisor on cgroupv2 // see https://github.com/google/cadvisor/blob/a9858972e75642c2b1914c8d5428e33e6392c08a/container/libcontainer/handler.go#L799 rssToken = \"anon\" inactiveFileToken = \"inactive_file\" } else { rssToken = \"total_rss\" inactiveFileToken = \"total_inactive_file\" } var totalInactiveFile float64 for _, line := range lines[1:] { tokens := strings.Split(line, \" \") if tokens[0] == \"total_rss\" { if tokens[0] == rssToken { rss, err = strconv.ParseFloat(tokens[1], 64) framework.ExpectNoError(err) } if tokens[0] == \"total_inactive_file\" { if tokens[0] == inactiveFileToken { totalInactiveFile, err = strconv.ParseFloat(tokens[1], 64) framework.ExpectNoError(err) }"} {"_id":"q-en-kubernetes-3f2345f0f9e0c7e497537e977ca89af11fa266b9e9fe1b2eec343b4dacf05b3d","text":"// How long to wait for a log pod to be displayed const podLogTimeout = 45 * time.Second // utility function for gomega Eventually func getPodLogs(c *client.Client, namespace, podName, containerName string) (string, error) { logs, err := c.Get().Resource(\"pods\").Namespace(namespace).Name(podName).SubResource(\"log\").Param(\"container\", containerName).Do().Raw() if err != nil { return \"\", err } if err == nil && strings.Contains(string(logs), \"Internal Error\") { return \"\", fmt.Errorf(\"Internal Error\") } return string(logs), err } var _ = Describe(\"Downward API volume\", func() { f := NewFramework(\"downward-api\") It(\"should provide podname only [Conformance]\", func() {"} {"_id":"q-en-kubernetes-3f6102d1b028599c1511ce0cad7d949721237f0a591149ec2e02ea6510931d03","text":"], library = \":go_default_library\", deps = [ \"//federation/apis/federation:go_default_library\", \"//federation/apis/federation/v1beta1:go_default_library\", \"//federation/client/clientset_generated/federation_clientset/fake:go_default_library\", \"//pkg/api:go_default_library\","} {"_id":"q-en-kubernetes-3f9cf48897560087502c9fc20145c6bd87578c02d4e203879f6d77ab89a391dd","text":"glog.Infof(\"Running tests for APIVersion: %s\", apiVersion) manifestURL := ServeCachedManifestFile() apiServerURL, configFilePath := startComponents(manifestURL, apiVersion) firstManifestURL := ServeCachedManifestFile(testPodSpecFile) secondManifestURL := ServeCachedManifestFile(testManifestFile) apiServerURL, configFilePath := startComponents(firstManifestURL, secondManifestURL, apiVersion) // Ok. we're good to go. glog.Infof(\"API Server started on %s\", apiServerURL)"} {"_id":"q-en-kubernetes-3feb39c3f7e2878793e9de39945777fbfef3e77605194d0e74efb65b3f0775f1","text":"// buildELBSecurityGroupList returns list of SecurityGroups which should be // attached to ELB created by a service. List always consist of at least // 1 member which is an SG created for this service. Extra groups can be // 1 member which is an SG created for this service or a SG from the Global config. Extra groups can be // specified via annotation func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, loadBalancerName, annotation string) ([]string, error) { var err error"} {"_id":"q-en-kubernetes-3ff1b8d08100a08f3d19a06321feeddf479f63a137fb9563a2d32342ce18fd1e","text":"if !apierrors.IsBadRequest(err) { t.Errorf(\"expected HTTP status: BadRequest, got: %#v\", apierrors.ReasonForError(err)) } if err.Error() != expectedError { if !strings.Contains(err.Error(), expectedError) { t.Errorf(\"expected %#v, got %#v\", expectedError, err.Error()) } }"} {"_id":"q-en-kubernetes-402a470f7dfd0801270ef55791c8b1d11ab39d8af3395fcd73b07cab5a0937e2","text":"func mountToRootfs(m *configs.Mount, c *mountConfig) error { rootfs := c.root mountLabel := c.label mountFd := c.fd dest, err := securejoin.SecureJoin(rootfs, m.Destination) if err != nil { return err } // procfs and sysfs are special because we need to ensure they are actually // mounted on a specific path in a container without any funny business. switch m.Device { case \"proc\", \"sysfs\": // If the destination already exists and is not a directory, we bail // out This is to avoid mounting through a symlink or similar -- which // out. This is to avoid mounting through a symlink or similar -- which // has been a \"fun\" attack scenario in the past. // TODO: This won't be necessary once we switch to libpathrs and we can // stop all of these symlink-exchange attacks. dest := filepath.Clean(m.Destination) if !strings.HasPrefix(dest, rootfs) { // Do not use securejoin as it resolves symlinks. dest = filepath.Join(rootfs, dest) } if fi, err := os.Lstat(dest); err != nil { if !os.IsNotExist(err) { return err } } else if fi.Mode()&os.ModeDir == 0 { } else if !fi.IsDir() { return fmt.Errorf(\"filesystem %q must be mounted on ordinary directory\", m.Device) } if err := os.MkdirAll(dest, 0o755); err != nil { return err } // Selinux kernels do not support labeling of /proc or /sys // Selinux kernels do not support labeling of /proc or /sys. return mountPropagate(m, rootfs, \"\", nil) } mountLabel := c.label mountFd := c.fd dest, err := securejoin.SecureJoin(rootfs, m.Destination) if err != nil { return err } switch m.Device { case \"mqueue\": if err := os.MkdirAll(dest, 0o755); err != nil { return err"} {"_id":"q-en-kubernetes-40324b2e42b6f994c10ad56c6dba5b19804786d81e3edd7b91608649d26f0375","text":"} } type buffer struct { b bytes.Buffer rw sync.RWMutex } func (b *buffer) String() string { b.rw.RLock() defer b.rw.RUnlock() return b.b.String() } func (b *buffer) Write(p []byte) (n int, err error) { b.rw.Lock() defer b.rw.Unlock() return b.b.Write(p) } func TestSecretUpdated(t *testing.T) { datacenter := \"0.0.0.0\" secretName := \"vccreds\""} {"_id":"q-en-kubernetes-407a7b6fa9b9b1179b0b05314bfd51c4b30da19e17b2efa5dc7292b3ea9bc452","text":"// stopKubelet will kill the running kubelet, and returns a func that will restart the process again func stopKubelet() func() { kubeletServiceName := findRunningKubletServiceName() stdout, err := exec.Command(\"sudo\", \"systemctl\", \"kill\", kubeletServiceName).CombinedOutput() // reset the kubelet service start-limit-hit stdout, err := exec.Command(\"sudo\", \"systemctl\", \"reset-failed\", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, \"Failed to reset kubelet start-limit-hit with systemctl: %v, %v\", err, stdout) stdout, err = exec.Command(\"sudo\", \"systemctl\", \"kill\", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, \"Failed to stop kubelet with systemctl: %v, %v\", err, stdout) return func() { stdout, err := exec.Command(\"sudo\", \"systemctl\", \"start\", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, \"Failed to restart kubelet with systemctl: %v, %v\", err, stdout) } } func kubeletHealthCheck(url string) bool { insecureTransport := http.DefaultTransport.(*http.Transport).Clone() insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} insecureHTTPClient := &http.Client{ Transport: insecureTransport, } req, err := http.NewRequest(\"HEAD\", url, nil) if err != nil { return false } req.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", framework.TestContext.BearerToken)) resp, err := insecureHTTPClient.Do(req) if err != nil { klog.Warningf(\"Health check on %q failed, error=%v\", url, err) } else if resp.StatusCode != http.StatusOK { klog.Warningf(\"Health check on %q failed, status=%d\", url, resp.StatusCode) } return err == nil && resp.StatusCode == http.StatusOK } func toCgroupFsName(cgroupName cm.CgroupName) string { if framework.TestContext.KubeletConfig.CgroupDriver == \"systemd\" { return cgroupName.ToSystemd()"} {"_id":"q-en-kubernetes-408cccef83bedd405a6ce0731b5bffe556039ccab07b2f4b0f44f0478d589918","text":"handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, \"true\") // WithWarningRecorder must be wrapped by the timeout handler // to make the addition of warning headers threadsafe handler = genericapifilters.WithWarningRecorder(handler) // WithTimeoutForNonLongRunningRequests will call the rest of the request handling in a go-routine with the // context with deadline. The go-routine can keep running, while the timeout logic will return a timeout to the client. handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.LongRunningFunc)"} {"_id":"q-en-kubernetes-408d41342ff59f1fe86972d71f8cdcf6b3828cb1cac65b15efdeb103ded6b226","text":"testRootDir := makeTempDirOrDie(\"kubelet_integ_1.\", \"\") configFilePath := makeTempDirOrDie(\"config\", testRootDir) glog.Infof(\"Using %s as root dir for kubelet #1\", testRootDir) kcfg := kubeletapp.SimpleKubelet(cl, &fakeDocker1, machineList[0], testRootDir, manifestURL, \"127.0.0.1\", 10250, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, configFilePath) kcfg := kubeletapp.SimpleKubelet(cl, &fakeDocker1, machineList[0], testRootDir, firstManifestURL, \"127.0.0.1\", 10250, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, configFilePath) kcfg.PodStatusUpdateFrequency = 1 * time.Second kubeletapp.RunKubelet(kcfg) // Kubelet (machine)"} {"_id":"q-en-kubernetes-40aa644f9e896a85fdb78ad4e9907f0b8165c7b56194cc1b7e48fcb49831bd10","text":"\"regexp\" \"strings\" \"syscall\" \"github.com/golang/glog\" ) const MOUNT_MS_BIND = syscall.MS_BIND"} {"_id":"q-en-kubernetes-40c9c6e79791e19a011697fa36d1e3c18dc1b69ddf53c7438dade195d5d24d21","text":"{ cfg: &kubeadmapi.MasterConfiguration{}, expected: api.Volume{ Name: \"pki\", Name: \"k8s\", VolumeSource: api.VolumeSource{ HostPath: &api.HostPathVolumeSource{ Path: kubeadmapi.GlobalEnvParams.KubernetesDir},"} {"_id":"q-en-kubernetes-40d6248e1fc2cf2915c4b81bf9a2d933ee43b1c189e876da9ada1783f36ccb16","text":"go_test( name = \"go_default_test\", srcs = [ \"labels_test.go\", \"pod_update_test.go\", \"types_test.go\", ],"} {"_id":"q-en-kubernetes-40fa4142e0548e86a6d144dc972d3c9f92d7a75d43cb9d81fea16e303f5a4432","text":"// corresponding requests. func newCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripper { d := diskv.New(diskv.Options{ PathPerm: os.FileMode(0750), FilePerm: os.FileMode(0660), BasePath: cacheDir, TempDir: filepath.Join(cacheDir, \".diskv-temp\"), })"} {"_id":"q-en-kubernetes-4104a5e532b1b7e1aaba810dd585065d028257d1f0d047a4e52fc1dfcc94d840","text":"// Create a usage object that is based on the quota resource version that will handle updates // by default, we preserve the past usage observation, and set hard to the current spec usage := v1.ResourceQuota{ ObjectMeta: metav1.ObjectMeta{ Name: resourceQuota.Name, Namespace: resourceQuota.Namespace, ResourceVersion: resourceQuota.ResourceVersion, Labels: resourceQuota.Labels, Annotations: resourceQuota.Annotations}, Status: v1.ResourceQuotaStatus{ Hard: hardLimits, Used: used, }, usage := resourceQuota.DeepCopy() usage.Status = v1.ResourceQuotaStatus{ Hard: hardLimits, Used: used, } dirty = dirty || !quota.Equals(usage.Status.Used, resourceQuota.Status.Used) // there was a change observed by this controller that requires we update quota if dirty { _, err = rq.rqClient.ResourceQuotas(usage.Namespace).UpdateStatus(&usage) _, err = rq.rqClient.ResourceQuotas(usage.Namespace).UpdateStatus(usage) return err } return nil"} {"_id":"q-en-kubernetes-4108d4f4bfb4b6b2d760fd5f8d094c0fd05d0edb96ac9448636c4d137f134c37","text":"attachdetachMutex.LockKey(string(nodeName)) defer attachdetachMutex.UnlockKey(string(nodeName)) if err := detacher.vsphereVolumes.DetachDisk(volPath, nodeName); err != nil { if err := detacher.vsphereVolumes.DetachDisk(newVolumePath, nodeName); err != nil { klog.Errorf(\"Error detaching volume %q: %v\", volPath, err) return err }"} {"_id":"q-en-kubernetes-411446b1c6fb40f56463abefbc7197db0a2448f1c71403d695a74e9b58db8e0f","text":"registerMetrics.Do(func() { legacyregistry.MustRegister(etcdRequestLatency) legacyregistry.MustRegister(objectCounts) legacyregistry.MustRegister(etcdObjectCounts) legacyregistry.MustRegister(dbTotalSize) legacyregistry.MustRegister(etcdBookmarkCounts) legacyregistry.MustRegister(etcdLeaseObjectCounts) }) } // UpdateObjectCount sets the etcd_object_counts metric. // UpdateObjectCount sets the apiserver_storage_object_counts and etcd_object_counts (deprecated) metric. func UpdateObjectCount(resourcePrefix string, count int64) { objectCounts.WithLabelValues(resourcePrefix).Set(float64(count)) etcdObjectCounts.WithLabelValues(resourcePrefix).Set(float64(count)) } // RecordEtcdRequestLatency sets the etcd_request_duration_seconds metrics."} {"_id":"q-en-kubernetes-413c85b57f8986eaf45f64426d7ef1121ff3f484283874cec323d87423c38c95","text":"return len(c1map) == 0 } func shouldIgnoreNodeUpdate(oldNode, curNode v1.Node) bool { if !nodeInSameCondition(oldNode.Status.Conditions, curNode.Status.Conditions) { return false } oldNode.ResourceVersion = curNode.ResourceVersion oldNode.Status.Conditions = curNode.Status.Conditions return apiequality.Semantic.DeepEqual(oldNode, curNode) } func (dsc *DaemonSetsController) updateNode(old, cur interface{}) { oldNode := old.(*v1.Node) curNode := cur.(*v1.Node) if reflect.DeepEqual(oldNode.Labels, curNode.Labels) && reflect.DeepEqual(oldNode.Spec.Taints, curNode.Spec.Taints) && nodeInSameCondition(oldNode.Status.Conditions, curNode.Status.Conditions) { // If node labels, taints and condition didn't change, we can ignore this update. if shouldIgnoreNodeUpdate(*oldNode, *curNode) { return }"} {"_id":"q-en-kubernetes-41898da6e9393b17f6a2ab0a9f944a41f5720a1ac2c72635a4a5a7a906b4919f","text":"timeout := time.Duration(3 * time.Second) ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() scheme := runtime.NewScheme() scheme := fake.NewTestScheme() metav1.AddMetaToScheme(scheme) informerReciveObjectCh := make(chan *metav1.PartialObjectMetadata, 1) objs := []runtime.Object{}"} {"_id":"q-en-kubernetes-418f1b8b64f8b578c0f4ede841826858a597639685effa63e0af7e429b5127cb","text":"} apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) default: return nil, nil, nil, fmt.Errorf(\"Unknown discovery response content-type: %s\", responseContentType) // Default is unaggregated discovery v1. err = json.Unmarshal(body, apiGroupList) if err != nil { return nil, nil, nil, err } } return apiGroupList, resourcesByGV, failedGVs, nil } // isV2Beta1ContentType checks of the content-type string is both // \"application/json\" and contains the v2beta1 content-type params. // NOTE: This function is resilient to the ordering of the // content-type parameters, as well as parameters added by // intermediaries such as proxies or gateways. Examples: // //\t\"application/json; g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList\" = true //\t\"application/json; as=APIGroupDiscoveryList;v=v2beta1;g=apidiscovery.k8s.io\" = true //\t\"application/json; as=APIGroupDiscoveryList;v=v2beta1;g=apidiscovery.k8s.io;charset=utf-8\" = true //\t\"application/json\" = false //\t\"application/json; charset=UTF-8\" = false func isV2Beta1ContentType(contentType string) bool { base, params, err := mime.ParseMediaType(contentType) if err != nil { return false } return runtime.ContentTypeJSON == base && params[\"g\"] == \"apidiscovery.k8s.io\" && params[\"v\"] == \"v2beta1\" && params[\"as\"] == \"APIGroupDiscoveryList\" } // ServerGroups returns the supported groups, with information like supported versions and the // preferred version. func (d *DiscoveryClient) ServerGroups() (*metav1.APIGroupList, error) {"} {"_id":"q-en-kubernetes-41a5f32c9cf0219dcdc6ba0c1c85c39e1d51677606b91686ee24a6b99e38756a","text":"return machine, exists, err } // VirtualMachineClientGetWithRetry invokes az.VirtualMachinesClient.Get with exponential backoff retry func (az *Cloud) VirtualMachineClientGetWithRetry(resourceGroup, vmName string, types compute.InstanceViewTypes) (compute.VirtualMachine, error) { var machine compute.VirtualMachine err := wait.ExponentialBackoff(az.resourceRequestBackoff, func() (bool, error) { var retryErr error machine, retryErr = az.VirtualMachinesClient.Get(resourceGroup, vmName, types) if retryErr != nil { glog.Errorf(\"backoff: failure, will retry,err=%v\", retryErr) return false, nil } glog.V(2).Infof(\"backoff: success\") return true, nil }) return machine, err } // GetIPForMachineWithRetry invokes az.getIPForMachine with exponential backoff retry func (az *Cloud) GetIPForMachineWithRetry(name types.NodeName) (string, error) { var ip string err := wait.ExponentialBackoff(az.resourceRequestBackoff, func() (bool, error) { var retryErr error ip, retryErr = az.getIPForMachine(name) if retryErr != nil { glog.Errorf(\"backoff: failure, will retry,err=%v\", retryErr) return false, nil } glog.V(2).Infof(\"backoff: success\") return true, nil }) return ip, err } // CreateOrUpdateSGWithRetry invokes az.SecurityGroupsClient.CreateOrUpdate with exponential backoff retry func (az *Cloud) CreateOrUpdateSGWithRetry(sg network.SecurityGroup) error { return wait.ExponentialBackoff(az.resourceRequestBackoff, func() (bool, error) {"} {"_id":"q-en-kubernetes-41b5179627ef86c9a91dbcf09a96b05e9c90723006afbea58ab7f45d27835300","text":" # 3.1 * The pause container gains a signal handler to clean up orphaned zombie processes. ([#36853](https://prs.k8s.io/36853), [@verb](https://github.com/verb)) * `pause -v` will return build information for the pause binary. ([#56762](https://prs.k8s.io/56762), [@verb](https://github.com/verb)) # 3.0 * The pause container was rewritten entirely in C. ([#23009](https://prs.k8s.io/23009), [@uluyol](https://github.com/uluyol)) "} {"_id":"q-en-kubernetes-41bd3dac3b588b5cffd6edfdbc78c1b12eee3a23ac1fb90a11187595aa309611","text":"Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { Name: \"default\", Protocol: api.Protocol(\"UDP\"), Port: 14, Name: \"default\", Protocol: api.Protocol(\"UDP\"), Port: 14, TargetPort: util.NewIntOrStringFromInt(14), }, }, Selector: map[string]string{\"func\": \"stream\"}, Type: api.ServiceTypeLoadBalancer, }, }, expected: \"you will also need to explicitly open a firewall\", status: 200, status: 200, }, }"} {"_id":"q-en-kubernetes-41d25a233026a747dd19c4f68e2a228b48f0d367469dd6ee6db70dd3cfe4398a","text":"func TestSecretForDockerRegistryGenerate(t *testing.T) { username, password, email, server := \"test-user\", \"test-password\", \"test-user@example.org\", \"https://index.docker.io/v1/\" secretData, err := handleDockercfgContent(username, password, email, server) secretData, err := handleDockerCfgJsonContent(username, password, email, server) if err != nil { t.Errorf(\"unexpected error: %v\", err) } secretDataNoEmail, err := handleDockercfgContent(username, password, \"\", server) secretDataNoEmail, err := handleDockerCfgJsonContent(username, password, \"\", server) if err != nil { t.Errorf(\"unexpected error: %v\", err) }"} {"_id":"q-en-kubernetes-41e9f63aa088b03f70466764c3b7a0c69f35ad24914d6fff1533c7530dfc5ce7","text":"} require.NoError(t, registerAPIService(ctx, client, groupVersion, service)) defer func() { require.NoError(t, unregisterAPIService(ctx, client, groupVersion)) }() groupVersions = append(groupVersions, groupVersion) } // Keep repeatedly fetching document from aggregator. // Check to see if it contains our service within a reasonable amount of time require.NoError(t, WaitForGroups(ctx, client, basicTestGroupWithFixup)) require.NoError(t, WaitForRootPaths(t, ctx, client, sets.New(\"/apis/\"+basicTestGroup.Name), nil)) // Unregister and ensure the group gets dropped from root paths for _, groupVersion := range groupVersions { require.NoError(t, unregisterAPIService(ctx, client, groupVersion)) } require.NoError(t, WaitForRootPaths(t, ctx, client, nil, sets.New(\"/apis/\"+basicTestGroup.Name))) } func runTestCases(t *testing.T, cases []testCase) {"} {"_id":"q-en-kubernetes-41eca6aa62720a1c353d5dffae2b312a913ba7f68dcb6c2cf2a6eb9a159287da","text":"func TestCheckVolumeFSResize(t *testing.T) { mode := v1.PersistentVolumeFilesystem pv := &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: \"dswp-test-volume-name\", setCapacity := func(pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim, capacity int) { pv.Spec.Capacity = volumeCapacity(capacity) pvc.Spec.Resources.Requests = volumeCapacity(capacity) } testcases := []struct { resize func(*testing.T, *v1.PersistentVolume, *v1.PersistentVolumeClaim, *desiredStateOfWorldPopulator) verify func(*testing.T, []v1.UniqueVolumeName, v1.UniqueVolumeName) enableResize bool readOnlyVol bool }{ { // No resize request for volume, volumes in ASW shouldn't be marked as fsResizeRequired resize: func(*testing.T, *v1.PersistentVolume, *v1.PersistentVolumeClaim, *desiredStateOfWorldPopulator) { }, verify: func(t *testing.T, vols []v1.UniqueVolumeName, _ v1.UniqueVolumeName) { if len(vols) > 0 { t.Errorf(\"No resize request for any volumes, but found resize required volumes in ASW: %v\", vols) } }, enableResize: true, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{RBD: &v1.RBDPersistentVolumeSource{}}, Capacity: volumeCapacity(1), ClaimRef: &v1.ObjectReference{Namespace: \"ns\", Name: \"file-bound\"}, VolumeMode: &mode, { // Disable the feature gate, so volume shouldn't be marked as fsResizeRequired resize: func(_ *testing.T, pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim, _ *desiredStateOfWorldPopulator) { setCapacity(pv, pvc, 2) }, verify: func(t *testing.T, vols []v1.UniqueVolumeName, _ v1.UniqueVolumeName) { if len(vols) > 0 { t.Errorf(\"Feature gate disabled, but found resize required volumes in ASW: %v\", vols) } }, enableResize: false, }, } pvc := &v1.PersistentVolumeClaim{ Spec: v1.PersistentVolumeClaimSpec{ VolumeName: \"dswp-test-volume-name\", Resources: v1.ResourceRequirements{ Requests: volumeCapacity(1), { // Make volume used as ReadOnly, so volume shouldn't be marked as fsResizeRequired resize: func(_ *testing.T, pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim, _ *desiredStateOfWorldPopulator) { setCapacity(pv, pvc, 2) }, verify: func(t *testing.T, vols []v1.UniqueVolumeName, _ v1.UniqueVolumeName) { if len(vols) > 0 { t.Errorf(\"volume mounted as ReadOnly, but found resize required volumes in ASW: %v\", vols) } }, readOnlyVol: true, enableResize: true, }, Status: v1.PersistentVolumeClaimStatus{ Phase: v1.ClaimBound, Capacity: volumeCapacity(1), { // Clear ASW, so volume shouldn't be marked as fsResizeRequired because they are not mounted resize: func(_ *testing.T, pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim, dswp *desiredStateOfWorldPopulator) { setCapacity(pv, pvc, 2) clearASW(dswp.actualStateOfWorld, dswp.desiredStateOfWorld, t) }, verify: func(t *testing.T, vols []v1.UniqueVolumeName, _ v1.UniqueVolumeName) { if len(vols) > 0 { t.Errorf(\"volume hasn't been mounted, but found resize required volumes in ASW: %v\", vols) } }, enableResize: true, }, } dswp, fakePodManager, fakeDSW := createDswpWithVolume(t, pv, pvc) fakeASW := dswp.actualStateOfWorld // create pod containers := []v1.Container{ { VolumeMounts: []v1.VolumeMount{ { Name: \"dswp-test-volume-name\", MountPath: \"/mnt\", }, // volume in ASW should be marked as fsResizeRequired resize: func(_ *testing.T, pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim, _ *desiredStateOfWorldPopulator) { setCapacity(pv, pvc, 2) }, verify: func(t *testing.T, vols []v1.UniqueVolumeName, volName v1.UniqueVolumeName) { if len(vols) == 0 { t.Fatalf(\"Request resize for volume, but volume in ASW hasn't been marked as fsResizeRequired\") } if len(vols) != 1 { t.Errorf(\"Some unexpected volumes are marked as fsResizeRequired: %v\", vols) } if vols[0] != volName { t.Fatalf(\"Mark wrong volume as fsResizeRequired: %s\", vols[0]) } }, enableResize: true, }, } pod := createPodWithVolume(\"dswp-test-pod\", \"dswp-test-volume-name\", \"file-bound\", containers) uniquePodName := types.UniquePodName(pod.UID) uniqueVolumeName := v1.UniqueVolumeName(\"fake-plugin/\" + pod.Spec.Volumes[0].Name) fakePodManager.AddPod(pod) // Fill the dsw to contains volumes and pods. dswp.findAndAddNewPods() reconcileASW(fakeASW, fakeDSW, t) for _, tc := range testcases { pv := &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: \"dswp-test-volume-name\", }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{RBD: &v1.RBDPersistentVolumeSource{}}, Capacity: volumeCapacity(1), ClaimRef: &v1.ObjectReference{Namespace: \"ns\", Name: \"file-bound\"}, VolumeMode: &mode, }, } pvc := &v1.PersistentVolumeClaim{ Spec: v1.PersistentVolumeClaimSpec{ VolumeName: pv.Name, Resources: v1.ResourceRequirements{ Requests: pv.Spec.Capacity, }, }, Status: v1.PersistentVolumeClaimStatus{ Phase: v1.ClaimBound, Capacity: pv.Spec.Capacity, }, } // No resize request for volume, volumes in ASW shouldn't be marked as fsResizeRequired. defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ExpandInUsePersistentVolumes, true)() resizeRequiredVolumes := reprocess(dswp, uniquePodName, fakeDSW, fakeASW) if len(resizeRequiredVolumes) > 0 { t.Fatalf(\"No resize request for any volumes, but found resize required volumes in ASW: %v\", resizeRequiredVolumes) } dswp, fakePodManager, fakeDSW := createDswpWithVolume(t, pv, pvc) fakeASW := dswp.actualStateOfWorld // create pod containers := []v1.Container{ { VolumeMounts: []v1.VolumeMount{ { Name: pv.Name, MountPath: \"/mnt\", ReadOnly: tc.readOnlyVol, }, }, }, } pod := createPodWithVolume(\"dswp-test-pod\", \"dswp-test-volume-name\", \"file-bound\", containers) uniquePodName := types.UniquePodName(pod.UID) uniqueVolumeName := v1.UniqueVolumeName(\"fake-plugin/\" + pod.Spec.Volumes[0].Name) // Add a resize request to volume. pv.Spec.Capacity = volumeCapacity(2) pvc.Spec.Resources.Requests = volumeCapacity(2) fakePodManager.AddPod(pod) // Fill the dsw to contains volumes and pods. dswp.findAndAddNewPods() reconcileASW(fakeASW, fakeDSW, t) // Disable the feature gate, so volume shouldn't be marked as fsResizeRequired. defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ExpandInUsePersistentVolumes, false)() resizeRequiredVolumes = reprocess(dswp, uniquePodName, fakeDSW, fakeASW) if len(resizeRequiredVolumes) > 0 { t.Fatalf(\"Feature gate disabled, but found resize required volumes in ASW: %v\", resizeRequiredVolumes) } func() { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ExpandInUsePersistentVolumes, tc.enableResize)() // Make volume used as ReadOnly, so volume shouldn't be marked as fsResizeRequired. defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ExpandInUsePersistentVolumes, true)() pod.Spec.Containers[0].VolumeMounts[0].ReadOnly = true resizeRequiredVolumes = reprocess(dswp, uniquePodName, fakeDSW, fakeASW) if len(resizeRequiredVolumes) > 0 { t.Fatalf(\"volume mounted as ReadOnly, but found resize required volumes in ASW: %v\", resizeRequiredVolumes) } tc.resize(t, pv, pvc, dswp) // Clear ASW, so volume shouldn't be marked as fsResizeRequired because they are not mounted. pod.Spec.Containers[0].VolumeMounts[0].ReadOnly = false clearASW(fakeASW, fakeDSW, t) resizeRequiredVolumes = reprocess(dswp, uniquePodName, fakeDSW, fakeASW) if len(resizeRequiredVolumes) > 0 { t.Fatalf(\"volume hasn't been mounted, but found resize required volumes in ASW: %v\", resizeRequiredVolumes) } resizeRequiredVolumes := reprocess(dswp, uniquePodName, fakeDSW, fakeASW) // volume in ASW should be marked as fsResizeRequired. reconcileASW(fakeASW, fakeDSW, t) resizeRequiredVolumes = reprocess(dswp, uniquePodName, fakeDSW, fakeASW) if len(resizeRequiredVolumes) == 0 { t.Fatalf(\"Request resize for volume, but volume in ASW hasn't been marked as fsResizeRequired\") } if len(resizeRequiredVolumes) != 1 { t.Fatalf(\"Some unexpected volumes are marked as fsResizeRequired: %v\", resizeRequiredVolumes) } if resizeRequiredVolumes[0] != uniqueVolumeName { t.Fatalf(\"Mark wrong volume as fsResizeRequired: %s\", resizeRequiredVolumes[0]) tc.verify(t, resizeRequiredVolumes, uniqueVolumeName) }() } }"} {"_id":"q-en-kubernetes-41f46c93bd5771a09726e91664b0b0107924f25fe92702b072d1ad00f7cc8857","text":"MINION_TAG=\"${INSTANCE_PREFIX}-minion\" MINION_NAMES=($(eval echo ${INSTANCE_PREFIX}-minion-{1..${NUM_MINIONS}})) MINION_IP_RANGES=($(eval echo \"10.245.{1..${NUM_MINIONS}}.0/24\")) MINION_SCOPES=\"\" MINION_SCOPES=\"storage-ro,compute-rw\" # Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default. POLL_SLEEP_INTERVAL=3 PORTAL_NET=\"10.0.0.0/16\""} {"_id":"q-en-kubernetes-42002e64c76f20f79f11ef971e2ac6fc2fb2313807a470289ee934dd902a1ea2","text":") // ValidateLoadBalancerStatus validates required fields on a LoadBalancerStatus func ValidateLoadBalancerStatus(status *core.LoadBalancerStatus, fldPath *field.Path) field.ErrorList { func ValidateLoadBalancerStatus(status *core.LoadBalancerStatus, fldPath *field.Path, spec *core.ServiceSpec) field.ErrorList { allErrs := field.ErrorList{} for i, ingress := range status.Ingress { idxPath := fldPath.Child(\"ingress\").Index(i) if len(ingress.IP) > 0 { if isIP := (netutils.ParseIPSloppy(ingress.IP) != nil); !isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"ip\"), ingress.IP, \"must be a valid IP address\")) } } if utilfeature.DefaultFeatureGate.Enabled(features.LoadBalancerIPMode) && ingress.IPMode == nil { ingrPath := fldPath.Child(\"ingress\") if !utilfeature.DefaultFeatureGate.Enabled(features.AllowServiceLBStatusOnNonLB) && spec.Type != core.ServiceTypeLoadBalancer && len(status.Ingress) != 0 { allErrs = append(allErrs, field.Forbidden(ingrPath, \"may only be used when `spec.type` is 'LoadBalancer'\")) } else { for i, ingress := range status.Ingress { idxPath := ingrPath.Index(i) if len(ingress.IP) > 0 { allErrs = append(allErrs, field.Required(idxPath.Child(\"ipMode\"), \"must be specified when `ip` is set\")) if isIP := (netutils.ParseIPSloppy(ingress.IP) != nil); !isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"ip\"), ingress.IP, \"must be a valid IP address\")) } } } else if ingress.IPMode != nil && len(ingress.IP) == 0 { allErrs = append(allErrs, field.Forbidden(idxPath.Child(\"ipMode\"), \"may not be specified when `ip` is not set\")) } else if ingress.IPMode != nil && !supportedLoadBalancerIPMode.Has(string(*ingress.IPMode)) { allErrs = append(allErrs, field.NotSupported(idxPath.Child(\"ipMode\"), ingress.IPMode, supportedLoadBalancerIPMode.List())) } if len(ingress.Hostname) > 0 { for _, msg := range validation.IsDNS1123Subdomain(ingress.Hostname) { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"hostname\"), ingress.Hostname, msg)) if utilfeature.DefaultFeatureGate.Enabled(features.LoadBalancerIPMode) && ingress.IPMode == nil { if len(ingress.IP) > 0 { allErrs = append(allErrs, field.Required(idxPath.Child(\"ipMode\"), \"must be specified when `ip` is set\")) } } else if ingress.IPMode != nil && len(ingress.IP) == 0 { allErrs = append(allErrs, field.Forbidden(idxPath.Child(\"ipMode\"), \"may not be specified when `ip` is not set\")) } else if ingress.IPMode != nil && !supportedLoadBalancerIPMode.Has(string(*ingress.IPMode)) { allErrs = append(allErrs, field.NotSupported(idxPath.Child(\"ipMode\"), ingress.IPMode, supportedLoadBalancerIPMode.List())) } if isIP := (netutils.ParseIPSloppy(ingress.Hostname) != nil); isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"hostname\"), ingress.Hostname, \"must be a DNS name, not an IP address\")) if len(ingress.Hostname) > 0 { for _, msg := range validation.IsDNS1123Subdomain(ingress.Hostname) { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"hostname\"), ingress.Hostname, msg)) } if isIP := (netutils.ParseIPSloppy(ingress.Hostname) != nil); isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"hostname\"), ingress.Hostname, \"must be a DNS name, not an IP address\")) } } } }"} {"_id":"q-en-kubernetes-42c079551a889d222996920bf41873496a42d559e8487fa316159c2aa301c763","text":"} } func printStatusAndLogsForNotReadyPods(c *client.Client, oldPods, newPods []*api.Pod) { printFn := func(id, log string, err error, previous bool) { prefix := \"Retrieving log for container\" if previous { prefix = \"Retrieving log for the last terminated container\" } if err != nil { Logf(\"%s %s, err: %v:n%sn\", prefix, id, log) } else { Logf(\"%s %s:n%sn\", prefix, id, log) } } for _, oldPod := range oldPods { for _, p := range newPods { if p.Namespace != oldPod.Namespace || p.Name != oldPod.Name { continue } if ok, _ := podRunningReady(p); !ok { Logf(\"Status for not ready pod %s/%s: %+v\", p.Namespace, p.Name, p.Status) // Print the log of the containers if pod is not running and ready. for _, container := range p.Status.ContainerStatuses { cIdentifer := fmt.Sprintf(\"%s/%s/%s\", p.Namespace, p.Name, container.Name) log, err := getPodLogs(c, p.Namespace, p.Name, container.Name) printFn(cIdentifer, log, err, false) // Get log from the previous container. if container.RestartCount > 0 { printFn(cIdentifer, log, err, true) } } } break } } } // rebootNode takes node name on provider through the following steps using c: // - ensures the node is ready // - ensures all pods on the node are running and ready"} {"_id":"q-en-kubernetes-43111ce15215608c4ab3b42238ef8d1ca6b69d3bc0a8e8476cf194664227430d","text":"// parameters, you'll run out of stack space before anything useful happens. Convert(src, dest interface{}, flags FieldMatchingFlags) error // DefaultConvert performs the default conversion, without calling a conversion func // on the current stack frame. This makes it safe to call from a conversion func. DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error // SrcTags and DestTags contain the struct tags that src and dest had, respectively. // If the enclosing object was not a struct, then these will contain no tags, of course. SrcTag() reflect.StructTag"} {"_id":"q-en-kubernetes-4316117c3882f5047aa18ff5944fc759747a35fec29976001b5f8e82875f0ae6","text":"return utilfile.FileExists(pathname) } // EvalHostSymlinks returns the path name after evaluating symlinks func (mounter *Mounter) EvalHostSymlinks(pathname string) (string, error) { return filepath.EvalSymlinks(pathname) } // check whether hostPath is within volume path // this func will lock all intermediate subpath directories, need to close handle outside of this func after container started func lockAndCheckSubPath(volumePath, hostPath string) ([]uintptr, error) {"} {"_id":"q-en-kubernetes-432bd5b639184b08c0db0fff3ce866519f2b53caabbf5caebb96e18553f3d65f","text":"endpointSlicesEnabled := utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceProxying) var incorrectAddresses []string nodePortAddresses, incorrectAddresses = utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, isIPv6) if len(incorrectAddresses) > 0 { klog.Warning(\"NodePortAddresses of wrong family; \", incorrectAddresses) } proxier := &Proxier{ portsMap: make(map[utilproxy.LocalPort]utilproxy.Closeable), serviceMap: make(proxy.ServiceMap),"} {"_id":"q-en-kubernetes-432c0a75f6e7d161a38dbfcf4f68e850fe50967a5a48d0e55af87d31cf9f7a08","text":"fi local -r src_dir=\"${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty\" if [[ -n \"${KUBE_USER:-}\" || ! -e /etc/srv/kubernetes/abac-authz-policy.jsonl ]]; then local -r abac_policy_json=\"${src_dir}/abac-authz-policy.jsonl\" remove-salt-config-comments \"${abac_policy_json}\" if [[ -n \"${KUBE_USER:-}\" ]]; then sed -i -e \"s/{{kube_user}}/${KUBE_USER}/g\" \"${abac_policy_json}\" else sed -i -e \"/{{kube_user}}/d\" \"${abac_policy_json}\" fi cp \"${abac_policy_json}\" /etc/srv/kubernetes/ fi src_file=\"${src_dir}/kube-apiserver.manifest\" remove-salt-config-comments \"${src_file}\" # Evaluate variables."} {"_id":"q-en-kubernetes-4365c17191a3c7ecdd591d6f31381287d325ba7bb250098bfc31aaae9f234e9c","text":"SecurityOpt: fmtSecurityOpts, } // There is no /etc/resolv.conf in Windows, DNS and DNSSearch options would have to be passed to Docker runtime instead if runtime.GOOS == \"windows\" { hc.DNS = opts.DNS hc.DNSSearch = opts.DNSSearch } updateHostConfig(hc) // Set sysctls if requested if container.Name == PodInfraContainerName {"} {"_id":"q-en-kubernetes-43982a424ea568c0b87027b7d272023ab41597a46694a24ad0c151d6969376d8","text":"} _, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip) if errors.IsNotFound(err) { framework.Skipf(\"podpresets requires k8s.io/api/settings/v1alpha1 to be enabled\") } Expect(err).NotTo(HaveOccurred()) By(\"creating the pod\")"} {"_id":"q-en-kubernetes-43af45089f138c9db67a2362f9bd3a4e0653566412cffa1d4494bec5d87a6f7b","text":"t.Fatalf(\"AddPod failed. Expected: Actual: <%v>\", podAddErr) } time.Sleep(1000 * time.Millisecond) // Volume is added to asw, volume should be reported as attached to the node. waitForVolumeAddedToNode(t, generatedVolumeName, nodeName1, asw) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) // Delete the pod, but detach will fail dsw.DeletePod(types.UniquePodName(podName1), generatedVolumeName, nodeName1)"} {"_id":"q-en-kubernetes-43c17ca74868e539b32412b651870fff9923317e54743d6ffa6c76a4a78d905b","text":"exit 2 fi /opt/bin/etcdctl mk /coreos.com/network/config \"{\"Network\":\"${FLANNEL_NET}\", \"Backend\": {\"Type\": \"vxlan\"}}\" /opt/bin/etcdctl mk /coreos.com/network/config \"{\"Network\":\"${FLANNEL_NET}\", \"Backend\": {\"Type\": \"vxlan\"}${FLANNEL_OTHER_NET_CONFIG}}\" attempt=$((attempt+1)) sleep 3 fi"} {"_id":"q-en-kubernetes-443fab67406de499a6f3c4177a74faa92e30fb5df2dbf2c7b8cd01b97434db26","text":"rm -rf \"${LOCAL_OUTPUT_BINPATH}\" mkdir -p \"${LOCAL_OUTPUT_BINPATH}\" # Remove the container if it is left over from some previous aborted run \"${DOCKER[@]}\" rm -f -v \"${KUBE_BUILD_CONTAINER_NAME}\" >/dev/null 2>&1 || true kube::build::destroy_container \"${KUBE_BUILD_CONTAINER_NAME}\" \"${docker_cmd[@]}\" bash -c \"cp -r ${REMOTE_OUTPUT_BINPATH} /tmp/bin;touch /tmp/finished;rm /tmp/bin/test_for_remote;/bin/sleep 600\" > /dev/null 2>&1 # Wait until binaries have finished coppying"} {"_id":"q-en-kubernetes-44501edfe14669dd5a3ff9d73f09f0e9dc7324dd60e64c728fb909f254b55707","text":"w.initialValue = results.Unknown } podName := getPodLabelName(w.pod) basicMetricLabels := metrics.Labels{ \"probe_type\": w.probeType.String(), \"container\": w.container.Name, \"pod\": podName, \"pod\": w.pod.Name, \"namespace\": w.pod.Namespace, \"pod_uid\": string(w.pod.UID), }"} {"_id":"q-en-kubernetes-445e51478527d5b68801334d99e9c8d568c7597734c740313eaaca5af311038c","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package util import ( \"fmt\" \"reflect\" \"sync\" \"time\" federation_api \"k8s.io/kubernetes/federation/apis/federation/v1beta1\" federation_release_1_4 \"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4\" api \"k8s.io/kubernetes/pkg/api\" api_v1 \"k8s.io/kubernetes/pkg/api/v1\" \"k8s.io/kubernetes/pkg/client/cache\" \"k8s.io/kubernetes/pkg/client/restclient\" \"k8s.io/kubernetes/pkg/controller/framework\" pkg_runtime \"k8s.io/kubernetes/pkg/runtime\" \"k8s.io/kubernetes/pkg/watch\" \"github.com/golang/glog\" ) const ( clusterSyncPeriod = 10 * time.Minute userAgentName = \"federation-service-controller\" ) // FederatedReadOnlyStore is an overlay over multiple stores created in federated clusters. type FederatedReadOnlyStore interface { // Returns all items in the store. List() ([]interface{}, error) // GetByKey returns the item stored under the given key in the specified cluster (if exist). GetByKey(clusterName string, key string) (interface{}, bool, error) // Returns the items stored under the given key in all clusters. GetFromAllClusters(key string) ([]interface{}, error) // Checks whether stores for all clusters form the lists (and only these) are there and // are synced. This is only a basic check whether the data inside of the store is usable. // It is not a full synchronization/locking mechanism it only tries to ensure that out-of-sync // issues occur less often.\tAll users of the interface should assume // that there may be significant delays in content updates of all kinds and write their // code that it doesn't break if something is slightly out-of-sync. ClustersSynced(clusters []*federation_api.Cluster) bool } // An interface to access federation members and clients. type FederationView interface { // GetClientsetForCluster returns a clientset for the cluster, if present. GetClientsetForCluster(clusterName string) (federation_release_1_4.Interface, error) // GetReadyClusers returns all clusters for which the sub-informers are run. GetReadyClusters() ([]*federation_api.Cluster, error) // GetReadyCluster returns the cluster with the given name, if found. GetReadyCluster(name string) (*federation_api.Cluster, bool, error) // ClustersSynced returns true if the view is synced (for the first time). ClustersSynced() bool } // A structure that combines an informer running agains federated api server and listening for cluster updates // with multiple Kubernetes API informers (called target informers) running against federation members. Whenever a new // cluster is added to the federation an informer is created for it using TargetInformerFactory. Infomrers are stoped // when a cluster is either put offline of deleted. It is assumed that some controller keeps an eye on the cluster list // and thus the clusters in ETCD are up to date. type FederatedInformer interface { FederationView // Returns a store created over all stores from target informers. GetTargetStore() FederatedReadOnlyStore // Starts all the processes. Start() // Stops all the processes inside the informer. Stop() } // A function that should be used to create an informer on the target object. Store should use // framework.DeletionHandlingMetaNamespaceKeyFunc as a keying function. type TargetInformerFactory func(*federation_api.Cluster, federation_release_1_4.Interface) (cache.Store, framework.ControllerInterface) // Builds a FederatedInformer for the given federation client and factory. func NewFederatedInformer(federationClient federation_release_1_4.Interface, targetInformerFactory TargetInformerFactory) FederatedInformer { federatedInformer := &federatedInformerImpl{ targetInformerFactory: targetInformerFactory, clientFactory: func(cluster *federation_api.Cluster) (federation_release_1_4.Interface, error) { clusterConfig, err := BuildClusterConfig(cluster) if err != nil && clusterConfig != nil { clientset := federation_release_1_4.NewForConfigOrDie(restclient.AddUserAgent(clusterConfig, userAgentName)) return clientset, nil } return nil, err }, targetInformers: make(map[string]informer), } federatedInformer.clusterInformer.store, federatedInformer.clusterInformer.controller = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { return federationClient.Federation().Clusters().List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { return federationClient.Federation().Clusters().Watch(options) }, }, &federation_api.Cluster{}, clusterSyncPeriod, framework.ResourceEventHandlerFuncs{ DeleteFunc: func(old interface{}) { oldCluster, ok := old.(*federation_api.Cluster) if ok { federatedInformer.deleteCluster(oldCluster) } }, AddFunc: func(cur interface{}) { curCluster, ok := cur.(*federation_api.Cluster) if ok && isClusterReady(curCluster) { federatedInformer.addCluster(curCluster) } }, UpdateFunc: func(old, cur interface{}) { oldCluster, ok := old.(*federation_api.Cluster) if !ok { return } curCluster, ok := cur.(*federation_api.Cluster) if !ok { return } if isClusterReady(oldCluster) != isClusterReady(curCluster) || !reflect.DeepEqual(oldCluster.Spec, curCluster.Spec) { federatedInformer.deleteCluster(oldCluster) if isClusterReady(curCluster) { federatedInformer.addCluster(curCluster) } } }, }, ) return federatedInformer } func isClusterReady(cluster *federation_api.Cluster) bool { for _, condition := range cluster.Status.Conditions { if condition.Type == federation_api.ClusterReady { if condition.Status == api_v1.ConditionTrue { return true } } } return false } type informer struct { controller framework.ControllerInterface store cache.Store stopChan chan struct{} } type federatedInformerImpl struct { sync.Mutex // Informer on federated clusters. clusterInformer informer // Target informers factory targetInformerFactory TargetInformerFactory // Structures returned by targetInformerFactory targetInformers map[string]informer // A function to build clients. clientFactory func(*federation_api.Cluster) (federation_release_1_4.Interface, error) } type federatedStoreImpl struct { federatedInformer *federatedInformerImpl } func (f *federatedInformerImpl) Stop() { f.Lock() defer f.Unlock() close(f.clusterInformer.stopChan) for _, informer := range f.targetInformers { close(informer.stopChan) } } func (f *federatedInformerImpl) Start() { f.Lock() defer f.Unlock() f.clusterInformer.stopChan = make(chan struct{}) go f.clusterInformer.controller.Run(f.clusterInformer.stopChan) } // GetClientsetForCluster returns a clientset for the cluster, if present. func (f *federatedInformerImpl) GetClientsetForCluster(clusterName string) (federation_release_1_4.Interface, error) { f.Lock() defer f.Unlock() return f.getClientsetForClusterUnlocked(clusterName) } func (f *federatedInformerImpl) getClientsetForClusterUnlocked(clusterName string) (federation_release_1_4.Interface, error) { // No locking needed. Will happen in f.GetCluster. if cluster, found, err := f.getReadyClusterUnlocked(clusterName); found && err == nil { return f.clientFactory(cluster) } else { if err != nil { return nil, err } } return nil, fmt.Errorf(\"cluster %s not found\", clusterName) } // GetReadyClusers returns all clusters for which the sub-informers are run. func (f *federatedInformerImpl) GetReadyClusters() ([]*federation_api.Cluster, error) { f.Lock() defer f.Unlock() items := f.clusterInformer.store.List() result := make([]*federation_api.Cluster, 0, len(items)) for _, item := range items { if cluster, ok := item.(*federation_api.Cluster); ok { if isClusterReady(cluster) { result = append(result, cluster) } } else { return nil, fmt.Errorf(\"wrong data in FederatedInformerImpl cluster store: %v\", item) } } return result, nil } // GetCluster returns the cluster with the given name, if found. func (f *federatedInformerImpl) GetReadyCluster(name string) (*federation_api.Cluster, bool, error) { f.Lock() defer f.Unlock() return f.getReadyClusterUnlocked(name) } func (f *federatedInformerImpl) getReadyClusterUnlocked(name string) (*federation_api.Cluster, bool, error) { if obj, exist, err := f.clusterInformer.store.GetByKey(name); exist && err == nil { if cluster, ok := obj.(*federation_api.Cluster); ok { if isClusterReady(cluster) { return cluster, true, nil } return nil, false, nil } return nil, false, fmt.Errorf(\"wrong data in FederatedInformerImpl cluster store: %v\", obj) } else { return nil, false, err } } // Synced returns true if the view is synced (for the first time) func (f *federatedInformerImpl) ClustersSynced() bool { f.Lock() defer f.Unlock() return f.clusterInformer.controller.HasSynced() } // Adds the given cluster to federated informer. func (f *federatedInformerImpl) addCluster(cluster *federation_api.Cluster) { f.Lock() defer f.Unlock() name := cluster.Name if client, err := f.getClientsetForClusterUnlocked(name); err == nil { store, controller := f.targetInformerFactory(cluster, client) targetInformer := informer{ controller: controller, store: store, stopChan: make(chan struct{}), } f.targetInformers[name] = targetInformer go targetInformer.controller.Run(targetInformer.stopChan) } else { // TODO: create also an event for cluster. glog.Errorf(\"Failed to create a client for cluster: %v\", err) } } // Removes the cluster from federated informer. func (f *federatedInformerImpl) deleteCluster(cluster *federation_api.Cluster) { f.Lock() defer f.Unlock() name := cluster.Name if targetInformer, found := f.targetInformers[name]; found { close(targetInformer.stopChan) } delete(f.targetInformers, name) } // Returns a store created over all stores from target informers. func (f *federatedInformerImpl) GetTargetStore() FederatedReadOnlyStore { return &federatedStoreImpl{ federatedInformer: f, } } // Returns all items in the store. func (fs *federatedStoreImpl) List() ([]interface{}, error) { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() result := make([]interface{}, 0) for _, targetInformer := range fs.federatedInformer.targetInformers { values := targetInformer.store.List() result = append(result, values...) } return result, nil } // GetByKey returns the item stored under the given key in the specified cluster (if exist). func (fs *federatedStoreImpl) GetByKey(clusterName string, key string) (interface{}, bool, error) { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() if targetInformer, found := fs.federatedInformer.targetInformers[clusterName]; found { return targetInformer.store.GetByKey(key) } return nil, false, nil } // Returns the items stored under the given key in all clusters. func (fs *federatedStoreImpl) GetFromAllClusters(key string) ([]interface{}, error) { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() result := make([]interface{}, 0) for _, targetInformer := range fs.federatedInformer.targetInformers { value, exist, err := targetInformer.store.GetByKey(key) if err != nil { return nil, err } if exist { result = append(result, value) } } return result, nil } // GetKey for returns the key under which the item would be put in the store. func (fs *federatedStoreImpl) GetKeyFor(item interface{}) string { // TODO: support other keying functions. key, _ := framework.DeletionHandlingMetaNamespaceKeyFunc(item) return key } // Checks whether stores for all clusters form the lists (and only these) are there and // are synced. func (fs *federatedStoreImpl) ClustersSynced(clusters []*federation_api.Cluster) bool { fs.federatedInformer.Lock() defer fs.federatedInformer.Unlock() if len(fs.federatedInformer.targetInformers) != len(clusters) { return false } for _, cluster := range clusters { if targetInformer, found := fs.federatedInformer.targetInformers[cluster.Name]; found { if !targetInformer.controller.HasSynced() { return false } } else { return false } } return true } "} {"_id":"q-en-kubernetes-446c0fe158a7ca6d4ebe84bb45be7b738d139e3cf5ad857da2ed3f68f90812c3","text":"sched.Recorder.Eventf(victim, preemptor, v1.EventTypeNormal, \"Preempted\", \"Preempting\", \"Preempted by %v/%v on node %v\", preemptor.Namespace, preemptor.Name, nodeName) } metrics.PreemptionVictims.Set(float64(len(victims))) metrics.PreemptionVictims.Observe(float64(len(victims))) } // Clearing nominated pods should happen outside of \"if node != nil\". Node could // be nil when a pod with nominated node name is eligible to preempt again,"} {"_id":"q-en-kubernetes-44879f612cdaf178b47b8d050f3bbf4b82d09541306148f9e2f988025ac4946b","text":"var ( // Master nodes are not added to standard load balancer by default. defaultExcludeMasterFromStandardLB = true // Outbound SNAT is enabled by default. defaultDisableOutboundSNAT = false ) // Config holds the configuration parsed from the --cloud-config flag"} {"_id":"q-en-kubernetes-44c8aec4c0b8c7f4c9ff5ed7d539a9636d76eb5dac1fae22515374cbebca981e","text":"a.cachedCreds = newCreds // Only close all connections when TLS cert rotates. Token rotation doesn't // need the extra noise. if a.onRotate != nil && oldCreds != nil && !reflect.DeepEqual(oldCreds.cert, a.cachedCreds.cert) { a.onRotate() if len(a.onRotateList) > 0 && oldCreds != nil && !reflect.DeepEqual(oldCreds.cert, a.cachedCreds.cert) { for _, onRotate := range a.onRotateList { onRotate() } } return nil }"} {"_id":"q-en-kubernetes-44de75c645c5d57298b260dba70f1f718a2560af341f79fe2123148d2aa2826b","text":"releaseHugepages() ginkgo.By(\"restarting kubelet to pick up pre-allocated hugepages\") restartKubelet() // stop the kubelet and wait until the server will restart it automatically stopKubelet() waitForHugepages() })"} {"_id":"q-en-kubernetes-451d67bcc3324e916a66e933c8d69271c7db65dfa489895c99f7a0154d400d1f","text":"containers: - name: fluentd-cloud-logging image: gcr.io/google_containers/fluentd-gcp:1.6 resources: limits: cpu: 100m env: - name: \"FLUENTD_ARGS\" value: \"-qq\""} {"_id":"q-en-kubernetes-451fa37ea404b80e0bf92aee191a3634d5c3c6e295608abe452b0fc6a80341aa","text":"// Determine if this is tagged as an Internal ELB internalELB := false internalAnnotation := apiService.Annotations[ServiceAnnotationLoadBalancerInternal] if internalAnnotation != \"\" { if internalAnnotation == \"false\" { internalELB = false } else if internalAnnotation != \"\" { internalELB = true }"} {"_id":"q-en-kubernetes-4523f688787ea72a5eee2a31a0921a8a91901ec4be3d23639647dc18b5f3c47c","text":"for i, test := range tests { test.namespace.ObjectMeta.ResourceVersion = \"1\" test.oldNamespace.ObjectMeta.ResourceVersion = \"1\" errs := ValidateNamespaceStatusUpdate(&test.oldNamespace, &test.namespace) errs := ValidateNamespaceStatusUpdate(&test.namespace, &test.oldNamespace) if test.valid && len(errs) > 0 { t.Errorf(\"%d: Unexpected error: %v\", i, errs) t.Logf(\"%#v vs %#v\", test.oldNamespace.ObjectMeta, test.namespace.ObjectMeta)"} {"_id":"q-en-kubernetes-452a706cf53cc356105437790e5016c3d926759c016b802b4f1ebe760dd770f7","text":"} func TestValidateSubpathMutuallyExclusive(t *testing.T) { // Enable feature VolumeSubpathEnvExpansion and VolumeSubpath defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeSubpathEnvExpansion, true)() // Enable feature VolumeSubpath defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeSubpath, true)() volumes := []core.Volume{"} {"_id":"q-en-kubernetes-4537d9c45a7981997bc10fbbda6bb417f3b13aa96c271bd900f6aedf4e760de5","text":"- user: root - name: /opt/cni - makedirs: True - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-09214926.tar.gz - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-42c4cb842dad606a84e93aad5a4484ded48e3046.tar.gz - tar_options: v - source_hash: md5=58f8631f912dd88be6a0920775db7274 - source_hash: md5=8cee1d59f01a27e8c2c10c120dce1e7d - archive_format: tar - if_missing: /opt/cni/bin"} {"_id":"q-en-kubernetes-453caf9feac845ae8179d4b780f5a16e12cbdb06e00f027a0fdc6dffbee0d07e","text":"\"//staging/src/k8s.io/client-go/util/testing:go_default_library\", \"//staging/src/k8s.io/component-base/featuregate/testing:go_default_library\", \"//staging/src/k8s.io/component-base/version:go_default_library\", \"//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library\", \"//vendor/github.com/google/cadvisor/info/v1:go_default_library\", \"//vendor/github.com/google/cadvisor/info/v2:go_default_library\", \"//vendor/github.com/stretchr/testify/assert:go_default_library\", \"//vendor/github.com/stretchr/testify/require:go_default_library\", \"//vendor/k8s.io/utils/mount:go_default_library\", ], ] + select({ \"@io_bazel_rules_go//go/platform:android\": [ \"//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library\", ], \"@io_bazel_rules_go//go/platform:linux\": [ \"//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library\", ], \"//conditions:default\": [], }), ) filegroup("} {"_id":"q-en-kubernetes-456a16074a6c99cc150d1712641207dd4f0a8ec3ca42a22759d5d84b914a9862","text":"} return nil, err } if !matchImageTagOrSHA(resp, image) { return nil, imageNotFoundError{ID: image} } return &resp, nil }"} {"_id":"q-en-kubernetes-45e0c7c96f7394099091ed1419384fd4fa4965594676cd10bc95d57159b40412","text":"github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v1.1.4 h1:nRCz/8sKg6K6jgYAFLDlXzPeITBZJyX28DBVhWD+5dg= github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0="} {"_id":"q-en-kubernetes-45ea7bb63b96eb792aed228dc7a8fcfc088731a6d0f5d925deee37756e48c689","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package plugin import ( \"testing\" \"github.com/stretchr/testify/assert\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" ) func getFakeNode() (*v1.Node, error) { return &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: \"worker\"}}, nil } func TestRegistrationHandler_ValidatePlugin(t *testing.T) { newRegistrationHandler := func() *RegistrationHandler { return NewRegistrationHandler(nil, getFakeNode) } for _, test := range []struct { description string handler func() *RegistrationHandler pluginName string endpoint string versions []string shouldError bool }{ { description: \"no versions provided\", handler: newRegistrationHandler, shouldError: true, }, { description: \"unsupported version\", handler: newRegistrationHandler, versions: []string{\"v2.0.0\"}, shouldError: true, }, { description: \"plugin already registered with a higher supported version\", handler: func() *RegistrationHandler { handler := newRegistrationHandler() if err := handler.RegisterPlugin(\"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\", \"\", []string{\"v1.1.0\"}, nil); err != nil { t.Fatal(err) } return handler }, pluginName: \"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\", versions: []string{\"v1.0.0\"}, shouldError: true, }, { description: \"should validate the plugin\", handler: newRegistrationHandler, pluginName: \"this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide\", versions: []string{\"v1.3.0\"}, }, } { t.Run(test.description, func(t *testing.T) { handler := test.handler() err := handler.ValidatePlugin(test.pluginName, test.endpoint, test.versions) if test.shouldError { assert.Error(t, err) } else { assert.NoError(t, err) } }) } t.Cleanup(func() { handler := newRegistrationHandler() handler.DeRegisterPlugin(\"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\") handler.DeRegisterPlugin(\"this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide\") }) } "} {"_id":"q-en-kubernetes-4610f2bcc7deee901873b72e4b9130164edff2d1668e47b9431900f1766f2229","text":"var map_EndpointPort = map[string]string{ \"\": \"EndpointPort represents a Port used by an EndpointSlice\", \"name\": \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass IANA_SVC_NAME validation: * must be no more than 15 characters long * may contain only [-a-z0-9] * must contain at least one letter [a-z] * it must not start or end with a hyphen, nor contain adjacent hyphens Default is empty string.\", \"name\": \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.\", \"protocol\": \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\", \"port\": \"The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.\", }"} {"_id":"q-en-kubernetes-464b259299165091540610265ff439082d84d420b9f59d18f0f7aaa8ea4c793a","text":"\"github.com/GoogleCloudPlatform/kubernetes/pkg/admission\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache\" )"} {"_id":"q-en-kubernetes-46531a8b9f1e7cd4a4761ed0ba9d1fa5eed0f1ce9f09610badd3e1306d46950e","text":"- name: config mountPath: /etc/config nodeSelector: # TODO(liggitt): switch to node.kubernetes.io/masq-agent-ds-ready in 1.16 beta.kubernetes.io/masq-agent-ds-ready: \"true\" node.kubernetes.io/masq-agent-ds-ready: \"true\" volumes: - name: config configMap:"} {"_id":"q-en-kubernetes-467ae2f0ab912393343d7b4a25440ec5a0a27e59cd385f71df7550f45b04c431","text":"// and updating Scale for any resource which implements the `scale` subresource, // as long as that subresource operates on a version of scale convertable to // autoscaling.Scale. package scale package scale // import \"k8s.io/client-go/scale\" "} {"_id":"q-en-kubernetes-469d90a0027521be7f34c93b119d7a460cfc9ca845b80a3804fd3868551580ae","text":"Reject = \"REJECT\" ToDest = \"--to-destination \" Recent = \"recent \" MatchSet = \"--match-set \" ) type Rule map[string]string"} {"_id":"q-en-kubernetes-46d2bbe914d072ff19e5d81852edb74c0d59c57395a0341b2efc8260620aef19","text":" apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: static-ip"} {"_id":"q-en-kubernetes-46ecec888e764ba7285f1a33472c67d42956f8075484b8836deee95064ac9e09","text":" linux/amd64=alpine:3.12 linux/arm=arm32v6/alpine:3.12 linux/arm64=arm64v8/alpine:3.12 linux/ppc64le=ppc64le/alpine:3.12 linux/s390x=s390x/alpine:3.12 linux/amd64=alpine:3.16 linux/arm=arm32v6/alpine:3.16 linux/arm64=arm64v8/alpine:3.16 linux/ppc64le=ppc64le/alpine:3.16 linux/s390x=s390x/alpine:3.16 windows/amd64/1809=REGISTRY/busybox:1.29-2-windows-amd64-1809 windows/amd64/ltsc2022=REGISTRY/busybox:1.29-2-windows-amd64-ltsc2022"} {"_id":"q-en-kubernetes-47465fe8816417c02c40a19dfb97d753521676e0f20d2b2d300b96d801c88151","text":"updateMeta(&podMeta, \"Pod\") setMeta := set.TypeMeta updateMeta(&setMeta, \"StatefulSet\") policy := set.Spec.PersistentVolumeClaimRetentionPolicy policy := getPersistentVolumeClaimRetentionPolicy(set) const retain = apps.RetainPersistentVolumeClaimRetentionPolicyType const delete = apps.DeletePersistentVolumeClaimRetentionPolicyType switch {"} {"_id":"q-en-kubernetes-477c894487d373c542d8bbc366b0a7a3fb7f8615872bc06e8eae0f633a4cb2b0","text":"if len(obj.Type) == 0 { obj.Nullable = false // because this does not roundtrip through go-openapi } if obj.XIntOrString { obj.Type = \"\" } }, func(obj *apiextensions.JSONSchemaPropsOrBool, c fuzz.Continue) { if c.RandBool() {"} {"_id":"q-en-kubernetes-477c91e87749c6d80f210a863a937cc2c67ee9ac1232fd8d09500a1b429b2c34","text":"client := http.Client{} request, err := http.NewRequest(\"PATCH\", server.URL+\"/api/version/namespaces/default/simple/\"+ID, bytes.NewReader([]byte(`{\"labels\":{\"foo\":\"bar\"}}`))) request.Header.Set(\"Content-Type\", \"application/merge-patch+json\") request.Header.Set(\"Content-Type\", \"application/merge-patch+json; charset=UTF-8\") _, err = client.Do(request) if err != nil { t.Errorf(\"unexpected error: %v\", err)"} {"_id":"q-en-kubernetes-47816e978d0f7a1210155e6c8fe2156e69154e3acd5af2ceabe7070204db1e54","text":"\"tagline\" : \"You Know, for Search\" } ``` Visiting the URL `http://104.154.91.224:5601` should show the Kibana viewer for the logging information stored in the Elasticsearch service running at `http://104.154.81.135:9200`. Visiting the URL `https://130.211.122.180/api/v1beta3/proxy/namespaces/default/services/kibana-logging` should show the Kibana viewer for the logging information stored in the Elasticsearch service. "} {"_id":"q-en-kubernetes-47c3bc2a552279fa00e4128901f7a007ad23a711a3912876544480accc195d94","text":"} // Uses the same niceness level as cadvisor.fs does when running du // Uses -B 1 to always scale to a blocksize of 1 byte out, err := exec.Command(\"nice\", \"-n\", \"19\", \"du\", \"-s\", \"-B\", \"1\", path).CombinedOutput() out, err := exec.Command(\"nice\", \"-n\", \"19\", \"du\", \"-x\", \"-s\", \"-B\", \"1\", path).CombinedOutput() if err != nil { return nil, fmt.Errorf(\"failed command 'du' ($ nice -n 19 du -s -B 1) on path %s with error %v\", path, err) return nil, fmt.Errorf(\"failed command 'du' ($ nice -n 19 du -x -s -B 1) on path %s with error %v\", path, err) } used, err := resource.ParseQuantity(strings.Fields(string(out))[0]) if err != nil {"} {"_id":"q-en-kubernetes-47dcfb3757aa65b051f15714fc56d6732970a3bc443353dca07e34c79d5cf4be","text":"} } if test.disableAttach { gomega.Expect(err).To(gomega.HaveOccurred(), \"Unexpected VolumeAttachment found\") framework.ExpectError(err, \"Unexpected VolumeAttachment found\") } })"} {"_id":"q-en-kubernetes-47f887701195853bf8279d0146553b968de4c554bf44107091f82af6c5941375","text":"action MUST be validated. release: v1.21 file: test/e2e/network/service.go - testname: Service, deletes a collection of services codename: '[sig-network] Services should delete a collection of services [Conformance]' description: Create three services with the required labels and ports. It MUST locate three services in the test namespace. It MUST succeed at deleting a collection of services via a label selector. It MUST locate only one service after deleting the service collection. release: v1.23 file: test/e2e/network/service.go - testname: Find Kubernetes Service in default Namespace codename: '[sig-network] Services should find a service from listing all namespaces [Conformance]'"} {"_id":"q-en-kubernetes-47fc2bf1e4bcb566ff14c641abb7d8cbddc44a94368bc5a8a2e27f7723aac476","text":"allErrs = append(allErrs, metavalidation.ValidateLabels(endpoint.Topology, topologyPath)...) if endpoint.Hostname != nil { for _, msg := range validation.IsDNS1123Label(*endpoint.Hostname) { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"hostname\"), *endpoint.Hostname, msg)) } allErrs = append(allErrs, apivalidation.ValidateDNS1123Label(*endpoint.Hostname, idxPath.Child(\"hostname\"))...) } }"} {"_id":"q-en-kubernetes-480c578a70c385c4a31aa3b2f03cea53c276fbcba22e13088f675d78dfeae4f3","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. // source: k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto // DO NOT EDIT! /* Package v1alpha1 is a generated protocol buffer package. It is generated from these files: k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto It has these top-level messages: PetSet PetSetList PetSetSpec PetSetStatus */ package v1alpha1 import proto \"github.com/gogo/protobuf/proto\" import fmt \"fmt\" import math \"math\" import _ \"github.com/gogo/protobuf/gogoproto\" import _ \"k8s.io/kubernetes/pkg/api/resource\" import k8s_io_kubernetes_pkg_api_unversioned \"k8s.io/kubernetes/pkg/api/unversioned\" import k8s_io_kubernetes_pkg_api_v1 \"k8s.io/kubernetes/pkg/api/v1\" import _ \"k8s.io/kubernetes/pkg/util/intstr\" import io \"io\" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf func (m *PetSet) Reset() { *m = PetSet{} } func (m *PetSet) String() string { return proto.CompactTextString(m) } func (*PetSet) ProtoMessage() {} func (m *PetSetList) Reset() { *m = PetSetList{} } func (m *PetSetList) String() string { return proto.CompactTextString(m) } func (*PetSetList) ProtoMessage() {} func (m *PetSetSpec) Reset() { *m = PetSetSpec{} } func (m *PetSetSpec) String() string { return proto.CompactTextString(m) } func (*PetSetSpec) ProtoMessage() {} func (m *PetSetStatus) Reset() { *m = PetSetStatus{} } func (m *PetSetStatus) String() string { return proto.CompactTextString(m) } func (*PetSetStatus) ProtoMessage() {} func init() { proto.RegisterType((*PetSet)(nil), \"k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet\") proto.RegisterType((*PetSetList)(nil), \"k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetList\") proto.RegisterType((*PetSetSpec)(nil), \"k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetSpec\") proto.RegisterType((*PetSetStatus)(nil), \"k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetStatus\") } func (m *PetSet) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *PetSet) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) n1, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n1 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) n2, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n2 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) n3, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *PetSetList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *PetSetList) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) n4, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n4 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *PetSetSpec) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *PetSetSpec) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Replicas != nil { data[i] = 0x8 i++ i = encodeVarintGenerated(data, i, uint64(*m.Replicas)) } if m.Selector != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) n5, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } i += n5 } data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) n6, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } i += n6 if len(m.VolumeClaimTemplates) > 0 { for _, msg := range m.VolumeClaimTemplates { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) if err != nil { return 0, err } i += n } } data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.ServiceName))) i += copy(data[i:], m.ServiceName) return i, nil } func (m *PetSetStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *PetSetStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.ObservedGeneration != nil { data[i] = 0x8 i++ i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) } data[i] = 0x10 i++ i = encodeVarintGenerated(data, i, uint64(m.Replicas)) return i, nil } func encodeFixed64Generated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) data[offset+2] = uint8(v >> 16) data[offset+3] = uint8(v >> 24) data[offset+4] = uint8(v >> 32) data[offset+5] = uint8(v >> 40) data[offset+6] = uint8(v >> 48) data[offset+7] = uint8(v >> 56) return offset + 8 } func encodeFixed32Generated(data []byte, offset int, v uint32) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) data[offset+2] = uint8(v >> 16) data[offset+3] = uint8(v >> 24) return offset + 4 } func encodeVarintGenerated(data []byte, offset int, v uint64) int { for v >= 1<<7 { data[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } data[offset] = uint8(v) return offset + 1 } func (m *PetSet) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *PetSetList) Size() (n int) { var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *PetSetSpec) Size() (n int) { var l int _ = l if m.Replicas != nil { n += 1 + sovGenerated(uint64(*m.Replicas)) } if m.Selector != nil { l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } l = m.Template.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.VolumeClaimTemplates) > 0 { for _, e := range m.VolumeClaimTemplates { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } l = len(m.ServiceName) n += 1 + l + sovGenerated(uint64(l)) return n } func (m *PetSetStatus) Size() (n int) { var l int _ = l if m.ObservedGeneration != nil { n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) } n += 1 + sovGenerated(uint64(m.Replicas)) return n } func sovGenerated(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *PetSet) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf(\"proto: PetSet: wiretype end group for non-group\") } if fieldNum <= 0 { return fmt.Errorf(\"proto: PetSet: illegal tag %d (wire type %d)\", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field ObjectMeta\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field Spec\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field Status\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PetSetList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf(\"proto: PetSetList: wiretype end group for non-group\") } if fieldNum <= 0 { return fmt.Errorf(\"proto: PetSetList: illegal tag %d (wire type %d)\", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field ListMeta\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field Items\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, PetSet{}) if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PetSetSpec) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf(\"proto: PetSetSpec: wiretype end group for non-group\") } if fieldNum <= 0 { return fmt.Errorf(\"proto: PetSetSpec: illegal tag %d (wire type %d)\", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf(\"proto: wrong wireType = %d for field Replicas\", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } m.Replicas = &v case 2: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field Selector\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Selector == nil { m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field Template\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field VolumeClaimTemplates\", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{}) if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf(\"proto: wrong wireType = %d for field ServiceName\", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ServiceName = string(data[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PetSetStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf(\"proto: PetSetStatus: wiretype end group for non-group\") } if fieldNum <= 0 { return fmt.Errorf(\"proto: PetSetStatus: illegal tag %d (wire type %d)\", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf(\"proto: wrong wireType = %d for field ObservedGeneration\", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.ObservedGeneration = &v case 2: if wireType != 0 { return fmt.Errorf(\"proto: wrong wireType = %d for field Replicas\", wireType) } m.Replicas = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ m.Replicas |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipGenerated(data []byte) (n int, err error) { l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if data[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthGenerated } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipGenerated(data[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf(\"proto: illegal wireType %d\", wireType) } } panic(\"unreachable\") } var ( ErrInvalidLengthGenerated = fmt.Errorf(\"proto: negative length found during unmarshaling\") ErrIntOverflowGenerated = fmt.Errorf(\"proto: integer overflow\") ) "} {"_id":"q-en-kubernetes-481435c46332b5e397cca8a6a5f8a32d80a676ca11f145e355483d3592de146f","text":"} // inClusterClientConfig makes a config that will work from within a kubernetes cluster container environment. type inClusterClientConfig struct{} // Can take options overrides for flags explicitly provided to the command inside the cluster container. type inClusterClientConfig struct { overrides *ConfigOverrides inClusterConfigProvider func() (*restclient.Config, error) } var _ ClientConfig = inClusterClientConfig{} var _ ClientConfig = &inClusterClientConfig{} func (inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { func (config *inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { return clientcmdapi.Config{}, fmt.Errorf(\"inCluster environment config doesn't support multiple clusters\") } func (inClusterClientConfig) ClientConfig() (*restclient.Config, error) { return restclient.InClusterConfig() func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error) { if config.inClusterConfigProvider == nil { config.inClusterConfigProvider = restclient.InClusterConfig } icc, err := config.inClusterConfigProvider() if err != nil { return nil, err } // in-cluster configs only takes a host, token, or CA file // if any of them were individually provided, ovewrite anything else if config.overrides != nil { if server := config.overrides.ClusterInfo.Server; len(server) > 0 { icc.Host = server } if token := config.overrides.AuthInfo.Token; len(token) > 0 { icc.BearerToken = token } if certificateAuthorityFile := config.overrides.ClusterInfo.CertificateAuthority; len(certificateAuthorityFile) > 0 { icc.TLSClientConfig.CAFile = certificateAuthorityFile } } return icc, err } func (inClusterClientConfig) Namespace() (string, bool, error) { func (config *inClusterClientConfig) Namespace() (string, bool, error) { // This way assumes you've set the POD_NAMESPACE environment variable using the downward API. // This check has to be done first for backwards compatibility with the way InClusterConfig was originally set up if ns := os.Getenv(\"POD_NAMESPACE\"); ns != \"\" {"} {"_id":"q-en-kubernetes-481dd13ca4bb817a7f290f4ebe9308ab33df1a922b93c5a3384a239b9382fd14","text":"\"The same PVC should be used after failover.\") By(\"verifying the container output has 2 lines, indicating the pod has been created twice using the same regional PD.\") pod = getPod(c, ns, regionalPDLabels) logs, err := framework.GetPodLogs(c, ns, pod.Name, \"\") Expect(err).NotTo(HaveOccurred(), \"Error getting logs from pod %s in namespace %s\", pod.Name, ns)"} {"_id":"q-en-kubernetes-48325ec8ae577dc508542ea0245f810885ec945d7172bd12a2cc78ebdd05489d","text":"package plugin import ( \"context\" \"fmt\" \"net\" \"os\" \"path/filepath\" \"sync\" \"testing\" \"github.com/stretchr/testify/assert\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"google.golang.org/grpc\" drapb \"k8s.io/kubelet/pkg/apis/dra/v1alpha4\" \"k8s.io/kubernetes/test/utils/ktesting\" ) func getFakeNode() (*v1.Node, error) { return &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: \"worker\"}}, nil const ( v1alpha4Version = \"v1alpha4\" ) type fakeV1alpha4GRPCServer struct { drapb.UnimplementedNodeServer } var _ drapb.NodeServer = &fakeV1alpha4GRPCServer{} func (f *fakeV1alpha4GRPCServer) NodePrepareResources(ctx context.Context, in *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { return &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{\"claim-uid\": { Devices: []*drapb.Device{ { RequestNames: []string{\"test-request\"}, CDIDeviceIDs: []string{\"test-cdi-id\"}, }, }, }}}, nil } func (f *fakeV1alpha4GRPCServer) NodeUnprepareResources(ctx context.Context, in *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { return &drapb.NodeUnprepareResourcesResponse{}, nil } type tearDown func() func setupFakeGRPCServer(version string) (string, tearDown, error) { p, err := os.MkdirTemp(\"\", \"dra_plugin\") if err != nil { return \"\", nil, err } closeCh := make(chan struct{}) addr := filepath.Join(p, \"server.sock\") teardown := func() { close(closeCh) if err := os.RemoveAll(addr); err != nil { panic(err) } } listener, err := net.Listen(\"unix\", addr) if err != nil { teardown() return \"\", nil, err } s := grpc.NewServer() switch version { case v1alpha4Version: fakeGRPCServer := &fakeV1alpha4GRPCServer{} drapb.RegisterNodeServer(s, fakeGRPCServer) default: return \"\", nil, fmt.Errorf(\"unsupported version: %s\", version) } go func() { go func() { if err := s.Serve(listener); err != nil { panic(err) } }() <-closeCh s.GracefulStop() }() return addr, teardown, nil } func TestRegistrationHandler_ValidatePlugin(t *testing.T) { newRegistrationHandler := func() *RegistrationHandler { return NewRegistrationHandler(nil, getFakeNode) func TestGRPCConnIsReused(t *testing.T) { tCtx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(v1alpha4Version) if err != nil { t.Fatal(err) } defer teardown() reusedConns := make(map[*grpc.ClientConn]int) wg := sync.WaitGroup{} m := sync.Mutex{} p := &Plugin{ backgroundCtx: tCtx, endpoint: addr, clientCallTimeout: defaultClientCallTimeout, } conn, err := p.getOrCreateGRPCConn() defer func() { err := conn.Close() if err != nil { t.Error(err) } }() if err != nil { t.Fatal(err) } // ensure the plugin we are using is registered draPlugins.add(\"dummy-plugin\", p) defer draPlugins.delete(\"dummy-plugin\") // we call `NodePrepareResource` 2 times and check whether a new connection is created or the same is reused for i := 0; i < 2; i++ { wg.Add(1) go func() { defer wg.Done() client, err := NewDRAPluginClient(\"dummy-plugin\") if err != nil { t.Error(err) return } req := &drapb.NodePrepareResourcesRequest{ Claims: []*drapb.Claim{ { Namespace: \"dummy-namespace\", UID: \"dummy-uid\", Name: \"dummy-claim\", }, }, } _, err = client.NodePrepareResources(tCtx, req) assert.NoError(t, err) client.mutex.Lock() conn := client.conn client.mutex.Unlock() m.Lock() defer m.Unlock() reusedConns[conn]++ }() } wg.Wait() // We should have only one entry otherwise it means another gRPC connection has been created if len(reusedConns) != 1 { t.Errorf(\"expected length to be 1 but got %d\", len(reusedConns)) } if counter, ok := reusedConns[conn]; ok && counter != 2 { t.Errorf(\"expected counter to be 2 but got %d\", counter) } } func TestNewDRAPluginClient(t *testing.T) { for _, test := range []struct { description string handler func() *RegistrationHandler setup func(string) tearDown pluginName string endpoint string versions []string shouldError bool }{ { description: \"no versions provided\", handler: newRegistrationHandler, description: \"plugin name is empty\", setup: func(_ string) tearDown { return func() {} }, pluginName: \"\", shouldError: true, }, { description: \"unsupported version\", handler: newRegistrationHandler, versions: []string{\"v2.0.0\"}, description: \"plugin name not found in the list\", setup: func(_ string) tearDown { return func() {} }, pluginName: \"plugin-name-not-found-in-the-list\", shouldError: true, }, { description: \"plugin already registered with a higher supported version\", handler: func() *RegistrationHandler { handler := newRegistrationHandler() if err := handler.RegisterPlugin(\"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\", \"\", []string{\"v1.1.0\"}, nil); err != nil { t.Fatal(err) description: \"plugin exists\", setup: func(name string) tearDown { draPlugins.add(name, &Plugin{}) return func() { draPlugins.delete(name) } return handler }, pluginName: \"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\", versions: []string{\"v1.0.0\"}, shouldError: true, }, { description: \"should validate the plugin\", handler: newRegistrationHandler, pluginName: \"this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide\", versions: []string{\"v1.3.0\"}, pluginName: \"dummy-plugin\", }, } { t.Run(test.description, func(t *testing.T) { handler := test.handler() err := handler.ValidatePlugin(test.pluginName, test.endpoint, test.versions) teardown := test.setup(test.pluginName) defer teardown() client, err := NewDRAPluginClient(test.pluginName) if test.shouldError { assert.Nil(t, client) assert.Error(t, err) } else { assert.NotNil(t, client) assert.Nil(t, err) } }) } } t.Cleanup(func() { handler := newRegistrationHandler() handler.DeRegisterPlugin(\"this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide\") handler.DeRegisterPlugin(\"this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide\") }) func TestNodeUnprepareResources(t *testing.T) { for _, test := range []struct { description string serverSetup func(string) (string, tearDown, error) serverVersion string request *drapb.NodeUnprepareResourcesRequest }{ { description: \"server supports v1alpha4\", serverSetup: setupFakeGRPCServer, serverVersion: v1alpha4Version, request: &drapb.NodeUnprepareResourcesRequest{}, }, } { t.Run(test.description, func(t *testing.T) { tCtx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(test.serverVersion) if err != nil { t.Fatal(err) } defer teardown() p := &Plugin{ backgroundCtx: tCtx, endpoint: addr, clientCallTimeout: defaultClientCallTimeout, } conn, err := p.getOrCreateGRPCConn() defer func() { err := conn.Close() if err != nil { t.Error(err) } }() if err != nil { t.Fatal(err) } draPlugins.add(\"dummy-plugin\", p) defer draPlugins.delete(\"dummy-plugin\") client, err := NewDRAPluginClient(\"dummy-plugin\") if err != nil { t.Fatal(err) } _, err = client.NodeUnprepareResources(tCtx, test.request) if err != nil { t.Fatal(err) } }) } }"} {"_id":"q-en-kubernetes-486babcaf81b450d59cc38b2c4da21387eeeb0112c1aee4c999e5ed564dbf14f","text":"} } func TestNominatedNodeCleanUpUponNodeDeletion(t *testing.T) { // Initialize scheduler. testCtx := initTest(t, \"preemption\") defer testutils.CleanupTest(t, testCtx) cs := testCtx.ClientSet defer cleanupPodsInNamespace(cs, t, testCtx.NS.Name) // Create a node with some resources and a label. nodeRes := &v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(32, resource.DecimalSI), v1.ResourceCPU: *resource.NewMilliQuantity(100, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(100, resource.DecimalSI), } nodeNames := []string{\"node1\", \"node2\"} for _, nodeName := range nodeNames { _, err := createNode(testCtx.ClientSet, nodeName, nodeRes) if err != nil { t.Fatalf(\"Error creating nodes: %v\", err) } } // Fill the cluster with one high-priority and one low-priority Pod. highPriPod, err := createPausePod(cs, mkPriorityPodWithGrace(testCtx, \"high-pod\", highPriority, 60)) if err != nil { t.Fatalf(\"Error creating high-priority pod: %v\", err) } // Make sure the pod is scheduled. if err := testutils.WaitForPodToSchedule(cs, highPriPod); err != nil { t.Fatalf(\"Pod %v/%v didn't get scheduled: %v\", highPriPod.Namespace, highPriPod.Name, err) } lowPriPod, err := createPausePod(cs, mkPriorityPodWithGrace(testCtx, \"low-pod\", lowPriority, 60)) if err != nil { t.Fatalf(\"Error creating low-priority pod: %v\", err) } // Make sure the pod is scheduled. if err := testutils.WaitForPodToSchedule(cs, lowPriPod); err != nil { t.Fatalf(\"Pod %v/%v didn't get scheduled: %v\", lowPriPod.Namespace, lowPriPod.Name, err) } // Create a medium-priority Pod. medPriPod, err := createPausePod(cs, mkPriorityPodWithGrace(testCtx, \"med-pod\", mediumPriority, 60)) if err != nil { t.Fatalf(\"Error creating med-priority pod: %v\", err) } // Check its nominatedNodeName field is set properly. if err := waitForNominatedNodeName(cs, medPriPod); err != nil { t.Fatalf(\"NominatedNodeName was not set for pod %v/%v: %v\", medPriPod.Namespace, medPriPod.Name, err) } // Get the live version of low and med pods. lowPriPod, _ = getPod(cs, lowPriPod.Name, lowPriPod.Namespace) medPriPod, _ = getPod(cs, medPriPod.Name, medPriPod.Namespace) want, got := lowPriPod.Spec.NodeName, medPriPod.Status.NominatedNodeName if want != got { t.Fatalf(\"Expect med-priority's nominatedNodeName to be %v, but got %v.\", want, got) } // Delete the node where med-priority pod is nominated to. cs.CoreV1().Nodes().Delete(context.TODO(), got, metav1.DeleteOptions{}) if err := wait.Poll(200*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { _, err := cs.CoreV1().Nodes().Get(context.TODO(), got, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return true, nil } return false, err }); err != nil { t.Fatalf(\"Node %v cannot be deleted: %v.\", got, err) } // Finally verify if med-priority pod's nominatedNodeName gets cleared. if err := wait.Poll(200*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { pod, err := cs.CoreV1().Pods(medPriPod.Namespace).Get(context.TODO(), medPriPod.Name, metav1.GetOptions{}) if err != nil { t.Errorf(\"Error getting the medium priority pod info: %v\", err) } if len(pod.Status.NominatedNodeName) == 0 { return true, nil } return false, err }); err != nil { t.Errorf(\"The nominated node name of the medium priority pod was not cleared: %v\", err) } } func mkMinAvailablePDB(name, namespace string, uid types.UID, minAvailable int, matchLabels map[string]string) *policy.PodDisruptionBudget { intMinAvailable := intstr.FromInt(minAvailable) return &policy.PodDisruptionBudget{"} {"_id":"q-en-kubernetes-487bc7d30e8f8baa5234339c32a9bf770f8822ae94317766a41cb7c5739e9831","text":"// +optional optional string imagePullPolicy = 14; // Security options the pod should run with. // SecurityContext defines the security options the container should be run with. // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ // +optional optional SecurityContext securityContext = 15;"} {"_id":"q-en-kubernetes-48a353894265358f5dd25b1305911e3a8800bf102bd9b690eae3ba9dd32ad7e6","text":"} if (opts.Watch || forceWatch) && rw != nil { glog.Infof(\"Started to log from %v for %v\", ctx, req.Request.URL.RequestURI()) watcher, err := rw.Watch(ctx, &opts) if err != nil { scope.err(err, res.ResponseWriter, req.Request)"} {"_id":"q-en-kubernetes-48b410a4d56ebd58e8754fa9f9f8ad3641b19643d9e079afa47f89446f70f057","text":"trap cleanup EXIT while true; do read x; done while true; do sleep 1; done "} {"_id":"q-en-kubernetes-48ff853ff38139a948e4ce6bd92a1d9a92d2e96177bef66efecf123b143a29f5","text":"in.Spec.InitContainers = values // Call defaulters explicitly until annotations are removed for i := range in.Spec.InitContainers { c := &in.Spec.InitContainers[i] SetDefaults_Container(c) tmpPodTemp := &PodTemplate{ Template: PodTemplateSpec{ Spec: PodSpec{ HostNetwork: in.Spec.HostNetwork, InitContainers: values, }, }, } SetObjectDefaults_PodTemplate(tmpPodTemp) in.Spec.InitContainers = tmpPodTemp.Template.Spec.InitContainers } if err := autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in, out, s); err != nil {"} {"_id":"q-en-kubernetes-4902a0e694d5ac9b03649ee98bea84195ff7dd47de9766daf6c3dbda26c4ef73","text":"exit 1 fi if [ ${#errors_expect_error[@]} -ne 0 ]; then { echo \"Errors:\" for err in \"${errors_expect_error[@]}\"; do echo \"$err\" done echo echo 'The above files need to use framework.ExpectError(err) instead of ' echo 'Expect(err).To(HaveOccurred()) or gomega.Expect(err).To(gomega.HaveOccurred())' echo } >&2 exit 1 fi echo 'Congratulations! All e2e test source files are valid.'"} {"_id":"q-en-kubernetes-490b2a0aea7e3c7ba6317eb7b709ce163197e1fcf0523c80bab869eddfb1050f","text":"} } _, err = client.CoreV1().Pods(\"default\").Create(reinvocationMarkerFixture) if err != nil { t.Fatal(err) } for i, tt := range testCases { t.Run(tt.name, func(t *testing.T) { upCh := recorder.Reset() ns := fmt.Sprintf(\"reinvoke-%d\", i) _, err = client.CoreV1().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) testCaseID := strconv.Itoa(i) ns := \"reinvoke-\" + testCaseID nsLabels := map[string]string{\"test-case\": testCaseID} _, err = client.CoreV1().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns, Labels: nsLabels}}) if err != nil { t.Fatal(err) } // Write markers to a separate namespace to avoid cross-talk markerNs := ns + \"-markers\" markerNsLabels := map[string]string{\"test-markers\": testCaseID} _, err = client.CoreV1().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: markerNs, Labels: markerNsLabels}}) if err != nil { t.Fatal(err) } // Create a maker object to use to check for the webhook configurations to be ready. marker, err := client.CoreV1().Pods(markerNs).Create(newReinvocationMarkerFixture(markerNs)) if err != nil { t.Fatal(err) } fail := admissionv1beta1.Fail webhooks := []admissionv1beta1.MutatingWebhook{} for j, webhook := range tt.webhooks { name := fmt.Sprintf(\"admission.integration.test.%d.%s\", j, strings.TrimPrefix(webhook.path, \"/\")) fail := admissionv1beta1.Fail endpoint := webhookServer.URL + webhook.path name := fmt.Sprintf(\"admission.integration.test.%d.%s\", j, strings.TrimPrefix(webhook.path, \"/\")) webhooks = append(webhooks, admissionv1beta1.MutatingWebhook{ Name: name, ClientConfig: admissionv1beta1.WebhookClientConfig{"} {"_id":"q-en-kubernetes-4915f8d77f840d5d1257e808ad509fcb9e370fbf029f72802bc8f3415e716c16","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package service import ( \"context\" \"net\" \"time\" \"google.golang.org/grpc\" \"k8s.io/klog/v2\" kmsapi \"k8s.io/kms/apis/v2alpha1\" ) // GRPCService is a gprc server that runs the kms v2 alpha 1 API. type GRPCService struct { addr string timeout time.Duration server *grpc.Server kmsService Service } var _ kmsapi.KeyManagementServiceServer = (*GRPCService)(nil) // NewGRPCService creates an instance of GRPCService. func NewGRPCService( address string, timeout time.Duration, kmsService Service, ) *GRPCService { klog.V(4).InfoS(\"KMS plugin configured\", \"address\", address, \"timeout\", timeout) return &GRPCService{ addr: address, timeout: timeout, kmsService: kmsService, } } // ListenAndServe accepts incoming connections on a Unix socket. It is a blocking method. // Returns non-nil error unless Close or Shutdown is called. func (s *GRPCService) ListenAndServe() error { ln, err := net.Listen(\"unix\", s.addr) if err != nil { return err } defer ln.Close() gs := grpc.NewServer( grpc.ConnectionTimeout(s.timeout), ) s.server = gs kmsapi.RegisterKeyManagementServiceServer(gs, s) klog.V(4).InfoS(\"kms plugin serving\", \"address\", s.addr) return gs.Serve(ln) } // Shutdown performs a grafecul shutdown. Doesn't accept new connections and // blocks until all pending RPCs are finished. func (s *GRPCService) Shutdown() { klog.V(4).InfoS(\"kms plugin shutdown\", \"address\", s.addr) if s.server != nil { s.server.GracefulStop() } } // Close stops the server by closing all connections immediately and cancels // all active RPCs. func (s *GRPCService) Close() { klog.V(4).InfoS(\"kms plugin close\", \"address\", s.addr) if s.server != nil { s.server.Stop() } } // Status sends a status request to specified kms service. func (s *GRPCService) Status(ctx context.Context, _ *kmsapi.StatusRequest) (*kmsapi.StatusResponse, error) { res, err := s.kmsService.Status(ctx) if err != nil { return nil, err } return &kmsapi.StatusResponse{ Version: res.Version, Healthz: res.Healthz, KeyId: res.KeyID, }, nil } // Decrypt sends a decryption request to specified kms service. func (s *GRPCService) Decrypt(ctx context.Context, req *kmsapi.DecryptRequest) (*kmsapi.DecryptResponse, error) { klog.V(4).InfoS(\"decrypt request received\", \"id\", req.Uid) plaintext, err := s.kmsService.Decrypt(ctx, req.Uid, &DecryptRequest{ Ciphertext: req.Ciphertext, KeyID: req.KeyId, Annotations: req.Annotations, }) if err != nil { return nil, err } return &kmsapi.DecryptResponse{ Plaintext: plaintext, }, nil } // Encrypt sends an encryption request to specified kms service. func (s *GRPCService) Encrypt(ctx context.Context, req *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error) { klog.V(4).InfoS(\"encrypt request received\", \"id\", req.Uid) encRes, err := s.kmsService.Encrypt(ctx, req.Uid, req.Plaintext) if err != nil { return nil, err } return &kmsapi.EncryptResponse{ Ciphertext: encRes.Ciphertext, KeyId: encRes.KeyID, Annotations: encRes.Annotations, }, nil } "} {"_id":"q-en-kubernetes-4947fed7c4a0646e80b5991a859d07a759d92c7b2c97eb6e03789dbd6327da67","text":"set -o pipefail set -o xtrace retry() { for i in {1..5}; do \"$@\" && return 0 || sleep $i done \"$@\" } # Runs the unit and integration tests, producing JUnit-style XML test # reports in ${WORKSPACE}/artifacts. This script is intended to be run from # kubekins-test container with a kubernetes repo mapped in. See"} {"_id":"q-en-kubernetes-496cc39dcd83d99cb83e098fb559257edc7b870a65c27986e4fe95758c6e3f72","text":"q := NewPriorityQueue(nil) q.Add(&medPriorityPod) // Add a couple of pods to the unschedulableQ. q.unschedulableQ.addOrUpdate(&unschedulablePod) q.unschedulableQ.addOrUpdate(affinityPod) addOrUpdateUnschedulablePod(q, &unschedulablePod) addOrUpdateUnschedulablePod(q, affinityPod) // Simulate addition of an assigned pod. The pod has matching labels for // affinityPod. So, affinityPod should go to activeQ. q.AssignedPodAdded(&labelPod) if q.unschedulableQ.get(affinityPod) != nil { if getUnschedulablePod(q, affinityPod) != nil { t.Error(\"affinityPod is still in the unschedulableQ.\") } if _, exists, _ := q.activeQ.Get(affinityPod); !exists { t.Error(\"affinityPod is not moved to activeQ.\") } // Check that the other pod is still in the unschedulableQ. if q.unschedulableQ.get(&unschedulablePod) == nil { if getUnschedulablePod(q, &unschedulablePod) == nil { t.Error(\"unschedulablePod is not in the unschedulableQ.\") } }"} {"_id":"q-en-kubernetes-496de095dbd61aa881f139a35f827f2da0498d7976df91c2980017c1f56b8754","text":"defer ws.Close() buf := &bytes.Buffer{} for { var msg []byte if err := websocket.Message.Receive(ws, &msg); err != nil { if err == io.EOF { break Eventually(func() error { for { var msg []byte if err := websocket.Message.Receive(ws, &msg); err != nil { if err == io.EOF { break } framework.Failf(\"Failed to read completely from websocket %s: %v\", url.String(), err) } framework.Failf(\"Failed to read completely from websocket %s: %v\", url.String(), err) if len(msg) == 0 { continue } if msg[0] != 1 { framework.Failf(\"Got message from server that didn't start with channel 1 (STDOUT): %v\", msg) } buf.Write(msg[1:]) } if len(msg) == 0 { continue if buf.Len() == 0 { return fmt.Errorf(\"Unexpected output from server\") } if msg[0] != 1 { framework.Failf(\"Got message from server that didn't start with channel 1 (STDOUT): %v\", msg) if !strings.Contains(buf.String(), \"nameserver\") { return fmt.Errorf(\"Expected to find 'nameserver' in %q\", buf.String()) } buf.Write(msg[1:]) } if buf.Len() == 0 { framework.Failf(\"Unexpected output from server\") } if !strings.Contains(buf.String(), \"nameserver\") { framework.Failf(\"Expected to find 'nameserver' in %q\", buf.String()) } return nil }, time.Minute, 10*time.Second).Should(BeNil()) }) It(\"should support retrieving logs from the container over websockets\", func() {"} {"_id":"q-en-kubernetes-497aff69f23cfaa988115918b22aef0580c22dfbb472ebc4fcce62793b185ae0","text":"FindBoundSatsified: false, }, eventReason: \"FailedScheduling\", expectError: makePredicateError(\"1 VolumeNodeAffinityConflict\"), expectError: makePredicateError(\"1 node(s) had volume node affinity conflict\"), }, \"unbound,no-matches\": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{"} {"_id":"q-en-kubernetes-497c5b0a982d73a133eee69da91338d5b39eb6d717be0d3598b7423638bbd4f4","text":"ginkgo.By(fmt.Sprintf(\"SSH'ing to %d nodes and running %s\", len(testhosts), testCase.cmd)) for _, host := range testhosts { ginkgo.By(fmt.Sprintf(\"SSH'ing host %s\", host)) result, err := e2essh.SSH(testCase.cmd, host, framework.TestContext.Provider) stdout, stderr := strings.TrimSpace(result.Stdout), strings.TrimSpace(result.Stderr) if err != testCase.expectedError {"} {"_id":"q-en-kubernetes-497e42d5cee95380a996a1edf0c64cd9e79fa77f0e3dde52f91874b1b203d73e","text":" apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: pre-shared-cert"} {"_id":"q-en-kubernetes-497eaace1e80105629b4df313bb48300a519f943ad476b33c965fe0906a44b21","text":"import ( \"fmt\" \"strings\" \"testing\" )"} {"_id":"q-en-kubernetes-49ac6e2a8d890b23d5b546431f225c35995e5a6452fe78a76f10a0729c7c9561","text":"ginkgo.Context(\"when gracefully shutting down with Pod priority\", func() { const ( pollInterval = 1 * time.Second podStatusUpdateTimeout = 10 * time.Second pollInterval = 1 * time.Second podStatusUpdateTimeout = 10 * time.Second priorityClassesCreateTimeout = 10 * time.Second ) var ("} {"_id":"q-en-kubernetes-49ff8936875095178ec4f1ec9edeffc4308821d5f8b341173fa5243d29bf0104","text":"// for the iSCSI connection. dirs2, err := io.ReadDir(sessionPath) if err != nil { return nil, err klog.Infof(\"Failed to process session %s, assuming this session is unavailable: %s\", sessionName, err) continue } for _, dir2 := range dirs2 { // Skip over files that aren't the connection"} {"_id":"q-en-kubernetes-4a0e748b6268c8cdac8821e5dddcb61664f3dda7afc5cb4898bd6c6e2e93b899","text":"return nil } // hasServedCRDVersion returns true if the given version is in the list of CRD's versions and the Served flag is set. func hasServedCRDVersion(spec *apiextensions.CustomResourceDefinitionSpec, version string) bool { for _, v := range spec.Versions { if v.Name == version { return v.Served } } return false } "} {"_id":"q-en-kubernetes-4a2854d89abd7f7d1b9520e2f4bd93925dcfd2bdd18b2d1b571c37a3d3a6d9e8","text":"\"time\" utilnet \"k8s.io/apimachinery/pkg/util/net\" utilrand \"k8s.io/apimachinery/pkg/util/rand\" \"k8s.io/client-go/tools/cache\""} {"_id":"q-en-kubernetes-4a444828d4ad7e3c53833db101c272cf288652b2d6d32c50d2e4f4d3bf1f538f","text":"// MinionList is a list of minions. type MinionList struct { JSONBase `json:\",inline\" yaml:\",inline\"` Items []Minion `json:\"minions,omitempty\" yaml:\"minions,omitempty\"` Items []Minion `json:\"items,omitempty\" yaml:\"items,omitempty\"` } // Binding is written by a scheduler to cause a pod to be bound to a host."} {"_id":"q-en-kubernetes-4a463cc9ace21224e50a746e19e16b06fa6d6577f395c0e3f196e0019985b947","text":"} func IsMirrorPod(pod *api.Pod) bool { if value, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey]; !ok { return false } else { return value == kubetypes.MirrorType } _, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey] return ok } func getHashFromMirrorPod(pod *api.Pod) (string, bool) { hash, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey] return hash, ok } func getPodHash(pod *api.Pod) string { // The annotation exists for all static pods. return pod.Annotations[kubetypes.ConfigHashAnnotationKey] }"} {"_id":"q-en-kubernetes-4aabeea88085eabb28ec0e920cb515888b245de7eb3973ad8ab11b3622fda32d","text":"tester(unconfined) }) By(\"Running a CAP_SYS_ADMIN pod\", func() { By(\"Running a SYS_ADMIN pod\", func() { sysadmin := restrictedPod(f, \"sysadmin\") sysadmin.Spec.Containers[0].SecurityContext.Capabilities = &v1.Capabilities{ Add: []v1.Capability{\"CAP_SYS_ADMIN\"}, Add: []v1.Capability{\"SYS_ADMIN\"}, } sysadmin.Spec.Containers[0].SecurityContext.AllowPrivilegeEscalation = nil tester(sysadmin)"} {"_id":"q-en-kubernetes-4ac1789d15c9419586df0270849f9592bfa2acb618bdad2a9dd1d909b1965f5f","text":"// General settings. fs.StringVar(&s.ContainerRuntime, \"container-runtime\", s.ContainerRuntime, \"The container runtime to use. Possible values: 'docker', 'remote'.\") fs.StringVar(&s.RuntimeCgroups, \"runtime-cgroups\", s.RuntimeCgroups, \"Optional absolute name of cgroups to create and run the runtime in.\") _ = fs.Bool(\"redirect-container-streaming\", false, \"[REMOVED]\") // TODO: Delete in v1.22 fs.MarkDeprecated(\"redirect-container-streaming\", \"Container streaming redirection has been removed from the kubelet as of v1.20, and this flag will be removed in v1.22. For more details, see http://git.k8s.io/enhancements/keps/sig-node/20191205-container-streaming-requests.md\") // Docker-specific settings. fs.StringVar(&s.DockershimRootDirectory, \"experimental-dockershim-root-directory\", s.DockershimRootDirectory, \"Path to the dockershim root directory.\")"} {"_id":"q-en-kubernetes-4ac4e34c87528e1ca8b8b357633248223dfb4817110ad07d736f87c33a24b028","text":"concurrencyLimit: 6, evalDuration: time.Second * 20, expectedFair: []bool{true}, expectedFairnessMargin: []float64{0.15}, expectedFairnessMargin: []float64{0.155}, expectAllRequests: true, evalInqueueMetrics: true, evalExecutingMetrics: true,"} {"_id":"q-en-kubernetes-4ae791cacef4332c0d3c2eb861ba88852692666561204eacb1a96b711857d3c7","text":"return hist.GetSampleSum() / float64(hist.GetSampleCount()) } // Clear clears all fields of the wrapped histogram func (hist *Histogram) Clear() { if hist.SampleCount != nil { *hist.SampleCount = 0 } if hist.SampleSum != nil { *hist.SampleSum = 0 } for _, b := range hist.Bucket { if b.CumulativeCount != nil { *b.CumulativeCount = 0 } } } // Validate makes sure the wrapped histogram has all necessary fields set and with valid values. func (hist *Histogram) Validate() error { if hist.SampleCount == nil || hist.GetSampleCount() == 0 {"} {"_id":"q-en-kubernetes-4b0d00672ecbaad6257a8258690a3181bf4d24c579e619c1eb7ea698f701730e","text":" /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package runtime import ( \"testing\" \"k8s.io/apimachinery/pkg/runtime/schema\" ) func gv(group, version string) schema.GroupVersion { return schema.GroupVersion{Group: group, Version: version} } func gvk(group, version, kind string) schema.GroupVersionKind { return schema.GroupVersionKind{Group: group, Version: version, Kind: kind} } func gk(group, kind string) schema.GroupKind { return schema.GroupKind{Group: group, Kind: kind} } func TestCoercingMultiGroupVersioner(t *testing.T) { testcases := []struct { name string target schema.GroupVersion preferredKinds []schema.GroupKind kinds []schema.GroupVersionKind expectKind schema.GroupVersionKind }{ { name: \"matched preferred group/kind\", target: gv(\"mygroup\", \"__internal\"), preferredKinds: []schema.GroupKind{gk(\"mygroup\", \"Foo\"), gk(\"anothergroup\", \"Bar\")}, kinds: []schema.GroupVersionKind{gvk(\"yetanother\", \"v1\", \"Baz\"), gvk(\"anothergroup\", \"v1\", \"Bar\")}, expectKind: gvk(\"mygroup\", \"__internal\", \"Bar\"), }, { name: \"matched preferred group\", target: gv(\"mygroup\", \"__internal\"), preferredKinds: []schema.GroupKind{gk(\"mygroup\", \"\"), gk(\"anothergroup\", \"\")}, kinds: []schema.GroupVersionKind{gvk(\"yetanother\", \"v1\", \"Baz\"), gvk(\"anothergroup\", \"v1\", \"Bar\")}, expectKind: gvk(\"mygroup\", \"__internal\", \"Bar\"), }, { name: \"no preferred group/kind match, uses first kind in list\", target: gv(\"mygroup\", \"__internal\"), preferredKinds: []schema.GroupKind{gk(\"mygroup\", \"\"), gk(\"anothergroup\", \"\")}, kinds: []schema.GroupVersionKind{gvk(\"yetanother\", \"v1\", \"Baz\"), gvk(\"yetanother\", \"v1\", \"Bar\")}, expectKind: gvk(\"mygroup\", \"__internal\", \"Baz\"), }, } for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { v := NewCoercingMultiGroupVersioner(tc.target, tc.preferredKinds...) kind, ok := v.KindForGroupVersionKinds(tc.kinds) if !ok { t.Error(\"got no kind\") } if kind != tc.expectKind { t.Errorf(\"expected %#v, got %#v\", tc.expectKind, kind) } }) } } "} {"_id":"q-en-kubernetes-4b43493298e864b0538e6ba916c0e165cc63d8d3f533cc6b270f3956b1e6727b","text":" v1.8.3-3 v1.9.1-1 "} {"_id":"q-en-kubernetes-4b575b1c0df097d3d6bbe8f23323aa3c062c69815f9ca6c1e1d569975ca2c8d1","text":"configs[CheckMetadataConcealment] = Config{e2eRegistry, \"metadata-concealment\", \"1.2\"} configs[CudaVectorAdd] = Config{e2eRegistry, \"cuda-vector-add\", \"1.0\"} configs[CudaVectorAdd2] = Config{e2eRegistry, \"cuda-vector-add\", \"2.0\"} configs[DebianIptables] = Config{buildImageRegistry, \"debian-iptables\", \"buster-v1.4.0\"} configs[DebianIptables] = Config{buildImageRegistry, \"debian-iptables\", \"buster-v1.5.0\"} configs[EchoServer] = Config{e2eRegistry, \"echoserver\", \"2.2\"} configs[Etcd] = Config{gcRegistry, \"etcd\", \"3.4.13-0\"} configs[GlusterDynamicProvisioner] = Config{dockerGluster, \"glusterdynamic-provisioner\", \"v1.0\"}"} {"_id":"q-en-kubernetes-4b7e244a4f69988927b9915fb273c3f6cc12556416d4c786818fa2576f74ffb8","text":"}, }, }, { name: \"node port service with protocol sctp on a node with multiple nodeIPs\", services: []*v1.Service{ makeTestService(\"ns1\", \"svc1\", func(svc *v1.Service) { svc.Spec.Type = \"NodePort\" svc.Spec.ClusterIP = \"10.20.30.41\" svc.Spec.Ports = []v1.ServicePort{{ Name: \"p80\", Port: int32(80), Protocol: v1.ProtocolSCTP, NodePort: int32(3001), }} }), }, endpoints: []*v1.Endpoints{ makeTestEndpoints(\"ns1\", \"svc1\", func(ept *v1.Endpoints) { ept.Subsets = []v1.EndpointSubset{{ Addresses: []v1.EndpointAddress{{ IP: \"10.180.0.1\", }}, Ports: []v1.EndpointPort{{ Name: \"p80\", Port: int32(80), }}, }} }), }, nodeIPs: []net.IP{ net.ParseIP(\"100.101.102.103\"), net.ParseIP(\"100.101.102.104\"), net.ParseIP(\"100.101.102.105\"), net.ParseIP(\"2001:db8::1:1\"), net.ParseIP(\"2001:db8::1:2\"), net.ParseIP(\"2001:db8::1:3\"), }, nodePortAddresses: []string{}, expectedIPVS: &ipvstest.FakeIPVS{ Services: map[ipvstest.ServiceKey]*utilipvs.VirtualServer{ { IP: \"10.20.30.41\", Port: 80, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"10.20.30.41\"), Protocol: \"SCTP\", Port: uint16(80), Scheduler: \"rr\", }, { IP: \"100.101.102.103\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"100.101.102.103\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, { IP: \"100.101.102.104\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"100.101.102.104\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, { IP: \"100.101.102.105\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"100.101.102.105\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, { IP: \"2001:db8::1:1\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"2001:db8::1:1\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, { IP: \"2001:db8::1:2\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"2001:db8::1:2\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, { IP: \"2001:db8::1:3\", Port: 3001, Protocol: \"SCTP\", }: { Address: net.ParseIP(\"2001:db8::1:3\"), Protocol: \"SCTP\", Port: uint16(3001), Scheduler: \"rr\", }, }, Destinations: map[ipvstest.ServiceKey][]*utilipvs.RealServer{ { IP: \"10.20.30.41\", Port: 80, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"100.101.102.103\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"100.101.102.104\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"100.101.102.105\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"2001:db8::1:1\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"2001:db8::1:2\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, { IP: \"2001:db8::1:3\", Port: 3001, Protocol: \"SCTP\", }: { { Address: net.ParseIP(\"10.180.0.1\"), Port: uint16(80), Weight: 1, }, }, }, }, expectedIPSets: netlinktest.ExpectedIPSet{ kubeNodePortSetSCTP: { { IP: \"100.101.102.103\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, { IP: \"100.101.102.104\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, { IP: \"100.101.102.105\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, { IP: \"2001:db8::1:1\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, { IP: \"2001:db8::1:2\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, { IP: \"2001:db8::1:3\", Port: 3001, Protocol: strings.ToLower(string(v1.ProtocolSCTP)), SetType: utilipset.HashIPPort, }, }, }, }, } for _, test := range tests {"} {"_id":"q-en-kubernetes-4baabd3b0850d356278c598613dfd94ed7ea2eeb31a45735bb0a9d84ac12a444","text":"// The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per // RFC-6335 and http://www.iana.org/assignments/service-names). // RFC-6335 and https://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional"} {"_id":"q-en-kubernetes-4bb9d79fd048482eaecc5f7b756e34b0dbbbd4b13e8aa133619f7ccf0277763a","text":"&unversioned.APIGroup{}, &unversioned.APIResourceList{}, ) addDeepCopyFuncs(scheme) addDefaultingFuncs(scheme) addConversionFuncs(scheme) }"} {"_id":"q-en-kubernetes-4bd3c10f50921f43ea241e2b545dd52d2ab01b190e331de52244a9b23fab90db","text":"for format := range columnsFormats { formats = append(formats, format) } sort.Strings(formats) return formats }"} {"_id":"q-en-kubernetes-4c3650be7443d76937fb70b3060eb20d8426b67cac17490194f6232b9aacd28c","text":"// compute the context. Mutation is allowed. ValidatedPSPAnnotation is not taken into account. allowedPod, pspName, validationErrs, err := p.computeSecurityContext(ctx, a, pod, true, \"\") if err != nil { return admission.NewForbidden(a, err) return admission.NewForbidden(a, fmt.Errorf(\"PodSecurityPolicy: %w\", err)) } if allowedPod != nil { *pod = *allowedPod"} {"_id":"q-en-kubernetes-4cab9d7b1f7e85ed0efcefa5a7a55063ccdf0209851fbed5d9c9e4f78193719c","text":"\"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/managedfields\" \"k8s.io/apimachinery/pkg/watch\" \"k8s.io/kube-openapi/pkg/validation/spec\" \"k8s.io/utils/ptr\" )"} {"_id":"q-en-kubernetes-4caf04a555f035630d866bcf729cca71ae53363b4c3031c130f9bb22c903c863","text":"ginkgo.By(\"Ensuring resource quota status captures configMap creation\") usedResources = v1.ResourceList{} usedResources[v1.ResourceQuotas] = resource.MustParse(strconv.Itoa(c + 1)) // we expect there to be two configmaps because each namespace will receive // a ca.crt configmap by default. // ref:https://github.com/kubernetes/kubernetes/pull/68812 usedResources[v1.ResourceConfigMaps] = resource.MustParse(hardConfigMaps) err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) framework.ExpectNoError(err)"} {"_id":"q-en-kubernetes-4d1599a956709cb982487c4a6c358e45a0e62d95555c2f24b93be95262e53b59","text":"containerTopologyScope = \"container\" // podTopologyScope specifies the TopologyManagerScope per pod. podTopologyScope = \"pod\" // noneTopologyScope specifies the TopologyManagerScope when topologyPolicyName is none. noneTopologyScope = \"none\" ) type podTopologyHints map[string]map[string]TopologyHint"} {"_id":"q-en-kubernetes-4d216e62d6afe32a0d5bf39557443e64a2166d52f7319b89efb7f3fe281b50df","text":"return } for _, pod := range podList.Items { framework.Logf(\"Kubectl output:n%v\", framework.RunKubectlOrDie(\"log\", pod.Name, \"--namespace=kube-system\")) framework.Logf(\"Kubectl output:n%v\", framework.RunKubectlOrDie(\"log\", pod.Name, \"--namespace=kube-system\", \"--container=heapster\")) } }"} {"_id":"q-en-kubernetes-4d31ae772d5456b144369dbed5774abebd7f2dacd40ceb00847500c341c2207e","text":"By(fmt.Sprintf(\"Initial restart count of pod %s is %d\", podDescr.Name, initialRestartCount)) // Wait for at most 48 * 5 = 240s = 4 minutes until restartCount is incremented pass := false restarts := false for i := 0; i < 48; i++ { // Wait until restartCount is incremented. time.Sleep(5 * time.Second)"} {"_id":"q-en-kubernetes-4dc3275367e11f5562004c8b1381ddb178173ded1fb822e1dd719149efc57524","text":"old_storage_version=${test_data[4]} kube::log::status \"Verifying ${resource}/${namespace}/${name} has storage version ${old_storage_version} in etcd\" curl -s http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/registry/${resource}/${namespace}/${name} | grep ${old_storage_version} curl -s http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/${ETCD_PREFIX}/${resource}/${namespace}/${name} | grep ${old_storage_version} done killApiServer"} {"_id":"q-en-kubernetes-4df3b809265b898ae97976f38e0399d4e18a0f0972d78b011094da465d84e873","text":"func (runner *runner) connectToFirewallD() { bus, err := runner.dbus.SystemBus() if err != nil { glog.V(1).Info(\"Could not connect to D-Bus system bus: %s\", err) glog.V(1).Infof(\"Could not connect to D-Bus system bus: %s\", err) return }"} {"_id":"q-en-kubernetes-4dfef973dfe6219bf75ad9f1a597b021cc15d58029e598568afe3ee670855b3e","text":"} // validateValueValidation checks the value validation in a structural schema. func validateValueValidation(v *ValueValidation, skipAnyOf, skipFirstAllOfAnyOf bool, fldPath *field.Path) field.ErrorList { func validateValueValidation(v *ValueValidation, skipAnyOf, skipFirstAllOfAnyOf bool, lvl level, fldPath *field.Path) field.ErrorList { if v == nil { return nil }"} {"_id":"q-en-kubernetes-4e1cd949c5e171393c152470ec2391341c6eacf0b49b848a38c0401730d81015","text":"WaitForCacheSync: func() bool { return cache.WaitForCacheSync(c.StopEverything, c.scheduledPodsHasSynced) }, NextPod: func() *v1.Pod { return c.getNextPod() }, NextPod: internalqueue.MakeNextPodFunc(c.podQueue), Error: c.MakeDefaultErrorFunc(podBackoff, c.podQueue), StopEverything: c.StopEverything, VolumeBinder: c.volumeBinder,"} {"_id":"q-en-kubernetes-4e37581a88bb412847689e2a25b0a71d3199e6410e354c5a26099ab4f794177a","text":"} function dump_nodes() { local node_names local node_names=() if [[ -n \"${1:-}\" ]]; then echo \"Dumping logs for nodes provided as args to dump_nodes() function\" node_names=( \"$@\" )"} {"_id":"q-en-kubernetes-4e394ca93acd8b7476554626542bb7e0296a8dae4affef58ef29b23de8c5b06a","text":"package v1_test import ( \"encoding/json\" \"fmt\" \"reflect\" \"testing\""} {"_id":"q-en-kubernetes-4e3e33f18400c5396553d1ace3b4d355524ee5121f71770b3420f958e8a70166","text":"configs[NginxNew] = Config{list.PromoterE2eRegistry, \"nginx\", \"1.15-2\"} configs[NodePerfNpbEp] = Config{list.PromoterE2eRegistry, \"node-perf/npb-ep\", \"1.2\"} configs[NodePerfNpbIs] = Config{list.PromoterE2eRegistry, \"node-perf/npb-is\", \"1.2\"} configs[NodePerfTfWideDeep] = Config{list.PromoterE2eRegistry, \"node-perf/tf-wide-deep\", \"1.2\"} configs[NodePerfTfWideDeep] = Config{list.PromoterE2eRegistry, \"node-perf/tf-wide-deep\", \"1.3\"} configs[Nonewprivs] = Config{list.PromoterE2eRegistry, \"nonewprivs\", \"1.3\"} configs[NonRoot] = Config{list.PromoterE2eRegistry, \"nonroot\", \"1.2\"} // Pause - when these values are updated, also update cmd/kubelet/app/options/container_runtime.go"} {"_id":"q-en-kubernetes-4e68d2e05ed579fd7e99b7a33cc8c5f8ba10d3db6e26a1b3b2a27ccee7b54d7c","text":"} if inline := cmdutil.GetFlagString(cmd, \"overrides\"); len(inline) > 0 { object, err = cmdutil.Merge(scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...), object, inline) codec := runtime.NewCodec(scheme.DefaultJSONEncoder(), scheme.Codecs.UniversalDecoder(scheme.Scheme.PrioritizedVersionsAllGroups()...)) object, err = cmdutil.Merge(codec, object, inline) if err != nil { return err }"} {"_id":"q-en-kubernetes-4e7aa4a381e9aea985e13e10c9c967008a0103029737fd980eec6c1087541eb8","text":"\"strings\" \"time\" \"encoding/json\" appsv1 \"k8s.io/api/apps/v1\" \"k8s.io/api/core/v1\" storage \"k8s.io/api/storage/v1\" \"k8s.io/apimachinery/pkg/api/resource\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/strategicpatch\" \"k8s.io/apimachinery/pkg/util/wait\" clientset \"k8s.io/client-go/kubernetes\" podutil \"k8s.io/kubernetes/pkg/api/v1/pod\" \"k8s.io/kubernetes/pkg/kubelet/apis\" kubeletapis \"k8s.io/kubernetes/pkg/kubelet/apis\" \"k8s.io/kubernetes/pkg/volume/util\" \"k8s.io/kubernetes/test/e2e/framework\" \"k8s.io/kubernetes/test/e2e/framework/providers/gce\" \"k8s.io/kubernetes/test/e2e/storage/testsuites\" \"k8s.io/kubernetes/test/e2e/storage/utils\" imageutils \"k8s.io/kubernetes/test/utils/image\""} {"_id":"q-en-kubernetes-4e7abfdb19bc742161d38b85d4d0d8db14b6218dbe5c58e9bae83d6982b47fbc","text":"return c.restConfig, nil } func (c *fakeAuthenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) { atomic.AddInt32(c.cachedCount, 1) return c.restConfig, nil } func newMatchEverythingRules() []registrationv1beta1.RuleWithOperations { return []registrationv1beta1.RuleWithOperations{{ Operations: []registrationv1beta1.OperationType{registrationv1beta1.OperationAll},"} {"_id":"q-en-kubernetes-4ea54e43772aa981ad20d5ec14b1717f37413a2e433650ff81af05f047a4d7d5","text":"// Create a security group for the load balancer sgName := \"k8s-elb-\" + loadBalancerName sgDescription := fmt.Sprintf(\"Security group for Kubernetes ELB %s (%v)\", loadBalancerName, serviceName) securityGroupID, err = c.ensureSecurityGroup(sgName, sgDescription) securityGroupID, err = c.ensureSecurityGroup(sgName, sgDescription, getLoadBalancerAdditionalTags(annotations)) if err != nil { glog.Errorf(\"Error creating load balancer security group: %q\", err) return nil, err"} {"_id":"q-en-kubernetes-4eb396044987b94a7b28c5f918235203ab16001b053e86c8decaa054b5dba729","text":"// NewKubeRegistry creates a new vanilla Registry without any Collectors // pre-registered. func NewKubeRegistry() KubeRegistry { r := newKubeRegistry(version.Get()) r := newKubeRegistry(BuildVersion()) return r }"} {"_id":"q-en-kubernetes-4ece8f981e5016b56c8530fac3e36d475b39549461d5e8eccc6410ab89efdef0","text":"// Returns true if and only if changes were made // The security group must already exist func (c *Cloud) setSecurityGroupIngress(securityGroupID string, permissions IPPermissionSet) (bool, error) { // We do not want to make changes to the Global defined SG if securityGroupID == c.cfg.Global.ElbSecurityGroup { return false, nil } group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warningf(\"Error retrieving security group %q\", err)"} {"_id":"q-en-kubernetes-4f066e1ef1219d8400b200e9240cc51649f113dc853472d51a8c46601b646fba","text":"// Next, we compare the current list of endpoints with the list of master IP keys formatCorrect, ipCorrect, portsCorrect := checkEndpointSubsetFormatWithLease(e, masterIPs, endpointPorts, reconcilePorts) if formatCorrect && ipCorrect && portsCorrect { return nil return r.epAdapter.EnsureEndpointSliceFromEndpoints(corev1.NamespaceDefault, e) } if !formatCorrect {"} {"_id":"q-en-kubernetes-4f39664e31dc941bfda4ef0dd8c5f6ce5080304f058e8696b18463730cba6a5f","text":"local stack_skip=\"${3:-0}\" stack_skip=$((stack_skip + 1)) # Always print the error message, regardless of KUBE_VERBOSE value kube::log::error \"${message}\" # Additional debug information printed if KUBE_VERBOSE is 4 or greater if [[ ${KUBE_VERBOSE} -ge 4 ]]; then local source_file=${BASH_SOURCE[${stack_skip}]} local source_line=${BASH_LINENO[$((stack_skip - 1))]}"} {"_id":"q-en-kubernetes-4f5d687e97f3b47522ecf5dc690ce728d640e80ca1c3f5c70ca301cce6269c7f","text":"if err != nil { return nil, err } // Fall back to ARM API if the address is empty string. // TODO: this is a workaround because IMDS is not stable enough. // It should be removed after IMDS fixing the issue. if strings.TrimSpace(ipAddress.PrivateIP) == \"\" { return addressGetter(name) } // Use ip address got from instance metadata. addresses := []v1.NodeAddress{ {Type: v1.NodeInternalIP, Address: ipAddress.PrivateIP}, {Type: v1.NodeHostName, Address: string(name)},"} {"_id":"q-en-kubernetes-4f81abdda706697f31a515b10e565e4ed4e2cd3390a01dc9d46256a93ad68aeb","text":"// ValidateServiceStatusUpdate tests if required fields in the Service are set when updating status. func ValidateServiceStatusUpdate(service, oldService *core.Service) field.ErrorList { allErrs := ValidateObjectMetaUpdate(&service.ObjectMeta, &oldService.ObjectMeta, field.NewPath(\"metadata\")) allErrs = append(allErrs, ValidateLoadBalancerStatus(&service.Status.LoadBalancer, field.NewPath(\"status\", \"loadBalancer\"))...) allErrs = append(allErrs, ValidateLoadBalancerStatus(&service.Status.LoadBalancer, field.NewPath(\"status\", \"loadBalancer\"), &service.Spec)...) return allErrs }"} {"_id":"q-en-kubernetes-4f8c80e3666911d4c74f13bc3b5e8460ab02e03c2f2d91ecc8dfabca5d7e4ecb","text":"testKubelet := newTestKubelet(t) kl := testKubelet.kubelet kl.nodeLister = testNodeLister{nodes: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: \"testnode\", Labels: map[string]string{\"key\": \"B\"}}}, {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{\"key\": \"B\"}}}, }} testKubelet.fakeCadvisor.On(\"MachineInfo\").Return(&cadvisorApi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On(\"DockerImagesFsInfo\").Return(cadvisorApiv2.FsInfo{}, nil)"} {"_id":"q-en-kubernetes-4fab3e8522035e75ffe554d48485ba54c9e39052ce127d23763041f94663e9bb","text":"} } func TestMinionRESTWithHealthCheck(t *testing.T) { minionRegistry := registrytest.NewMinionRegistry([]string{}, api.NodeResources{}) minionHealthRegistry := HealthyRegistry{ delegate: minionRegistry, client: ¬Minion{minion: \"m1\"}, } ms := NewREST(&minionHealthRegistry) ctx := api.NewContext() c, err := ms.Create(ctx, &api.Minion{ObjectMeta: api.ObjectMeta{Name: \"m1\"}}) if err != nil { t.Errorf(\"insert failed\") } result := <-c if m, ok := result.Object.(*api.Minion); !ok || m.Name != \"m1\" { t.Errorf(\"insert return value was weird: %#v\", result) } if _, err := ms.Get(ctx, \"m1\"); err == nil { t.Errorf(\"node is unhealthy, expect no result from apiserver\") } } func contains(nodes *api.MinionList, nodeID string) bool { for _, node := range nodes.Items { if node.Name == nodeID {"} {"_id":"q-en-kubernetes-4fadf89fecb9066a77c7d7c041085683420e5fd347aff512821c19608960a959","text":"defer backendServer.Close() defer func() { if called != tc.ExpectCalled { if called := atomic.LoadInt32(×Called) > 0; called != tc.ExpectCalled { t.Errorf(\"%s: expected called=%v, got %v\", tcName, tc.ExpectCalled, called) } }()"} {"_id":"q-en-kubernetes-4fb13084229a53108221cf754065944b11361544c839f047082b767d835d4c9e","text":"# sleep 4 # i=$[$i+1] # done apiVersion: v1beta1 apiVersion: v1beta3 kind: Pod id: synthetic-logger-10lps-pod desiredState: manifest: version: v1beta1 id: synth-logger-10lps containers: - name: synth-lgr image: ubuntu:14.04 command: [\"bash\", \"-c\", \"i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 0.1; i=$[$i+1]; done\"] labels: name: synth-logging-source metadata: creationTimestamp: null labels: name: synth-logging-source name: synthetic-logger-10lps-pod spec: containers: - args: - bash - -c - 'i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 0.1; i=$[$i+1]; done' image: ubuntu:14.04 name: synth-lgr "} {"_id":"q-en-kubernetes-4fc1901c978ddadeada0e4482416bf2242f52bab833618b3df3be6d7c4e30f2c","text":"return err } // GetDiskLun finds the lun on the host that the vhd is attached to, given a vhd's diskName and diskURI func (ss *scaleSet) GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) { // GetDataDisks gets a list of data disks attached to the node. func (ss *scaleSet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) { _, _, vm, err := ss.getVmssVM(string(nodeName)) if err != nil { return -1, err return nil, err } disks := *vm.StorageProfile.DataDisks for _, disk := range disks { if disk.Lun != nil && (disk.Name != nil && diskName != \"\" && *disk.Name == diskName) || (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != \"\" && *disk.Vhd.URI == diskURI) || (disk.ManagedDisk != nil && *disk.ManagedDisk.ID == diskURI) { // found the disk glog.V(4).Infof(\"azureDisk - find disk: lun %d name %q uri %q\", *disk.Lun, diskName, diskURI) return *disk.Lun, nil } } return -1, fmt.Errorf(\"Cannot find Lun for disk %s\", diskName) } // GetNextDiskLun searches all vhd attachment on the host and find unused lun // return -1 if all luns are used func (ss *scaleSet) GetNextDiskLun(nodeName types.NodeName) (int32, error) { _, _, vm, err := ss.getVmssVM(string(nodeName)) if err != nil { return -1, err } used := make([]bool, maxLUN) disks := *vm.StorageProfile.DataDisks for _, disk := range disks { if disk.Lun != nil { used[*disk.Lun] = true } } for k, v := range used { if !v { return int32(k), nil } } return -1, fmt.Errorf(\"All Luns are used\") } // DisksAreAttached checks if a list of volumes are attached to the node with the specified NodeName func (ss *scaleSet) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { attached := make(map[string]bool) for _, diskName := range diskNames { attached[diskName] = false } _, _, vm, err := ss.getVmssVM(string(nodeName)) if err != nil { if err == cloudprovider.InstanceNotFound { // if host doesn't exist, no need to detach glog.Warningf(\"azureDisk - Cannot find node %q, DisksAreAttached will assume disks %v are not attached to it.\", nodeName, diskNames) return attached, nil } return attached, err } disks := *vm.StorageProfile.DataDisks for _, disk := range disks { for _, diskName := range diskNames { if disk.Name != nil && diskName != \"\" && *disk.Name == diskName { attached[diskName] = true } } if vm.StorageProfile.DataDisks == nil { return nil, nil } return attached, nil return *vm.StorageProfile.DataDisks, nil }"} {"_id":"q-en-kubernetes-4fed9bab438f616a81f60cc449dd8bf07ab7c727e737685058e34d63b8e1473b","text":"if err != nil { return err } if len(rsrc.Versions) == 0 { return fmt.Errorf(\"ThirdPartyResource %s has no defined versions\", rsrc.Name) } plural, _ := meta.KindToResource(unversioned.GroupVersionKind{ Group: group, Version: rsrc.Versions[0].Name,"} {"_id":"q-en-kubernetes-501826fc405106fc0e2eee6b284f52a0e6dd924d9470e69991737ad714eb5739","text":"return unmountedVolumes } func (asw *actualStateOfWorld) SyncReconstructedVolume(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName, outerVolumeSpecName string) { asw.Lock() defer asw.Unlock() if volumeObj, volumeExists := asw.attachedVolumes[volumeName]; volumeExists { if podObj, podExists := volumeObj.mountedPods[podName]; podExists { if podObj.outerVolumeSpecName != outerVolumeSpecName { podObj.outerVolumeSpecName = outerVolumeSpecName asw.attachedVolumes[volumeName].mountedPods[podName] = podObj } } } } func (asw *actualStateOfWorld) newAttachedVolume( attachedVolume *attachedVolume) AttachedVolume { return AttachedVolume{"} {"_id":"q-en-kubernetes-5029439eefc77871d6020e1da636d97ed0d8d697cb6a2838ec272634ed972dbc","text":"// DetachDisk detaches the disk specified by vmDiskPath func (vm *VirtualMachine) DetachDisk(ctx context.Context, vmDiskPath string) error { vmDiskPath = RemoveStorageClusterORFolderNameFromVDiskPath(vmDiskPath) device, err := vm.getVirtualDeviceByPath(ctx, vmDiskPath) if err != nil { klog.Errorf(\"Disk ID not found for VM: %q with diskPath: %q\", vm.InventoryPath, vmDiskPath)"} {"_id":"q-en-kubernetes-50351b30c8b2042224189c4c77656beaf5f33f02c22ef389866bc6c70b9958a4","text":"// satisfy the pod topology spread constraints. Hence it needs to preempt another low pod // to make the Pods spread like [, ]. runPausePod(f, mediumPodCfg) e2epod.WaitForPodNotPending(cs, ns, mediumPodCfg.Name) ginkgo.By(\"Verify there are 3 Pods left in this namespace\") wantPods := sets.NewString(\"high\", \"medium\", \"low\") podList, err := cs.CoreV1().Pods(ns).List(context.TODO(), metav1.ListOptions{}) pods := podList.Items var pods []v1.Pod // Wait until the number of pods stabilizes. Note that `medium` pod can get scheduled once the // second low priority pod is marked as terminating. // TODO: exact the wait.PollImmediate block to framework.WaitForNumberOfRunningPods. err := wait.PollImmediate(framework.Poll, framework.PollShortTimeout, func() (bool, error) { podList, err := cs.CoreV1().Pods(ns).List(context.TODO(), metav1.ListOptions{}) // ignore intermittent network error if err != nil { return false, nil } pods = podList.Items return len(pods) == 3, nil }) framework.ExpectNoError(err) framework.ExpectEqual(len(pods), 3) for _, pod := range pods { // Remove the ordinal index for low pod."} {"_id":"q-en-kubernetes-5095196fd76455ec237af885bcf70df1e1b7988961d8e2d1e84e47117855ade2","text":"// applyPlatformSpecificDockerConfig applies platform-specific configurations to a dockertypes.ContainerCreateConfig struct. // The containerCleanupInfo struct it returns will be passed as is to performPlatformSpecificContainerCleanup // after either: // * the container creation has failed // * the container has been successfully started // * the container has been removed // whichever happens first. // after either the container creation has failed or the container has been removed. func (ds *dockerService) applyPlatformSpecificDockerConfig(request *runtimeapi.CreateContainerRequest, createConfig *dockertypes.ContainerCreateConfig) (*containerCleanupInfo, error) { cleanupInfo := &containerCleanupInfo{}"} {"_id":"q-en-kubernetes-50e13d61eba1a90973b7a8a15336d0853f022952e4eaea242723b1d75d68d6b1","text":"return } func isHostRunningCgroupV2(f *framework.Framework, host string) bool { result, err := e2essh.SSH(\"stat -fc %T /sys/fs/cgroup/\", host, framework.TestContext.Provider) framework.ExpectNoError(err) framework.ExpectEqual(result.Code, 0) // 0x63677270 == CGROUP2_SUPER_MAGIC // https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html return strings.Contains(result.Stdout, \"cgroup2\") || strings.Contains(result.Stdout, \"0x63677270\") } func getNpdPodStat(f *framework.Framework, nodeName string) (cpuUsage, rss, workingSet float64) { summary, err := e2ekubelet.GetStatsSummary(f.ClientSet, nodeName) framework.ExpectNoError(err)"} {"_id":"q-en-kubernetes-50e34dbdfa074989caefec4d1422fdc38bfac7d62813c9d120913b116441eb40","text":"} // Add volume to desired state of world _, err = dswp.desiredStateOfWorld.AddPodToVolume( uniqueVolumeName, err := dswp.desiredStateOfWorld.AddPodToVolume( uniquePodName, pod, volumeSpec, podVolume.Name, volumeGidValue) if err != nil { klog.ErrorS(err, \"Failed to add volume to desiredStateOfWorld\", \"pod\", klog.KObj(pod), \"volumeName\", podVolume.Name, \"volumeSpecName\", volumeSpec.Name())"} {"_id":"q-en-kubernetes-5170f5a1d063e4899c679a04c657bb8a17bb4b1291290ff07964a8c13f493182","text":"\"io/ioutil\" \"os\" \"reflect\" \"strings\" \"testing\" \"github.com/imdario/mergo\" \"k8s.io/kubernetes/pkg/client/restclient\" clientcmdapi \"k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api\" )"} {"_id":"q-en-kubernetes-51bbd77076a9564d5ea6ba2d43ab96ecbd50c3cad61418190683694829d5e355","text":"hosts := []string{} for _, n := range nodelist.Items { for _, addr := range n.Status.Addresses { if addr.Type == addrType { if addr.Type == addrType && addr.Address != \"\" { hosts = append(hosts, addr.Address) break }"} {"_id":"q-en-kubernetes-51f0e5389e55c3403487e645dcbda348c0658435aa3034fa93a549f559d1920d","text":"setMaxElements: 42, expectedSetCost: 8, }, { name: \"enums with maxLength equals to the longest possible value\", schemaGenerator: genEnumWithRuleAndValues(\"self.contains('A')\", \"A\", \"B\", \"C\", \"LongValue\"), expectedCalcCost: 2, setMaxElements: 1000, expectedSetCost: 401, }, } for _, testCase := range cases { t.Run(testCase.name, func(t *testing.T) {"} {"_id":"q-en-kubernetes-526f7f53990dc292b643c28160c7416d34feca611a8a06ecf38a21aead0e211b","text":"--allow \"tcp:3389\" & fi fi kube::util::wait-for-jobs || { code=$? echo -e \"${color_red}Failed to create firewall rules.${color_norm}\" >&2 exit $code } } function expand-default-subnetwork() {"} {"_id":"q-en-kubernetes-52740fa1a436fe1f8f9498693045961b87b34c8fc5f3f1b35ed639093611d5a5","text":"WorkingDir string `gcfg:\"working-dir\"` // Soap round tripper count (retries = RoundTripper - 1) RoundTripperCount uint `gcfg:\"soap-roundtrip-count\"` // Deprecated as the virtual machines will be automatically discovered. // Is required on the controller-manager if it does not run on a VMware machine // VMUUID is the VM Instance UUID of virtual machine which can be retrieved from instanceUuid // property in VmConfigInfo, or also set as vc.uuid in VMX file. // If not set, will be fetched from the machine via sysfs (requires root)"} {"_id":"q-en-kubernetes-52817c8519fe40c88f58fb826244009bc22e2b2f4e5cb87925350f8f17c148c9","text":"stdoutBuf := bytes.NewBuffer(nil) stderrBuf := bytes.NewBuffer(nil) w := newLogWriter(stdoutBuf, stderrBuf, &LogOptions{since: test.since, timestamp: test.timestamp, bytes: -1}) err := w.write(msg) err := w.write(msg, true) assert.NoError(t, err) assert.Equal(t, test.expectStdout, stdoutBuf.String()) assert.Equal(t, test.expectStderr, stderrBuf.String())"} {"_id":"q-en-kubernetes-528c131df334d9c9279028f3e679c742aae0c926036781e1612da4732e24fcf6","text":"} func (npm *nominatedPodMap) update(oldPod, newPod *v1.Pod) { // In some cases, an Update event with no \"NominatedNode\" present is received right // after a node(\"NominatedNode\") is reserved for this pod in memory. // In this case, we need to keep reserving the NominatedNode when updating the pod pointer. nodeName := \"\" // We won't fall into below `if` block if the Update event represents: // (1) NominatedNode info is added // (2) NominatedNode info is updated // (3) NominatedNode info is removed if NominatedNodeName(oldPod) == \"\" && NominatedNodeName(newPod) == \"\" { if nnn, ok := npm.nominatedPodToNode[oldPod.UID]; ok { // This is the only case we should continue reserving the NominatedNode nodeName = nnn } } // We update irrespective of the nominatedNodeName changed or not, to ensure // that pod pointer is updated. npm.delete(oldPod) npm.add(newPod, \"\") npm.add(newPod, nodeName) } func (npm *nominatedPodMap) podsForNode(nodeName string) []*v1.Pod {"} {"_id":"q-en-kubernetes-52d7cff0cb39a861336e429c72e6c8225fef70688fd60d1a3f9bf08166ec0909","text":"// ListRegisteredPriorityFunctions returns the registered priority functions. func ListRegisteredPriorityFunctions() []string { schedulerFactoryMutex.Lock() defer schedulerFactoryMutex.Unlock() schedulerFactoryMutex.RLock() defer schedulerFactoryMutex.RUnlock() var names []string for name := range priorityFunctionMap {"} {"_id":"q-en-kubernetes-52fcfbd57004797122bff061220df57223172da5a11b583f491199c8465debdc","text":"# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging # googleinfluxdb - Enable influxdb and google (except GCM) # standalone - Heapster only. Metrics available via Heapster REST API. ENABLE_CLUSTER_MONITORING=\"${KUBE_ENABLE_CLUSTER_MONITORING:-googleinfluxdb}\" ENABLE_CLUSTER_MONITORING=\"${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}\" # Optional: Enable node logging. ENABLE_NODE_LOGGING=\"${KUBE_ENABLE_NODE_LOGGING:-true}\""} {"_id":"q-en-kubernetes-53002220b235fdeea4555235d2b0fa1362fb31743ece39e062846fcf488ff3f4","text":"want []string } testFn := func(test *testcase, t *testing.T) { SortControllerRevisions(test.revisions) for i := range test.revisions { if test.revisions[i].Name != test.want[i] { t.Errorf(\"%s: want %s at %d got %s\", test.name, test.want[i], i, test.revisions[i].Name) t.Run(test.name, func(t *testing.T) { SortControllerRevisions(test.revisions) for i := range test.revisions { if test.revisions[i].Name != test.want[i] { t.Errorf(\"%s: want %s at %d got %s\", test.name, test.want[i], i, test.revisions[i].Name) } } } }) } ss1 := newStatefulSet(3, \"ss1\", types.UID(\"ss1\"), map[string]string{\"foo\": \"bar\"}) ss1.Status.CollisionCount = new(int32)"} {"_id":"q-en-kubernetes-53203b8e74f208257e4c0108d4e7c75311724dfde1bba98cde5e3cad82dcd744","text":"l.migrationCheck.validateMigrationVolumeOpCounts() } ginkgo.It(\"should write files of various sizes, verify size, validate content [Slow][LinuxOnly]\", func() { ginkgo.It(\"should write files of various sizes, verify size, validate content [Slow]\", func() { init() defer cleanup()"} {"_id":"q-en-kubernetes-532058bb01883d7dfa86bbe6f0ac481d1b356d3cbf5d782f90e599eefc430bf4","text":"} }) ginkgo.It(\"should function for pod-Service(hostNetwork): udp\", func() { config := e2enetwork.NewNetworkingTestConfig(f, e2enetwork.EndpointsUseHostNetwork) ginkgo.By(fmt.Sprintf(\"dialing(udp) %v --> %v:%v (config.clusterIP)\", config.TestContainerPod.Name, config.ClusterIP, e2enetwork.ClusterUDPPort)) err := config.DialFromTestContainer(\"udp\", config.ClusterIP, e2enetwork.ClusterUDPPort, config.MaxTries, 0, config.EndpointHostnames()) if err != nil { framework.Failf(\"failed dialing endpoint, %v\", err) } ginkgo.By(fmt.Sprintf(\"dialing(udp) %v --> %v:%v (nodeIP)\", config.TestContainerPod.Name, config.NodeIP, config.NodeUDPPort)) err = config.DialFromTestContainer(\"udp\", config.NodeIP, config.NodeUDPPort, config.MaxTries, 0, config.EndpointHostnames()) if err != nil { framework.Failf(\"failed dialing endpoint, %v\", err) } }) // if the endpoints pods use hostNetwork, several tests can't run in parallel // because the pods will try to acquire the same port in the host. // We run the test in serial, to avoid port conflicts."} {"_id":"q-en-kubernetes-5340f7fe75f5a50a5fa411acc49d2426d7bc371346fae30aa4541d5f626ac852","text":"} else { handler = restfulGetResource(getter, exporter, reqScope) } handler = metrics.InstrumentRouteFunc(action.Verb, resource, subresource, namespaceScope, handler) if needOverride { // need change the reported verb handler = metrics.InstrumentRouteFunc(verbOverrider.OverrideMetricsVerb(action.Verb), resource, subresource, namespaceScope, handler) } else { handler = metrics.InstrumentRouteFunc(action.Verb, resource, subresource, namespaceScope, handler) } if a.enableAPIResponseCompression { handler = genericfilters.RestfulWithCompression(handler, a.group.Context) }"} {"_id":"q-en-kubernetes-539e853bf14ca5c13f517b8cb011a8c72a1b1622ee2a7ab95c5470f4e1d5b687","text":"case \"get\": // Return an existing (matching) node on get. return &api.Node{ ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}, Spec: api.NodeSpec{ExternalID: \"127.0.0.1\"}, ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{ExternalID: testKubeletHostname}, }, nil default: return nil, fmt.Errorf(\"no reaction implemented for %s\", action.Action)"} {"_id":"q-en-kubernetes-53ac2f174d1ef4a4cc133d1aabd8237a913ff8e3d9040ba97a27458f25206549","text":"function save-logs() { local -r node_name=\"${1}\" local -r dir=\"${2}\" local files=\"${3} ${common_logfiles}\" local files=\"${3}\" if [[ \"${KUBERNETES_PROVIDER}\" == \"gce\" || \"${KUBERNETES_PROVIDER}\" == \"gke\" ]]; then files=\"${files} ${gce_logfiles}\" fi if [[ \"${KUBERNETES_PROVIDER}\" == \"aws\" ]]; then files=\"${files} ${aws_logfiles}\" fi if ssh-to-node \"${node_name}\" \"sudo systemctl status kubelet.service\" &> /dev/null; then ssh-to-node \"${node_name}\" \"sudo journalctl --output=cat -u kubelet.service\" > \"${dir}/kubelet.log\" || true ssh-to-node \"${node_name}\" \"sudo journalctl --output=cat -u docker.service\" > \"${dir}/docker.log\" || true ssh-to-node \"${node_name}\" \"sudo journalctl --output=cat -k\" > \"${dir}/kern.log\" || true else files=\"${files} ${initd_logfiles} ${supervisord_logfiles}\" files=\"${kern_logfile} ${files} ${initd_logfiles} ${supervisord_logfiles}\" fi copy-logs-from-node \"${node_name}\" \"${dir}\" \"${files}\" }"} {"_id":"q-en-kubernetes-53c577a84ce702877b9fcb21675e9184e097b2a0e24eb6c3e5b6d5bc46c1e3a8","text":"return checkMirrorPodDisappear(ctx, f.ClientSet, pod.Name, pod.Namespace) }, f.Timeouts.PodDelete, f.Timeouts.Poll).Should(gomega.BeNil()) }) // Regression test for an extended scenario for https://issues.k8s.io/123980 ginkgo.It(\"should evict running pods that do not meet the affinity after the kubelet restart\", func(ctx context.Context) { nodeLabelKey := string(uuid.NewUUID()) nodeLabelValueRequired := string(uuid.NewUUID()) podName := \"affinity-pod\" + string(uuid.NewUUID()) nodeName := getNodeName(ctx, f) ginkgo.By(fmt.Sprintf(\"Adding node label for node (%s) to satisify pod (%s/%s) affinity\", nodeName, f.Namespace.Name, podName)) e2enode.AddOrUpdateLabelOnNode(f.ClientSet, nodeName, nodeLabelKey, nodeLabelValueRequired) ginkgo.DeferCleanup(func() { e2enode.RemoveLabelOffNode(f.ClientSet, nodeName, nodeLabelKey) }) pod := e2epod.MustMixinRestrictedPodSecurity(&v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: f.Namespace.Name, }, Spec: v1.PodSpec{ Affinity: &v1.Affinity{ NodeAffinity: &v1.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { MatchExpressions: []v1.NodeSelectorRequirement{ { Key: nodeLabelKey, Operator: v1.NodeSelectorOpIn, Values: []string{nodeLabelValueRequired}, }, }, }, }, }, }, }, Containers: []v1.Container{ { Name: podName, Image: imageutils.GetPauseImageName(), }, }, }, }) // Create the pod bound to the node. It will start, but will be rejected after kubelet restart. ginkgo.By(fmt.Sprintf(\"Creating a pod (%s/%s)\", f.Namespace.Name, podName)) e2epod.NewPodClient(f).Create(ctx, pod) ginkgo.By(fmt.Sprintf(\"Waiting for the pod (%s/%s) to be running\", f.Namespace.Name, pod.Name)) err := e2epod.WaitForPodNameRunningInNamespace(ctx, f.ClientSet, pod.Name, f.Namespace.Name) framework.ExpectNoError(err, \"Failed to await for the pod to be running: (%v/%v)\", f.Namespace.Name, pod.Name) // Remove node label e2enode.RemoveLabelOffNode(f.ClientSet, nodeName, nodeLabelKey) ginkgo.By(\"Restart the kubelet\") restartKubelet(true) gomega.Eventually(ctx, func() bool { return kubeletHealthCheck(kubeletHealthCheckURL) }, recoverTimeout, f.Timeouts.Poll). Should(gomega.BeTrueBecause(\"kubelet should be healthy after restart\")) // Pod should be terminated, maybe not immediately, should allow a few seconds for the kubelet to kill the pod // after kubelet restart, pod admission denied, kubelet will reject the pod and kill container. gomega.Eventually(ctx, func() bool { pod, err = e2epod.NewPodClient(f).Get(ctx, podName, metav1.GetOptions{}) framework.ExpectNoError(err) // pod is in a final state, the following are the behaviors of pods after kubelet restarted: // 1. kubelet `canAdmitPod` reject pod by reason Pod admission denied by nodeAffinity // 2. kubelet stop/kill container // the final state of the pod is related to the kill container. // if an error occurs in the preStop of the container or the exitCode is not 0, // the phase is PodFailed. if the exitCode of the StopContainer is 0, the phase is PodSucceeded. // in this case, stop and kill container is successful(exitCode 0), the pod phase should be PodSucceeded. return pod.Status.Phase == v1.PodSucceeded }, recoverTimeout, f.Timeouts.Poll).Should(gomega.BeTrueBecause(\"Pod %s not terminated: %s\", pod.Name, pod.Status.Phase)) }) }) })"} {"_id":"q-en-kubernetes-53c5bc6641c6246ffcb90e998db914cf6073610a7a1a310c14c688aaa52607b6","text":"}, &api.Pod{ ObjectMeta: api.ObjectMeta{ UID: \"222\", Name: \"bar\" + \"-\" + hostname, Namespace: \"default\", SelfLink: getSelfLink(\"bar-\"+hostname, kubetypes.NamespaceDefault), UID: \"222\", Name: \"bar\" + \"-\" + hostname, Namespace: \"default\", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: \"222\"}, SelfLink: getSelfLink(\"bar-\"+hostname, kubetypes.NamespaceDefault), }, Spec: api.PodSpec{ NodeName: hostname,"} {"_id":"q-en-kubernetes-53f1c232f67be637b6694e294409450bde97591b890305b00b195e69127aa594","text":"apiVersion: v1 metadata: name: etcd-discovery creationTimestamp: labels: name: etcd-discovery spec:"} {"_id":"q-en-kubernetes-544f813af334db3ce53e6330fba708f3380990f9d8eae32d3ce0b13b66f1cf30","text":"} ginkgo.By(fmt.Sprintf(\"Create node foo by user: %v\", asUser)) _, err := c.CoreV1().Nodes().Create(context.TODO(), node, metav1.CreateOptions{}) // NOTE: If the test fails and a new node IS created, we need to delete it. If we don't, we'd have // a zombie node in a NotReady state which will delay further tests since we're waiting for all // tests to be in the Ready state. defer func() { f.ClientSet.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}) }() framework.ExpectEqual(apierrors.IsForbidden(err), true) })"} {"_id":"q-en-kubernetes-54629e34041a92a3195a23da1fe8ecef3c9f76f3dfa5647eef05c6e2cbcb580a","text":"if err != nil { return nil, err } errors := ds.performPlatformSpecificContainerForContainer(r.ContainerId) if len(errors) != 0 { return nil, fmt.Errorf(\"failed to run platform-specific clean ups for container %q: %v\", r.ContainerId, errors) } err = ds.client.RemoveContainer(r.ContainerId, dockertypes.ContainerRemoveOptions{RemoveVolumes: true, Force: true}) if err != nil { return nil, fmt.Errorf(\"failed to remove container %q: %v\", r.ContainerId, err) } return &runtimeapi.RemoveContainerResponse{}, nil }"} {"_id":"q-en-kubernetes-54793bd71f6a698b26b9ae8bc160c227b3ba2bd344710609eb83e516b08b5ea4","text":"bash -c \"${common_commands}\" diff -ruN \"${output_dir}/upstream\" \"${output_dir}/patch\" >\"${diff_file}\" || true if [[ -t 1 ]]; then # Attached to a terminal? less \"${diff_file}\" fi echo echo \" *** Diff saved in ${diff_file} ***\""} {"_id":"q-en-kubernetes-5497c01f5abf144fdf36358526e86190553872eaab9e820ccca412656170856e","text":"\"type\": \"string\" }, \"ports\": { \"description\": \"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.\", \"description\": \"List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.\", \"items\": { \"allOf\": [ {"} {"_id":"q-en-kubernetes-54ae05a93453d5828d9cb0fcc62d9ce1e8af2c9df4a3b559e1cba98cfa50d57e","text":"if err != nil { t.Fatalf(\"unexpected error: %v\", err) } } func TestDeleteNamespaceWithIncompleteFinalizers(t *testing.T) { now := util.Now() fakeEtcdClient, helper := newHelper(t) fakeEtcdClient.ChangeIndex = 1 fakeEtcdClient.Data[\"/registry/namespaces/foo\"] = tools.EtcdResponseWithError{ R: &etcd.Response{ Node: &etcd.Node{ Value: runtime.EncodeOrDie(latest.Codec, &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\", DeletionTimestamp: &now, }, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{api.FinalizerKubernetes}, }, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, }), ModifiedIndex: 1, CreatedIndex: 1, }, }, } storage, _, _ := NewStorage(helper) _, err := storage.Delete(api.NewDefaultContext(), \"foo\", nil) if err == nil { t.Fatalf(\"expected error: %v\", err) } } // TODO: when we add life-cycle, this will go to Terminating, and then we need to test Terminating to gone func TestDeleteNamespaceWithCompleteFinalizers(t *testing.T) { now := util.Now() fakeEtcdClient, helper := newHelper(t) fakeEtcdClient.ChangeIndex = 1 fakeEtcdClient.Data[\"/registry/namespaces/foo\"] = tools.EtcdResponseWithError{ R: &etcd.Response{ Node: &etcd.Node{ Value: runtime.EncodeOrDie(latest.Codec, &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\", DeletionTimestamp: &now, }, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{}, }, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, }), ModifiedIndex: 1, CreatedIndex: 1, }, }, } storage, _, _ := NewStorage(helper) _, err := storage.Delete(api.NewDefaultContext(), \"foo\", nil) if err != nil { t.Fatalf(\"unexpected error: %v\", err) } }"} {"_id":"q-en-kubernetes-54b2bcd915c84f3ee7e0490fe242dd69f8569d9dfeb3b70597c8c4b5f807715f","text":"\"kind\": \"Service\", \"apiVersion\": \"v1beta3\", \"metadata\": { \"name\": \"my-service\", \"name\": \"my-service\" }, \"spec\": { \"selector\": {"} {"_id":"q-en-kubernetes-54ba1bf5d59d0e82c86b99d4defd9317886063bd58ecd9f20ce18b55d6e36396","text":"// during \"reserve\" extension point or later. func (mc CommunicatingPlugin) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) { if pod.Name == \"my-test-pod\" { state.Lock() // The pod is at the end of its lifecycle -- let's clean up the allocated // resources. In this case, our clean up is simply deleting the key written // in the Reserve operation. state.Delete(framework.StateKey(pod.Name)) state.Unlock() } }"} {"_id":"q-en-kubernetes-54d4bf400f0f13a6f7bbcaea607d27c37566fa1530e10ec4fb17634a33965f20","text":"### Negative caching The `denial` cache TTL has been reduced to the minimum of 5 seconds [here](https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L37). In the unlikely event that this impacts performance, setting this TTL to a higher value make help alleviate issues, but be aware that operations that rely on DNS polling for orchestration may fail (for example operators with StatefulSets). The `denial` cache TTL has been reduced to the minimum of 5 seconds [here](https://github.com/kubernetes/kubernetes/blob/a38ed2c5ceedf682cbc19442aac5224ae6e10eaa/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L61). In the unlikely event that this impacts performance, setting this TTL to a higher value make help alleviate issues, but be aware that operations that rely on DNS polling for orchestration may fail (for example operators with StatefulSets). "} {"_id":"q-en-kubernetes-54f8619f2ce1b23bc9473cfd04b8c7e9502001e8c6b90414f2f54ed899e60365","text":"}) } // waitForRCPodToDisappear returns nil if the pod from the given replication controller (described by rcName) no longer exists. // In case of failure or too long waiting time, an error is returned. func waitForRCPodToDisappear(c *client.Client, ns, rcName, podName string) error { label := labels.SelectorFromSet(labels.Set(map[string]string{\"name\": rcName})) return waitForPodToDisappear(c, ns, podName, label, 20*time.Second, 5*time.Minute) } // waitForService waits until the service appears (exist == true), or disappears (exist == false) func waitForService(c *client.Client, namespace, name string, exist bool, interval, timeout time.Duration) error { err := wait.Poll(interval, timeout, func() (bool, error) {"} {"_id":"q-en-kubernetes-54fbd2d1f5d7308a7d9c0757a250f7dc6544bbe50e57ad3ca55c662fff5a372e","text":"\"name\": \"The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.\", \"port\": \"The port number of the endpoint.\", \"protocol\": \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", } func (EndpointPort) SwaggerDoc() map[string]string {"} {"_id":"q-en-kubernetes-5530ad254027c90e2a7f4086fa4e3485e6973a421d0523a414f7e8087d18744a","text":"}, []string{\"operation\", \"type\"}, ) etcdObjectCounts = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Name: \"etcd_object_counts\", DeprecatedVersion: \"1.21.0\", Help: \"Number of stored objects at the time of last check split by kind. This metric is replaced by apiserver_storage_object_counts.\", StabilityLevel: compbasemetrics.ALPHA, }, []string{\"resource\"}, ) objectCounts = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Name: \"etcd_object_counts\", Name: \"apiserver_storage_object_counts\", Help: \"Number of stored objects at the time of last check split by kind.\", StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.STABLE, }, []string{\"resource\"}, )"} {"_id":"q-en-kubernetes-554b584bd7dd2413e24450abbdca28b19b8b3807bcee0706ca926975e4e6275d","text":"Status: status, } } func TestPrioritiesRegistered(t *testing.T) { var functionNames []string // Files and directories which priorities may be referenced targetFiles := []string{ \"./../../algorithmprovider/defaults/defaults.go\", // Default algorithm \"./../../factory/plugins.go\", // Registered in init() } // List all golang source files under ./priorities/, excluding test files and sub-directories. files, err := codeinspector.GetSourceCodeFiles(\".\") if err != nil { t.Errorf(\"unexpected error: %v when listing files in current directory\", err) } // Get all public priorities in files. for _, filePath := range files { functions, err := codeinspector.GetPublicFunctions(filePath) if err == nil { functionNames = append(functionNames, functions...) } else { t.Errorf(\"unexpected error when parsing %s\", filePath) } } // Check if all public priorities are referenced in target files. for _, functionName := range functionNames { args := []string{\"-rl\", functionName} args = append(args, targetFiles...) err := exec.Command(\"grep\", args...).Run() if err != nil { switch err.Error() { case \"exit status 2\": t.Errorf(\"unexpected error when checking %s\", functionName) case \"exit status 1\": t.Errorf(\"priority %s is implemented as public but seems not registered or used in any other place\", functionName) } } } } "} {"_id":"q-en-kubernetes-555210586c074f6777944574c07886a890eb6d90f2fcc56156ac728f6587bdcc","text":"} return parameters, nil default: sort.Slice(objs, func(i, j int) bool { obj1, obj2 := objs[i].(*resourcev1alpha2.ResourceClaimParameters), objs[j].(*resourcev1alpha2.ResourceClaimParameters) if obj1 == nil || obj2 == nil { return false } return obj1.Name < obj2.Name }) return nil, statusError(logger, fmt.Errorf(\"multiple generated claim parameters for %s.%s %s found: %s\", claim.Spec.ParametersRef.Kind, claim.Spec.ParametersRef.APIGroup, klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name), klog.KObjSlice(objs))) } }"} {"_id":"q-en-kubernetes-560c0004b45db80d2e276702e7752dcf4c732af802ad719be7239ce6399a6237","text":"\"PD\" \"ServiceAccounts\" \"Networkingsshouldsfunctionsforsintra-podscommunication\" # possibly causing Ginkgo to get stuck, issue: #13485 \"Services.*identicallysnamed\" # error waiting for reachability, issue: #16285 ) # Tests that should not run on soak cluster."} {"_id":"q-en-kubernetes-5648b270d50d750b6b9756c341ac44663cbd925e24d002f3e4af814d22987f63","text":"err = e2epod.WaitForPodContainerStarted(f.ClientSet, f.Namespace.Name, p.Name, 0, framework.PodStartTimeout) framework.ExpectNoError(err) startedTime := time.Now() // We assume the pod became ready when the container became ready. This // is true for a single container pod. err = e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, p.Name, f.Namespace.Name, framework.PodStartTimeout) framework.ExpectNoError(err) readyTime := time.Now() p, err = podClient.Get(context.TODO(), p.Name, metav1.GetOptions{}) framework.ExpectNoError(err)"} {"_id":"q-en-kubernetes-567786d13e9797f55a9ee626746fb9fb464046680797077b3d691bfdf3d24060","text":"} } func TestDeletePodForNotExistingNode(t *testing.T) { func TestDeleteUnscheduledPodForNotExistingNode(t *testing.T) { for _, f := range []bool{true, false} { defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ScheduleDaemonSetPods, f)() for _, strategy := range updateStrategies() {"} {"_id":"q-en-kubernetes-567e9a787c6c30f77e581a78503baa45044bc34b24a774b1c0657ba7cb20031c","text":"return plugin.getFakeVolume(&plugin.Attachers), nil } func (plugin *FakeVolumePlugin) GetAttachers() (Attachers []*FakeVolume) { plugin.RLock() defer plugin.RUnlock() return plugin.Attachers } func (plugin *FakeVolumePlugin) GetNewAttacherCallCount() int { plugin.RLock() defer plugin.RUnlock()"} {"_id":"q-en-kubernetes-56931736f632f9679012371ef7f0bde1fe3fb28f5e7841053d7129a08d6109f4","text":"defaultBurst = 300 AcceptV1 = runtime.ContentTypeJSON // Aggregated discovery content-type (currently v2beta1). NOTE: Currently, we are assuming the order // for \"g\", \"v\", and \"as\" from the server. We can only compare this string if we can make that assumption. // Aggregated discovery content-type (v2beta1). NOTE: content-type parameters // MUST be ordered (g, v, as) for server in \"Accept\" header (BUT we are resilient // to ordering when comparing returned values in \"Content-Type\" header). AcceptV2Beta1 = runtime.ContentTypeJSON + \";\" + \"g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList\" // Prioritize aggregated discovery by placing first in the order of discovery accept types. acceptDiscoveryFormats = AcceptV2Beta1 + \",\" + AcceptV1"} {"_id":"q-en-kubernetes-56b5496a0381a88a8a6f08286a4bfff1888b302b118f72acab2a71d6bf353af6","text":"readyEps := 0 notReadyEps := 0 for i := range pods { // TODO: Do we need to copy here? pod := &(*pods[i]) for _, pod := range pods { for i := range service.Spec.Ports { servicePort := &service.Spec.Ports[i]"} {"_id":"q-en-kubernetes-56bc789172b3761f6664748d89733f31ab3a56b39352996332ceb948ab769e28","text":"# CNI plugins - name: \"cni\" version: 0.8.7 version: 0.9.1 refPaths: - path: cluster/gce/gci/configure.sh match: DEFAULT_CNI_VERSION="} {"_id":"q-en-kubernetes-56cbe84d0c60c05a93376b326a80b34f5b3864dca23bc0f8a8be6a189837883f","text":"framework.SkipUnlessProviderIs(\"gce\", \"gke\") // Testing a 1.7 version of the sample-apiserver TestSampleAPIServer(f, \"gcr.io/kubernetes-e2e-test-images/k8s-aggregator-sample-apiserver-amd64:1.7\", \"sample-system\") TestSampleAPIServer(f, \"gcr.io/kubernetes-e2e-test-images/k8s-aggregator-sample-apiserver-amd64:1.7v2\", \"sample-system\") }) })"} {"_id":"q-en-kubernetes-56d38b520ee2fc419cc1513ae11284f85ac615e81caa440d49c8fdca426aa775","text":"\"io/ioutil\" \"net\" \"path/filepath\" \"time\" cadvisorapiv1 \"github.com/google/cadvisor/info/v1\" cadvisorv2 \"github.com/google/cadvisor/info/v2\""} {"_id":"q-en-kubernetes-56dbcbda8b317d88bda99208dd165d87b0e0d280727a2a0e75bb7a199e4b2ab7","text":" # On Collaborative Development Kubernetes is open source, but many of the people working on it do so as their day job. In order to avoid forcing people to be \"at work\" effectively 24/7, we want to establish some semi-formal protocols around development. Hopefully these rules make things go more smoothly. If you find that this is not the case, please complain loudly. ## Patches welcome First and foremost: as a potential contributor, your changes and ideas are welcome at any hour of the day or night, weekdays, weekends, and holidays. Please do not ever hesitate to ask a question or send a PR. ## Timezones and calendars For the time being, most of the people working on this project are in the US and on Pacific time. Any times mentioned henceforth will refer to this timezone. Any references to \"work days\" will refer to the US calendar. ## Code reviews All changes must be code reviewed. For non-maintainers this is obvious, since you can't commit anyway. But even for maintainers, we want all changes to get at least one review, preferably from someone who knows the areas the change touches. For non-trivial changes we may want two reviewers. The primary reviewer will make this decision and nominate a second reviewer, if needed. Except for trivial changes, PRs should sit for at least a 2 hours to allow for wider review. Most PRs will find reviewers organically. If a maintainer intends to be the primary reviewer of a PR they should set themselves as the assignee on GitHub and say so in a reply to the PR. Only the primary reviewer of a change should actually do the merge, except in rare cases (e.g. they are unavailable in a reasonable timeframe). If a PR has gone 2 work days without an owner emerging, please poke the PR thread and ask for a reviewer to be assigned. Except for rare cases, such as trivial changes (e.g. typos, comments) or emergencies (e.g. broken builds), maintainers should not merge their own changes. Expect reviewers to request that you avoid [common go style mistakes](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) in your PRs. ## Assigned reviews Maintainers can assign reviews to other maintainers, when appropriate. The assignee becomes the shepherd for that PR and is responsible for merging the PR once they are satisfied with it or else closing it. The assignee might request reviews from non-maintainers. ## Merge hours Maintainers will do merges between the hours of 7:00 am Monday and 7:00 pm (19:00h) Friday. PRs that arrive over the weekend or on holidays will only be merged if there is a very good reason for it and if the code review requirements have been met. There may be discussion an even approvals granted outside of the above hours, but merges will generally be deferred. ## Holds Any maintainer or core contributor who wants to review a PR but does not have time immediately may put a hold on a PR simply by saying so on the PR discussion and offering an ETA measured in single-digit days at most. Any PR that has a hold shall not be merged until the person who requested the hold acks the review, withdraws their hold, or is overruled by a preponderance of maintainers. "} {"_id":"q-en-kubernetes-571ee7a4513ff13ac1a6add674e596945fd8383798b677da575f5d9967088b24","text":"pod.Status.ContainerStatuses = test.oldStatuses podStatus.ContainerStatuses = test.statuses apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) verifyStatus(t, i, apiStatus, test.expectedState, test.expectedLastTerminationState) assert.NoError(t, verifyContainerStatuses(apiStatus.ContainerStatuses, test.expectedState, test.expectedLastTerminationState), \"case %d\", i) } // Everything should be the same for init containers for i, test := range tests { kubelet.reasonCache = NewReasonCache() for n, e := range test.reasons { kubelet.reasonCache.add(pod.UID, n, e, \"\") } pod.Spec.InitContainers = test.containers pod.Status.InitContainerStatuses = test.oldStatuses podStatus.ContainerStatuses = test.statuses apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) expectedState := test.expectedState if test.expectedInitState != nil { expectedState = test.expectedInitState } assert.NoError(t, verifyContainerStatuses(apiStatus.InitContainerStatuses, expectedState, test.expectedLastTerminationState), \"case %d\", i) } } // Test generateAPIPodStatus with different restart policies. func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { testErrorReason := fmt.Errorf(\"test-error\") emptyContainerID := (&kubecontainer.ContainerID{}).String() testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet pod := podWithUidNameNs(\"12345678\", \"foo\", \"new\") containers := []api.Container{{Name: \"succeed\"}, {Name: \"failed\"}} podStatus := &kubecontainer.PodStatus{ ID: pod.UID, Name: pod.Name, Namespace: pod.Namespace, ContainerStatuses: []*kubecontainer.ContainerStatus{ { Name: \"succeed\", State: kubecontainer.ContainerStateExited, ExitCode: 0, }, { Name: \"failed\", State: kubecontainer.ContainerStateExited, ExitCode: 1, }, { Name: \"succeed\", State: kubecontainer.ContainerStateExited, ExitCode: 2, }, { Name: \"failed\", State: kubecontainer.ContainerStateExited, ExitCode: 3, }, }, } kubelet.reasonCache.add(pod.UID, \"succeed\", testErrorReason, \"\") kubelet.reasonCache.add(pod.UID, \"failed\", testErrorReason, \"\") for c, test := range []struct { restartPolicy api.RestartPolicy expectedState map[string]api.ContainerState expectedLastTerminationState map[string]api.ContainerState // Only set expectedInitState when it is different from expectedState expectedInitState map[string]api.ContainerState // Only set expectedInitLastTerminationState when it is different from expectedLastTerminationState expectedInitLastTerminationState map[string]api.ContainerState }{ { restartPolicy: api.RestartPolicyNever, expectedState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 0, ContainerID: emptyContainerID, }}, \"failed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID, }}, }, expectedLastTerminationState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 2, ContainerID: emptyContainerID, }}, \"failed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 3, ContainerID: emptyContainerID, }}, }, }, { restartPolicy: api.RestartPolicyOnFailure, expectedState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 0, ContainerID: emptyContainerID, }}, \"failed\": {Waiting: &api.ContainerStateWaiting{Reason: testErrorReason.Error()}}, }, expectedLastTerminationState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 2, ContainerID: emptyContainerID, }}, \"failed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID, }}, }, }, { restartPolicy: api.RestartPolicyAlways, expectedState: map[string]api.ContainerState{ \"succeed\": {Waiting: &api.ContainerStateWaiting{Reason: testErrorReason.Error()}}, \"failed\": {Waiting: &api.ContainerStateWaiting{Reason: testErrorReason.Error()}}, }, expectedLastTerminationState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 0, ContainerID: emptyContainerID, }}, \"failed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID, }}, }, // If the init container is terminated with exit code 0, it won't be restarted even when the // restart policy is RestartAlways. expectedInitState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 0, ContainerID: emptyContainerID, }}, \"failed\": {Waiting: &api.ContainerStateWaiting{Reason: testErrorReason.Error()}}, }, expectedInitLastTerminationState: map[string]api.ContainerState{ \"succeed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 2, ContainerID: emptyContainerID, }}, \"failed\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID, }}, }, }, } { pod.Spec.RestartPolicy = test.restartPolicy // Test normal containers pod.Spec.Containers = containers apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) expectedState, expectedLastTerminationState := test.expectedState, test.expectedLastTerminationState assert.NoError(t, verifyContainerStatuses(apiStatus.ContainerStatuses, expectedState, expectedLastTerminationState), \"case %d\", c) pod.Spec.Containers = nil // Test init containers pod.Spec.InitContainers = containers apiStatus = kubelet.generateAPIPodStatus(pod, podStatus) if test.expectedInitState != nil { expectedState = test.expectedInitState } if test.expectedInitLastTerminationState != nil { expectedLastTerminationState = test.expectedInitLastTerminationState } assert.NoError(t, verifyContainerStatuses(apiStatus.InitContainerStatuses, expectedState, expectedLastTerminationState), \"case %d\", c) pod.Spec.InitContainers = nil } }"} {"_id":"q-en-kubernetes-5749562a999dd60af238f73e28f8414df70230290516a9fa683e666e449109eb","text":"func TestRegisterExistingNodeWithApiserver(t *testing.T) { testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet kubelet.hostname = \"127.0.0.1\" kubeClient := testKubelet.fakeKubeClient kubeClient.ReactFn = func(action testclient.FakeAction) (runtime.Object, error) { segments := strings.Split(action.Action, \"-\")"} {"_id":"q-en-kubernetes-5765858ad7ac60327254a71e4b388f99d89e116aabaf3172efb74839a2fc7222","text":"// Handle the containers failed to be started, which should be in Waiting state. for _, container := range containers { if isInitContainer { // If the init container is terminated with exit code 0, it won't be restarted. // TODO(random-liu): Handle this in a cleaner way. s := podStatus.FindContainerStatusByName(container.Name) if s != nil && s.State == kubecontainer.ContainerStateExited && s.ExitCode == 0 { continue } } // If a container should be restarted in next syncpod, it is *Waiting*. if !kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) { continue"} {"_id":"q-en-kubernetes-5765d6343e6fe9d07f240791343fec09f7880c9e759dd9a30367586af9170be0","text":"} /* Release : v1.12 Testname: Security Context: runAsUser (id:65534) Description: Container created with runAsUser option, passing an id (id:65534) uses that given id when running the container. This test is marked LinuxOnly since Windows does not support running as UID / GID. Release : v1.15 Testname: Security Context, runAsUser=65534 Description: Container is created with runAsUser option by passing uid 65534 to run as unpriviledged user. Pod MUST be in Succeeded phase. [LinuxOnly]: This test is marked as LinuxOnly since Windows does not support running as UID / GID. */ It(\"should run the container with uid 65534 [LinuxOnly] [NodeConformance]\", func() { framework.ConformanceIt(\"should run the container with uid 65534 [LinuxOnly] [NodeConformance]\", func() { createAndWaitUserPod(65534) }) /* Release : v1.12 Testname: Security Context: runAsUser (id:0) Description: Container created with runAsUser option, passing an id (id:0) uses that given id when running the container. This test is marked LinuxOnly since Windows does not support running as UID / GID. Release : v1.15 Testname: Security Context, runAsUser=0 Description: Container is created with runAsUser option by passing uid 0 to run as root priviledged user. Pod MUST be in Succeeded phase. This e2e can not be promoted to Conformance because a Conformant platform may not allow to run containers with 'uid 0' or running privileged operations. [LinuxOnly]: This test is marked as LinuxOnly since Windows does not support running as UID / GID. */ It(\"should run the container with uid 0 [LinuxOnly] [NodeConformance]\", func() { createAndWaitUserPod(0)"} {"_id":"q-en-kubernetes-57964512d36716ef7d0fea65e16c561e29bc5265043e40afd85708689006fbed","text":"srcs = [ \"alpha.go\", \"annotate.go\", \"apiresources.go\", \"apiversions.go\", \"apply.go\", \"apply_edit_last_applied.go\","} {"_id":"q-en-kubernetes-58309873e8f237c1d75ea5028283534cd2880873563fdca39be6e674447b1d47","text":"if [[ ${GOOS} == \"windows\" ]]; then bin=\"${bin}.exe\" fi CGO_ENABLED=0 go build -installsuffix cgo -o \"${output_path}/${bin}\" go build -o \"${output_path}/${bin}\" \"${goflags[@]:+${goflags[@]}}\" -ldflags \"${version_ldflags}\" \"${binary}\" done else CGO_ENABLED=0 go install -installsuffix cgo \"${goflags[@]:+${goflags[@]}}\" go install \"${goflags[@]:+${goflags[@]}}\" -ldflags \"${version_ldflags}\" \"${binaries[@]}\" fi"} {"_id":"q-en-kubernetes-58662a5122d3152d2fbb43a63310c53efd2c9e0f78db29d63370da8bec27bce5","text":"// +k8s:deepcopy-gen=package package testing package testing // import \"k8s.io/apimachinery/pkg/runtime/testing\" "} {"_id":"q-en-kubernetes-586d4e5bda1015b03871fd1a80bd3a69a6ce8d4fd43be5fde9e48fd1696845bb","text":"} fn := func() error { if !p.Quiet && stderr != nil { fmt.Fprintln(stderr, \"If you don't see a command prompt, try pressing enter.\") } restClient, err := restclient.RESTClientFor(p.Config) if err != nil { return err"} {"_id":"q-en-kubernetes-5891a553b763786ca965f35fb043ac2f8a11ebb55c4890ae10ff8d1d2a0dbd52","text":"return v.target.WithKind(src.Kind), true } } if v.coerce && len(kinds) > 0 { return v.target.WithKind(kinds[0].Kind), true } return schema.GroupVersionKind{}, false }"} {"_id":"q-en-kubernetes-58cfa79db15c0869c9d140c472c12933cb529008f1a39edb0c8cb31a44324efd","text":"framework.ExpectNotEqual(len(list.Groups), 0, \"Missing APIGroups\") for _, group := range list.Groups { if strings.HasSuffix(group.Name, \".example.com\") { // ignore known example dynamic API groups that are added/removed during the e2e test run continue } framework.Logf(\"Checking APIGroup: %v\", group.Name) // locate APIGroup endpoint"} {"_id":"q-en-kubernetes-59034e49b7eaf1b05febc6724155e6838a183334eb05cee23896bb0778b2d7ad","text":"namespace quota. The creation MUST fail release: v1.15 file: test/e2e/apps/rc.go - testname: Replication Controller, lifecycle codename: '[sig-apps] ReplicationController should test the lifecycle of a ReplicationController [Conformance]' description: A Replication Controller (RC) is created, read, patched, and deleted with verification. release: v1.20 file: test/e2e/apps/rc.go - testname: StatefulSet, Burst Scaling codename: '[sig-apps] StatefulSet [k8s.io] Basic StatefulSet functionality [StatefulSetBasic] Burst scaling should run to completion even with unhealthy pods [Slow] [Conformance]'"} {"_id":"q-en-kubernetes-591b42be501c5c6f3178ec5fd9df9fb0edb5be05eaf769147a567cd3d5fdb4e2","text":"\"k8s.io/kubernetes/test/e2e/framework\" ) const minFileSize = 1 * framework.MiB const ( minFileSize = 1 * framework.MiB fileSizeSmall = 1 * framework.MiB fileSizeMedium = 100 * framework.MiB fileSizeLarge = 1 * framework.GiB ) // MD5 hashes of the test file corresponding to each file size. // Test files are generated in testVolumeIO() // If test file generation algorithm changes, these must be recomputed. var md5hashes = map[int64]string{ fileSizeSmall: \"5c34c2813223a7ca05a3c2f38c0d1710\", fileSizeMedium: \"f2fa202b1ffeedda5f3a58bd1ae81104\", fileSizeLarge: \"8d763edc71bd16217664793b5a15e403\", } // Return the plugin's client pod spec. Use an InitContainer to setup the file i/o test env. func makePodSpec(config framework.VolumeTestConfig, dir, initCmd string, volsrc v1.VolumeSource, podSecContext *v1.PodSecurityContext) *v1.Pod {"} {"_id":"q-en-kubernetes-5942d75cfa7a69c14666ad6f951408012954c803e0aba5e4fe1bb36b924946d7","text":"Command: getSchedulerCommand(cfg), LivenessProbe: componentProbe(10251, \"/healthz\"), Resources: componentResources(\"100m\"), Env: getProxyEnvVars(), }), }"} {"_id":"q-en-kubernetes-596fdc8c33d803e087eb5d5c7220aea26a38f8c655b92e1a0897868cf1ddab00","text":"}, } // deep copy before reconciler runs to avoid data race. pvWithSize := pv.DeepCopy() volumePluginMgr, fakePlugin := volumetesting.GetTestKubeletVolumePluginMgr(t) dsw := cache.NewDesiredStateOfWorld(volumePluginMgr) asw := cache.NewActualStateOfWorld(nodeName, volumePluginMgr)"} {"_id":"q-en-kubernetes-59b1bf3a0d6c069a47f96cc6cf4b9f97c858aa72c6cbf51f80bd73fdd2a5d598","text":"local -r known_tokens_csv=\"${auth_dir}/known_tokens.csv\" if [[ ! -e \"${known_tokens_csv}\" ]]; then echo \"${KUBE_BEARER_TOKEN},admin,admin\" > \"${known_tokens_csv}\" echo \"${KUBELET_TOKEN},kubelet,kubelet\" >> \"${known_tokens_csv}\" echo \"${KUBE_PROXY_TOKEN},kube_proxy,kube_proxy\" >> \"${known_tokens_csv}\" echo \"${KUBE_CONTROLLER_MANAGER_TOKEN},system:kube-controller-manager,uid:system:kube-controller-manager\" >> \"${known_tokens_csv}\" echo \"${KUBELET_TOKEN},system:node:node-name,uid:kubelet,system:nodes\" >> \"${known_tokens_csv}\" echo \"${KUBE_PROXY_TOKEN},system:kube-proxy,uid:kube_proxy\" >> \"${known_tokens_csv}\" fi local use_cloud_config=\"false\" cat </etc/gce.conf"} {"_id":"q-en-kubernetes-59bb03d4f6a01deae2b4f74d4d9a51bddb8918587b02c0fc33f9f92b181b6a41","text":"func (c *FakePods) Evict(eviction *policy.Eviction) error { action := core.CreateActionImpl{} action.Verb = \"create\" action.Namespace = c.ns action.Resource = podsResource action.Subresource = \"eviction\" action.Object = eviction"} {"_id":"q-en-kubernetes-5a55ac028837b8a6c82be0aa52ef2a6fc4914dfcba452b22f2abe8f3f97a0b27","text":"fs.BoolVar(&s.EnableLogsHandler, \"enable-logs-handler\", s.EnableLogsHandler, \"If true, install a /logs handler for the apiserver logs.\") fs.MarkDeprecated(\"enable-logs-handler\", \"This flag will be removed in v1.19\") // Deprecated in release 1.9 fs.StringVar(&s.SSHUser, \"ssh-user\", s.SSHUser,"} {"_id":"q-en-kubernetes-5a6f0954ec3a23b41a230a0bc98baf84cdd3503f3d0cc97a6b817c0da545c6f8","text":" #!/bin/bash # Copyright 2017 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Sets up FlexVolume drivers on GCE COS instances using mounting utilities packaged in a Google # Container Registry image. # The user-provided FlexVolume driver(s) must be under /flexvolume of the image filesystem. # For example, the driver k8s/nfs must be located at /flexvolume/k8s~nfs/nfs . # # This script should be used on a clean instance, with no FlexVolume installed. # Should not be run on instances with an existing full or partial installation. # Upon failure, the script will clean up the partial installation automatically. # # Must be executed under /home/kubernetes/bin with sudo. # Warning: kubelet will be restarted upon successful execution. set -o errexit set -o nounset set -o pipefail MOUNTER_IMAGE=${1:-} MOUNTER_PATH=/home/kubernetes/flexvolume_mounter VOLUME_PLUGIN_DIR=/etc/srv/kubernetes/kubelet-plugins/volume/exec usage() { echo \"usage: $0 imagename[:tag]\" echo \" imagename Name of a Container Registry image. By default the latest image is used.\" echo \" :tag Container Registry image tag.\" exit 1 } if [ -z ${MOUNTER_IMAGE} ]; then echo \"ERROR: No Container Registry mounter image is specified.\" echo usage fi # Unmounts a mount point lazily. If a mount point does not exist, continue silently, # and without error. umount_silent() { umount -l $1 &> /dev/null || /bin/true } # Waits for kubelet to restart for 1 minute. kubelet_wait() { timeout=60 kubelet_readonly_port=10255 until [[ $timeout -eq 0 ]]; do printf \".\" if [[ $( curl -s http://localhost:${kubelet_readonly_port}/healthz ) == \"ok\" ]]; then return 0 fi sleep 1 timeout=$(( timeout-1 )) done # Timed out waiting for kubelet to become healthy. return 1 } flex_clean() { echo echo \"An error has occurred. Cleaning up...\" echo umount_silent ${VOLUME_PLUGIN_DIR} rm -rf ${VOLUME_PLUGIN_DIR} umount_silent ${MOUNTER_PATH}/var/lib/kubelet umount_silent ${MOUNTER_PATH} rm -rf ${MOUNTER_PATH} if [ -n ${IMAGE_URL:-} ]; then docker rmi -f ${IMAGE_URL} &> /dev/null || /bin/true fi if [ -n ${MOUNTER_DEFAULT_NAME:-} ]; then docker rm -f ${MOUNTER_DEFAULT_NAME} &> /dev/null || /bin/true fi } trap flex_clean ERR # Generates a bash script that wraps all calls to the actual driver inside mount utilities # in the chroot environment. Kubelet sees this script as the FlexVolume driver. generate_chroot_wrapper() { if [ ! -d ${MOUNTER_PATH}/flexvolume ]; then echo \"Failed to set up FlexVolume driver: cannot find directory '/flexvolume' in the mount utility image.\" exit 1 fi for driver_dir in ${MOUNTER_PATH}/flexvolume/*; do if [ -d \"$driver_dir\" ]; then filecount=$(ls -1 $driver_dir | wc -l) if [ $filecount -gt 1 ]; then echo \"ERROR: Expected 1 file in the FlexVolume directory but found $filecount.\" exit 1 fi driver_file=$( ls $driver_dir | head -n 1 ) # driver_path points to the actual driver inside the mount utility image, # relative to image root. # wrapper_path is the wrapper script location, which is known to kubelet. driver_path=flexvolume/$( basename $driver_dir )/${driver_file} wrapper_dir=${VOLUME_PLUGIN_DIR}/$( basename $driver_dir ) wrapper_path=${wrapper_dir}/${driver_file} mkdir -p $wrapper_dir cat >$wrapper_path < /dev/null sudo -u ${SUDO_USER} docker run --name=${MOUNTER_DEFAULT_NAME} ${IMAGE_URL} docker export ${MOUNTER_DEFAULT_NAME} > /tmp/${MOUNTER_DEFAULT_NAME}.tar docker rm ${MOUNTER_DEFAULT_NAME} > /dev/null docker rmi ${IMAGE_URL} > /dev/null echo echo \"Loading mount utilities onto this instance...\" echo mkdir ${MOUNTER_PATH} tar xf /tmp/${MOUNTER_DEFAULT_NAME}.tar -C ${MOUNTER_PATH} # Bind the kubelet directory to one under flexvolume_mounter mkdir ${MOUNTER_PATH}/var/lib/kubelet mount --rbind /var/lib/kubelet/ ${MOUNTER_PATH}/var/lib/kubelet mount --make-rshared ${MOUNTER_PATH}/var/lib/kubelet # Remount the flexvolume_mounter environment with /dev enabled. mount --bind ${MOUNTER_PATH} ${MOUNTER_PATH} mount -o remount,dev,exec ${MOUNTER_PATH} echo echo \"Setting up FlexVolume driver...\" echo mkdir -p ${VOLUME_PLUGIN_DIR} mount --bind ${VOLUME_PLUGIN_DIR} ${VOLUME_PLUGIN_DIR} mount -o remount,exec ${VOLUME_PLUGIN_DIR} generate_chroot_wrapper echo echo \"Restarting Kubelet...\" echo systemctl restart kubelet.service kubelet_wait if [ $? -eq 0 ]; then echo echo \"FlexVolume is ready.\" else echo \"ERROR: Timed out after 1 minute waiting for kubelet restart.\" fi "} {"_id":"q-en-kubernetes-5a7cad29c29061012c0d7f2631146efa44d2dd44667791cfc6d878daab8d2c13","text":"ContainerID: emptyContainerID, }}, }, map[string]api.ContainerState{ expectedLastTerminationState: map[string]api.ContainerState{ \"without-reason\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 3, ContainerID: emptyContainerID,"} {"_id":"q-en-kubernetes-5a98336356865d685225d054320d98db2ff665115a9af42d932d3fa759deb44d","text":"return err } err = os.Chmod(f.Name(), 0755) err = os.Chmod(f.Name(), 0660) if err != nil { return err }"} {"_id":"q-en-kubernetes-5af2eb6482ac9f5316b474aa67217de05af91000c35e632289f0c5a5c66afd5e","text":"return \"default\", false, nil } func (inClusterClientConfig) ConfigAccess() ConfigAccess { func (config *inClusterClientConfig) ConfigAccess() ConfigAccess { return NewDefaultClientConfigLoadingRules() } // Possible returns true if loading an inside-kubernetes-cluster is possible. func (inClusterClientConfig) Possible() bool { func (config *inClusterClientConfig) Possible() bool { fi, err := os.Stat(\"/var/run/secrets/kubernetes.io/serviceaccount/token\") return os.Getenv(\"KUBERNETES_SERVICE_HOST\") != \"\" && os.Getenv(\"KUBERNETES_SERVICE_PORT\") != \"\" &&"} {"_id":"q-en-kubernetes-5b230dadce25356ea8bd61eb3160fe9d95755f5b0f3a13d18b2c151680b5a605","text":"\"github.com/GoogleCloudPlatform/kubernetes/pkg/admission\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\""} {"_id":"q-en-kubernetes-5b2ee3a7ed06fd2c63875d0d8038c7d5ddc1ee03958bc5268a2073fea1b993e1","text":"function upload-resources() { swift post kubernetes --read-acl '.r:*,.rlistings' echo \"[INFO] Upload ${KUBERNETES_RELEASE_TAR}\" swift upload kubernetes ${ROOT}/../../_output/release-tars/${KUBERNETES_RELEASE_TAR} locations=( \"${ROOT}/../../_output/release-tars/${KUBERNETES_RELEASE_TAR}\" \"${ROOT}/../../server/${KUBERNETES_RELEASE_TAR}\" ) RELEASE_TAR_LOCATION=$( (ls -t \"${locations[@]}\" 2>/dev/null || true) | head -1 ) RELEASE_TAR_PATH=$(dirname ${RELEASE_TAR_LOCATION}) echo \"[INFO] Uploading ${KUBERNETES_RELEASE_TAR}\" swift upload kubernetes ${RELEASE_TAR_PATH}/${KUBERNETES_RELEASE_TAR} --object-name kubernetes-server.tar.gz echo \"[INFO] Upload kubernetes-salt.tar.gz\" swift upload kubernetes ${ROOT}/../../_output/release-tars/kubernetes-salt.tar.gz echo \"[INFO] Uploading kubernetes-salt.tar.gz\" swift upload kubernetes ${RELEASE_TAR_PATH}/kubernetes-salt.tar.gz --object-name kubernetes-salt.tar.gz }"} {"_id":"q-en-kubernetes-5b62c370643fbb7d85fe854a168b233644641a60293d5b0c78b261b7d5945682","text":"Import-Module -Force C:$Filename } # Returns true if the ENABLE_STACKDRIVER_WINDOWS or ENABLE_NODE_LOGGING field in kube_env is true. # $KubeEnv is a hash table containing the kube-env metadata keys+values. # ENABLE_NODE_LOGGING is used for legacy Stackdriver Logging, and will be deprecated (always set to False) # soon. ENABLE_STACKDRIVER_WINDOWS is added to indicate whether logging is enabled for windows nodes. function IsLoggingEnabled { param ( [parameter(Mandatory=$true)] [hashtable]$KubeEnv ) if ($KubeEnv.Contains('ENABLE_STACKDRIVER_WINDOWS') -and ` ($KubeEnv['ENABLE_STACKDRIVER_WINDOWS'] -eq 'true')) { return $true } elseif ($KubeEnv.Contains('ENABLE_NODE_LOGGING') -and ` ($KubeEnv['ENABLE_NODE_LOGGING'] -eq 'true')) { return $true } return $false } try { # Don't use FetchAndImport-ModuleFromMetadata for common.psm1 - the common # module includes variables and functions that any other function may depend"} {"_id":"q-en-kubernetes-5b8f8f669adfde5a772faf3515394437e03347272d7a7752fb4008208d3bb52f","text":"\"-A\", string(kubeServicesChain), \"-m\", \"comment\", \"--comment\", proxier.ipsetList[kubeClusterIPSet].getComment(), \"-m\", \"set\", \"--match-set\", kubeClusterIPSet, \"dst,dst\", ) if proxier.masqueradeAll { writeLine(proxier.natRules, append(args, \"-j\", string(KubeMarkMasqChain))...) writeLine(proxier.natRules, append(args, \"dst,dst\", \"-j\", string(KubeMarkMasqChain))...) } else if len(proxier.clusterCIDR) > 0 { // This masquerades off-cluster traffic to a service VIP. The idea // is that you can establish a static route for your Service range, // routing to any node, and that node will bridge into the Service // for you. Since that might bounce off-node, we masquerade here. // If/when we support \"Local\" policy for VIPs, we should update this. writeLine(proxier.natRules, append(args, \"! -s\", proxier.clusterCIDR, \"-j\", string(KubeMarkMasqChain))...) writeLine(proxier.natRules, append(args, \"dst,dst\", \"! -s\", proxier.clusterCIDR, \"-j\", string(KubeMarkMasqChain))...) } else { // Masquerade all OUTPUT traffic coming from a service ip. // The kube dummy interface has all service VIPs assigned which // results in the service VIP being picked as the source IP to reach // a VIP. This leads to a connection from VIP: to // VIP:. // Always masquerading OUTPUT (node-originating) traffic with a VIP // source ip and service port destination fixes the outgoing connections. writeLine(proxier.natRules, append(args, \"src,dst\", \"-j\", string(KubeMarkMasqChain))...) } }"} {"_id":"q-en-kubernetes-5b9761a96fcacf7e9a4917d99e33954e86cf1804c717ade4cc24698688b1f716","text":"VolumeNFSServer = ImageConfig{e2eRegistry, \"volume/nfs\", \"1.0\"} VolumeISCSIServer = ImageConfig{e2eRegistry, \"volume/iscsi\", \"1.0\"} VolumeGlusterServer = ImageConfig{e2eRegistry, \"volume/gluster\", \"1.0\"} VolumeRBDServer = ImageConfig{e2eRegistry, \"volume/rbd\", \"1.0\"} VolumeRBDServer = ImageConfig{e2eRegistry, \"volume/rbd\", \"1.0.1\"} ) func GetE2EImage(image ImageConfig) string {"} {"_id":"q-en-kubernetes-5bad42f0e4c66207f686339c91e9ec8c9f5545bdff22feeeb1e238cda1b8d1ae","text":"importpath = \"k8s.io/component-base/metrics/testutil\", visibility = [\"//visibility:public\"], deps = [ \"//staging/src/k8s.io/apimachinery/pkg/version:go_default_library\", \"//staging/src/k8s.io/component-base/metrics:go_default_library\", \"//vendor/github.com/prometheus/client_golang/prometheus/testutil:go_default_library\", \"//vendor/github.com/prometheus/common/expfmt:go_default_library\","} {"_id":"q-en-kubernetes-5bccbca72aaf3e561ce7f2b467de03b88267c90c5eb7270f20b51cd617876f69","text":"// GetInstanceTypeByNodeName gets the instance type by node name. func (ss *scaleSet) GetInstanceTypeByNodeName(name string) (string, error) { _, _, vm, err := ss.getVmssVM(name) managedByAS, err := ss.isNodeManagedByAvailabilitySet(name) if err != nil { if err == ErrorNotVmssInstance { glog.V(4).Infof(\"GetInstanceTypeByNodeName: node %q is managed by availability set\", name) // Retry with standard type because nodes are not managed by vmss. return ss.availabilitySet.GetInstanceTypeByNodeName(name) } glog.Errorf(\"Failed to check isNodeManagedByAvailabilitySet: %v\", err) return \"\", err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetInstanceTypeByNodeName(name) } _, _, vm, err := ss.getVmssVM(name) if err != nil { return \"\", err }"} {"_id":"q-en-kubernetes-5bdb878a76504e2bf239961639672bc380bb42b9bd2322c9afb7439331c98d3f","text":"# Optional: Enable node logging. ENABLE_NODE_LOGGING=true LOGGING_DESTINATION=elasticsearch # options: elasticsearch, gcp # Don't require https for registries in our local RFC1918 network EXTRA_DOCKER_OPTS=\"--insecure-registry 10.0.0.0/8\" "} {"_id":"q-en-kubernetes-5bf8f1e14fdad38057fcb279ad75399548048f0f20c04c9ffdf161488440829c","text":"4.0.0 io.k8s.cassandra kubernetes-cassandra 0.0.4 0.0.5 src "} {"_id":"q-en-kubernetes-5c1cc06492bafc26d6777b37484b3d518c341f6ad9a09f3a800dc2adccfbc3b8","text":"# REVISION provides a version number fo this image and all it's bundled # artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment # for each revision of this image at that etcd version. REVISION?=2 REVISION?=3 # IMAGE_TAG Uniquely identifies k8s.gcr.io/etcd docker image with a tag of the form \"-\". IMAGE_TAG=$(LATEST_ETCD_VERSION)-$(REVISION)"} {"_id":"q-en-kubernetes-5c39dd0c6e3e4481d0cf45069a579211ad9a27c08d66001b7fb5549f3befc160","text":"import ( \"context\" \"fmt\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-5c3c1e736a833e197d9b4d734a8c5e496908800e11d7c5232f4718222db1c514","text":"host_platform=$(kube::golang::host_platform) # Use eval to preserve embedded quoted strings. local goflags goldflags gogcflags build_with_coverage local goflags goldflags gogcflags eval \"goflags=(${GOFLAGS:-})\" goldflags=\"${GOLDFLAGS:-} $(kube::version::ldflags)\" gogcflags=\"${GOGCFLAGS:-}\" build_with_coverage=\"${KUBE_BUILD_WITH_COVERAGE:-}\" local -a targets=() local arg"} {"_id":"q-en-kubernetes-5c804f829db78e7c5bb20271e46925e4950674ababeb6b034ef811561bbbff8c","text":"} } // This function is used canary updates and phased rolling updates of template modifications for partiton1 and delete pod-0 func deletingPodForRollingUpdatePartitionTest(ctx context.Context, f *framework.Framework, c clientset.Interface, ns string, ss *appsv1.StatefulSet) { setHTTPProbe(ss) ss.Spec.UpdateStrategy = appsv1.StatefulSetUpdateStrategy{ Type: appsv1.RollingUpdateStatefulSetStrategyType, RollingUpdate: func() *appsv1.RollingUpdateStatefulSetStrategy { return &appsv1.RollingUpdateStatefulSetStrategy{ Partition: pointer.Int32(1), } }(), } ss, err := c.AppsV1().StatefulSets(ns).Create(ctx, ss, metav1.CreateOptions{}) framework.ExpectNoError(err) e2estatefulset.WaitForRunningAndReady(ctx, c, *ss.Spec.Replicas, ss) ss = waitForStatus(ctx, c, ss) currentRevision, updateRevision := ss.Status.CurrentRevision, ss.Status.UpdateRevision gomega.Expect(currentRevision).To(gomega.Equal(updateRevision), fmt.Sprintf(\"StatefulSet %s/%s created with update revision %s not equal to current revision %s\", ss.Namespace, ss.Name, updateRevision, currentRevision)) pods := e2estatefulset.GetPodList(ctx, c, ss) for i := range pods.Items { gomega.Expect(pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel]).To(gomega.Equal(currentRevision), fmt.Sprintf(\"Pod %s/%s revision %s is not equal to currentRevision %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel], currentRevision)) } ginkgo.By(\"Adding finalizer for pod-0\") pod0name := getStatefulSetPodNameAtIndex(0, ss) pod0, err := c.CoreV1().Pods(ns).Get(ctx, pod0name, metav1.GetOptions{}) framework.ExpectNoError(err) pod0.Finalizers = append(pod0.Finalizers, testFinalizer) pod0, err = c.CoreV1().Pods(ss.Namespace).Update(ctx, pod0, metav1.UpdateOptions{}) framework.ExpectNoError(err) pods.Items[0] = *pod0 defer e2epod.NewPodClient(f).RemoveFinalizer(ctx, pod0.Name, testFinalizer) ginkgo.By(\"Updating image on StatefulSet\") newImage := NewWebserverImage oldImage := ss.Spec.Template.Spec.Containers[0].Image ginkgo.By(fmt.Sprintf(\"Updating stateful set template: update image from %s to %s\", oldImage, newImage)) gomega.Expect(oldImage).ToNot(gomega.Equal(newImage), \"Incorrect test setup: should update to a different image\") ss, err = updateStatefulSetWithRetries(ctx, c, ns, ss.Name, func(update *appsv1.StatefulSet) { update.Spec.Template.Spec.Containers[0].Image = newImage }) framework.ExpectNoError(err) ginkgo.By(\"Creating a new revision\") ss = waitForStatus(ctx, c, ss) currentRevision, updateRevision = ss.Status.CurrentRevision, ss.Status.UpdateRevision gomega.Expect(currentRevision).ToNot(gomega.Equal(updateRevision), \"Current revision should not equal update revision during rolling update\") ginkgo.By(\"Await for all replicas running, all are updated but pod-0\") e2estatefulset.WaitForState(ctx, c, ss, func(set2 *appsv1.StatefulSet, pods2 *v1.PodList) (bool, error) { ss = set2 pods = pods2 if ss.Status.UpdatedReplicas == *ss.Spec.Replicas-1 && ss.Status.Replicas == *ss.Spec.Replicas && ss.Status.ReadyReplicas == *ss.Spec.Replicas { // rolling updated is not completed, because replica 0 isn't ready return true, nil } return false, nil }) ginkgo.By(\"Verify pod images before pod-0 deletion and recreation\") for i := range pods.Items { if i < int(*ss.Spec.UpdateStrategy.RollingUpdate.Partition) { gomega.Expect(pods.Items[i].Spec.Containers[0].Image).To(gomega.Equal(oldImage), fmt.Sprintf(\"Pod %s/%s has image %s not equal to oldimage image %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, oldImage)) gomega.Expect(pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel]).To(gomega.Equal(currentRevision), fmt.Sprintf(\"Pod %s/%s has revision %s not equal to current revision %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel], currentRevision)) } else { gomega.Expect(pods.Items[i].Spec.Containers[0].Image).To(gomega.Equal(newImage), fmt.Sprintf(\"Pod %s/%s has image %s not equal to new image %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, newImage)) gomega.Expect(pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel]).To(gomega.Equal(updateRevision), fmt.Sprintf(\"Pod %s/%s has revision %s not equal to new revision %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel], updateRevision)) } } ginkgo.By(\"Deleting the pod-0 so that kubelet terminates it and StatefulSet controller recreates it\") deleteStatefulPodAtIndex(ctx, c, 0, ss) ginkgo.By(\"Await for two replicas to be updated, while the pod-0 is not running\") e2estatefulset.WaitForState(ctx, c, ss, func(set2 *appsv1.StatefulSet, pods2 *v1.PodList) (bool, error) { ss = set2 pods = pods2 return ss.Status.ReadyReplicas == *ss.Spec.Replicas-1, nil }) ginkgo.By(fmt.Sprintf(\"Removing finalizer from pod-0 (%v/%v) to allow recreation\", pod0.Namespace, pod0.Name)) e2epod.NewPodClient(f).RemoveFinalizer(ctx, pod0.Name, testFinalizer) ginkgo.By(\"Await for recreation of pod-0, so that all replicas are running\") e2estatefulset.WaitForState(ctx, c, ss, func(set2 *appsv1.StatefulSet, pods2 *v1.PodList) (bool, error) { ss = set2 pods = pods2 return ss.Status.ReadyReplicas == *ss.Spec.Replicas, nil }) ginkgo.By(\"Verify pod images after pod-0 deletion and recreation\") pods = e2estatefulset.GetPodList(ctx, c, ss) for i := range pods.Items { if i < int(*ss.Spec.UpdateStrategy.RollingUpdate.Partition) { gomega.Expect(pods.Items[i].Spec.Containers[0].Image).To(gomega.Equal(oldImage), fmt.Sprintf(\"Pod %s/%s has image %s not equal to current image %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, oldImage)) gomega.Expect(pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel]).To(gomega.Equal(currentRevision), fmt.Sprintf(\"Pod %s/%s has revision %s not equal to current revision %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel], currentRevision)) } else { gomega.Expect(pods.Items[i].Spec.Containers[0].Image).To(gomega.Equal(newImage), fmt.Sprintf(\"Pod %s/%s has image %s not equal to new image %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, newImage)) gomega.Expect(pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel]).To(gomega.Equal(updateRevision), fmt.Sprintf(\"Pod %s/%s has revision %s not equal to new revision %s\", pods.Items[i].Namespace, pods.Items[i].Name, pods.Items[i].Labels[appsv1.StatefulSetRevisionLabel], updateRevision)) } } } // confirmStatefulPodCount asserts that the current number of Pods in ss is count, waiting up to timeout for ss to // scale to count. func confirmStatefulPodCount(ctx context.Context, c clientset.Interface, count int, ss *appsv1.StatefulSet, timeout time.Duration, hard bool) {"} {"_id":"q-en-kubernetes-5cc3b69a98daf1bba2564541bfc81f1fdef13a2a6bc1280eddbc043f0a9f54dc","text":"\"restartPolicy\": \"Always\" } } {% endif %} "} {"_id":"q-en-kubernetes-5cc9ae6170766f1b6152a513890c53ddb049c4499599013f6c555a135b28dc21","text":"basename := filepath.Base(os.Args[0]) if err := commandFor(basename, hyperkubeCommand, allCommandFns).Execute(); err != nil { fmt.Fprintf(os.Stderr, \"%vn\", err) os.Exit(1) } }"} {"_id":"q-en-kubernetes-5d1cb0594a7ee9541b3a418b81fb21a0927a414b404620010aac746a9457c809","text":"} return true } // GetWindowsPath get a windows path func GetWindowsPath(path string) string { windowsPath := strings.Replace(path, \"/\", \"\", -1) if strings.HasPrefix(windowsPath, \"\") { windowsPath = \"c:\" + windowsPath } return windowsPath } "} {"_id":"q-en-kubernetes-5d25b1dd3960caf7c1d04ba84371c63671b71e6509328f00dfc9416413e23325","text":"// CheckEtcdServers will attempt to reach all etcd servers once. If any // can be reached, return true. func (con EtcdConnection) CheckEtcdServers() (done bool, err error) { // Attempt to reach every Etcd server in order for _, serverURI := range con.ServerList { host, err := parseServerURI(serverURI) // Attempt to reach every Etcd server randomly. serverNumber := len(con.ServerList) serverPerms := rand.Perm(serverNumber) for _, index := range serverPerms { host, err := parseServerURI(con.ServerList[index]) if err != nil { return false, err }"} {"_id":"q-en-kubernetes-5d3ee6742b609219bbcea6603bbf791298833d5198d9d91a56ee8fafa372db46","text":"} response, err := h.Client.Get(key, false, false) if err != nil && !IsEtcdNotFound(err) { if err != nil { if IsEtcdNotFound(err) { return nil } return err }"} {"_id":"q-en-kubernetes-5d98b5dccb9509ca8d0bdfb67b6e15c16ed4a7753c80e3325ec0e19fe46263d7","text":"echo \"ZONE='${ZONE}'\" echo \"MASTER_NAME='${MASTER_NAME}'\" echo \"MINION_IP_RANGE='${MINION_IP_RANGES[$i]}'\" echo \"EXTRA_DOCKER_OPTS='${EXTRA_DOCKER_OPTS}'\" echo \"ENABLE_DOCKER_REGISTRY_CACHE='${ENABLE_DOCKER_REGISTRY_CACHE:-false}'\" grep -v \"^#\" \"${KUBE_ROOT}/cluster/gce/templates/common.sh\" grep -v \"^#\" \"${KUBE_ROOT}/cluster/gce/templates/salt-minion.sh\""} {"_id":"q-en-kubernetes-5d9bbe1f2ac168a2790775d8f4af02fd1b7c7add9d5a5d7e87f1ddd3658964ed","text":"return framework.NewStatus(framework.Error, \"pod cannot be nil\") } if pod.Name == \"my-test-pod\" { state.Lock() state.Write(framework.StateKey(pod.Name), &stateData{data: \"never bind\"}) state.Unlock() } return nil }"} {"_id":"q-en-kubernetes-5d9ce08e6493056a7a2f01fa74b3b16fb94d5f6fa5eb488c7997ca7e2c0780aa","text":"Priorities []PriorityPolicy `json:\"priorities\"` // Holds the information to communicate with the extender(s) ExtenderConfigs []ExtenderConfig `json:\"extenders\"` // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100. HardPodAffinitySymmetricWeight int `json:\"hardPodAffinitySymmetricWeight\"` } type PredicatePolicy struct {"} {"_id":"q-en-kubernetes-5db7293da306e9e4c4a94428efa87290f10fc99dbd33049f5413c7d387bed691","text":"} } // TestClusterIPLBInCreateDsrLoadBalancer tests, if the available endpoints are remote, // syncproxyrules only creates ClusterIP Loadbalancer and no NodePort, External IP or IngressIP // loadbalancers will be created. func TestClusterIPLBInCreateDsrLoadBalancer(t *testing.T) { syncPeriod := 30 * time.Second proxier := NewFakeProxier(syncPeriod, syncPeriod, clusterCIDR, \"testhost\", netutils.ParseIPSloppy(\"10.0.0.1\"), NETWORK_TYPE_OVERLAY) if proxier == nil { t.Error() } svcIP := \"10.20.30.41\" svcPort := 80 svcNodePort := 3001 svcPortName := proxy.ServicePortName{ NamespacedName: makeNSN(\"ns1\", \"svc1\"), Port: \"p80\", Protocol: v1.ProtocolTCP, } lbIP := \"11.21.31.41\" makeServiceMap(proxier, makeTestService(svcPortName.Namespace, svcPortName.Name, func(svc *v1.Service) { svc.Spec.Type = \"NodePort\" svc.Spec.ClusterIP = svcIP svc.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyLocal svc.Spec.Ports = []v1.ServicePort{{ Name: svcPortName.Port, Port: int32(svcPort), Protocol: v1.ProtocolTCP, NodePort: int32(svcNodePort), }} svc.Status.LoadBalancer.Ingress = []v1.LoadBalancerIngress{{ IP: lbIP, }} }), ) tcpProtocol := v1.ProtocolTCP populateEndpointSlices(proxier, makeTestEndpointSlice(svcPortName.Namespace, svcPortName.Name, 1, func(eps *discovery.EndpointSlice) { eps.AddressType = discovery.AddressTypeIPv4 eps.Endpoints = []discovery.Endpoint{{ Addresses: []string{epIpAddressRemote}, NodeName: pointer.StringPtr(\"testhost2\"), // This will make this endpoint as a remote endpoint }} eps.Ports = []discovery.EndpointPort{{ Name: pointer.StringPtr(svcPortName.Port), Port: pointer.Int32(int32(svcPort)), Protocol: &tcpProtocol, }} }), ) proxier.setInitialized(true) proxier.syncProxyRules() svc := proxier.svcPortMap[svcPortName] svcInfo, ok := svc.(*serviceInfo) if !ok { t.Errorf(\"Failed to cast serviceInfo %q\", svcPortName.String()) } else { // Checking ClusterIP Loadbalancer is created if svcInfo.hnsID != guid { t.Errorf(\"%v does not match %v\", svcInfo.hnsID, guid) } // Verifying NodePort Loadbalancer is not created if svcInfo.nodePorthnsID != \"\" { t.Errorf(\"NodePortHnsID %v is not empty.\", svcInfo.nodePorthnsID) } // Verifying ExternalIP Loadbalancer is not created for _, externalIP := range svcInfo.externalIPs { if externalIP.hnsID != \"\" { t.Errorf(\"ExternalLBID %v is not empty.\", externalIP.hnsID) } } // Verifying IngressIP Loadbalancer is not created for _, ingressIP := range svcInfo.loadBalancerIngressIPs { if ingressIP.hnsID != \"\" { t.Errorf(\"IngressLBID %v is not empty.\", ingressIP.hnsID) } } } } func TestEndpointSlice(t *testing.T) { syncPeriod := 30 * time.Second proxier := NewFakeProxier(syncPeriod, syncPeriod, clusterCIDR, \"testhost\", netutils.ParseIPSloppy(\"10.0.0.1\"), NETWORK_TYPE_OVERLAY)"} {"_id":"q-en-kubernetes-5df55c5d4296ef65620bc9ab5a6318e13c5933833aa80c2c659d689db733ed96","text":"VolumeMounts: volumeMounts, LivenessProbe: componentProbe(8080, \"/healthz\"), Resources: componentResources(\"250m\"), Env: getProxyEnvVars(), }, volumes...), kubeControllerManager: componentPod(api.Container{ Name: kubeControllerManager,"} {"_id":"q-en-kubernetes-5e0f6b70415c72ccba9a0f7c0897dbdf8dee9d1d3ab2a7ad70c6fa4e67d60ccf","text":") const execInfoEnv = \"KUBERNETES_EXEC_INFO\" const onRotateListWarningLength = 1000 var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme)"} {"_id":"q-en-kubernetes-5e480e7463a8d598dadbd759232890a158363ef198430ae7d900099ef648b5ea","text":"flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) } // BindOverrideFlags is a convenience method to bind the specified flags to their associated variables func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, flagNames ConfigOverrideFlags) { BindAuthInfoFlags(&overrides.AuthInfo, flags, flagNames.AuthOverrideFlags) BindClusterFlags(&overrides.ClusterInfo, flags, flagNames.ClusterOverrideFlags) BindContextFlags(&overrides.Context, flags, flagNames.ContextOverrideFlags) flagNames.CurrentContext.BindStringFlag(flags, &overrides.CurrentContext) flagNames.Timeout.BindStringFlag(flags, &overrides.Timeout) } // BindFlags is a convenience method to bind the specified flags to their associated variables func BindContextFlags(contextInfo *clientcmdapi.Context, flags *pflag.FlagSet, flagNames ContextOverrideFlags) { flagNames.ClusterName.BindStringFlag(flags, &contextInfo.Cluster)"} {"_id":"q-en-kubernetes-5e615403699e0893fe2e47440ae80c698ab6c0377dbe0e60e218a97ec94f9dd2","text":"\"github.com/golang/glog\" \"k8s.io/api/core/v1\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" \"k8s.io/apimachinery/pkg/labels\" utilruntime \"k8s.io/apimachinery/pkg/util/runtime\" \"k8s.io/apimachinery/pkg/util/wait\" v1informers \"k8s.io/client-go/informers/core/v1\" v1listers \"k8s.io/client-go/listers/core/v1\" \"k8s.io/client-go/tools/cache\" \"k8s.io/client-go/util/workqueue\""} {"_id":"q-en-kubernetes-5e9af35bfc7bc84cce4e0d019c46bbd300cb0813d505b59118cdf0b1e18f6091","text":"Endpoints: []discovery.Endpoint{}, }, }, \"bad-port-name-length\": { expectedErrors: 1, endpointSlice: &discovery.EndpointSlice{ ObjectMeta: standardMeta, AddressType: addressTypePtr(discovery.AddressTypeIP), Ports: []discovery.EndpointPort{{ Name: utilpointer.StringPtr(strings.Repeat(\"a\", 64)), Protocol: protocolPtr(api.ProtocolTCP), }}, Endpoints: []discovery.Endpoint{}, }, }, \"invalid-port-protocol\": { expectedErrors: 1, endpointSlice: &discovery.EndpointSlice{"} {"_id":"q-en-kubernetes-5ea080f8fea0f29375b1a0e7f008efedd902bf255a7ed23b734f33175ab943f6","text":"\"spec\": { \"containers\": [{ \"name\": \"test-container\", \"image\": \"gcr.io/google_containers/pause-amd64:3.0\" \"image\": \"gcr.io/google_containers/pause-amd64:3.1\" }] } }"} {"_id":"q-en-kubernetes-5ee8123608a19a5d98183d1906a1386cdb03a3d4a3bfd6b38b96c5b23f1dfecc","text":"} # k8s KUBE_VERSION=${KUBE_VERSION:-\"1.1.4\"} KUBE_VERSION=${KUBE_VERSION:-\"1.1.7\"} echo \"Prepare kubernetes ${KUBE_VERSION} release ...\" grep -q \"^${KUBE_VERSION}$\" binaries/.kubernetes 2>/dev/null || { curl -L https://github.com/kubernetes/kubernetes/releases/download/v${KUBE_VERSION}/kubernetes.tar.gz -o kubernetes.tar.gz"} {"_id":"q-en-kubernetes-5eff49486ba052786459583c8897095e6ce3880f004a1ff8f0ecab19b5861b4a","text":"const ( csiNodeLimitUpdateTimeout = 5 * time.Minute csiPodUnschedulableTimeout = 2 * time.Minute csiPodUnschedulableTimeout = 5 * time.Minute ) var _ = utils.SIGDescribe(\"CSI mock volume\", func() {"} {"_id":"q-en-kubernetes-5f00897bafe37025a7f727e570277102153195cf8de102fdfd2ce08a2859fd33","text":"\"//staging/src/k8s.io/component-base/metrics:go_default_library\", \"//vendor/github.com/emicklei/go-restful:go_default_library\", \"//vendor/github.com/google/cadvisor/info/v1:go_default_library\", \"//vendor/github.com/pkg/errors:go_default_library\", \"//vendor/k8s.io/klog:go_default_library\", ], )"} {"_id":"q-en-kubernetes-5f17ebf387b9c5829933399653790df061306a0667483bdbc7ebb26b66102bbf","text":"return 0 } func (ds *dockerService) getSecurityOpts(containerName string, sandboxConfig *runtimeapi.PodSandboxConfig, separator rune) ([]string, error) { hasSeccompSetting := false annotations := sandboxConfig.GetAnnotations() if _, ok := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName]; !ok { _, hasSeccompSetting = annotations[v1.SeccompPodAnnotationKey] } else { hasSeccompSetting = true func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) { if seccompProfile != \"\" { glog.Warningf(\"seccomp annotations are not supported on windows\") } if hasSeccompSetting { glog.Warningf(\"seccomp annotations found, but it is not supported on windows\") } return nil, nil }"} {"_id":"q-en-kubernetes-5f27feedcfa768f0fad712cba99f6da0434976f66ea9d15345ed78f1708c054b","text":"setHugepages() ginkgo.By(\"restarting kubelet to pick up pre-allocated hugepages\") restartKubelet() // stop the kubelet and wait until the server will restart it automatically stopKubelet() // wait until the kubelet health check will fail gomega.Eventually(func() bool { return kubeletHealthCheck(kubeletHealthCheckURL) }, time.Minute, time.Second).Should(gomega.BeFalse()) // wait until the kubelet health check will pass gomega.Eventually(func() bool { return kubeletHealthCheck(kubeletHealthCheckURL) }, 2*time.Minute, 10*time.Second).Should(gomega.BeTrue()) waitForHugepages()"} {"_id":"q-en-kubernetes-5f2fb841329d3cccb57bb3ba72f0a542792802bf1f1c84cc3829c59e5488753f","text":"match: BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:[a-zA-Z]+-v((([0-9]+).([0-9]+).([0-9]+)(?:-([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?)(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?) - name: \"k8s.gcr.io/debian-iptables: dependents\" version: buster-v1.4.0 version: buster-v1.5.0 refPaths: - path: build/common.sh match: debian_iptables_version="} {"_id":"q-en-kubernetes-5f540bbf7e040f408dc43a80c9f3ca895f19c2cfa1a894c707bc5819c73d2178","text":"VolumePlugins: volumePlugins(), TLSOptions: nil, OOMAdjuster: oom.NewFakeOOMAdjuster(), Mounter: mount.New(\"\" /* default mount path */), Mounter: &mount.FakeMounter{}, Subpather: &subpath.FakeSubpath{}, HostUtil: hostutil.NewFakeHostUtil(nil), }"} {"_id":"q-en-kubernetes-5f7d322b6c459fb675e211727e0a7483b50fca33567c7d1885d38c6e629a8264","text":")}, wantErr: \"duplicate profile with scheduler name \"foo\"\", }, { name: \"With extenders\", opts: []Option{ WithProfiles( schedulerapi.KubeSchedulerProfile{ SchedulerName: \"default-scheduler\", Plugins: &schedulerapi.Plugins{ QueueSort: schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: \"PrioritySort\"}}}, Bind: schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: \"DefaultBinder\"}}}, }, }, ), WithExtenders( schedulerapi.Extender{ URLPrefix: \"http://extender.kube-system/\", }, ), }, wantProfiles: []string{\"default-scheduler\"}, wantExtenders: []string{\"http://extender.kube-system/\"}, }, } for _, tc := range cases {"} {"_id":"q-en-kubernetes-5fe8512897969566897ce405f8f7dfaddc6f6155e59ee1d18802d324cfec81d6","text":"// Flush is part of Interface. Currently we delete IPVS services one by one func (runner *runner) Flush() error { vss, err := runner.GetVirtualServers() if err != nil { return err } for _, vs := range vss { err := runner.DeleteVirtualServer(vs) // TODO: aggregate errors? if err != nil { return err } } return nil return runner.ipvsHandle.Flush() } // AddRealServer is part of Interface."} {"_id":"q-en-kubernetes-604d17a2c9df63227164276d22de278b9ced7181f0d3a5bc3b19980d69cb23a5","text":"\"k8s.io/kubernetes/pkg/api/v1\" dockertypes \"github.com/docker/engine-api/types\" dockercontainer \"github.com/docker/engine-api/types/container\" ) // These two functions are OS specific (for now at least) func updateHostConfig(config *dockercontainer.HostConfig) { // There is no /etc/resolv.conf in Windows, DNS and DNSSearch options would have to be passed to Docker runtime instead hc.DNS = opts.DNS hc.DNSSearch = opts.DNSSearch // MemorySwap == -1 is not currently supported in Docker 1.14 on Windows // https://github.com/docker/docker/blob/master/daemon/daemon_windows.go#L175 hc.Resources.MemorySwap = 0 } func DefaultMemorySwap() int64 { return 0 } func getContainerIP(container *dockertypes.ContainerJSON) string { if container.NetworkSettings != nil { for _, network := range container.NetworkSettings.Networks {"} {"_id":"q-en-kubernetes-6055c240f51cce1ed523b72d44fc05ba58f20d883a93cd5dd51ac33892d3a18e","text":"const ( DefaultEtcdPathPrefix = \"/registry\" globalTimeout = time.Minute ) // StorageDestinations is a mapping from API group & resource to"} {"_id":"q-en-kubernetes-60776d769ad222723d51ae91a04a3683bfcc7859d13c379f455af2bbcdcd86d2","text":"w.WriteHeader(http.StatusNotFound) } func startComponents(manifestURL, apiVersion string) (string, string) { func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (string, string) { // Setup servers := []string{} glog.Infof(\"Creating etcd client pointing to %v\", servers)"} {"_id":"q-en-kubernetes-6079718c006e3aab69e724b8c3e64944e4284cfa46309e78662154d4878da361","text":"Priorities []PriorityPolicy // Holds the information to communicate with the extender(s) ExtenderConfigs []ExtenderConfig // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100. HardPodAffinitySymmetricWeight int } type PredicatePolicy struct {"} {"_id":"q-en-kubernetes-607e84ced79aa2e76fd42d37a38cdd726e203cf299d4c370a9d77a45aac10bba","text":"func addConversionFuncs(scheme *runtime.Scheme) { // Add non-generated conversion functions err := scheme.AddConversionFuncs( v1.Convert_api_ServiceSpec_To_v1_ServiceSpec, v1.Convert_v1_DeleteOptions_To_api_DeleteOptions, v1.Convert_api_DeleteOptions_To_v1_DeleteOptions, v1.Convert_v1_ExportOptions_To_api_ExportOptions, v1.Convert_api_ExportOptions_To_v1_ExportOptions, v1.Convert_v1_List_To_api_List, v1.Convert_api_List_To_v1_List, v1.Convert_v1_ListOptions_To_api_ListOptions, v1.Convert_api_ListOptions_To_v1_ListOptions, v1.Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector, v1.Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector, v1.Convert_v1_ObjectMeta_To_api_ObjectMeta, v1.Convert_api_ObjectMeta_To_v1_ObjectMeta, v1.Convert_v1_ObjectReference_To_api_ObjectReference, v1.Convert_api_ObjectReference_To_v1_ObjectReference, v1.Convert_v1_OwnerReference_To_api_OwnerReference, v1.Convert_api_OwnerReference_To_v1_OwnerReference, v1.Convert_v1_Service_To_api_Service, v1.Convert_api_Service_To_v1_Service, v1.Convert_v1_ServiceList_To_api_ServiceList, v1.Convert_api_ServiceList_To_v1_ServiceList, v1.Convert_v1_ServicePort_To_api_ServicePort, v1.Convert_api_ServicePort_To_v1_ServicePort, v1.Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions, v1.Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions, v1.Convert_v1_ServiceSpec_To_api_ServiceSpec, v1.Convert_api_ServiceSpec_To_v1_ServiceSpec, v1.Convert_v1_ServiceStatus_To_api_ServiceStatus, v1.Convert_api_ServiceStatus_To_v1_ServiceStatus, ) if err != nil { // If one of the conversion functions is malformed, detect it immediately."} {"_id":"q-en-kubernetes-60d573f37bcdd7e6396ea40e92bf155e97878cc820e5cb00e168464634b431da","text":"\"os\" \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/api/meta\" \"k8s.io/kubernetes/pkg/api/unversioned\" \"k8s.io/kubernetes/pkg/apimachinery/registered\" \"k8s.io/kubernetes/pkg/kubectl\""} {"_id":"q-en-kubernetes-60dcc1637cc784887d5b65d998c35a7579d0bcef58b8a0b3fd5395ab299864fa","text":"} // DiskIsAttached returns if disk is attached to the VM using controllers supported by the plugin. func (vs *VSphere) DiskIsAttached(volPath string, nodeName k8stypes.NodeName) (bool, error) { diskIsAttachedInternal := func(volPath string, nodeName k8stypes.NodeName) (bool, error) { func (vs *VSphere) DiskIsAttached(volPath string, nodeName k8stypes.NodeName) (bool, string, error) { diskIsAttachedInternal := func(volPath string, nodeName k8stypes.NodeName) (bool, string, error) { var vSphereInstance string if nodeName == \"\" { vSphereInstance = vs.hostName"} {"_id":"q-en-kubernetes-60e5a96a572ecf008a23a9fe5c67e1cf774c180f4500ce77f61b78f75b085293","text":"terminating := apiextensions.IsCRDConditionTrue(crd, apiextensions.Terminating) crdInfo, err := r.getOrCreateServingInfoFor(crd) crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return } if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } if !hasServedCRDVersion(crdInfo.spec, requestInfo.APIVersion) { r.delegate.ServeHTTP(w, req) return } verb := strings.ToUpper(requestInfo.Verb) resource := requestInfo.Resource"} {"_id":"q-en-kubernetes-60edc5cdb535093766fc799fcbdc3badf1c4edae6eb182b7aca7d797b29d15b6","text":"// Check that request <= limit. limitQuantity, exists := requirements.Limits[resourceName] if exists { // For GPUs, not only requests can't exceed limits, they also can't be lower, i.e. must be equal. // For non overcommitable resources, not only requests can't exceed limits, they also can't be lower, i.e. must be equal. if quantity.Cmp(limitQuantity) != 0 && !helper.IsOvercommitAllowed(resourceName) { allErrs = append(allErrs, field.Invalid(reqPath, quantity.String(), fmt.Sprintf(\"must be equal to %s limit\", resourceName))) } else if quantity.Cmp(limitQuantity) > 0 { allErrs = append(allErrs, field.Invalid(reqPath, quantity.String(), fmt.Sprintf(\"must be less than or equal to %s limit\", resourceName))) } } else if resourceName == core.ResourceNvidiaGPU { allErrs = append(allErrs, field.Invalid(reqPath, quantity.String(), fmt.Sprintf(\"must be equal to %s request\", core.ResourceNvidiaGPU))) } else if !helper.IsOvercommitAllowed(resourceName) { allErrs = append(allErrs, field.Required(limPath, \"Limit must be set for non overcommitable resources\")) } }"} {"_id":"q-en-kubernetes-60fbeb5986900225f6d38a6c035f1605a6dc560065c28816a49112704e5fdb22","text":"return nil } func TestUpgradeServicePreferToDualStack(t *testing.T) { // Create an IPv4 only dual stack control-plane serviceCIDR := \"192.168.0.0/24\" defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.IPv6DualStack, true)() cfg := framework.NewIntegrationTestControlPlaneConfig() _, cidr, err := net.ParseCIDR(serviceCIDR) if err != nil { t.Fatalf(\"bad cidr: %v\", err) } cfg.ExtraConfig.ServiceIPRange = *cidr _, s, closeFn := framework.RunAnAPIServer(cfg) client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) // Wait until the default \"kubernetes\" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { _, err := client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), \"kubernetes\", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } return !apierrors.IsNotFound(err), nil }); err != nil { t.Fatalf(\"creating kubernetes service timed out\") } preferDualStack := v1.IPFamilyPolicyPreferDualStack svc := &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: \"svc-prefer-dual\", }, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeClusterIP, ClusterIPs: nil, IPFamilies: nil, IPFamilyPolicy: &preferDualStack, Ports: []v1.ServicePort{ { Name: \"svc-port-1\", Port: 443, TargetPort: intstr.IntOrString{IntVal: 443}, Protocol: \"TCP\", }, }, }, } // create the service _, err = client.CoreV1().Services(metav1.NamespaceDefault).Create(context.TODO(), svc, metav1.CreateOptions{}) if err != nil { t.Fatalf(\"Unexpected error: %v\", err) } // validate the service was created correctly if it was not expected to fail svc, err = client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), svc.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Unexpected error to get the service %s %v\", svc.Name, err) } if err := validateServiceAndClusterIPFamily(svc, []v1.IPFamily{v1.IPv4Protocol}); err != nil { t.Fatalf(\"Unexpected error validating the service %s %v\", svc.Name, err) } // reconfigure the apiserver to be dual-stack closeFn() secondaryServiceCIDR := \"2001:db8:1::/48\" _, secCidr, err := net.ParseCIDR(secondaryServiceCIDR) if err != nil { t.Fatalf(\"bad cidr: %v\", err) } cfg.ExtraConfig.SecondaryServiceIPRange = *secCidr _, s, closeFn = framework.RunAnAPIServer(cfg) defer closeFn() client = clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) // Wait until the default \"kubernetes\" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { _, err := client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), \"kubernetes\", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } return !apierrors.IsNotFound(err), nil }); err != nil { t.Fatalf(\"creating kubernetes service timed out\") } // validate the service was created correctly if it was not expected to fail svc, err = client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), svc.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Unexpected error to get the service %s %v\", svc.Name, err) } // service should remain single stack if err = validateServiceAndClusterIPFamily(svc, []v1.IPFamily{v1.IPv4Protocol}); err != nil { t.Fatalf(\"Unexpected error validating the service %s %v\", svc.Name, err) } } func TestDowngradeServicePreferToDualStack(t *testing.T) { // Create a dual stack control-plane serviceCIDR := \"192.168.0.0/24\" secondaryServiceCIDR := \"2001:db8:1::/48\" defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.IPv6DualStack, true)() dualStackCfg := framework.NewIntegrationTestControlPlaneConfig() _, cidr, err := net.ParseCIDR(serviceCIDR) if err != nil { t.Fatalf(\"bad cidr: %v\", err) } dualStackCfg.ExtraConfig.ServiceIPRange = *cidr _, secCidr, err := net.ParseCIDR(secondaryServiceCIDR) if err != nil { t.Fatalf(\"bad cidr: %v\", err) } dualStackCfg.ExtraConfig.SecondaryServiceIPRange = *secCidr _, s, closeFn := framework.RunAnAPIServer(dualStackCfg) client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) // Wait until the default \"kubernetes\" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { _, err := client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), \"kubernetes\", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } return !apierrors.IsNotFound(err), nil }); err != nil { t.Fatalf(\"creating kubernetes service timed out\") } preferDualStack := v1.IPFamilyPolicyPreferDualStack svc := &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: \"svc-prefer-dual01\", }, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeClusterIP, ClusterIPs: nil, IPFamilies: nil, IPFamilyPolicy: &preferDualStack, Ports: []v1.ServicePort{ { Name: \"svc-port-1\", Port: 443, TargetPort: intstr.IntOrString{IntVal: 443}, Protocol: \"TCP\", }, }, }, } // create the service _, err = client.CoreV1().Services(metav1.NamespaceDefault).Create(context.TODO(), svc, metav1.CreateOptions{}) if err != nil { t.Fatalf(\"Unexpected error: %v\", err) } // validate the service was created correctly if it was not expected to fail svc, err = client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), svc.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Unexpected error to get the service %s %v\", svc.Name, err) } if err := validateServiceAndClusterIPFamily(svc, []v1.IPFamily{v1.IPv4Protocol, v1.IPv6Protocol}); err != nil { t.Fatalf(\"Unexpected error validating the service %s %v\", svc.Name, err) } // reconfigure the apiserver to be sinlge stack closeFn() // reset secondary var emptyCidr net.IPNet dualStackCfg.ExtraConfig.SecondaryServiceIPRange = emptyCidr _, s, closeFn = framework.RunAnAPIServer(dualStackCfg) defer closeFn() client = clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) // Wait until the default \"kubernetes\" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { _, err := client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), \"kubernetes\", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } return !apierrors.IsNotFound(err), nil }); err != nil { t.Fatalf(\"creating kubernetes service timed out\") } // validate the service is still there. svc, err = client.CoreV1().Services(metav1.NamespaceDefault).Get(context.TODO(), svc.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Unexpected error to get the service %s %v\", svc.Name, err) } // service should be single stack if err = validateServiceAndClusterIPFamily(svc, []v1.IPFamily{v1.IPv4Protocol, v1.IPv6Protocol}); err != nil { t.Fatalf(\"Unexpected error validating the service %s %v\", svc.Name, err) } } "} {"_id":"q-en-kubernetes-610be331e15420f5433b60ff8d2c504f7b27aa5012f7a95ae0374e9b600f3537","text":"}) }) ginkgo.It(\"should ensure an IP overlapping both IPBlock.CIDR and IPBlock.Except is allowed [Feature:NetworkPolicy]\", func() { protocolUDP := v1.ProtocolUDP // Getting podServer's status to get podServer's IP, to create the CIDR with except clause podServerStatus, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(context.TODO(), podServer.Name, metav1.GetOptions{}) if err != nil { framework.ExpectNoError(err, \"Error occurred while getting pod status.\") } podServerAllowCIDR := fmt.Sprintf(\"%s/24\", podServerStatus.Status.PodIP) podServerIP := fmt.Sprintf(\"%s/32\", podServerStatus.Status.PodIP) // Exclude podServer's IP with an Except clause podServerExceptList := []string{podServerIP} // Create NetworkPolicy which blocks access to podServer with except clause. policyAllowCIDRWithExceptServerPod := &networkingv1.NetworkPolicy{ ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: \"deny-client-a-via-except-cidr-egress-rule\", }, Spec: networkingv1.NetworkPolicySpec{ // Apply this policy to the client. PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{ \"pod-name\": \"client-a\", }, }, PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeEgress}, // Allow traffic to only one CIDR block except subnet which includes Server. Egress: []networkingv1.NetworkPolicyEgressRule{ { Ports: []networkingv1.NetworkPolicyPort{ // Allow DNS look-ups { Protocol: &protocolUDP, Port: &intstr.IntOrString{Type: intstr.Int, IntVal: 53}, }, }, }, { To: []networkingv1.NetworkPolicyPeer{ { IPBlock: &networkingv1.IPBlock{ CIDR: podServerAllowCIDR, Except: podServerExceptList, }, }, }, }, }, }, } policyAllowCIDRWithExceptServerPodObj, err := f.ClientSet.NetworkingV1().NetworkPolicies(f.Namespace.Name).Create(context.TODO(), policyAllowCIDRWithExceptServerPod, metav1.CreateOptions{}) framework.ExpectNoError(err, \"Error occurred while creating policy: policyAllowCIDRWithExceptServerPod.\") ginkgo.By(\"Creating client-a which should not be able to contact the server.\", func() { testCannotConnect(f, f.Namespace, \"client-a\", service, 80) }) // Create NetworkPolicy which allows access to the podServer using podServer's IP in allow CIDR. policyAllowCIDRServerPod := &networkingv1.NetworkPolicy{ ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: \"allow-client-a-via-cidr-egress-rule\", }, Spec: networkingv1.NetworkPolicySpec{ // Apply this policy to the client. PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{ \"pod-name\": \"client-a\", }, }, PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeEgress}, // Allow traffic to only one CIDR block which includes Server. Egress: []networkingv1.NetworkPolicyEgressRule{ { Ports: []networkingv1.NetworkPolicyPort{ // Allow DNS look-ups { Protocol: &protocolUDP, Port: &intstr.IntOrString{Type: intstr.Int, IntVal: 53}, }, }, }, { To: []networkingv1.NetworkPolicyPeer{ { IPBlock: &networkingv1.IPBlock{ CIDR: podServerIP, }, }, }, }, }, }, } policyAllowCIDRServerPod, err = f.ClientSet.NetworkingV1().NetworkPolicies(f.Namespace.Name).Create(context.TODO(), policyAllowCIDRServerPod, metav1.CreateOptions{}) framework.ExpectNoError(err, \"Error occurred while creating policy: policyAllowCIDRServerPod.\") defer cleanupNetworkPolicy(f, policyAllowCIDRServerPod) ginkgo.By(\"Creating client-a which should now be able to contact the server.\", func() { testCanConnect(f, f.Namespace, \"client-a\", service, 80) }) ginkgo.By(\"Deleting the network policy with except podServer IP which disallows access to podServer.\") cleanupNetworkPolicy(f, policyAllowCIDRWithExceptServerPodObj) ginkgo.By(\"Creating client-a which should still be able to contact the server after deleting the network policy with except clause.\", func() { testCanConnect(f, f.Namespace, \"client-a\", service, 80) }) // Recreate the NetworkPolicy which contains the podServer's IP in the except list. policyAllowCIDRWithExceptServerPod, err = f.ClientSet.NetworkingV1().NetworkPolicies(f.Namespace.Name).Create(context.TODO(), policyAllowCIDRWithExceptServerPod, metav1.CreateOptions{}) framework.ExpectNoError(err, \"Error occurred while creating policy: policyAllowCIDRWithExceptServerPod.\") defer cleanupNetworkPolicy(f, policyAllowCIDRWithExceptServerPod) ginkgo.By(\"Creating client-a which should still be able to contact the server after recreating the network policy with except clause.\", func() { testCanConnect(f, f.Namespace, \"client-a\", service, 80) }) }) ginkgo.It(\"should enforce policies to check ingress and egress policies can be controlled independently based on PodSelector [Feature:NetworkPolicy]\", func() { var serviceA, serviceB *v1.Service var podA, podB *v1.Pod"} {"_id":"q-en-kubernetes-6112970c4a8d2d7086c631f704cab8c762d14fe080d9b66b81123df8de744fd8","text":" /* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package util import ( \"os\" \"reflect\" \"strings\" \"testing\" \"time\" \"github.com/google/go-cmp/cmp\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" kubetypes \"k8s.io/apimachinery/pkg/types\" \"k8s.io/client-go/informers\" csitrans \"k8s.io/csi-translation-lib\" fakeframework \"k8s.io/kubernetes/pkg/scheduler/framework/fake\" \"k8s.io/kubernetes/pkg/volume/csimigration\" \"k8s.io/kubernetes/pkg/volume/fc\" utilfeature \"k8s.io/apiserver/pkg/util/feature\" \"k8s.io/client-go/kubernetes/fake\" utiltesting \"k8s.io/client-go/util/testing\" \"k8s.io/kubernetes/pkg/volume\" volumetest \"k8s.io/kubernetes/pkg/volume/testing\" ) const ( testHostName = \"test-hostname\" socketPath = \"/var/run/kmsplugin\" migratedVolume = \"migrated-volume-name\" nonMigratedVolume = \"non-migrated-volume-name\" testNodeName = \"test-node-name\" ) var ( dirOrCreate = v1.HostPathType(v1.HostPathDirectoryOrCreate) nodeName = kubetypes.NodeName(testNodeName) hostPath = &v1.HostPathVolumeSource{ Path: socketPath, Type: &dirOrCreate, } migratedObjectReference = v1.ObjectReference{Namespace: \"default\", Name: \"migrated-pvc\"} nonMigratedObjectReference = v1.ObjectReference{Namespace: \"default\", Name: \"non-migrated-pvc\"} fsVolumeMode = new(v1.PersistentVolumeMode) ) type vaTest struct { desc string createNodeName kubetypes.NodeName pod *v1.Pod wantVolume *v1.Volume wantPersistentVolume *v1.PersistentVolume wantErrorMessage string } func Test_CreateVolumeSpec(t *testing.T) { for _, test := range []vaTest{ { desc: \"inline volume type that does not support csi migration\", createNodeName: nodeName, pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-apiserver\", Namespace: \"default\", }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: migratedVolume, VolumeSource: v1.VolumeSource{ HostPath: hostPath, }, }, }, }, }, wantVolume: &v1.Volume{ Name: migratedVolume, VolumeSource: v1.VolumeSource{ HostPath: hostPath, }, }, }, { desc: \"inline volume type that supports csi migration\", createNodeName: nodeName, pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-apiserver\", Namespace: \"default\", }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: migratedVolume, VolumeSource: v1.VolumeSource{ GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ PDName: \"test-disk\", FSType: \"ext4\", Partition: 0, ReadOnly: false, }, }, }, }, }, }, wantPersistentVolume: &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: \"pd.csi.storage.gke.io-test-disk\", }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ CSI: &v1.CSIPersistentVolumeSource{ Driver: \"pd.csi.storage.gke.io\", VolumeHandle: \"projects/UNSPECIFIED/zones/UNSPECIFIED/disks/test-disk\", FSType: \"ext4\", ReadOnly: false, VolumeAttributes: map[string]string{\"partition\": \"\"}, }, }, AccessModes: []v1.PersistentVolumeAccessMode{\"ReadWriteOnce\"}, VolumeMode: fsVolumeMode, }, }, }, { desc: \"pv type that does not support csi migration\", createNodeName: nodeName, pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-apiserver\", Namespace: \"default\", }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: nonMigratedVolume, VolumeSource: v1.VolumeSource{ PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ ClaimName: \"non-migrated-pvc\", ReadOnly: false, }, }, }, }, }, }, wantPersistentVolume: &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: nonMigratedVolume, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ ScaleIO: &v1.ScaleIOPersistentVolumeSource{}, }, ClaimRef: &nonMigratedObjectReference, }, }, }, { desc: \"pv type that supports csi migration\", createNodeName: nodeName, pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-apiserver\", Namespace: \"default\", }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: migratedVolume, VolumeSource: v1.VolumeSource{ PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ ClaimName: \"migrated-pvc\", ReadOnly: false, }, }, }, }, }, }, wantPersistentVolume: &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: migratedVolume, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ CSI: &v1.CSIPersistentVolumeSource{ Driver: \"pd.csi.storage.gke.io\", VolumeHandle: \"projects/UNSPECIFIED/zones/UNSPECIFIED/disks/test-disk\", FSType: \"ext4\", ReadOnly: false, VolumeAttributes: map[string]string{\"partition\": \"\"}, }, }, ClaimRef: &migratedObjectReference, }, }, }, { desc: \"CSINode not found for a volume type that supports csi migration\", createNodeName: kubetypes.NodeName(\"another-node\"), pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: \"kube-apiserver\", Namespace: \"default\", }, Spec: v1.PodSpec{ Volumes: []v1.Volume{ { Name: migratedVolume, VolumeSource: v1.VolumeSource{ PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ ClaimName: \"migrated-pvc\", ReadOnly: false, }, }, }, }, }, }, wantErrorMessage: \"csiNode \"another-node\" not found\", }, } { t.Run(test.desc, func(t *testing.T) { plugMgr, intreeToCSITranslator, csiTranslator, pvLister, pvcLister := setup(testNodeName, t) actualSpec, err := CreateVolumeSpec(test.pod.Spec.Volumes[0], test.pod, test.createNodeName, plugMgr, pvcLister, pvLister, intreeToCSITranslator, csiTranslator) if actualSpec == nil && (test.wantPersistentVolume != nil || test.wantVolume != nil) { t.Errorf(\"got volume spec is nil\") } if (len(test.wantErrorMessage) > 0 && err == nil) || (err != nil && !strings.Contains(err.Error(), test.wantErrorMessage)) { t.Errorf(\"got err %v, want err with message %v\", err, test.wantErrorMessage) } if test.wantPersistentVolume != nil { if actualSpec.PersistentVolume == nil { t.Errorf(\"gotVolumeWithCSIMigration is nil\") } gotVolumeWithCSIMigration := *actualSpec.PersistentVolume if gotVolumeWithCSIMigration.Name != test.wantPersistentVolume.Name { t.Errorf(\"got volume name is %v, want volume name is %v\", gotVolumeWithCSIMigration.Name, test.wantPersistentVolume.Name) } if !reflect.DeepEqual(gotVolumeWithCSIMigration.Spec, test.wantPersistentVolume.Spec) { t.Errorf(\"got volume.Spec and want.Spec diff is %s\", cmp.Diff(gotVolumeWithCSIMigration.Spec, test.wantPersistentVolume.Spec)) } } if test.wantVolume != nil { if actualSpec.Volume == nil { t.Errorf(\"gotVolume is nil\") } gotVolume := *actualSpec.Volume if !reflect.DeepEqual(gotVolume, *test.wantVolume) { t.Errorf(\"got volume and want diff is %s\", cmp.Diff(gotVolume, test.wantVolume)) } } }) } } func setup(nodeName string, t *testing.T) (*volume.VolumePluginMgr, csimigration.PluginManager, csitrans.CSITranslator, fakeframework.PersistentVolumeLister, fakeframework.PersistentVolumeClaimLister) { tmpDir, err := utiltesting.MkTmpdir(\"csi-test\") if err != nil { t.Fatalf(\"can't make a temp dir: %v\", err) } defer os.RemoveAll(tmpDir) *fsVolumeMode = v1.PersistentVolumeFilesystem csiTranslator := csitrans.New() intreeToCSITranslator := csimigration.NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate) kubeClient := fake.NewSimpleClientset() factory := informers.NewSharedInformerFactory(kubeClient, time.Minute) csiDriverInformer := factory.Storage().V1().CSIDrivers() csiDriverLister := csiDriverInformer.Lister() volumeAttachmentInformer := factory.Storage().V1().VolumeAttachments() volumeAttachmentLister := volumeAttachmentInformer.Lister() plugMgr := &volume.VolumePluginMgr{} fakeAttachDetachVolumeHost := volumetest.NewFakeAttachDetachVolumeHostWithCSINodeName(t, tmpDir, kubeClient, fc.ProbeVolumePlugins(), nodeName, csiDriverLister, volumeAttachmentLister, ) plugMgr.Host = fakeAttachDetachVolumeHost pvLister := fakeframework.PersistentVolumeLister{ { ObjectMeta: metav1.ObjectMeta{Name: migratedVolume}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ PDName: \"test-disk\", FSType: \"ext4\", Partition: 0, ReadOnly: false, }, }, ClaimRef: &migratedObjectReference, }, }, { ObjectMeta: metav1.ObjectMeta{Name: nonMigratedVolume}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ ScaleIO: &v1.ScaleIOPersistentVolumeSource{}, }, ClaimRef: &nonMigratedObjectReference, }, }, } pvcLister := fakeframework.PersistentVolumeClaimLister{ { ObjectMeta: metav1.ObjectMeta{Name: \"migrated-pvc\", Namespace: \"default\"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: migratedVolume}, Status: v1.PersistentVolumeClaimStatus{ Phase: v1.ClaimBound, }, }, { ObjectMeta: metav1.ObjectMeta{Name: \"non-migrated-pvc\", Namespace: \"default\"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: nonMigratedVolume}, Status: v1.PersistentVolumeClaimStatus{ Phase: v1.ClaimBound, }, }, } return plugMgr, intreeToCSITranslator, csiTranslator, pvLister, pvcLister } "} {"_id":"q-en-kubernetes-6128cfaf4c3226ef11f674132f21b82019e864368030657127fda3144fef4d48","text":"} func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(mounter, dir) return isNotMountPoint(mounter, dir) } // IsLikelyNotMountPoint determines if a directory is not a mountpoint."} {"_id":"q-en-kubernetes-61415bafbee1f3900c047dc4a6f3f444ef6b750ec57aea4185625695bb0cdd22","text":"test/e2e/network/service_latency.go: \"should not be very high\" test/e2e/node/events.go: \"should be sent by kubelets and the scheduler about pods scheduling and running\" test/e2e/node/pods.go: \"should be submitted and removed\" test/e2e/node/pods.go: \"should be submitted and removed\" test/e2e/node/pre_stop.go: \"should call prestop when killing a pod\" test/e2e/scheduling/predicates.go: \"validates resource limits of pods that are allowed to run\" test/e2e/scheduling/predicates.go: \"validates that NodeSelector is respected if not matching\""} {"_id":"q-en-kubernetes-6150af03b9e0f817a431a4b69b94027c27054a5e1531378c67ab759852edd1ed","text":"if [[ \"${KUBE_PROXY_DAEMONSET:-}\" == \"true\" && \"${master}\" != \"true\" ]]; then # Add kube-proxy daemonset label to node to avoid situation during cluster # upgrade/downgrade when there are two instances of kube-proxy running on a node. # TODO(liggitt): drop beta.kubernetes.io/kube-proxy-ds-ready in 1.16 node_labels=\"node.kubernetes.io/kube-proxy-ds-ready=true,beta.kubernetes.io/kube-proxy-ds-ready=true\" node_labels=\"node.kubernetes.io/kube-proxy-ds-ready=true\" fi if [[ -n \"${NODE_LABELS:-}\" ]]; then node_labels=\"${node_labels:+${node_labels},}${NODE_LABELS}\""} {"_id":"q-en-kubernetes-6169c65d978fc6a2e238e109788e84fb88d52be183ec3fe3690447d850117f86","text":"execAffinityTestForLBService(f, cs, svc) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. // [LinuxOnly]: Windows does not support session affinity. ginkgo.It(\"should be able to switch session affinity for LoadBalancer service with ESIPP on [Slow] [DisabledForLargeClusters] [LinuxOnly]\", func() { ginkgo.It(\"should be able to switch session affinity for LoadBalancer service with ESIPP on [Slow] [LinuxOnly]\", func() { // L4 load balancer affinity `ClientIP` is not supported on AWS ELB. e2eskipper.SkipIfProviderIs(\"aws\")"} {"_id":"q-en-kubernetes-61722917cc54b129eb3ae88be836ae5a09d7db29f43158ccee47e93f0e5156f6","text":"// api.Registry.GroupOrDie(v1.GroupName).GroupVersions[0].String() is changed // to \"v1\"? runtimeapi \"k8s.io/cri-api/pkg/apis/runtime/v1alpha2\" _ \"k8s.io/kubernetes/pkg/apis/core/install\" \"k8s.io/kubernetes/pkg/features\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\""} {"_id":"q-en-kubernetes-617abdcf13ee290705324bba1f1ea8409f86064929f06b2d0cf26d26d0211a33","text":"github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/onsi/ginkgo/v2 v2.9.1 github.com/onsi/gomega v1.27.4 github.com/opencontainers/runc v1.1.4 github.com/opencontainers/runc v1.1.5 github.com/opencontainers/selinux v1.10.0 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.0"} {"_id":"q-en-kubernetes-619cf7a3c50317d47c5ffcfa4e9b6aa7d463838de801747bdefd2f13b033eb82","text":"return \"\", err } // try and get canonical path for disk and if we can't throw error vmDiskPath, err = getcanonicalVolumePath(ctx, vm.Datacenter, vmDiskPath) if err != nil { klog.Errorf(\"failed to get canonical path for %s on node %s: %v\", vmDiskPath, convertToString(nodeName), err) return \"\", err } diskUUID, err = vm.AttachDisk(ctx, vmDiskPath, &vclib.VolumeOptions{SCSIControllerType: vclib.PVSCSIControllerType, StoragePolicyName: storagePolicyName}) if err != nil { klog.Errorf(\"Failed to attach disk: %s for node: %s. err: +%v\", vmDiskPath, convertToString(nodeName), err)"} {"_id":"q-en-kubernetes-61ed001609e2fbd480441bbad9e8a2ef0b47da6eb684571f1b0f1d3a1c01d1c7","text":"} func (sched *Scheduler) updatePodInSchedulingQueue(oldObj, newObj interface{}) { pod := newObj.(*v1.Pod) if sched.skipPodUpdate(pod) { oldPod, newPod := oldObj.(*v1.Pod), newObj.(*v1.Pod) // Bypass update event that carries identical objects; otherwise, a duplicated // Pod may go through scheduling and cause unexpected behavior (see #96071). if oldPod.ResourceVersion == newPod.ResourceVersion { return } if err := sched.SchedulingQueue.Update(oldObj.(*v1.Pod), pod); err != nil { if sched.skipPodUpdate(newPod) { return } if err := sched.SchedulingQueue.Update(oldPod, newPod); err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to update %T: %v\", newObj, err)) } }"} {"_id":"q-en-kubernetes-620aede4f2349dd52982e298122ef39d7b454a5570439281f4a43ebe5bf9cb01","text":"ExitCode: 1, }, }, map[string]error{}, []api.ContainerStatus{}, map[string]api.ContainerState{ reasons: map[string]error{}, oldStatuses: []api.ContainerStatus{}, expectedState: map[string]api.ContainerState{ \"running\": {Running: &api.ContainerStateRunning{ StartedAt: unversioned.NewTime(testTimestamp), }}, }, map[string]api.ContainerState{ expectedLastTerminationState: map[string]api.ContainerState{ \"running\": {Terminated: &api.ContainerStateTerminated{ ExitCode: 1, ContainerID: emptyContainerID,"} {"_id":"q-en-kubernetes-6225fc1174c6de99f250a88121747da3b5eefc17b4b19e87e0d1485ff89161ec","text":"procGetNetworkParams = iphlpapidll.MustFindProc(\"GetNetworkParams\") ) func fileExists(filename string) (bool, error) { stat, err := os.Stat(filename) if os.IsNotExist(err) { return false, nil } if err != nil { return false, err } return stat.Mode().IsRegular(), nil } func getHostDNSConfig(resolverConfig string) (*runtimeapi.DNSConfig, error) { if resolverConfig != \"\" && resolverConfig != hostResolvConf { err := fmt.Errorf(`Unexpected resolver config value: \"%s\". Expected \"\" or \"%s\".`, resolverConfig, hostResolvConf) if resolverConfig == \"\" { // This handles \"\" by returning defaults. return getDNSConfig(resolverConfig) } isFile, err := fileExists(resolverConfig) if err != nil { err = fmt.Errorf(`Unexpected error while getting os.Stat for \"%s\" resolver config. Error: %w`, resolverConfig, err) klog.ErrorS(err, \"Cannot get host DNS Configuration.\") return nil, err } if isFile { // Get the DNS config from a resolv.conf-like file. return getDNSConfig(resolverConfig) } var ( hostDNS, hostSearch []string err error ) if resolverConfig != hostResolvConf { err := fmt.Errorf(`Unexpected resolver config value: \"%s\". Expected \"\", \"%s\", or a path to an existing resolv.conf file.`, resolverConfig, hostResolvConf) klog.ErrorS(err, \"Cannot get host DNS Configuration.\") return nil, err } // If we get here, the resolverConfig == hostResolvConf and that is not actually a file, so // it means to use the host settings. // Get host DNS settings if resolverConfig == hostResolvConf { hostDNS, err = getDNSServerList() if err != nil { err = fmt.Errorf(\"Could not get the host's DNS Server List. Error: %w\", err) klog.ErrorS(err, \"Encountered error while getting host's DNS Server List.\") return nil, err } hostSearch, err = getDNSSuffixList() if err != nil { err = fmt.Errorf(\"Could not get the host's DNS Suffix List. Error: %w\", err) klog.ErrorS(err, \"Encountered error while getting host's DNS Suffix List.\") return nil, err } hostDNS, err := getDNSServerList() if err != nil { err = fmt.Errorf(\"Could not get the host's DNS Server List. Error: %w\", err) klog.ErrorS(err, \"Encountered error while getting host's DNS Server List.\") return nil, err } hostSearch, err := getDNSSuffixList() if err != nil { err = fmt.Errorf(\"Could not get the host's DNS Suffix List. Error: %w\", err) klog.ErrorS(err, \"Encountered error while getting host's DNS Suffix List.\") return nil, err } return &runtimeapi.DNSConfig{ Servers: hostDNS,"} {"_id":"q-en-kubernetes-622950245410adde9ed8e87a0ce692f6d6da8ce135a42e263272c5bd023f4470","text":"kubeCfg.PodInfraContainerImage, float32(kubeCfg.RegistryPullQPS), int(kubeCfg.RegistryBurst), containerLogsDir, ContainerLogsDir, kubeDeps.OSInterface, klet.networkPlugin, klet,"} {"_id":"q-en-kubernetes-625e2f560075fb096bbf6f7b4cfbe08780a525c74b30e90acdde5705b24fb469","text":"} return nil } // ClearEntriesForPortNAT uses the conntrack tool to delete the contrack entries // for connections specified by the {dest IP, port} pair. // Known issue: // https://github.com/kubernetes/kubernetes/issues/59368 func ClearEntriesForPortNAT(execer exec.Interface, dest string, port int, protocol v1.Protocol) error { if port <= 0 { return fmt.Errorf(\"Wrong port number. The port number must be greater then zero\") } parameters := parametersWithFamily(utilnet.IsIPv6String(dest), \"-D\", \"-p\", protoStr(protocol), \"--dport\", strconv.Itoa(port), \"--dst-nat\", dest) err := Exec(execer, parameters...) if err != nil && !strings.Contains(err.Error(), NoConnectionToDelete) { return fmt.Errorf(\"error deleting conntrack entries for UDP port: %d, error: %v\", port, err) } return nil } "} {"_id":"q-en-kubernetes-626d4e8710e4e16201ed04ec0a61abba19916e098c9ba880ebdcca8c64e3c368","text":"importpath = \"k8s.io/kube-aggregator/pkg/apiserver\", deps = [ \"//vendor/github.com/golang/glog:go_default_library\", \"//vendor/k8s.io/api/core/v1:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library\","} {"_id":"q-en-kubernetes-628730e7e32e608a94b5373c744822174a53518792765440f5b7843587b6d1d2","text":"if len(psp.Spec.AllowedFlexVolumes) > 0 { w.Write(LEVEL_1, \"Allowed FlexVolume Types:t%sn\", flexVolumesToString(psp.Spec.AllowedFlexVolumes)) } if len(psp.Spec.AllowedUnsafeSysctls) > 0 { w.Write(LEVEL_1, \"Allowed Unsafe Sysctls:t%sn\", sysctlsToString(psp.Spec.AllowedUnsafeSysctls)) } if len(psp.Spec.ForbiddenSysctls) > 0 { w.Write(LEVEL_1, \"Forbidden Sysctls:t%sn\", sysctlsToString(psp.Spec.ForbiddenSysctls)) } w.Write(LEVEL_1, \"Allow Host Network:t%tn\", psp.Spec.HostNetwork) w.Write(LEVEL_1, \"Allow Host Ports:t%sn\", hostPortRangeToString(psp.Spec.HostPorts)) w.Write(LEVEL_1, \"Allow Host PID:t%tn\", psp.Spec.HostPID)"} {"_id":"q-en-kubernetes-628df1e535f121983615554984159ddd3bf935334f00cc43451aa38260fc541e","text":"// applyPlatformSpecificDockerConfig applies platform-specific configurations to a dockertypes.ContainerCreateConfig struct. // The containerCleanupInfo struct it returns will be passed as is to performPlatformSpecificContainerCleanup // after either: // * the container creation has failed // * the container has been successfully started // * the container has been removed // whichever happens first. // after either the container creation has failed or the container has been removed. func (ds *dockerService) applyPlatformSpecificDockerConfig(*runtimeapi.CreateContainerRequest, *dockertypes.ContainerCreateConfig) (*containerCleanupInfo, error) { return nil, nil } // performPlatformSpecificContainerCleanup is responsible for doing any platform-specific cleanup // after either: // * the container creation has failed // * the container has been successfully started // * the container has been removed // whichever happens first. // Any errors it returns are simply logged, but do not prevent the container from being started or // removed. // after either the container creation has failed or the container has been removed. func (ds *dockerService) performPlatformSpecificContainerCleanup(cleanupInfo *containerCleanupInfo) (errors []error) { return }"} {"_id":"q-en-kubernetes-629213e341088499acbf47797f9f9bb1053a9019cff28136cec150bfc544241a","text":"utilerrors \"k8s.io/apimachinery/pkg/util/errors\" serviceapi \"k8s.io/kubernetes/pkg/api/v1/service\" \"github.com/Azure/azure-sdk-for-go/arm/compute\" \"github.com/Azure/azure-sdk-for-go/arm/network\" \"github.com/Azure/go-autorest/autorest/to\" \"github.com/golang/glog\""} {"_id":"q-en-kubernetes-62e2af84c42a2d1da5934d7473397d3695d64ca85144cbb525ac93b02a109716","text":"fs.IntVar(&s.HardPodAffinitySymmetricWeight, \"hard-pod-affinity-symmetric-weight\", api.DefaultHardPodAffinitySymmetricWeight, \"RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding \"+ \"to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule.\") fs.MarkDeprecated(\"hard-pod-affinity-symmetric-weight\", \"This option was moved to the policy configuration file\") fs.StringVar(&s.FailureDomains, \"failure-domains\", api.DefaultFailureDomains, \"Indicate the \"all topologies\" set for an empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.\") fs.MarkDeprecated(\"failure-domains\", \"Doesn't have any effect. Will be removed in future version.\") leaderelection.BindFlags(&s.LeaderElection, fs)"} {"_id":"q-en-kubernetes-62ec76c0843556553e724754c59e5071ca5683af473dd4cc1cc23bf8c9785858","text":" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\"

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version. Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). -- # Generic Configuration Object ## Abstract This proposal proposes a new API resource, `ConfigMap`, that stores data used for the configuration of applications deployed on `Kubernetes`. The main focus points of this proposal are: * Dynamic distribution of configuration data to deployed applications. * Encapsulate configuration information and simplify `Kubernetes` deployments. * Create a flexible configuration model for `Kubernetes`. ## Motivation A `Secret`-like API resource is needed to store configuration data that pods can consume. Goals of this design: 1. Describe a `ConfigMap` API resource 2. Describe the semantics of consuming `ConfigMap` as environment variables 3. Describe the semantics of consuming `ConfigMap` as files in a volume ## Use Cases 1. As a user, I want to be able to consume configuration data as environment variables 2. As a user, I want to be able to consume configuration data as files in a volume 3. As a user, I want my view of configuration data in files to be eventually consistent with changes to the data ### Consuming `ConfigMap` as Environment Variables Many programs read their configuration from environment variables. `ConfigMap` should be possible to consume in environment variables. The rough series of events for consuming `ConfigMap` this way is: 1. A `ConfigMap` object is created 2. A pod that consumes the configuration data via environment variables is created 3. The pod is scheduled onto a node 4. The kubelet retrieves the `ConfigMap` resource(s) referenced by the pod and starts the container processes with the appropriate data in environment variables ### Consuming `ConfigMap` in Volumes Many programs read their configuration from configuration files. `ConfigMap` should be possible to consume in a volume. The rough series of events for consuming `ConfigMap` this way is: 1. A `ConfigMap` object is created 2. A new pod using the `ConfigMap` via the volume plugin is created 3. The pod is scheduled onto a node 4. The Kubelet creates an instance of the volume plugin and calls its `Setup()` method 5. The volume plugin retrieves the `ConfigMap` resource(s) referenced by the pod and projects the appropriate data into the volume ### Consuming `ConfigMap` Updates Any long-running system has configuration that is mutated over time. Changes made to configuration data must be made visible to pods consuming data in volumes so that they can respond to those changes. The `resourceVersion` of the `ConfigMap` object will be updated by the API server every time the object is modified. After an update, modifications will be made visible to the consumer container: 1. A `ConfigMap` object is created 2. A new pod using the `ConfigMap` via the volume plugin is created 3. The pod is scheduled onto a node 4. During the sync loop, the Kubelet creates an instance of the volume plugin and calls its `Setup()` method 5. The volume plugin retrieves the `ConfigMap` resource(s) referenced by the pod and projects the appropriate data into the volume 6. The `ConfigMap` referenced by the pod is updated 7. During the next iteration of the `syncLoop`, the Kubelet creates an instance of the volume plugin and calls its `Setup()` method 8. The volume plugin projects the updated data into the volume atomically It is the consuming pod's responsibility to make use of the updated data once it is made visible. Because environment variables cannot be updated without restarting a container, configuration data consumed in environment variables will not be updated. ### Advantages * Easy to consume in pods; consumer-agnostic * Configuration data is persistent and versioned * Consumers of configuration data in volumes can respond to changes in the data ## Proposed Design ### API Resource The `ConfigMap` resource will be added to the `extensions` API Group: ```go package api // ConfigMap holds configuration data for pods to consume. type ConfigMap struct { TypeMeta `json:\",inline\"` ObjectMeta `json:\"metadata,omitempty\"` // Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN or leading // dot followed by valid DNS_SUBDOMAIN. Data map[string]string `json:\"data,omitempty\"` } type ConfigMapList struct { TypeMeta `json:\",inline\"` ListMeta `json:\"metadata,omitempty\"` Items []ConfigMap `json:\"items\"` } ``` A `Registry` implementation for `ConfigMap` will be added to `pkg/registry/configmap`. ### Environment Variables The `EnvVarSource` will be extended with a new selector for `ConfigMap`: ```go package api // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // other fields omitted // Specifies a ConfigMap key ConfigMap *ConfigMapSelector `json:\"configMap,omitempty\"` } // ConfigMapSelector selects a key of a ConfigMap. type ConfigMapSelector struct { // The name of the ConfigMap to select a key from. ConfigMapName string `json:\"configMapName\"` // The key of the ConfigMap to select. Key string `json:\"key\"` } ``` ### Volume Source A new `ConfigMapVolumeSource` type of volume source containing the `ConfigMap` object will be added to the `VolumeSource` struct in the API: ```go package api type VolumeSource struct { // other fields omitted ConfigMap *ConfigMapVolumeSource `json:\"configMap,omitempty\"` } // ConfigMapVolumeSource represents a volume that holds configuration data type ConfigMapVolumeSource struct { // A list of configuration data keys to project into the volume in files Files []ConfigMapVolumeFile `json:\"files\"` } // ConfigMapVolumeFile represents a single file containing configuration data type ConfigMapVolumeFile struct { ConfigMapSelector `json:\",inline\"` // The relative path name of the file to be created. // Must not be absolute or contain the '..' path. Must be utf-8 encoded. // The first item of the relative path must not start with '..' Path string `json:\"path\"` } ``` **Note:** The update logic used in the downward API volume plug-in will be extracted and re-used in the volume plug-in for `ConfigMap`. ## Examples #### Consuming `ConfigMap` as Environment Variables ```yaml apiVersion: extensions/v1beta1 kind: ConfigMap metadata: name: etcd-env-config data: number_of_members: 1 initial_cluster_state: new initial_cluster_token: DUMMY_ETCD_INITIAL_CLUSTER_TOKEN discovery_token: DUMMY_ETCD_DISCOVERY_TOKEN discovery_url: http://etcd-discovery:2379 etcdctl_peers: http://etcd:2379 ``` This pod consumes the `ConfigMap` as environment variables: ```yaml apiVersion: v1 kind: Pod metadata: name: config-env-example spec: containers: - name: etcd image: openshift/etcd-20-centos7 ports: - containerPort: 2379 protocol: TCP - containerPort: 2380 protocol: TCP env: - name: ETCD_NUM_MEMBERS valueFrom: configMap: configMapName: etcd-env-config key: number_of_members - name: ETCD_INITIAL_CLUSTER_STATE valueFrom: configMap: configMapName: etcd-env-config key: initial_cluster_state - name: ETCD_DISCOVERY_TOKEN valueFrom: configMap: configMapName: etcd-env-config key: discovery_token - name: ETCD_DISCOVERY_URL valueFrom: configMap: configMapName: etcd-env-config key: discovery_url - name: ETCDCTL_PEERS valueFrom: configMap: configMapName: etcd-env-config key: etcdctl_peers ``` ### Consuming `ConfigMap` as Volumes `redis-volume-config` is intended to be used as a volume containing a config file: ```yaml apiVersion: extensions/v1beta1 kind: ConfigMap metadata: name: redis-volume-config data: redis.conf: \"pidfile /var/run/redis.pidnport6379ntcp-backlog 511n databases 1ntimeout 0n\" ``` The following pod consumes the `redis-volume-config` in a volume: ```yaml apiVersion: v1 kind: Pod metadata: name: config-volume-example spec: containers: - name: redis image: kubernetes/redis command: \"redis-server /mnt/config-map/etc/redis.conf\" ports: - containerPort: 6379 volumeMounts: - name: config-map-volume mountPath: /mnt/config-map volumes: - name: config-map-volume configMap: files: - path: \"etc/redis.conf\" configMapName: redis-volume-config key: redis.conf ``` ### Future Improvements In the future, we may add the ability to specify an init-container that can watch the volume contents for updates and respond to changes when they occur. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/configmap.md?pixel)]()
"} {"_id":"q-en-kubernetes-62fda47231171e9a41a7c7894c0628d6702a7caa56c47e06f6b5e96c373fd2ba","text":"// Run begins watching and syncing daemon sets. func (dsc *DaemonSetsController) Run(workers int, stopCh <-chan struct{}) { defer util.HandleCrash() glog.Infof(\"Starting Daemon Sets controller manager\") controller.SyncAllPodsWithStore(dsc.kubeClient, dsc.podStore.Store) go dsc.dsController.Run(stopCh) go dsc.podController.Run(stopCh) go dsc.nodeController.Run(stopCh)"} {"_id":"q-en-kubernetes-62fe9de90eb340bf529cbe0e17b4f66ceeedebf0618fa419b4e9347d0a763e19","text":"}) It(\"should write files of various sizes, verify size, validate content\", func() { fileSizes := []int64{1 * framework.MiB, 100 * framework.MiB} fileSizes := []int64{fileSizeSmall, fileSizeMedium} fsGroup := int64(1234) podSec := v1.PodSecurityContext{ FSGroup: &fsGroup,"} {"_id":"q-en-kubernetes-630c4d56343abe9d5052b745860bdf7ad23839937dd71ceee3228bbdb340d51f","text":"(disk.ManagedDisk != nil && diskURI != \"\" && strings.EqualFold(*disk.ManagedDisk.ID, diskURI)) { // found the disk klog.V(2).Infof(\"azureDisk - detach disk: name %q uri %q\", diskName, diskURI) disks[i].ToBeDetached = to.BoolPtr(true) if strings.EqualFold(as.cloud.Environment.Name, \"AZURESTACKCLOUD\") { disks = append(disks[:i], disks[i+1:]...) } else { disks[i].ToBeDetached = to.BoolPtr(true) } bFoundDisk = true break }"} {"_id":"q-en-kubernetes-632406f1bac16cb044c1814620ff5c36b0e9a2f3d1a15cb63237a7b9085e04ea","text":"klog.Errorf(\"cannot convert to *v1.Node: %v\", t) return } klog.V(3).Infof(\"delete event for node %q\", node.Name) // NOTE: Updates must be written to scheduler cache before invalidating // equivalence cache, because we could snapshot equivalence cache after the // invalidation and then snapshot the cache itself. If the cache is"} {"_id":"q-en-kubernetes-63599030d8572160dd248513336ef4f7abed60bb5e0354ae56f24e72b736b142","text":"package fake import ( \"fmt\" \"k8s.io/apimachinery/pkg/util/rand\" ) const ( defaultUnixEndpoint = \"unix:///tmp/kubelet_remote.sock\" defaultUnixEndpoint = \"unix:///tmp/kubelet_remote_%v.sock\" ) // GenerateEndpoint generates a new unix socket server of grpc server. func GenerateEndpoint() (string, error) { return defaultUnixEndpoint, nil // use random int be a part fo file name return fmt.Sprintf(defaultUnixEndpoint, rand.Int()), nil }"} {"_id":"q-en-kubernetes-6359e75e50828a8310dc919fcb98d20678167e99caf3705180fa88b000bcb5dc","text":"return true, errors.New(\"not implemented\") } func (m *execMounter) EvalHostSymlinks(pathname string) (string, error) { return \"\", errors.New(\"not implemented\") } func (mounter *execMounter) PrepareSafeSubpath(subPath Subpath) (newHostPath string, cleanupAction func(), err error) { return subPath.Path, nil, nil }"} {"_id":"q-en-kubernetes-6390b3fd7342548749cf24fa921b501d67c9a944ca357799bd72e81b5db58295","text":"Description: The command 'kubectl version' MUST return the major, minor versions, GitCommit, etc of the Client and the Server that the kubectl is configured to connect to. */ framework.ConformanceIt(\"should check is all data is printed \", func() { version := framework.RunKubectlOrDie(ns, \"version\") requiredItems := []string{\"Client Version:\", \"Server Version:\", \"Major:\", \"Minor:\", \"GitCommit:\"} versionString := framework.RunKubectlOrDie(ns, \"version\") // we expect following values for: Major -> digit, Minor -> numeric followed by an optional '+', GitCommit -> alphanumeric requiredItems := []string{\"Client Version: \", \"Server Version: \"} for _, item := range requiredItems { if !strings.Contains(version, item) { framework.Failf(\"Required item %s not found in %s\", item, version) if matched, _ := regexp.MatchString(item+`version.Info{Major:\"d\", Minor:\"d++?\", GitVersion:\"vd.d+.[dw-.+]+\", GitCommit:\"[0-9a-f]+\"`, versionString); !matched { framework.Failf(\"Item %s value is not valid in %sn\", item, versionString) } } })"} {"_id":"q-en-kubernetes-6397ef63432ab62ac811d8d0722302e226ca00b70987307348e66041f37a38e9","text":"// The first detach will be triggered after at least 50ms (maxWaitForUnmountDuration in test). // Right before detach operation is performed, the volume will be first removed from being reported // as attached on node status (RemoveVolumeFromReportAsAttached). After detach operation which is expected to fail, // controller then added the volume back as attached. // controller then treats the attachment as Uncertain. // Here it sleeps 100ms so that detach should be triggered already at this point. // verifyVolumeReportedAsAttachedToNode will check volume is in the list of volume attached that needs to be updated // in node status. By calling this function (GetVolumesToReportAttached), node status should be updated, and the volume // will not need to be updated until new changes are applied (detach is triggered again) time.Sleep(100 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateUncertain, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, false, asw, volumeAttachedCheckTimeout) // Add a second pod which tries to attach the volume to the same node. // After adding pod to the same node, detach will not be triggered any more. // After adding pod to the same node, detach will not be triggered any more, // the volume gets attached and reported as attached to the node. generatedVolumeName, podAddErr = dsw.AddPod(types.UniquePodName(podName2), controllervolumetesting.NewPod(podName2, podName2), volumeSpec, nodeName1) if podAddErr != nil { t.Fatalf(\"AddPod failed. Expected: Actual: <%v>\", podAddErr)"} {"_id":"q-en-kubernetes-6398f05f53e21a4a003affb78bf401e649c93bdba2dce138c81d4ee0e0662ccf","text":"eventRecorder := record.NewFakeRecorder(100) eventRecorder.IncludeObject = true metadataClient := fakemetadata.NewSimpleMetadataClient(legacyscheme.Scheme) metadataClient := fakemetadata.NewSimpleMetadataClient(fakemetadata.NewTestScheme()) tweakableRM := meta.NewDefaultRESTMapper(nil) tweakableRM.AddSpecific("} {"_id":"q-en-kubernetes-63ab684902c6393fb60627763290fe3fc53a3311863fe9c305a6362e3ad9c9d1","text":"} labels[\"e2e-run\"] = string(RunId) // We don't use ObjectMeta.GenerateName feature, as in case of API call // failure we don't know whether the namespace was created and what is its // name. name, err := findAvailableNamespaceName(baseName, c) if err != nil { return nil, err } namespaceObj := &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{ GenerateName: fmt.Sprintf(\"e2e-tests-%v-\", baseName), Namespace: \"\", Labels: labels, Name: name, Namespace: \"\", Labels: labels, }, Status: v1.NamespaceStatus{}, }"} {"_id":"q-en-kubernetes-63ac67d9710f04e408545c9f5a2187e4cf811d7a219491ce74de582a7364b638","text":"if err := os.WriteFile(certFixturePath, certBuffer.Bytes(), 0644); err != nil { return nil, nil, fmt.Errorf(\"failed to write cert fixture to %s: %v\", certFixturePath, err) } if err := os.WriteFile(keyFixturePath, keyBuffer.Bytes(), 0644); err != nil { if err := os.WriteFile(keyFixturePath, keyBuffer.Bytes(), 0600); err != nil { return nil, nil, fmt.Errorf(\"failed to write key fixture to %s: %v\", certFixturePath, err) } }"} {"_id":"q-en-kubernetes-63d0d3e391df2c12d5b7850236f4660958c439c06b4f48ad892dcb141ad97a7e","text":"\"//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library\", \"//vendor/google.golang.org/grpc:go_default_library\", \"//vendor/k8s.io/utils/exec:go_default_library\", ], ] + select({ \"@io_bazel_rules_go//go/platform:aix\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:android\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:darwin\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:dragonfly\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:freebsd\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:illumos\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:ios\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:js\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:linux\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:nacl\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:netbsd\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:openbsd\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:plan9\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"@io_bazel_rules_go//go/platform:solaris\": [ \"//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library\", ], \"//conditions:default\": [], }), ) filegroup("} {"_id":"q-en-kubernetes-63eb58428b481d1acdb569d945a415315555750065b4ba9424061982376b474d","text":"gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= "} {"_id":"q-en-kubernetes-63f9f4b3c8e0644fc80ef159d429eab7bc8703d29b692cc95d28ed4cd3dcde24","text":"_, err = client.CoreV1().Pods(defaultNamespace).List(ctx, metav1.ListOptions{}) tt.assertErrFn(t, err) err = os.WriteFile(apiServer.ServerOpts.Authentication.AuthenticationConfigFile, []byte(tt.newAuthConfigFn(t, oidcServer.URL(), string(caCert))), 0600) // Create a temporary file tempFile, err := os.CreateTemp(\"\", \"tempfile\") require.NoError(t, err) defer func() { _ = tempFile.Close() }() // Write the new content to the temporary file _, err = tempFile.Write([]byte(tt.newAuthConfigFn(t, oidcServer.URL(), string(caCert)))) require.NoError(t, err) // Atomically replace the original file with the temporary file err = os.Rename(tempFile.Name(), apiServer.ServerOpts.Authentication.AuthenticationConfigFile) require.NoError(t, err) if tt.waitAfterConfigSwap {"} {"_id":"q-en-kubernetes-6407ef9174bca7bea22a79b3af3f16442b67a0f815a0fe29c653152c378b5f15","text":"} } allErrs = append(allErrs, validateValueValidation(s.ValueValidation, skipAnyOf, skipFirstAllOfAnyOf, fldPath)...) allErrs = append(allErrs, validateValueValidation(s.ValueValidation, skipAnyOf, skipFirstAllOfAnyOf, lvl, fldPath)...) if s.XEmbeddedResource && s.Type != \"object\" { if len(s.Type) == 0 {"} {"_id":"q-en-kubernetes-641546cfd5c9ec07847705d2bfd4e0c35829bc67daca08a064ca05d6e1734887","text":"if err != nil { return fmt.Errorf(\"watch error:%v for volume %v\", err, volumeHandle) } var watcherClosed bool ch := watcher.ResultChan() defer func() { if !watcherClosed { watcher.Stop() } }() ch := watcher.ResultChan() defer watcher.Stop() for { select { case event, ok := <-ch:"} {"_id":"q-en-kubernetes-64348926d5386e5fd569284711718dcb27f5bd68083b620e895d6dc4cda1866c","text":" FROM debian:jessie RUN apt-get update RUN apt-get -qy install python-seqdiag make curl WORKDIR /diagrams RUN curl -sLo DroidSansMono.ttf https://googlefontdirectory.googlecode.com/hg/apache/droidsansmono/DroidSansMono.ttf ADD . /diagrams CMD bash -c 'make >/dev/stderr && tar cf - *.png' No newline at end of file"} {"_id":"q-en-kubernetes-64a3cfcaef8158c056f1028ad68ad5dacfeab06dbd510e87eefe0e5b11e9c4a5","text":"export FAIL_ON_GCP_RESOURCE_LEAK=\"false\" - 'gce-flannel': description: 'Run E2E tests on GCE using Flannel and the latest successful build. This suite is quarantined in a dedicated project because Flannel integration is experimental.' disable_job: true # Issue #24520 # We don't really care to enforce a timeout for flannel tests. Any performance issues will show up in the other GCE builders. # This suite is to continuously check that flannel + Kubernetes works. timeout: 120"} {"_id":"q-en-kubernetes-64aed225b31f5566fdcd522d235959dbfa6315616ecabcf577dc3ca95ee1f1d7","text":"\"//pkg/api/v1/endpoints:go_default_library\", \"//staging/src/k8s.io/api/core/v1:go_default_library\", \"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library\","} {"_id":"q-en-kubernetes-64b6ba010143fc7500330b7ddce2652bdfc939505cf55d3c75f97082eadd454f","text":"$KUBECFG delete services/redismaster $KUBECFG delete pods/redis-master-2 POD_LIST_2=$($KUBECFG '-template={{range.Items}}{{.Meta}} {{end}}' list pods) POD_LIST_2=$($KUBECFG '-template={{range.Items}}{{.Name}} {{end}}' list pods) echo \"Pods running after shutdown: ${POD_LIST_2}\" exit 0"} {"_id":"q-en-kubernetes-64e001cc52f5069c487c7bbc3fbe69afc497e2f48305b841ad5ca5792e9ff626","text":"addBadCheck bool }{ {\"?verbose\", \"[+]ping oknhealthz check passedn\", http.StatusOK, false}, {\"?exclude=dontexist\", \"ok\", http.StatusOK, false}, {\"?exclude=bad\", \"ok\", http.StatusOK, true}, {\"?verbose=true&exclude=bad\", \"[+]ping okn[+]bad excluded: oknhealthz check passedn\", http.StatusOK, true}, {\"?verbose=true&exclude=dontexist\", \"[+]ping oknwarn: some health checks cannot be excluded: no matches for \"dontexist\"nhealthz check passedn\", http.StatusOK, false}, {\"/ping\", \"ok\", http.StatusOK, false}, {\"\", \"ok\", http.StatusOK, false}, {\"?verbose\", \"[+]ping okn[-]bad failed: reason withheldnhealthz check failedn\", http.StatusInternalServerError, true},"} {"_id":"q-en-kubernetes-64e74624be6499077c6660754cbf34bbd86a3f51b4ba3cb8039e2c95980d3c58","text":"Porter = Config{e2eRegistry, \"porter\", \"1.0\"} PortForwardTester = Config{e2eRegistry, \"port-forward-tester\", \"1.0\"} Redis = Config{e2eRegistry, \"redis\", \"1.0\"} ResourceConsumer = Config{e2eRegistry, \"resource-consumer\", \"1.4\"} ResourceConsumer = Config{e2eRegistry, \"resource-consumer\", \"1.5\"} ResourceController = Config{e2eRegistry, \"resource-consumer/controller\", \"1.0\"} ServeHostname = Config{e2eRegistry, \"serve-hostname\", \"1.1\"} TestWebserver = Config{e2eRegistry, \"test-webserver\", \"1.0\"}"} {"_id":"q-en-kubernetes-64f77bddadf74fb2432fbaf2bc1c467e47d7cf828e5ca436425ac45968697464","text":"func (s *Controller) getNodeConditionPredicate() NodeConditionPredicate { return func(node *v1.Node) bool { // We add the master to the node list, but its unschedulable. So we use this to filter // the master. if node.Spec.Unschedulable { return false } if s.legacyNodeRoleFeatureEnabled { // As of 1.6, we will taint the master, but not necessarily mark it unschedulable. // Recognize nodes labeled as master, and filter them also, as we were doing previously."} {"_id":"q-en-kubernetes-6506af4b1254de9fc00ab6193ebe5ac0a049cc000f2f3e2e16c6b78409b17089","text":"\"fmt\" \"net\" \"reflect\" \"sort\" \"strings\" \"testing\""} {"_id":"q-en-kubernetes-6524534ae69e699a02e13769f85b0ee20d1717ab54db2b9092c209bd529349c8","text":"return err } var ok bool // Handle filename input from stdin. The resource builder always returns an api.List // when creating resource(s) from a stream. if list, ok := obj.(*api.List); ok { if len(list.Items) > 1 { return cmdutil.UsageError(cmd, \"%s specifies multiple items\", filename) } obj = list.Items[0] } newRc, ok = obj.(*api.ReplicationController) if !ok { if _, kind, err := typer.ObjectVersionAndKind(obj); err == nil {"} {"_id":"q-en-kubernetes-6548f62c957194401d7b2733ee9d292ef5b3edafa2b2bf6ecebb45ddefa1766a","text":"roleRef: kind: Role name: external-provisioner-cfg apiGroup: rbac.authorization.k8s.io "} {"_id":"q-en-kubernetes-654eefb3353139b76cce2a424b8cbbbc35a528429cc6ad9f86757bdc75c460a7","text":"webhook_authn_config_volume=\"{\"name\": \"webhookauthnconfigmount\",\"hostPath\": {\"path\": \"/etc/gcp_authn.config\"}},\" fi params+=\" --authorization-mode=ABAC\" params+=\" --authorization-mode=RBAC\" local webhook_config_mount=\"\" local webhook_config_volume=\"\" if [[ -n \"${GCP_AUTHZ_URL:-}\" ]]; then"} {"_id":"q-en-kubernetes-65816a4704722100b5944d5fe1a7a13e88dd51d9f1b27c2347341fcbc13ed7fd","text":"} func TestList(t *testing.T) { scheme := NewTestScheme() metav1.AddMetaToScheme(scheme) client := NewSimpleMetadataClient(scheme, newPartialObjectMetadata(\"group/version\", \"TheKind\", \"ns-foo\", \"name-foo\"), newPartialObjectMetadata(\"group2/version\", \"TheKind\", \"ns-foo\", \"name2-foo\"),"} {"_id":"q-en-kubernetes-65c90f19a9c121ce52fe69c92729db30a8ca0ab0dd973cfa47c34572e52f1411","text":"if err != nil { t.Errorf(\"test case %s failed: %v\", tc.name, err) } watchError := tc.watcherError csiAttacher.waitSleepTime = 100 * time.Millisecond go func() { if watchError { errStatus := apierrs.NewInternalError(fmt.Errorf(\"we got an error\")).Status() fakeWatcher.Error(&errStatus) return } fakeWatcher.Delete(attachment) }() err = csiAttacher.Detach(volumeName, types.NodeName(nodeName))"} {"_id":"q-en-kubernetes-65e7dd76a2314eee20d95c7492c7d6529e4ec0aca6cf928e5a0681803833ab63","text":"var watcher *fsnotify.Watcher var parse parseFunc var stop bool isNewLine := true found := true writer := newLogWriter(stdout, stderr, opts) msg := &logMessage{}"} {"_id":"q-en-kubernetes-660938dbcb689c10815d857f44eecac7a3d9fae6269cf6811e70ee267c5c7a60","text":"restoredState, err := NewCheckpointState(testingDir, testingCheckpoint, tc.policyName, tc.initialContainers) if err != nil { if strings.TrimSpace(tc.expectedError) != \"\" { tc.expectedError = \"could not restore state from checkpoint: \" + tc.expectedError if strings.HasPrefix(err.Error(), tc.expectedError) { if strings.Contains(err.Error(), \"could not restore state from checkpoint\") && strings.Contains(err.Error(), tc.expectedError) { t.Logf(\"got expected error: %v\", err) return }"} {"_id":"q-en-kubernetes-66113bdf876034e9e2c8d373dd59783ee05b89837729f55fdebb799a32b89b3a","text":"} func getPriorityFunctionConfigs(names sets.String, args PluginFactoryArgs) ([]priorities.PriorityConfig, error) { schedulerFactoryMutex.Lock() defer schedulerFactoryMutex.Unlock() schedulerFactoryMutex.RLock() defer schedulerFactoryMutex.RUnlock() var configs []priorities.PriorityConfig for _, name := range names.List() {"} {"_id":"q-en-kubernetes-664567d123f106680dee9042be58f63ef6fe1114423ea38ebce281f931320c10","text":"cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest:{% set params = address + \" \" + storage_backend + \" \" + etcd_servers + \" \" + etcd_servers_overrides + \" \" + cloud_provider + \" \" + cloud_config + \" \" + runtime_config + \" \" + feature_gates + \" \" + admission_control + \" \" + target_ram_mb + \" \" + service_cluster_ip_range + \" \" + client_ca_file + basic_auth_file + \" \" + min_request_timeout + \" \" + enable_garbage_collector -%} cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% set params = \"--master=127.0.0.1:8080\" + \" \" + cluster_name + \" \" + cluster_cidr + \" \" + allocate_node_cidrs + \" \" + service_cluster_ip_range + \" \" + terminated_pod_gc + \" \" + enable_garbage_collector + \" \" + cloud_provider + \" \" + cloud_config + \" \" + service_account_key + \" \" + log_level + \" \" + root_ca_file -%} cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% set params = params + \" \" + feature_gates -%} cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% if pillar.get('enable_hostpath_provisioner', '').lower() == 'true' -%} cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set api_servers_with_port = api_servers + \":6443\" -%} cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set api_servers_with_port = api_servers -%} cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set cluster_cidr=\" --cluster-cidr=\" + pillar['cluster_cidr'] %}"} {"_id":"q-en-kubernetes-664ed1e106a6b5968aa10f34c4b75735891cc450ff94571393135121f1b50b5d","text":"volumeSpec: volumeSpec, // volume.volumeSpecName is actually InnerVolumeSpecName. It will not be used // for volume cleanup. // TODO: in case pod is added back before reconciler starts to unmount, we can update this field from desired state information // in case pod is added back to desired state, outerVolumeSpecName will be updated from dsw information. // See issue #103143 and its fix for details. outerVolumeSpecName: volume.volumeSpecName, pod: pod, deviceMounter: deviceMounter,"} {"_id":"q-en-kubernetes-66796b3d3549c50dbde0e6d27acba79277a41bcd68a6d749274bb317fba80b3d","text":"} func (s *podScope) Admit(pod *v1.Pod) lifecycle.PodAdmitResult { // Exception - Policy : none if s.policy.Name() == PolicyNone { return s.admitPolicyNone(pod) } bestHint, admit := s.calculateAffinity(pod) klog.InfoS(\"Best TopologyHint\", \"bestHint\", bestHint, \"pod\", klog.KObj(pod)) if !admit {"} {"_id":"q-en-kubernetes-6690d0fae4d4fa813ffadbff3fdefe00bd8e58361cf42fc9d278239b82e59e22","text":"} func (e *PredicateFailureError) GetReason() string { return e.PredicateName return e.PredicateDesc } type FailureReason struct {"} {"_id":"q-en-kubernetes-66db5386d5a73eed6d3c114455e92a28b1abdf210671e1af1af06a3470ef9d2d","text":"fmt.Sprintf(\"%s::%s::%s\", f.Namespace.Name, pod1, \"busybox-container\"): boundedSample(10*e2evolume.Kb, 80*e2evolume.Mb), }), \"pod_cpu_usage_seconds_total\": gstruct.MatchElements(containerID, gstruct.IgnoreExtras, gstruct.Elements{ \"pod_cpu_usage_seconds_total\": gstruct.MatchElements(podID, gstruct.IgnoreExtras, gstruct.Elements{ fmt.Sprintf(\"%s::%s\", f.Namespace.Name, pod0): boundedSample(0, 100), fmt.Sprintf(\"%s::%s\", f.Namespace.Name, pod1): boundedSample(0, 100), }), \"pod_memory_working_set_bytes\": gstruct.MatchAllElements(containerID, gstruct.Elements{ \"pod_memory_working_set_bytes\": gstruct.MatchElements(podID, gstruct.IgnoreExtras, gstruct.Elements{ fmt.Sprintf(\"%s::%s\", f.Namespace.Name, pod0): boundedSample(10*e2evolume.Kb, 80*e2evolume.Mb), fmt.Sprintf(\"%s::%s\", f.Namespace.Name, pod1): boundedSample(10*e2evolume.Kb, 80*e2evolume.Mb), }),"} {"_id":"q-en-kubernetes-6725aad88f41543ea8049e68051ebb74e6d2ef410ec3595b82ab4846a94e1c35","text":"} } var fakeTypeConverter = func() managedfields.TypeConverter { data, err := os.ReadFile(filepath.Join(strings.Repeat(\"..\"+string(filepath.Separator), 5), \"api\", \"openapi-spec\", \"swagger.json\")) func configMapTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { parser, err := typed.NewParser(configMapTypedSchema) if err != nil { panic(err) panic(fmt.Sprintf(\"Failed to parse schema: %v\", err)) } swag := spec.Swagger{} if err := json.Unmarshal(data, &swag); err != nil { panic(err) } convertedDefs := map[string]*spec.Schema{} for k, v := range swag.Definitions { vCopy := v convertedDefs[k] = &vCopy } typeConverter, err := managedfields.NewTypeConverter(convertedDefs, false) if err != nil { panic(err) } return typeConverter }() return TypeConverter{Scheme: scheme, TypeResolver: parser} } var configMapTypedSchema = typed.YAMLObject(`types: - name: io.k8s.api.core.v1.ConfigMap map: fields: - name: apiVersion type: scalar: string - name: data type: map: elementType: scalar: string - name: kind type: scalar: string - name: metadata type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta map: fields: - name: creationTimestamp type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - name: managedFields type: list: elementType: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry elementRelationship: atomic - name: name type: scalar: string - name: namespace type: scalar: string - name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry map: fields: - name: apiVersion type: scalar: string - name: fieldsType type: scalar: string - name: fieldsV1 type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - name: manager type: scalar: string - name: operation type: scalar: string - name: subresource type: scalar: string - name: time type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 map: elementType: scalar: untyped list: elementType: namedType: __untyped_atomic_ elementRelationship: atomic map: elementType: namedType: __untyped_deduced_ elementRelationship: separable - name: io.k8s.apimachinery.pkg.apis.meta.v1.Time scalar: untyped - name: __untyped_deduced_ scalar: untyped list: elementType: namedType: __untyped_atomic_ elementRelationship: atomic map: elementType: namedType: __untyped_deduced_ elementRelationship: separable `) "} {"_id":"q-en-kubernetes-6728280f5063f3338a27804df24428e8258dc0ee4ab6d5624f37f1918c40f9d3","text":"limiter.Forget(item) } } // WithMaxWaitRateLimiter have maxDelay which avoids waiting too long type WithMaxWaitRateLimiter struct { limiter RateLimiter maxDelay time.Duration } func NewWithMaxWaitRateLimiter(limiter RateLimiter, maxDelay time.Duration) RateLimiter { return &WithMaxWaitRateLimiter{limiter: limiter, maxDelay: maxDelay} } func (w WithMaxWaitRateLimiter) When(item interface{}) time.Duration { delay := w.limiter.When(item) if delay > w.maxDelay { return w.maxDelay } return delay } func (w WithMaxWaitRateLimiter) Forget(item interface{}) { w.limiter.Forget(item) } func (w WithMaxWaitRateLimiter) NumRequeues(item interface{}) int { return w.limiter.NumRequeues(item) } "} {"_id":"q-en-kubernetes-67a659abca4ac4dec1fcd5771d864ef70dbc89a93b63c78b15f2ab410d3a6be0","text":"# # -M installs the master set +x curl -L http://bootstrap.saltstack.com | sh -s -- -M -X curl -L --connect-timeout 20 --retry 6 --retry-delay 10 http://bootstrap.saltstack.com | sh -s -- -M -X set -x echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd"} {"_id":"q-en-kubernetes-67ac32aff4ae5e7eeacf3ada071acd6b41f2b580f2d861b759711f58587fefd8","text":"kube::test::get_object_assert pods \"{{range.items}}{{$image_field}}:{{end}}\" 'changed-with-yaml:' ## Patch pod from JSON can change image # Command kubectl patch \"${kube_flags[@]}\" -f test/fixtures/doc-yaml/admin/limitrange/valid-pod.yaml -p='{\"spec\":{\"containers\":[{\"name\": \"kubernetes-serve-hostname\", \"image\": \"gcr.io/google_containers/pause-amd64:3.0\"}]}}' # Post-condition: valid-pod POD has image gcr.io/google_containers/pause-amd64:3.0 kube::test::get_object_assert pods \"{{range.items}}{{$image_field}}:{{end}}\" 'gcr.io/google_containers/pause-amd64:3.0:' kubectl patch \"${kube_flags[@]}\" -f test/fixtures/doc-yaml/admin/limitrange/valid-pod.yaml -p='{\"spec\":{\"containers\":[{\"name\": \"kubernetes-serve-hostname\", \"image\": \"gcr.io/google_containers/pause-amd64:3.1\"}]}}' # Post-condition: valid-pod POD has image gcr.io/google_containers/pause-amd64:3.1 kube::test::get_object_assert pods \"{{range.items}}{{$image_field}}:{{end}}\" 'gcr.io/google_containers/pause-amd64:3.1:' ## If resourceVersion is specified in the patch, it will be treated as a precondition, i.e., if the resourceVersion is different from that is stored in the server, the Patch should be rejected ERROR_FILE=\"${KUBE_TEMP}/conflict-error\""} {"_id":"q-en-kubernetes-67bd54c290f8eed4289386824ae26ef7c192eb784c4a7135ebde3cd6910c19e1","text":"mkdir -p \"${DISCOVERY_ROOT_DIR}\" curl -kfsS -H 'Authorization: Bearer dummy_token' -H 'Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList' \"https://${API_HOST}:${API_PORT}/apis\" | jq -S . > \"${DISCOVERY_ROOT_DIR}/aggregated_v2.json\" # Deprecated, remove before v1.33 curl -kfsS -H 'Authorization: Bearer dummy_token' -H 'Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList' \"https://${API_HOST}:${API_PORT}/apis\" | jq -S . > \"${DISCOVERY_ROOT_DIR}/aggregated_v2beta1.json\" kube::log::status \"Updating \" \"${OPENAPI_ROOT_DIR} for OpenAPI v2\" rm -f \"${OPENAPI_ROOT_DIR}/swagger.json\""} {"_id":"q-en-kubernetes-67c7f87e4b643aa159846d1e748e600336cb8393b69a7e394aee540f916bb29b","text":"return az.ExcludeMasterFromStandardLB != nil && *az.ExcludeMasterFromStandardLB } func (az *Cloud) disableLoadBalancerOutboundSNAT() bool { if !az.useStandardLoadBalancer() || az.DisableOutboundSNAT == nil { return false } return *az.DisableOutboundSNAT } // IsNodeUnmanaged returns true if the node is not managed by Azure cloud provider. // Those nodes includes on-prem or VMs from other clouds. They will not be added to load balancer // backends. Azure routes and managed disks are also not supported for them."} {"_id":"q-en-kubernetes-67cd0640b409436d66bca97c0af5b7848cafe2a5be4cf1d2a0f826ad3f2b02e7","text":"}) ginkgo.It(\"should perform canary updates and phased rolling updates of template modifications for partiton1 and delete pod-0 without failing container\", func(ctx context.Context) { ginkgo.By(\"Creating a new StatefulSet without failing container\") ss := e2estatefulset.NewStatefulSet(\"ss2\", ns, headlessSvcName, 3, nil, nil, labels) deletingPodForRollingUpdatePartitionTest(ctx, f, c, ns, ss) }) ginkgo.It(\"should perform canary updates and phased rolling updates of template modifications for partiton1 and delete pod-0 with failing container\", func(ctx context.Context) { ginkgo.By(\"Creating a new StatefulSet with failing container\") ss := e2estatefulset.NewStatefulSet(\"ss3\", ns, headlessSvcName, 3, nil, nil, labels) ss.Spec.Template.Spec.Containers = append(ss.Spec.Template.Spec.Containers, v1.Container{ Name: \"sleep-exit-with-1\", Image: imageutils.GetE2EImage(imageutils.BusyBox), Command: []string{\"sh\", \"-c\"}, Args: []string{` echo \"Running in pod $POD_NAME\" _term(){ echo \"Received SIGTERM signal\" if [ \"${POD_NAME}\" = \"ss3-0\" ]; then exit 1 else exit 0 fi } trap _term SIGTERM while true; do echo \"Running in infinite loop in $POD_NAME\" sleep 1 done `, }, Env: []v1.EnvVar{ { Name: \"POD_NAME\", ValueFrom: &v1.EnvVarSource{ FieldRef: &v1.ObjectFieldSelector{ APIVersion: \"v1\", FieldPath: \"metadata.name\", }, }, }, }, }) deletingPodForRollingUpdatePartitionTest(ctx, f, c, ns, ss) }) // Do not mark this as Conformance. // The legacy OnDelete strategy only exists for backward compatibility with pre-v1 APIs. ginkgo.It(\"should implement legacy replacement when the update strategy is OnDelete\", func(ctx context.Context) {"} {"_id":"q-en-kubernetes-67f50274ba11dd64cb2d3453509e84cdb0bf2b5377f3a47f6c2f36dce419d5dd","text":"if ss.excludeMasterNodesFromStandardLB() && isMasterNode(node) { continue } if ss.ShouldNodeExcludedFromLoadBalancer(node) { klog.V(4).Infof(\"Excluding unmanaged/external-resource-group node %q\", node.Name) continue } // in this scenario the vmSetName is an empty string and the name of vmss should be obtained from the provider IDs of nodes resourceGroupName, vmssName, err := getVmssAndResourceGroupNameByVMProviderID(node.Spec.ProviderID) if err != nil {"} {"_id":"q-en-kubernetes-68631a912a8da368a1a862c61c859649af4bb74cae434e7a3b46fe7fe2d9dde6","text":"} func PostStartHook(hookContext genericapiserver.PostStartHookContext) error { clientset, err := rbacclient.NewForConfig(hookContext.LoopbackClientConfig) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterroles: %v\", err)) return nil } existingClusterRoles, err := clientset.ClusterRoles().List(api.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterroles: %v\", err)) return nil } // if clusterroles already exist, then assume we don't have work to do because we've already // initialized or another API server has started this task if len(existingClusterRoles.Items) > 0 { return nil } for _, clusterRole := range append(bootstrappolicy.ClusterRoles(), bootstrappolicy.ControllerRoles()...) { if _, err := clientset.ClusterRoles().Create(&clusterRole); err != nil { // don't fail on failures, try to create as many as you can // intializing roles is really important. On some e2e runs, we've seen cases where etcd is down when the server // starts, the roles don't initialize, and nothing works. err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) { clientset, err := rbacclient.NewForConfig(hookContext.LoopbackClientConfig) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterroles: %v\", err)) continue return false, nil } glog.Infof(\"Created clusterrole.%s/%s\", rbac.GroupName, clusterRole.Name) } existingClusterRoleBindings, err := clientset.ClusterRoleBindings().List(api.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterrolebindings: %v\", err)) return nil } // if clusterrolebindings already exist, then assume we don't have work to do because we've already // initialized or another API server has started this task if len(existingClusterRoleBindings.Items) > 0 { return nil } existingClusterRoles, err := clientset.ClusterRoles().List(api.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterroles: %v\", err)) return false, nil } // only initialized on empty etcd if len(existingClusterRoles.Items) == 0 { for _, clusterRole := range append(bootstrappolicy.ClusterRoles(), bootstrappolicy.ControllerRoles()...) { if _, err := clientset.ClusterRoles().Create(&clusterRole); err != nil { // don't fail on failures, try to create as many as you can utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterroles: %v\", err)) continue } glog.Infof(\"Created clusterrole.%s/%s\", rbac.GroupName, clusterRole.Name) } } for _, clusterRoleBinding := range append(bootstrappolicy.ClusterRoleBindings(), bootstrappolicy.ControllerRoleBindings()...) { if _, err := clientset.ClusterRoleBindings().Create(&clusterRoleBinding); err != nil { // don't fail on failures, try to create as many as you can existingClusterRoleBindings, err := clientset.ClusterRoleBindings().List(api.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterrolebindings: %v\", err)) continue return false, nil } // only initialized on empty etcd if len(existingClusterRoleBindings.Items) == 0 { for _, clusterRoleBinding := range append(bootstrappolicy.ClusterRoleBindings(), bootstrappolicy.ControllerRoleBindings()...) { if _, err := clientset.ClusterRoleBindings().Create(&clusterRoleBinding); err != nil { // don't fail on failures, try to create as many as you can utilruntime.HandleError(fmt.Errorf(\"unable to initialize clusterrolebindings: %v\", err)) continue } glog.Infof(\"Created clusterrolebinding.%s/%s\", rbac.GroupName, clusterRoleBinding.Name) } } glog.Infof(\"Created clusterrolebinding.%s/%s\", rbac.GroupName, clusterRoleBinding.Name) return true, nil }) // if we're never able to make it through intialization, kill the API server if err != nil { return fmt.Errorf(\"unable to initialize roles: %v\", err) } return nil"} {"_id":"q-en-kubernetes-688cc19f13570486ab69836d98980eea6cf5876eb3b7141c3a07b0fef8d931de","text":"openapinamer \"k8s.io/apiserver/pkg/endpoints/openapi\" \"k8s.io/apiserver/pkg/registry/rest\" genericfilters \"k8s.io/apiserver/pkg/server/filters\" \"k8s.io/apiserver/pkg/warning\" \"k8s.io/client-go/informers\" \"k8s.io/client-go/kubernetes/fake\" restclient \"k8s.io/client-go/rest\""} {"_id":"q-en-kubernetes-68b0e92f78ebfde2f4757599420d11019f38776f043b8ecfc3bfc1f186ef2241","text":"} kind = fqParentKind.Kind } verbOverrider, needOverride := storage.(StorageMetricsOverride) switch action.Verb { case \"GET\": // Get a resource. var handler restful.RouteFunction"} {"_id":"q-en-kubernetes-69086266779059a825e1fbaa72a24a127495b9d273314951e90ed9dd3b04b594","text":"if skipFirstAllOfAnyOf && i == 0 { skipAnyOf = true } allErrs = append(allErrs, validateNestedValueValidation(&v.AllOf[i], skipAnyOf, false, fldPath.Child(\"allOf\").Index(i))...) allErrs = append(allErrs, validateNestedValueValidation(&v.AllOf[i], skipAnyOf, false, lvl, fldPath.Child(\"allOf\").Index(i))...) } for i := range v.OneOf { allErrs = append(allErrs, validateNestedValueValidation(&v.OneOf[i], false, false, fldPath.Child(\"oneOf\").Index(i))...) allErrs = append(allErrs, validateNestedValueValidation(&v.OneOf[i], false, false, lvl, fldPath.Child(\"oneOf\").Index(i))...) } allErrs = append(allErrs, validateNestedValueValidation(v.Not, false, false, fldPath.Child(\"not\"))...) allErrs = append(allErrs, validateNestedValueValidation(v.Not, false, false, lvl, fldPath.Child(\"not\"))...) return allErrs } // validateNestedValueValidation checks the nested value validation under a logic junctor in a structural schema. func validateNestedValueValidation(v *NestedValueValidation, skipAnyOf, skipAllOfAnyOf bool, fldPath *field.Path) field.ErrorList { func validateNestedValueValidation(v *NestedValueValidation, skipAnyOf, skipAllOfAnyOf bool, lvl level, fldPath *field.Path) field.ErrorList { if v == nil { return nil } allErrs := field.ErrorList{} allErrs = append(allErrs, validateValueValidation(&v.ValueValidation, skipAnyOf, skipAllOfAnyOf, fldPath)...) allErrs = append(allErrs, validateNestedValueValidation(v.Items, false, false, fldPath.Child(\"items\"))...) allErrs = append(allErrs, validateValueValidation(&v.ValueValidation, skipAnyOf, skipAllOfAnyOf, lvl, fldPath)...) allErrs = append(allErrs, validateNestedValueValidation(v.Items, false, false, lvl, fldPath.Child(\"items\"))...) for k, fld := range v.Properties { allErrs = append(allErrs, validateNestedValueValidation(&fld, false, false, fldPath.Child(\"properties\").Key(k))...) allErrs = append(allErrs, validateNestedValueValidation(&fld, false, false, fieldLevel, fldPath.Child(\"properties\").Key(k))...) } if len(v.ForbiddenGenerics.Type) > 0 {"} {"_id":"q-en-kubernetes-691903eb76e53fb64e55f59de517b45dd3a99e6974dd6d86c614780b5523da09","text":"want: []string{ss1Rev1.Name, ss1Rev2.Name, ss1Rev3.Name}, }, { name: \"with ties\", revisions: []*apps.ControllerRevision{ss1Rev3, ss1Rev3Time2, ss1Rev2, ss1Rev1}, want: []string{ss1Rev1.Name, ss1Rev2.Name, ss1Rev3.Name, ss1Rev3Time2.Name, ss1Rev3Time2Name2.Name}, }, { name: \"empty\", revisions: nil, want: nil,"} {"_id":"q-en-kubernetes-6944ce8a45573317d8a00b3062f6713e6adb18f522313f13400ff1b58d878c91","text":"// Create a deployment to delete nginx pods and instead bring up redis pods. deploymentName := \"redis-deployment-2\" Logf(\"Creating deployment %s\", deploymentName) _, err = c.Deployments(ns).Create(newDeployment(deploymentName, replicas, deploymentPodLabels, \"redis\", \"redis\")) _, err = c.Deployments(ns).Create(newDeployment(deploymentName, replicas, deploymentPodLabels, \"redis\", \"redis\", extensions.RollingUpdateDeploymentStrategyType)) Expect(err).NotTo(HaveOccurred()) defer func() { deployment, err := c.Deployments(ns).Get(deploymentName)"} {"_id":"q-en-kubernetes-69864ab041018e5d525330c3d51561768f2093a2d3bc5bf58eaa5ba639fc3990","text":"if (-not (Test-Path $user_dir)) { # If for some reason Create-NewProfile failed to create the user profile # directory just continue on to the next user. continue return } # NOTE: there is a race condition here where someone could try to ssh to"} {"_id":"q-en-kubernetes-69872a95bf1d4d39ddda8265678af3c31614c49a571ebca77134e81cfa9f4606","text":"logger.V(5).Info(\"Starting attacherDetacher.AttachVolume\", \"volume\", volumeToAttach) err := rc.attacherDetacher.AttachVolume(logger, volumeToAttach.VolumeToAttach, rc.actualStateOfWorld) if err == nil { logger.Info(\"attacherDetacher.AttachVolume started\", \"volume\", volumeToAttach) logger.Info(\"attacherDetacher.AttachVolume started\", \"volumeName\", volumeToAttach.VolumeName, \"nodeName\", volumeToAttach.NodeName, \"scheduledPods\", klog.KObjSlice(volumeToAttach.ScheduledPods)) } if err != nil && !exponentialbackoff.IsExponentialBackoff(err) { // Ignore exponentialbackoff.IsExponentialBackoff errors, they are expected. // Log all other errors. logger.Error(err, \"attacherDetacher.AttachVolume failed to start\", \"volume\", volumeToAttach) logger.Error(err, \"attacherDetacher.AttachVolume failed to start\", \"volumeName\", volumeToAttach.VolumeName, \"nodeName\", volumeToAttach.NodeName, \"scheduledPods\", klog.KObjSlice(volumeToAttach.ScheduledPods)) } } }"} {"_id":"q-en-kubernetes-699b0344c12b58f7715d84037418ceaebcf56ccac2c59be3e79db3eb64d3cfd5","text":"true, }, { \"mounting-unix-socket\", \"mount-unix-socket\", func(base string) error { testSocketFile := filepath.Join(base, \"mount_test.sock\") _, err := net.Listen(\"unix\", testSocketFile) if err != nil { return fmt.Errorf(\"Error preparing socket file %s with %v\", testSocketFile, err) socketFile, socketError := createSocketFile(base) if socketError != nil { return fmt.Errorf(\"Error preparing socket file %s with %v\", socketFile, socketError) } return nil }, \"mount_test.sock\", \"mt.sock\", false, }, { \"mounting-unix-socket-in-middle\", func(base string) error { testSocketFile := filepath.Join(base, \"mount_test.sock\") _, err := net.Listen(\"unix\", testSocketFile) if err != nil { return fmt.Errorf(\"Error preparing socket file %s with %v\", testSocketFile, err) testSocketFile, socketError := createSocketFile(base) if socketError != nil { return fmt.Errorf(\"Error preparing socket file %s with %v\", testSocketFile, socketError) } return nil }, \"mount_test.sock/bar\", \"mt.sock/bar\", true, }, }"} {"_id":"q-en-kubernetes-69bd6ef272b0795b7dac35934225cd5d3cc3c94ce8906b72ef93dfa483be2c3b","text":"return f } type CSINodeLister []storagev1.CSINode // Get returns a fake CSINode object. func (n CSINodeLister) Get(name string) (*storagev1.CSINode, error) { for _, cn := range n { if cn.Name == name { return &cn, nil } } return nil, fmt.Errorf(\"csiNode %q not found\", name) } // List lists all CSINodes in the indexer. func (n CSINodeLister) List(selector labels.Selector) (ret []*storagev1.CSINode, err error) { return nil, fmt.Errorf(\"not implemented\") } func getFakeCSINodeLister(csiNode *storagev1.CSINode) CSINodeLister { csiNodeLister := CSINodeLister{} if csiNode != nil { csiNodeLister = append(csiNodeLister, *csiNode.DeepCopy()) } return csiNodeLister } func (f *fakeKubeletVolumeHost) SetKubeletError(err error) { f.mux.Lock() defer f.mux.Unlock()"} {"_id":"q-en-kubernetes-6a1b0872dab68d089605077754a375404f032cef3d97587b961f0aee741c4b5d","text":"containers: # TODO: Add resources in 1.8 - name: event-exporter image: gcr.io/google-containers/event-exporter:v0.1.0-r2 image: gcr.io/google-containers/event-exporter:v0.1.4 command: - '/event-exporter' - name: prometheus-to-sd-exporter"} {"_id":"q-en-kubernetes-6ab9a49b545aca76b5a6e2ca3370678fd0643230063feab1dd28bdd89b3ce92c","text":"} func (c *LRUExpireCache) Get(key lru.Key) (interface{}, bool) { c.lock.RLock() defer c.lock.RUnlock() c.lock.Lock() defer c.lock.Unlock() e, ok := c.cache.Get(key) if !ok { return nil, false"} {"_id":"q-en-kubernetes-6ad1efbc670277278f3c98c91b02f1f82bf7d7016d5e90d8aba6332e86302155","text":"return isDummyVMPresent, nil } func (vs *VSphere) GetNodeNameFromProviderID(providerID string) (string, error) { var nodeName string nodes, err := vs.nodeManager.GetNodeDetails() if err != nil { glog.Errorf(\"Error while obtaining Kubernetes node nodeVmDetail details. error : %+v\", err) return \"\", err } for _, node := range nodes { // ProviderID is UUID for nodes v1.9.3+ if node.VMUUID == GetUUIDFromProviderID(providerID) || node.NodeName == providerID { nodeName = node.NodeName break } } if nodeName == \"\" { msg := fmt.Sprintf(\"Error while obtaining Kubernetes nodename for providerID %s.\", providerID) return \"\", errors.New(msg) } return nodeName, nil } func GetVMUUID() (string, error) { id, err := ioutil.ReadFile(UUIDPath) if err != nil {"} {"_id":"q-en-kubernetes-6ad84b19a3315068cb4b516a73d964e1d1cf3d9e9b7ac6dba4c75ecbd58bf399","text":"defer logs.FlushLogs() if err := command.Execute(); err != nil { fmt.Fprintf(os.Stderr, \"error: %vn\", err) os.Exit(1) } }"} {"_id":"q-en-kubernetes-6ae6aba4ef6e30e41f62cefa69825dcbb791f9f2ed952a54ed15015799ff8269","text":"// Register registers the device plugin for the given resourceName with Kubelet. func (m *Stub) Register(kubeletEndpoint, resourceName string) error { conn, err := grpc.Dial(kubeletEndpoint, grpc.WithInsecure(), conn, err := grpc.Dial(kubeletEndpoint, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(10*time.Second), grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout(\"unix\", addr, timeout) }))"} {"_id":"q-en-kubernetes-6aeb5a46e6fd0c4ce57e9cb19104e750622c6cec989528baa4dfa5e12e248cac","text":"[[projects]] name = \"github.com/modern-go/reflect2\" packages = [\".\"] revision = \"1df9eeb2bb81f327b96228865c5687bc2194af3f\" version = \"1.0.0\" revision = \"4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd\" version = \"1.0.1\" [solve-meta] analyzer-name = \"dep\" analyzer-version = 1 inputs-digest = \"56a0b9e9e61d2bc8af5e1b68537401b7f4d60805eda3d107058f3171aa5cf793\" inputs-digest = \"ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8\" solver-name = \"gps-cdcl\" solver-version = 1"} {"_id":"q-en-kubernetes-6b201f879ce2071681a01405d4321f20b4ccdea9b0e72fa02dfb668619cff44f","text":"}, { \"ImportPath\": \"github.com/json-iterator/go\", \"Comment\": \"1.1.3-22-gf2b4162afba355\", \"Rev\": \"f2b4162afba35581b6d4a50d3b8f34e33c144682\" \"Comment\": \"1.1.4\", \"Rev\": \"ab8a2e0c74be9d3be70b3184d9acc634935ded82\" }, { \"ImportPath\": \"github.com/jteeuwen/go-bindata\","} {"_id":"q-en-kubernetes-6b3b65bcd5ed85448329719053d5df4e6c39d10d53d658d44c43ebb9bf71dea0","text":"q99 := hist.Quantile(0.95) avg := hist.Average() // clear the metrics so that next test always starts with empty prometheus // metrics (since the metrics are shared among all tests run inside the same binary) hist.Clear() msFactor := float64(time.Second) / float64(time.Millisecond) // Copy labels and add \"Metric\" label for this metric."} {"_id":"q-en-kubernetes-6b553727a8f0087f5f43f298738a4189a347ba7cac7780c4f05e1d72a6c3dab4","text":"// we didn't validate against any provider, reject the pod and give the errors for each attempt klog.V(4).Infof(\"unable to validate pod %s (generate: %s) in namespace %s against any pod security policy: %v\", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) return admission.NewForbidden(a, fmt.Errorf(\"unable to validate against any pod security policy: %v\", validationErrs)) return admission.NewForbidden(a, fmt.Errorf(\"PodSecurityPolicy: unable to validate pod: %v\", validationErrs)) } func shouldIgnore(a admission.Attributes) (bool, error) {"} {"_id":"q-en-kubernetes-6b773e98b45cc0f4fdf3da5a1de57708a0908b3258d19f71214ee287f1370d94","text":"return c.callCustom(sv, dv, fv, scope) } return c.defaultConvert(sv, dv, scope) } // defaultConvert recursively copies sv into dv. no conversion function is called // for the current stack frame (but conversion functions may be called for nested objects) func (c *Converter) defaultConvert(sv, dv reflect.Value, scope *scope) error { dt, st := dv.Type(), sv.Type() if !scope.flags.IsSet(AllowDifferentFieldTypeNames) && c.NameFunc(dt) != c.NameFunc(st) { return scope.error(\"type names don't match (%v, %v)\", c.NameFunc(st), c.NameFunc(dt)) }"} {"_id":"q-en-kubernetes-6b84738a94a23af0f56a7c8cf31220024d7d74d7993be985041a14472692bb8b","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package core import ( \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/fields\" \"k8s.io/kubernetes/pkg/labels\" \"k8s.io/kubernetes/pkg/runtime\" ) func addDefaultingFuncs(scheme *runtime.Scheme) { scheme.AddDefaultingFuncs( func(obj *api.ListOptions) { if obj.LabelSelector == nil { obj.LabelSelector = labels.Everything() } if obj.FieldSelector == nil { obj.FieldSelector = fields.Everything() } }, ) } func addConversionFuncs(scheme *runtime.Scheme) { scheme.AddConversionFuncs( api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta, api.Convert_unversioned_ListMeta_To_unversioned_ListMeta, api.Convert_intstr_IntOrString_To_intstr_IntOrString, api.Convert_unversioned_Time_To_unversioned_Time, api.Convert_Slice_string_To_unversioned_Time, api.Convert_string_To_labels_Selector, api.Convert_string_To_fields_Selector, api.Convert_Pointer_bool_To_bool, api.Convert_bool_To_Pointer_bool, api.Convert_Pointer_string_To_string, api.Convert_string_To_Pointer_string, api.Convert_labels_Selector_To_string, api.Convert_fields_Selector_To_string, api.Convert_resource_Quantity_To_resource_Quantity, ) } "} {"_id":"q-en-kubernetes-6b84edf8e5821ada92698fb97ea9fb1ec4b5fe365b5334c0710c535f793600ab","text":"return fmt.Errorf(\"failed to watch %s, err: %v\", path, err) } case mode&os.ModeSocket != 0: w.wg.Add(1) go func() { defer w.wg.Done() w.fsWatcher.Events <- fsnotify.Event{ Name: path, Op: fsnotify.Create,"} {"_id":"q-en-kubernetes-6baa6a68f3a245554be6603a2e77c5e10449d46c31439e19b6dbd008023de733","text":"Name: \"total_preemption_attempts\", Help: \"Total preemption attempts in the cluster till now\", }) equivalenceCacheLookups = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: SchedulerSubsystem, Name: \"equiv_cache_lookups_total\", Help: \"Total number of equivalence cache lookups, by whether or not a cache entry was found\", }, []string{\"result\"}) EquivalenceCacheHits = equivalenceCacheLookups.With(prometheus.Labels{\"result\": \"hit\"}) EquivalenceCacheMisses = equivalenceCacheLookups.With(prometheus.Labels{\"result\": \"miss\"}) EquivalenceCacheWrites = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: SchedulerSubsystem, Name: \"equiv_cache_writes\", Help: \"Total number of equivalence cache writes, by result\", }, []string{\"result\"}) metricsList = []prometheus.Collector{ SchedulingLatency, E2eSchedulingLatency,"} {"_id":"q-en-kubernetes-6bf6b78f6e63368a7f16114587d7c81b66cbd0ef30b977c6f48473b0894682eb","text":"} func getCPUStat(f *framework.Framework, host string) (usage, uptime float64) { cpuCmd := \"cat /sys/fs/cgroup/cpu/system.slice/node-problem-detector.service/cpuacct.usage && cat /proc/uptime | awk '{print $1}'\" var cpuCmd string if isHostRunningCgroupV2(f, host) { cpuCmd = \" cat /sys/fs/cgroup/cpu.stat | grep 'usage_usec' | sed 's/[^0-9]*//g' && cat /proc/uptime | awk '{print $1}'\" } else { cpuCmd = \"cat /sys/fs/cgroup/cpu/system.slice/node-problem-detector.service/cpuacct.usage && cat /proc/uptime | awk '{print $1}'\" } result, err := e2essh.SSH(cpuCmd, host, framework.TestContext.Provider) framework.ExpectNoError(err) framework.ExpectEqual(result.Code, 0)"} {"_id":"q-en-kubernetes-6c114e216e0d52e6390c6dbf1ca69ebe20e240a73f583d249c7d066c197408cc","text":"// we expect following values for: Major -> digit, Minor -> numeric followed by an optional '+', GitCommit -> alphanumeric requiredItems := []string{\"Client Version: \", \"Server Version: \"} for _, item := range requiredItems { if matched, _ := regexp.MatchString(item+`vd.d+.[dw-.+]+`, versionString); !matched { // prior to 1.28 we printed long version information oldMatched, _ := regexp.MatchString(item+`version.Info{Major:\"d\", Minor:\"d++?\", GitVersion:\"vd.d+.[dw-.+]+\", GitCommit:\"[0-9a-f]+\"`, versionString) // 1.28+ prints short information newMatched, _ := regexp.MatchString(item+`vd.d+.[dw-.+]+`, versionString) // due to backwards compatibility we need to match both until 1.30 most likely if !oldMatched && !newMatched { framework.Failf(\"Item %s value is not valid in %sn\", item, versionString) } }"} {"_id":"q-en-kubernetes-6c1704e916136972e2875d04f986ae4c9302dadc8e1b376ee75954dc624f862f","text":" /* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( \"testing\" \"github.com/stretchr/testify/assert\" ) func TestGetContainerName(t *testing.T) { var cases = []struct { labels map[string]string containerName string }{ { labels: map[string]string{ \"io.kubernetes.container.name\": \"c1\", }, containerName: \"c1\", }, { labels: map[string]string{ \"io.kubernetes.container.name\": \"c2\", }, containerName: \"c2\", }, } for _, data := range cases { containerName := GetContainerName(data.labels) assert.Equal(t, data.containerName, containerName) } } func TestGetPodName(t *testing.T) { var cases = []struct { labels map[string]string podName string }{ { labels: map[string]string{ \"io.kubernetes.pod.name\": \"p1\", }, podName: \"p1\", }, { labels: map[string]string{ \"io.kubernetes.pod.name\": \"p2\", }, podName: \"p2\", }, } for _, data := range cases { podName := GetPodName(data.labels) assert.Equal(t, data.podName, podName) } } func TestGetPodUID(t *testing.T) { var cases = []struct { labels map[string]string podUID string }{ { labels: map[string]string{ \"io.kubernetes.pod.uid\": \"uid1\", }, podUID: \"uid1\", }, { labels: map[string]string{ \"io.kubernetes.pod.uid\": \"uid2\", }, podUID: \"uid2\", }, } for _, data := range cases { podUID := GetPodUID(data.labels) assert.Equal(t, data.podUID, podUID) } } func TestGetPodNamespace(t *testing.T) { var cases = []struct { labels map[string]string podNamespace string }{ { labels: map[string]string{ \"io.kubernetes.pod.namespace\": \"ns1\", }, podNamespace: \"ns1\", }, { labels: map[string]string{ \"io.kubernetes.pod.namespace\": \"ns2\", }, podNamespace: \"ns2\", }, } for _, data := range cases { podNamespace := GetPodNamespace(data.labels) assert.Equal(t, data.podNamespace, podNamespace) } } "} {"_id":"q-en-kubernetes-6c1936c6be36f5056fb340df40081f49f85643377a2d28e62afb26f96f744be0","text":"\"description\": \"EndpointPort represents a Port used by an EndpointSlice\", \"properties\": { \"name\": { \"description\": \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass IANA_SVC_NAME validation: * must be no more than 15 characters long * may contain only [-a-z0-9] * must contain at least one letter [a-z] * it must not start or end with a hyphen, nor contain adjacent hyphens Default is empty string.\", \"description\": \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.\", \"type\": \"string\" }, \"port\": {"} {"_id":"q-en-kubernetes-6c4e91a988d6c2cf43075e523b28868790ea0987e2c64d256bbdaa1824540e42","text":"TEMP_DIR:=$(shell mktemp -d) ifeq ($(ARCH),amd64) BASEIMAGE?=k8s.gcr.io/build-image/debian-base:buster-v1.3.0 BASEIMAGE?=k8s.gcr.io/build-image/debian-base:buster-v1.4.0 endif ifeq ($(ARCH),arm) BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm:buster-v1.3.0 BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm:buster-v1.4.0 endif ifeq ($(ARCH),arm64) BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm64:buster-v1.3.0 BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm64:buster-v1.4.0 endif ifeq ($(ARCH),ppc64le) BASEIMAGE?=k8s.gcr.io/build-image/debian-base-ppc64le:buster-v1.3.0 BASEIMAGE?=k8s.gcr.io/build-image/debian-base-ppc64le:buster-v1.4.0 endif ifeq ($(ARCH),s390x) BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:buster-v1.3.0 BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:buster-v1.4.0 endif RUNNERIMAGE?=gcr.io/distroless/static:latest"} {"_id":"q-en-kubernetes-6c57620a346dc9774cae37860441bc5390d4a14725ba0fc39487c770b3b420f1","text":"if podConfig.NS == \"\" { return nil, fmt.Errorf(\"Cannot create pod with empty namespace\") } if len(podConfig.Command) == 0 && !NodeOSDistroIs(\"windows\") { if len(podConfig.Command) == 0 { podConfig.Command = \"trap exit TERM; while true; do sleep 1; done\" }"} {"_id":"q-en-kubernetes-6c890f494514786854fa51e2bbf4bca08b9b1682b1a7c462f3b6274629330ce6","text":"continue } // Remember the last supported test for subsequent test of beta API betaTest = &test ginkgo.By(\"Testing \" + test.Name) suffix := fmt.Sprintf(\"%d\", i) test.Client = c"} {"_id":"q-en-kubernetes-6cd36c4b73d2ce3777044fb979b39661e259bd4186cf8361f9d4aee3d12cbfe5","text":"local local_ssds=\"\" if [[ ! -z ${NODE_LOCAL_SSDS+x} ]]; then # The NODE_LOCAL_SSDS check below fixes issue #49171 # Some versions of seq will count down from 1 if \"seq 0\" is specified if [[ ${NODE_LOCAL_SSDS} -ge 1 ]]; then for i in $(seq ${NODE_LOCAL_SSDS}); do local_ssds=\"$local_ssds--local-ssd=interface=SCSI \" local_ssds=\"$local_ssds--local-ssd=interface=SCSI \" done fi fi local network=$(make-gcloud-network-argument "} {"_id":"q-en-kubernetes-6d55f23be52681c64b32b29762287dc516b8eac8bf8546f1574dcde8d7ded593","text":"command: - /bin/sh - -c - echo -998 > /proc/$$$/oom_score_adj && kube-proxy {{api_servers_with_port}} {{kubeconfig}} {{cluster_cidr}} --resource-container=\"\" {{params}} 1>>/var/log/kube-proxy.log 2>&1 - kube-proxy {{api_servers_with_port}} {{kubeconfig}} {{cluster_cidr}} --resource-container=\"\" --oom-score-adj=-998 {{params}} 1>>/var/log/kube-proxy.log 2>&1 {{container_env}} {{kube_cache_mutation_detector_env_name}} {{kube_cache_mutation_detector_env_value}}"} {"_id":"q-en-kubernetes-6d588a1e395c16797b66a24e4fc0e8288c66d00603734aae74a6f868f36064c0","text":"// visit selectors if b.selector != nil { if len(b.name) != 0 { if len(b.names) != 0 { return &Result{err: fmt.Errorf(\"name cannot be provided when a selector is specified\")} } if len(b.resources) == 0 {"} {"_id":"q-en-kubernetes-6db9f0ccd4a5da72ebbe80c8253c1cff68d85fedeb704ccc4e094466ceb93ec8","text":"}, expected: CreatePodUpdate(kubetypes.SET, kubetypes.FileSource, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"test-\" + hostname, UID: \"12345\", Namespace: \"mynamespace\", SelfLink: getSelfLink(\"test-\"+hostname, \"mynamespace\"), Name: \"test-\" + hostname, UID: \"12345\", Namespace: \"mynamespace\", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: \"12345\"}, SelfLink: getSelfLink(\"test-\"+hostname, \"mynamespace\"), }, Spec: api.PodSpec{ NodeName: hostname,"} {"_id":"q-en-kubernetes-6e0fdf11bc38c79c98a53c48e4a4f7e1d43a7339cec1cd42cc3ce1e09b2f67dd","text":"idxPath := fldPath.Index(i) if len(*endpointPort.Name) > 0 { for _, msg := range validation.IsValidPortName(*endpointPort.Name) { allErrs = append(allErrs, field.Invalid(idxPath.Child(\"name\"), endpointPort.Name, msg)) } allErrs = append(allErrs, apivalidation.ValidateDNS1123Label(*endpointPort.Name, idxPath.Child(\"name\"))...) } if portNames.Has(*endpointPort.Name) {"} {"_id":"q-en-kubernetes-6e2c1bc6158e191a5160572ec5b4961d1dad35e7dd1f69c2ea85d11f9204dae9","text":"if err := nm.syncNamespaceFromKey(key.(string)); err != nil { if estimate, ok := err.(*contentRemainingError); ok { go func() { defer utilruntime.HandleCrash() t := estimate.Estimate/2 + 1 glog.V(4).Infof(\"Content remaining in namespace %s, waiting %d seconds\", key, t) time.Sleep(time.Duration(t) * time.Second) nm.queue.Add(key) }() } else { // rather than wait for a full resync, re-add the namespace to the queue to be processed nm.queue.Add(key) utilruntime.HandleError(err) } } }()"} {"_id":"q-en-kubernetes-6e399915e317dbca1e2d3af1f1e58142ce2c16f02c837d72146028f96969a102","text":"admissionapi \"k8s.io/pod-security-admission/api\" samplev1alpha1 \"k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1\" \"k8s.io/utils/pointer\" \"k8s.io/utils/strings/slices\" \"github.com/onsi/ginkgo/v2\" \"github.com/onsi/gomega\""} {"_id":"q-en-kubernetes-6e3c74340fb0c64c805550bd7e7f70304bcbe8e68ef36a554bf030df27c671f3","text":"# The IP of the master export MASTER_IP=\"10.245.1.2\" export INSTANCE_PREFIX=kubernetes export INSTANCE_PREFIX=\"kubernetes\" export MASTER_NAME=\"${INSTANCE_PREFIX}-master\" # Map out the IPs, names and container subnets of each minion"} {"_id":"q-en-kubernetes-6e94eb507cdefe046b645f78591bee857508ff5220baaf141131aecb10b15c57","text":"\"//pkg/registry/rbac/rolebinding/etcd:go_default_library\", \"//pkg/registry/rbac/rolebinding/policybased:go_default_library\", \"//pkg/util/runtime:go_default_library\", \"//pkg/util/wait:go_default_library\", \"//plugin/pkg/auth/authorizer/rbac/bootstrappolicy:go_default_library\", \"//vendor:github.com/golang/glog\", ],"} {"_id":"q-en-kubernetes-6ea9bd2c4e188e1ecd46ccabfd84939d8a3cdf02ac53fa1dc281c07d5f11d0a0","text":"github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q="} {"_id":"q-en-kubernetes-6ebe6b94ce008526b4c731126dfc7c24390464421e7b69eec3221b573a191c1a","text":"syncLoopPeriod = 100 * time.Minute maxWaitForUnmountDuration = 50 * time.Millisecond maxLongWaitForUnmountDuration = 4200 * time.Second volumeAttachedCheckTimeout = 5 * time.Second ) // Calls Run()"} {"_id":"q-en-kubernetes-6ecb01aacb6f026714fe23cc353e275d39d2a646d9c522a80d5d14f019403bae","text":"testCases := []struct { name string ipModeEnabled bool nonLBAllowed bool tweakLBStatus func(s *core.LoadBalancerStatus) tweakSvcSpec func(s *core.ServiceSpec) numErrs int }{ /* LoadBalancerIPMode*/ { name: \"type is not LB\", nonLBAllowed: false, tweakSvcSpec: func(s *core.ServiceSpec) { s.Type = core.ServiceTypeClusterIP }, tweakLBStatus: func(s *core.LoadBalancerStatus) { s.Ingress = []core.LoadBalancerIngress{{ IP: \"1.2.3.4\", }} }, numErrs: 1, }, { name: \"type is not LB. back-compat\", nonLBAllowed: true, tweakSvcSpec: func(s *core.ServiceSpec) { s.Type = core.ServiceTypeClusterIP }, tweakLBStatus: func(s *core.LoadBalancerStatus) { s.Ingress = []core.LoadBalancerIngress{{ IP: \"1.2.3.4\", }} }, numErrs: 0, }, { name: \"valid vip ipMode\", ipModeEnabled: true, tweakLBStatus: func(s *core.LoadBalancerStatus) {"} {"_id":"q-en-kubernetes-6f0cda27c2ea899f4f51d26525bdc7be3ed4d97df747556f5756a829b9e9a80d","text":"} client := oauth2.NewClient(oauth2.NoContext, tokenSource) // Override the transport to make it rate-limited. client.Transport = &rateLimitedRoundTripper{ rt: client.Transport, limiter: flowcontrol.NewTokenBucketRateLimiter(10, 100), // 10 qps, 100 bucket size. } svc, err := compute.New(client) if err != nil { return nil, err"} {"_id":"q-en-kubernetes-6f385988b4a27cc38efd8a5f99d836f733d9e1780b566013a6e936760a242fe0","text":"var _ = SIGDescribe(\"Deployment\", func() { var ns string var c clientset.Interface var dc dynamic.Interface ginkgo.AfterEach(func() { failureTrap(c, ns)"} {"_id":"q-en-kubernetes-6f508d75c32d21eb4c6e63a01f9c0fc1e69692c81e1ea2a4fdb13043c7f153fd","text":"load(\"@io_bazel_rules_docker//container:container.bzl\", \"container_pull\") container_pull( name = \"debian_jessie\", digest = \"sha256:e25703ee6ab5b2fac31510323d959cdae31eebdf48e88891c549e55b25ad7e94\", registry = \"index.docker.io\", repository = \"library/debian\", tag = \"jessie\", # ignored when digest provided, but kept here for documentation. name = \"distroless_base\", digest = \"sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5\", registry = \"gcr.io\", repository = \"distroless/base\", tag = \"latest\", # ignored when digest provided, but kept here for documentation. ) load(\"//build:workspace.bzl\", \"release_dependencies\")"} {"_id":"q-en-kubernetes-6f63f22b8747e74c1f6ce456abbfec7a860f0f4a052303b63f4874b5ec3d5a4d","text":"} } for _, endpointSlice := range slicesToCreate { addTriggerTimeAnnotation(endpointSlice, triggerTime) createdSlice, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Create(context.TODO(), endpointSlice, metav1.CreateOptions{}) if err != nil { // If the namespace is terminating, creates will continue to fail. Simply drop the item. if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { return nil // Don't create new EndpointSlices if the Service is pending deletion. This // is to avoid a potential race condition with the garbage collector where // it tries to delete EndpointSlices as this controller replaces them. if service.DeletionTimestamp == nil { for _, endpointSlice := range slicesToCreate { addTriggerTimeAnnotation(endpointSlice, triggerTime) createdSlice, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Create(context.TODO(), endpointSlice, metav1.CreateOptions{}) if err != nil { // If the namespace is terminating, creates will continue to fail. Simply drop the item. if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { return nil } errs = append(errs, fmt.Errorf(\"Error creating EndpointSlice for Service %s/%s: %v\", service.Namespace, service.Name, err)) } else { r.endpointSliceTracker.Update(createdSlice) metrics.EndpointSliceChanges.WithLabelValues(\"create\").Inc() } errs = append(errs, fmt.Errorf(\"Error creating EndpointSlice for Service %s/%s: %v\", service.Namespace, service.Name, err)) } else { r.endpointSliceTracker.Update(createdSlice) metrics.EndpointSliceChanges.WithLabelValues(\"create\").Inc() } }"} {"_id":"q-en-kubernetes-6f69998e3894eca82a651eb706cbd65011151be54fae8e6e7ca99584df895786","text":"} func TestFailedParseParamsSummaryHandler(t *testing.T) { fw := newServerTest() defer fw.testHTTPServer.Close() resp, err := http.Post(fw.testHTTPServer.URL+\"/stats/summary\", \"invalid/content/type\", nil) assert.NoError(t, err) defer resp.Body.Close() v, err := ioutil.ReadAll(resp.Body) assert.NoError(t, err) assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) assert.Contains(t, string(v), \"parse form failed\") } func TestTrimURLPath(t *testing.T) { tests := []struct { path, expected string"} {"_id":"q-en-kubernetes-6f75c268445f53b1ad7995aaae0fb1c9d3f101171f2230a27fbb2e472bfd34a2","text":") decoder := opts.StorageSerializer.DecoderToVersion( recognizer.NewDecoder(decoders...), runtime.NewMultiGroupVersioner( runtime.NewCoercingMultiGroupVersioner( opts.MemoryVersion, schema.GroupKind{Group: opts.MemoryVersion.Group}, schema.GroupKind{Group: opts.StorageVersion.Group},"} {"_id":"q-en-kubernetes-6f78eaaccb4ef7dcbfaed81dcce675ab94c42c14912cf5f60e2345021af8632f","text":"expectedIPFamilies: nil, expectError: true, }, // preferDualStack services should not be updated // to match cluster config if the user didn't change any // ClusterIPs related fields { name: \"unchanged preferDualStack-1-ClusterUpgraded\", modifyRest: fnMakeDualStackStackIPv4IPv6Allocator, oldSvc: &api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol}, IPFamilyPolicy: &preferDualStack, }, }, svc: api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol}, IPFamilyPolicy: &preferDualStack, }, }, expectedIPFamilyPolicy: &preferDualStack, expectedIPFamilies: []api.IPFamily{api.IPv4Protocol}, expectError: false, }, { name: \"unchanged preferDualStack-2-ClusterDowngraded\", modifyRest: fnMakeSingleStackIPv4Allocator, oldSvc: &api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\", \"2001::1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, IPFamilyPolicy: &preferDualStack, }, }, svc: api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\", \"2001::1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, IPFamilyPolicy: &preferDualStack, }, }, expectedIPFamilyPolicy: &preferDualStack, expectedIPFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, expectError: false, }, { name: \"changed preferDualStack-1 (cluster upgraded)\", modifyRest: fnMakeDualStackStackIPv4IPv6Allocator, oldSvc: &api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol}, IPFamilyPolicy: &preferDualStack, }, }, svc: api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: nil, IPFamilies: []api.IPFamily{api.IPv4Protocol}, IPFamilyPolicy: &requireDualStack, }, }, expectedIPFamilyPolicy: &requireDualStack, expectedIPFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, expectError: false, }, { name: \"changed preferDualStack-2-ClusterDowngraded\", modifyRest: fnMakeSingleStackIPv4Allocator, oldSvc: &api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\", \"2001::1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, IPFamilyPolicy: &preferDualStack, }, }, svc: api.Service{ Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, ClusterIPs: []string{\"1.1.1.1\"}, IPFamilies: []api.IPFamily{api.IPv4Protocol}, IPFamilyPolicy: &singleStack, }, }, expectedIPFamilyPolicy: &singleStack, expectedIPFamilies: []api.IPFamily{api.IPv4Protocol}, expectError: false, }, } // This func only runs when feature gate is on"} {"_id":"q-en-kubernetes-6f990199a5f356e414a7bdf0fd84db90c4e21203384509c9c30a5824a5a4e147","text":"} func testZonalFailover(c clientset.Interface, ns string) { nodes := framework.GetReadySchedulableNodesOrDie(c) nodeCount := len(nodes.Items) cloudZones := getTwoRandomZones(c) class := newRegionalStorageClass(ns, cloudZones) claimTemplate := newClaimTemplate(ns)"} {"_id":"q-en-kubernetes-6f9d7168e4cdc65c3a13a8f908455cc252a7f972fc5c936c8b1fea77c4175487","text":"if err != nil { return nil, err } minion, err := rs.registry.GetMinion(ctx, minion.Name) minionName := minion.Name minion, err := rs.registry.GetMinion(ctx, minionName) if err == ErrNotHealty { return rs.toApiMinion(minionName), nil } if minion == nil { return nil, ErrDoesNotExist }"} {"_id":"q-en-kubernetes-6fb88bc4c56cb33d882b20d65a320dc76ea4f7ef97dc5d0bb94ecf52fdc0a233","text":"defer nodePortOp.Finish() // try set ip families (for missing ip families) if err := rs.tryDefaultValidateServiceClusterIPFields(service); err != nil { if err := rs.tryDefaultValidateServiceClusterIPFields(oldService, service); err != nil { return nil, false, err }"} {"_id":"q-en-kubernetes-6fe7f416f4b8a188562232d24f692448e38a164609b657b1c18d57b335e23504","text":"} /* Testname: allowPrivilegeEscalation unset and uid != 0. Description: Configuring the allowPrivilegeEscalation unset, allows the privilege escalation operation. A container is configured with allowPrivilegeEscalation not specified (nil) and a given uid which is not 0. When the container is run, the container is run using uid=0. This test is marked LinuxOnly since Windows does not support running as UID / GID, or privilege escalation. Release : v1.15 Testname: Security Context, allowPrivilegeEscalation unset, uid != 0. Description: Configuring the allowPrivilegeEscalation unset, allows the privilege escalation operation. A container is configured with allowPrivilegeEscalation not specified (nil) and a given uid which is not 0. When the container is run, container's output MUST match with expected output verifying container ran with uid=0. This e2e Can not be promoted to Conformance as it is Container Runtime dependent and not all conformant platforms will require this behavior. [LinuxOnly]: This test is marked LinuxOnly since Windows does not support running as UID / GID, or privilege escalation. */ It(\"should allow privilege escalation when not explicitly set and uid != 0 [LinuxOnly] [NodeConformance]\", func() { podName := \"alpine-nnp-nil-\" + string(uuid.NewUUID())"} {"_id":"q-en-kubernetes-6ffb573bc7d9b88e021a48c89106216e64dcdadef9e542f1ab1cb4206fe44067","text":"List list = new ArrayList(); String host = \"https://kubernetes.default.cluster.local\"; String serviceName = getEnvOrDefault(\"CASSANDRA_SERVICE\", \"cassandra\"); String path = \"/api/v1/namespaces/default/endpoints/\"; String podNamespace = getEnvOrDefault(\"POD_NAMESPACE\", \"default\"); String path = String.format(\"/api/v1/namespaces/%s/endpoints/\", podNamespace); try { String token = getServiceAccountToken();"} {"_id":"q-en-kubernetes-7001b4e7de9fcd7a14303e7d61103f1939842a93312ce4b003e47f60831115ef","text":"cachedCreds *credentials exp time.Time onRotate func() onRotateList []func() } type credentials struct {"} {"_id":"q-en-kubernetes-70354507a91d89d53a73042f2a709fabb522103eb0995e8c2e9360ad551bc889","text":"# sleep 4 # i=$[$i+1] # done apiVersion: v1beta1 apiVersion: v1beta3 kind: Pod id: synthetic-logger-0.25lps-pod desiredState: manifest: version: v1beta1 id: synth-logger-0.25lps containers: - name: synth-lgr image: ubuntu:14.04 command: [\"bash\", \"-c\", \"i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 4; i=$[$i+1]; done\"] labels: name: synth-logging-source No newline at end of file metadata: labels: name: synth-logging-source name: synthetic-logger-0.25lps-pod spec: containers: - args: - bash - -c - 'i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 4; i=$[$i+1]; done' image: ubuntu:14.04 name: synth-lgr "} {"_id":"q-en-kubernetes-70376548b6529ba9d479934c8b6b7ad2caec983bd10145caca44aa7ed7503d24","text":"type PredicateFailureError struct { PredicateName string PredicateDesc string } func newPredicateFailureError(predicateName string) *PredicateFailureError { return &PredicateFailureError{PredicateName: predicateName} func newPredicateFailureError(predicateName, predicateDesc string) *PredicateFailureError { return &PredicateFailureError{PredicateName: predicateName, PredicateDesc: predicateDesc} } func (e *PredicateFailureError) Error() string {"} {"_id":"q-en-kubernetes-703eae7639ee028d9144cee21a508cb4081d7ec398c3c4598275e7bcd9f63876","text":" { \"kind\": \"ValidatingAdmissionPolicy\", \"apiVersion\": \"admissionregistration.k8s.io/v1alpha1\", \"metadata\": { \"name\": \"nameValue\", \"generateName\": \"generateNameValue\", \"namespace\": \"namespaceValue\", \"selfLink\": \"selfLinkValue\", \"uid\": \"uidValue\", \"resourceVersion\": \"resourceVersionValue\", \"generation\": 7, \"creationTimestamp\": \"2008-01-01T01:01:01Z\", \"deletionTimestamp\": \"2009-01-01T01:01:01Z\", \"deletionGracePeriodSeconds\": 10, \"labels\": { \"labelsKey\": \"labelsValue\" }, \"annotations\": { \"annotationsKey\": \"annotationsValue\" }, \"ownerReferences\": [ { \"apiVersion\": \"apiVersionValue\", \"kind\": \"kindValue\", \"name\": \"nameValue\", \"uid\": \"uidValue\", \"controller\": true, \"blockOwnerDeletion\": true } ], \"finalizers\": [ \"finalizersValue\" ], \"managedFields\": [ { \"manager\": \"managerValue\", \"operation\": \"operationValue\", \"apiVersion\": \"apiVersionValue\", \"time\": \"2004-01-01T01:01:01Z\", \"fieldsType\": \"fieldsTypeValue\", \"fieldsV1\": {}, \"subresource\": \"subresourceValue\" } ] }, \"spec\": { \"paramKind\": { \"apiVersion\": \"apiVersionValue\", \"kind\": \"kindValue\" }, \"matchConstraints\": { \"namespaceSelector\": { \"matchLabels\": { \"matchLabelsKey\": \"matchLabelsValue\" }, \"matchExpressions\": [ { \"key\": \"keyValue\", \"operator\": \"operatorValue\", \"values\": [ \"valuesValue\" ] } ] }, \"objectSelector\": { \"matchLabels\": { \"matchLabelsKey\": \"matchLabelsValue\" }, \"matchExpressions\": [ { \"key\": \"keyValue\", \"operator\": \"operatorValue\", \"values\": [ \"valuesValue\" ] } ] }, \"resourceRules\": [ { \"resourceNames\": [ \"resourceNamesValue\" ], \"operations\": [ \"operationsValue\" ], \"apiGroups\": [ \"apiGroupsValue\" ], \"apiVersions\": [ \"apiVersionsValue\" ], \"resources\": [ \"resourcesValue\" ], \"scope\": \"scopeValue\" } ], \"excludeResourceRules\": [ { \"resourceNames\": [ \"resourceNamesValue\" ], \"operations\": [ \"operationsValue\" ], \"apiGroups\": [ \"apiGroupsValue\" ], \"apiVersions\": [ \"apiVersionsValue\" ], \"resources\": [ \"resourcesValue\" ], \"scope\": \"scopeValue\" } ], \"matchPolicy\": \"matchPolicyValue\" }, \"validations\": [ { \"expression\": \"expressionValue\", \"message\": \"messageValue\", \"reason\": \"reasonValue\", \"messageExpression\": \"messageExpressionValue\" } ], \"failurePolicy\": \"failurePolicyValue\", \"auditAnnotations\": [ { \"key\": \"keyValue\", \"valueExpression\": \"valueExpressionValue\" } ], \"matchConditions\": [ { \"name\": \"nameValue\", \"expression\": \"expressionValue\" } ], \"variables\": null }, \"status\": { \"observedGeneration\": 1, \"typeChecking\": { \"expressionWarnings\": [ { \"fieldRef\": \"fieldRefValue\", \"warning\": \"warningValue\" } ] }, \"conditions\": [ { \"type\": \"typeValue\", \"status\": \"statusValue\", \"observedGeneration\": 3, \"lastTransitionTime\": \"2004-01-01T01:01:01Z\", \"reason\": \"reasonValue\", \"message\": \"messageValue\" } ] } } No newline at end of file"} {"_id":"q-en-kubernetes-704a8be13a73aedfaf3ccb25bc169c7ca5fde83eb3b03a149411e024fdfc9a68","text":"awsServices := newMockedFakeAWSServices(TestClusterId) c, _ := newAWSCloud(strings.NewReader(\"[global]\"), awsServices) sg1 := \"sg-000001\" sg2 := \"sg-000002\" sg1 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: \"sg-000001\"} sg2 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: \"sg-000002\"} sg3 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: \"sg-000001, sg-000002\"} tests := []struct { name string extraSGsAnnotation string expectedSGs []string annotations map[string]string expectedSGs []string }{ {\"No extra SG annotation\", \"\", []string{}}, {\"Empty extra SGs specified\", \", ,,\", []string{}}, {\"SG specified\", sg1, []string{sg1}}, {\"Multiple SGs specified\", fmt.Sprintf(\"%s, %s\", sg1, sg2), []string{sg1, sg2}}, {\"No extra SG annotation\", map[string]string{}, []string{}}, {\"Empty extra SGs specified\", map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: \", ,,\"}, []string{}}, {\"SG specified\", sg1, []string{sg1[ServiceAnnotationLoadBalancerExtraSecurityGroups]}}, {\"Multiple SGs specified\", sg3, []string{sg1[ServiceAnnotationLoadBalancerExtraSecurityGroups], sg2[ServiceAnnotationLoadBalancerExtraSecurityGroups]}}, } awsServices.ec2.(*MockedFakeEC2).expectDescribeSecurityGroups(TestClusterId, \"k8s-elb-aid\", \"cluster.test\")"} {"_id":"q-en-kubernetes-7059c440c3965c29ea70083ce4cb22bf6dc3d6c975fb090ef222c20c5eccca35","text":"}) } } func TestConvertToAPIContainerStatusesDataRace(t *testing.T) { pod := podWithUIDNameNs(\"12345\", \"test-pod\", \"test-namespace\") testTimestamp := time.Unix(123456789, 987654321) criStatus := &kubecontainer.PodStatus{ ID: pod.UID, Name: pod.Name, Namespace: pod.Namespace, ContainerStatuses: []*kubecontainer.Status{ {Name: \"containerA\", CreatedAt: testTimestamp}, {Name: \"containerB\", CreatedAt: testTimestamp.Add(1)}, }, } testKubelet := newTestKubelet(t, false) defer testKubelet.Cleanup() kl := testKubelet.kubelet // convertToAPIContainerStatuses is purely transformative and shouldn't alter the state of the kubelet // as there are no synchronisation events in that function (no locks, no channels, ...) each test routine // should have its own vector clock increased independently. Golang race detector uses pure happens-before // detection, so would catch a race condition consistently, despite only spawning 2 goroutines for i := 0; i < 2; i++ { go func() { kl.convertToAPIContainerStatuses(pod, criStatus, []v1.ContainerStatus{}, []v1.Container{}, false, false) }() } } "} {"_id":"q-en-kubernetes-706d7fbe949d5c2195c9b64b306883ba14440c8c39f7cbcee45f3f6e23d15a98","text":"mountPath: /device-plugin - name: dev mountPath: /dev updateStrategy: type: RollingUpdate "} {"_id":"q-en-kubernetes-70bedf886735a6690ee554ef0152fe083d460fba3ef3e01e9214f693adabb525","text":"{ \"ImportPath\": \"github.com/GoogleCloudPlatform/kubernetes\", \"GoVersion\": \"go1.3\", \"GoVersion\": \"go1.4.1\", \"Packages\": [ \"./...\" ],"} {"_id":"q-en-kubernetes-70f42fd3a53891408b7ade8b6f57203a1ee731c2d99e832a9c3effe6886111a7","text":"import ( \"context\" \"fmt\" \"time\" v1 \"k8s.io/api/core/v1\""} {"_id":"q-en-kubernetes-70fb071781e5487b572a0df0bc68aabf0d289955a1de72b90e6e73adc8af62e5","text":"func (m *manager) UpdatePodStatus(podUID types.UID, podStatus *v1.PodStatus) { for i, c := range podStatus.ContainerStatuses { var ready bool if c.State.Running == nil { ready = false } else if result, ok := m.readinessManager.Get(kubecontainer.ParseContainerID(c.ContainerID)); ok { ready = result == results.Success } else { // The check whether there is a probe which hasn't run yet. _, exists := m.getWorker(podUID, c.Name, readiness) ready = !exists } podStatus.ContainerStatuses[i].Ready = ready var started bool if c.State.Running == nil { started = false"} {"_id":"q-en-kubernetes-71493df9dd735e64b867a28c12062f31ef4528f5bd3902906deada4ebb2e3741","text":"t.Errorf(\"Invalid content read from cache %q\", string(content)) } } func TestCacheRoundTripperPathPerm(t *testing.T) { assert := assert.New(t) rt := &testRoundTripper{} cacheDir, err := ioutil.TempDir(\"\", \"cache-rt\") os.RemoveAll(cacheDir) defer os.RemoveAll(cacheDir) if err != nil { t.Fatal(err) } cache := newCacheRoundTripper(cacheDir, rt) // First call, caches the response req := &http.Request{ Method: http.MethodGet, URL: &url.URL{Host: \"localhost\"}, } rt.Response = &http.Response{ Header: http.Header{\"ETag\": []string{`\"123456\"`}}, Body: ioutil.NopCloser(bytes.NewReader([]byte(\"Content\"))), StatusCode: http.StatusOK, } resp, err := cache.RoundTrip(req) if err != nil { t.Fatal(err) } content, err := ioutil.ReadAll(resp.Body) if err != nil { t.Fatal(err) } if string(content) != \"Content\" { t.Errorf(`Expected Body to be \"Content\", got %q`, string(content)) } err = filepath.Walk(cacheDir, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.IsDir() { assert.Equal(os.FileMode(0750), info.Mode().Perm()) } else { assert.Equal(os.FileMode(0660), info.Mode().Perm()) } return nil }) assert.NoError(err) } "} {"_id":"q-en-kubernetes-71505ba8fbbb10789462bd8975f0e0b891fc4f7321a67910c145c12bd2234b59","text":"}) } } func TestSubnet(t *testing.T) { for i, c := range []struct { desc string service *v1.Service expected *string }{ { desc: \"No annotation should return nil\", service: &v1.Service{}, expected: nil, }, { desc: \"annotation with subnet but no ILB should return nil\", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: \"subnet\", }, }, }, expected: nil, }, { desc: \"annotation with subnet but ILB=false should return nil\", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: \"subnet\", ServiceAnnotationLoadBalancerInternal: \"false\", }, }, }, expected: nil, }, { desc: \"annotation with empty subnet should return nil\", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: \"\", ServiceAnnotationLoadBalancerInternal: \"true\", }, }, }, expected: nil, }, { desc: \"annotation with subnet and ILB should return subnet\", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ServiceAnnotationLoadBalancerInternalSubnet: \"subnet\", ServiceAnnotationLoadBalancerInternal: \"true\", }, }, }, expected: to.StringPtr(\"subnet\"), }, } { real := subnet(c.service) assert.Equal(t, c.expected, real, fmt.Sprintf(\"TestCase[%d]: %s\", i, c.desc)) } } "} {"_id":"q-en-kubernetes-715925d93a41296f6068e5cb7db4c0aa728f8ee9ec8bf8eecf5ff2fa73cb8ebf","text":"\"fmt\" \"os\" \"path/filepath\" \"strings\" \"time\" \"github.com/pkg/errors\""} {"_id":"q-en-kubernetes-716999b38246af4c9270b6160848053ed7fc15884b244ce0fe1dcb9d94f46b3f","text":"} // CleanupAdapter deletes Custom Metrics - Stackdriver adapter deployments. func CleanupAdapter(namespace, adapterDeploymentFile string) { stat, err := framework.RunKubectl(namespace, \"delete\", \"-f\", adapterDeploymentFile) func CleanupAdapter(adapterDeploymentFile string) { stat, err := framework.RunKubectl(\"\", \"delete\", \"-f\", adapterDeploymentFile) framework.Logf(stat) if err != nil { framework.Logf(\"Failed to delete adapter deployments: %s\", err)"} {"_id":"q-en-kubernetes-7170f5e1f674e349b705d2899e7b1fb10156086e42893bebdc5c466bc686907f","text":"internalapi \"k8s.io/cri-api/pkg/apis\" apitest \"k8s.io/cri-api/pkg/apis/testing\" fakeremote \"k8s.io/kubernetes/pkg/kubelet/cri/remote/fake\" \"k8s.io/kubernetes/pkg/kubelet/cri/remote/util\" ) const ("} {"_id":"q-en-kubernetes-718671d140b86ebf5b93a6194596b0324f233352f6657a5cad794f27a1ec1d0d","text":"* [Example of dynamic updates](examples/update-demo/README.md) * [Cluster monitoring with heapster and cAdvisor](https://github.com/GoogleCloudPlatform/heapster) * [Community projects](https://github.com/GoogleCloudPlatform/kubernetes/wiki/Kubernetes-Community) * [Development guide](docs/development.md) * [Development guide](docs/devel/development.md) Or fork and start hacking!"} {"_id":"q-en-kubernetes-718a96f0663797fccf6cec1365e3d1ffc94cc79229396dcfcd62a7941b8f333f","text":"\"description\": \"EndpointPort is a tuple that describes a single port.\", \"properties\": { \"appProtocol\": { \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.\", \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.\", \"type\": \"string\" }, \"name\": {"} {"_id":"q-en-kubernetes-71a56af80b333d369ea5436decfac8d8bc987f9747310af3a27f973e0960eff4","text":"return feasibleNodes, nil } type pluginScores struct { Plugin string Score int64 AverageNodeScore float64 } // prioritizeNodes prioritizes the nodes by running the score plugins, // which return a score for each node from the call to RunScorePlugins(). // The scores from each plugin are added together to make the score for that node, then"} {"_id":"q-en-kubernetes-71d20a89960ccd8b120add7e2889312112c8a3d5316f22268340474a922acb89","text":") apiserverRequestConcurrencyLimit = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Namespace: namespace, Subsystem: subsystem, Name: \"request_concurrency_limit\", Help: \"Shared concurrency limit in the API Priority and Fairness subsystem\", StabilityLevel: compbasemetrics.ALPHA, Namespace: namespace, Subsystem: subsystem, Name: \"request_concurrency_limit\", Help: \"Nominal number of execution seats configured for each priority level\", // Remove this metric once all suppported releases have the equal nominal_limit_seats metric DeprecatedVersion: \"1.30.0\", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel}, )"} {"_id":"q-en-kubernetes-71d428ebfbc7fa4fb0807eb410ca7f2bf521c711473b4462db452802b18c4739","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( \"k8s.io/kubernetes/pkg/api/v1\" \"k8s.io/kubernetes/pkg/runtime\" ) func addDeepCopyFuncs(scheme *runtime.Scheme) { if err := scheme.AddGeneratedDeepCopyFuncs( v1.DeepCopy_v1_DeleteOptions, v1.DeepCopy_v1_ExportOptions, v1.DeepCopy_v1_List, v1.DeepCopy_v1_ListOptions, v1.DeepCopy_v1_ObjectMeta, v1.DeepCopy_v1_ObjectReference, v1.DeepCopy_v1_OwnerReference, v1.DeepCopy_v1_Service, v1.DeepCopy_v1_ServiceList, v1.DeepCopy_v1_ServicePort, v1.DeepCopy_v1_ServiceSpec, v1.DeepCopy_v1_ServiceStatus, ); err != nil { // if one of the deep copy functions is malformed, detect it immediately. panic(err) } } "} {"_id":"q-en-kubernetes-7246166cab5d200f4711466274910e226d2d0ef91c4dd091e47740daf97683b2","text":"statuses = append(statuses, \"Unknown\") } row.Cells = append(row.Cells, obj.Name, strings.Join(statuses, \",\"), translateTimestamp(obj.CreationTimestamp)) if options.ShowLabels { row.Cells = append(row.Cells, labels.FormatLabels(obj.Labels)) } return []metav1alpha1.TableRow{row}, nil }"} {"_id":"q-en-kubernetes-72af7b59ec9ebd34d57bf50a67026b162e74fd85721c157a0730fc80f8201d15","text":"echo -n Attempt \"$(($attempt+1))\" to check for salt-master local output local ok=1 output=$(ssh -oStrictHostKeyChecking=no -i \"${AWS_SSH_KEY}\" ubuntu@${KUBE_MASTER_IP} pgrep salt-master 2> $LOG) || ok=0 output=$(ssh -oStrictHostKeyChecking=no -i \"${AWS_SSH_KEY}\" ${SSH_USER}@${KUBE_MASTER_IP} pgrep salt-master 2> $LOG) || ok=0 if [[ ${ok} == 0 ]]; then if (( attempt > 30 )); then echo"} {"_id":"q-en-kubernetes-72d504fbe29a40e4965d730182509c6382eedbf5be1f11660e96036eda24e8c5","text":"// Run begins watching and syncing. func (rm *ReplicationManager) Run(workers int, stopCh <-chan struct{}) { defer util.HandleCrash() glog.Infof(\"Starting RC Manager\") controller.SyncAllPodsWithStore(rm.kubeClient, rm.podStore.Store) go rm.rcController.Run(stopCh) go rm.podController.Run(stopCh) for i := 0; i < workers; i++ {"} {"_id":"q-en-kubernetes-730e16fcf0872634daf133e83372c62bab09568914217adae36e316b4301ad9a","text":"for _, kind := range []string{ \"Service\", } { err = api.Scheme.AddFieldLabelConversionFunc(\"v1\", kind, err = scheme.AddFieldLabelConversionFunc(\"v1\", kind, func(label, value string) (string, string, error) { switch label { case \"metadata.namespace\","} {"_id":"q-en-kubernetes-7315a192ace9f41f386ea62608c77db4ccee12fdc7ea9b0ae17bb21a12e26e3e","text":"// zero capacity, and the default labels. func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) { if kl.kubeClient != nil { if n, err := kl.nodeLister.Get(string(kl.nodeName)); err == nil { if n, err := kl.GetNode(); err == nil { return n, nil } }"} {"_id":"q-en-kubernetes-73295edc882161b8be65028842cfb0cb0d438b3beb196432dc1c73796c43fca1","text":"var k8sBinDir = flag.String(\"k8s-bin-dir\", \"\", \"Directory containing k8s kubelet and kube-apiserver binaries.\") var buildTargets = []string{ \"cmd/kubelet\", \"cmd/kube-apiserver\", \"test/e2e_node/e2e_node.test\", } func buildGo() { glog.Infof(\"Building k8s binaries...\") k8sRoot, err := getK8sRootDir() if err != nil { glog.Fatalf(\"Failed to locate kubernetes root directory %v.\", err) } cmd := exec.Command(filepath.Join(k8sRoot, \"hack/build-go.sh\"), buildTargets...) cmd := exec.Command(filepath.Join(k8sRoot, \"hack/build-go.sh\")) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Run()"} {"_id":"q-en-kubernetes-7370a595c266f58e16dfadcc43e67e51e6781c1ebbd5ad0b3f2237523c96ac67","text":"} } } func hasJump(rules []iptablestest.Rule, destChain, ipSet string) bool { match := false for _, r := range rules { if r[iptablestest.Jump] == destChain { match = true if ipSet != \"\" { if strings.Contains(r[iptablestest.MatchSet], ipSet) { return true } match = false } } } return match } "} {"_id":"q-en-kubernetes-7378151faa881b9d04a90683c7f1060671f81b0448b442a31bb94649272f5744","text":"deps = [ \"//cmd/kubeadm/app/apis/kubeadm:go_default_library\", \"//cmd/kubeadm/app/constants:go_default_library\", \"//cmd/kubeadm/app/features:go_default_library\", \"//cmd/kubeadm/app/util:go_default_library\", \"//cmd/kubeadm/app/util/apiclient:go_default_library\", \"//pkg/api/legacyscheme:go_default_library\","} {"_id":"q-en-kubernetes-737bc614ab54dce551cd4cbc21c996bb46d8d6d577a9fd705b4372f278f47bfa","text":"\"terminationMessagePath\": \"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.\", \"terminationMessagePolicy\": \"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\", \"imagePullPolicy\": \"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\", \"securityContext\": \"Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\", \"securityContext\": \"SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\", \"stdin\": \"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.\", \"stdinOnce\": \"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\", \"tty\": \"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.\","} {"_id":"q-en-kubernetes-737c78118b9f2825dfc162456aa695b4ff6ec9abf9a9c5f7cedb46f632b55c82","text":"apps \"k8s.io/api/apps/v1\" \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/api/errors\" apierrs \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\""} {"_id":"q-en-kubernetes-738bfbf2a2cfece745dd90ccc3a283f28bcf6b2f4401ed755cee1818a5c1e352","text":"if itemOut.Status != api.StatusWorking || itemOut.Details == nil || itemOut.Details.ID == \"\" { t.Errorf(\"Unexpected status: %#v (%s)\", itemOut, string(body)) } wait.Done() } func TestCreateNotFound(t *testing.T) {"} {"_id":"q-en-kubernetes-73bf9911847c40ff86ab3144058ee980db2a621094879a2f80b1d3f7bea22e6a","text":"// MinionList is a list of minions. type MinionList struct { JSONBase `json:\",inline\" yaml:\",inline\"` Items []Minion `json:\"minions,omitempty\" yaml:\"minions,omitempty\"` // DEPRECATED: the below Minions is due to a naming mistake and // will be replaced with Items in the future. Minions []Minion `json:\"minions,omitempty\" yaml:\"minions,omitempty\"` Items []Minion `json:\"items,omitempty\" yaml:\"items,omitempty\"` } // Binding is written by a scheduler to cause a pod to be bound to a host."} {"_id":"q-en-kubernetes-73ce865f9c34194f1c7450d11e4c6f130974cd16147e0f9040323cc00396a57a","text":"burst, containerLogsDir, osInterface, networkPlugin, runtimeHelper, httpClient, &NativeExecHandler{}, fakeOOMAdjuster, fakeProcFs, false, imageBackOff, false, false, true) dm.dockerPuller = &FakeDockerPuller{} dm.versionCache = cache.NewVersionCache(func() (kubecontainer.Version, kubecontainer.Version, error) { return dm.getVersionInfo() }) return dm }"} {"_id":"q-en-kubernetes-73ec152a766d272dce7a0fa9968b1ca77f18ba0d8df8ea2b522687ebd0a574a7","text":"}) /* Testname: allowPrivilegeEscalation=true. Description: Configuring the allowPrivilegeEscalation to true, allows the privilege escalation operation. A container is configured with allowPrivilegeEscalation=true and a given uid (1000) which is not 0. When the container is run, the container is run using uid=0 (making use of the privilege escalation). This test is marked LinuxOnly since Windows does not support running as UID / GID. Release : v1.15 Testname: Security Context, allowPrivilegeEscalation=true. Description: Configuring the allowPrivilegeEscalation to true, allows the privilege escalation operation. A container is configured with allowPrivilegeEscalation=true and a given uid (1000) which is not 0. When the container is run, container's output MUST match with expected output verifying container ran with uid=0 (making use of the privilege escalation). This e2e Can not be promoted to Conformance as it is Container Runtime dependent and runtime may not allow to run. [LinuxOnly]: This test is marked LinuxOnly since Windows does not support running as UID / GID. */ It(\"should allow privilege escalation when true [LinuxOnly] [NodeConformance]\", func() { podName := \"alpine-nnp-true-\" + string(uuid.NewUUID())"} {"_id":"q-en-kubernetes-74011e2b27e6fbc3f1b24d1134d404a0ef1fc87f0d9ed66c6b161588e2455265","text":"}) } func getParams(featureList map[string]bool) string { if features.Enabled(featureList, features.SupportIPVSProxyMode) { return \"- --proxy-mode=ipvsn - --feature-gates=SupportIPVSProxyMode=true\" } return \"\" } func getClusterCIDR(podsubnet string) string { if len(podsubnet) == 0 { return \"\""} {"_id":"q-en-kubernetes-7415173c57ead87619d3dabadb70718f60476ae65db71d31283a3cfa1a1802c9","text":"glog.Infof(\"Starting APIServiceRegistrationController\") defer glog.Infof(\"Shutting down APIServiceRegistrationController\") if !controllers.WaitForCacheSync(\"APIServiceRegistrationController\", stopCh, c.apiServiceSynced, c.servicesSynced) { if !controllers.WaitForCacheSync(\"APIServiceRegistrationController\", stopCh, c.apiServiceSynced) { return }"} {"_id":"q-en-kubernetes-7424831c3d31f727134eeba69d863878fb983c0be2b56f720316f7e9485698ec","text":"var warnOnce sync.Once func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { // deprecated in v1.22, remove in v1.25 // this should be updated to use klog.Warningf in v1.24 to more actively warn consumers warnOnce.Do(func() { klog.V(1).Infof(`WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins`) klog.Warningf(`WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke`) }) ts, err := tokenSource(isCmdTokenSource(gcpConfig), gcpConfig)"} {"_id":"q-en-kubernetes-7425c8298fd95dbc48399390bc15f55f3f1537449a4fd39e14e07fc348a95920","text":" /* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package testutil import ( \"strings\" \"testing\" \"k8s.io/component-base/metrics\" ) func TestNewFakeKubeRegistry(t *testing.T) { registryVersion := \"1.18.0\" counter := metrics.NewCounter( &metrics.CounterOpts{ Name: \"test_counter_name\", Help: \"counter help\", }, ) deprecatedCounter := metrics.NewCounter( &metrics.CounterOpts{ Name: \"test_deprecated_counter\", Help: \"counter help\", DeprecatedVersion: \"1.18.0\", }, ) hiddenCounter := metrics.NewCounter( &metrics.CounterOpts{ Name: \"test_hidden_counter\", Help: \"counter help\", DeprecatedVersion: \"1.17.0\", }, ) var tests = []struct { name string metric *metrics.Counter expected string }{ { name: \"normal\", metric: counter, expected: ` # HELP test_counter_name [ALPHA] counter help # TYPE test_counter_name counter test_counter_name 0 `, }, { name: \"deprecated\", metric: deprecatedCounter, expected: ` # HELP test_deprecated_counter [ALPHA] (Deprecated since 1.18.0) counter help # TYPE test_deprecated_counter counter test_deprecated_counter 0 `, }, { name: \"hidden\", metric: hiddenCounter, expected: ``, }, } for _, test := range tests { tc := test t.Run(tc.name, func(t *testing.T) { registry := NewFakeKubeRegistry(registryVersion) registry.MustRegister(tc.metric) if err := GatherAndCompare(registry, strings.NewReader(tc.expected), tc.metric.FQName()); err != nil { t.Fatal(err) } }) } } "} {"_id":"q-en-kubernetes-745d381fa41da15f155ef8da60ae55fcca0f06dadec83246b90b044f9bd74fa6","text":"} if status == health.Healthy { result = append(result, minion) } else { glog.Errorf(\"%s failed a health check, ignoring.\", minion) } } return result, nil"} {"_id":"q-en-kubernetes-74890f172185e57f4f5c1afbf79ec5ad22bdd6d130ea728d6090650e7e706c5a","text":"go_library( name = \"go_default_library\", srcs = [ \"conntrack.go\", \"dns.go\", \"dns_common.go\", \"dns_configmap.go\","} {"_id":"q-en-kubernetes-74bd8f33efc87cc69096e7d9eaea99df730af0f019dfc9b0d89ef15002239232","text":"// Create a deployment to delete nginx pods and instead bring up redis pods. deploymentName := \"redis-deployment\" Logf(\"Creating deployment %s\", deploymentName) _, err = c.Deployments(ns).Create(newDeployment(deploymentName, replicas, deploymentPodLabels, \"redis\", \"redis\")) _, err = c.Deployments(ns).Create(newDeployment(deploymentName, replicas, deploymentPodLabels, \"redis\", \"redis\", extensions.RollingUpdateDeploymentStrategyType)) Expect(err).NotTo(HaveOccurred()) defer func() { deployment, err := c.Deployments(ns).Get(deploymentName)"} {"_id":"q-en-kubernetes-74c4bd2d0b4b4776c8dcc18cb2a4e9a3c6a50fa495f4f282fffa51bdb2d33dcf","text":"t *testing.T, expectedDetachCallCount int, fakePlugin *volumetesting.FakeVolumePlugin) { if len(fakePlugin.Detachers) == 0 && expectedDetachCallCount == 0 { if len(fakePlugin.GetDetachers()) == 0 && expectedDetachCallCount == 0 { return } err := retryWithExponentialBackOff( time.Duration(5*time.Millisecond), func() (bool, error) { for i, detacher := range fakePlugin.Detachers { for i, detacher := range fakePlugin.GetDetachers() { actualCallCount := detacher.GetDetachCallCount() if actualCallCount == expectedDetachCallCount { return true, nil"} {"_id":"q-en-kubernetes-74cf27df18e88f565c42ae5aa3fcfd3ff0d6e4088880ba8533c9e645202a244d","text":"return 1 fi # provide `--pull` argument to `docker build` if `KUBE_BUILD_PULL_LATEST_IMAGES` # is set to y or Y; otherwise try to build the image without forcefully # pulling the latest base image. local DOCKER_BUILD_OPTS=() if [[ \"${KUBE_BUILD_PULL_LATEST_IMAGES}\" =~ [yY] ]]; then DOCKER_BUILD_OPTS+=(\"--pull\") fi local -r docker_build_opts=\"${DOCKER_BUILD_OPTS[@]}\" for wrappable in \"${binaries[@]}\"; do local oldifs=$IFS"} {"_id":"q-en-kubernetes-74fd5c00cce4eb5c167d5de9e56991ec6c4c3677102ba3da67527a31723773d1","text":"input MicroTime }{ {MicroTime{}}, {DateMicro(1998, time.May, 5, 1, 5, 5, 50, time.Local)}, {DateMicro(1998, time.May, 5, 1, 5, 5, 1000, time.Local)}, {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, }"} {"_id":"q-en-kubernetes-75062d570a53a521afef67ca4f68c770e526b1d547a8ac38d6f9c56fc9bb5083","text":"Hard_rename log message [FILTER] Name modify Match winevt.raw Hard_rename Message message [FILTER] Name parser Match kube_* Key_Name message"} {"_id":"q-en-kubernetes-7533904bb03a72fbf692721e06056562020b17702e5a6869c3a505373e81f10e","text":"return &os.PathError{Op: \"fstat\", Path: file.Name(), Err: err} } // Skip chown if uid is already the one we want. if int(s.Uid) == u.Uid { // Skip chown if uid is already the one we want or any of the STDIO descriptors // were redirected to /dev/null. if int(s.Uid) == u.Uid || s.Rdev == null.Rdev { continue }"} {"_id":"q-en-kubernetes-757dec5aea8d65fe714da4e929418f8d1b34d11baef1a5ab295f3751b8b5f423","text":"err = gce.waitForRegionOp(op, region) if err != nil { glog.Warningf(\"Failed waiting for Forwarding Rule %s to be deleted: got error %s.\", name, err.Error()) return err } } op, err = gce.service.TargetPools.Delete(gce.projectID, region, name).Do()"} {"_id":"q-en-kubernetes-7594f092355a5bc5de3628251b80f8ee7d09e6e990b3b8284693c9a26ddfe3ac","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package core import ( \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/runtime\" ) func addDeepCopyFuncs(scheme *runtime.Scheme) { if err := scheme.AddGeneratedDeepCopyFuncs( api.DeepCopy_api_DeleteOptions, api.DeepCopy_api_ExportOptions, api.DeepCopy_api_List, api.DeepCopy_api_ListOptions, api.DeepCopy_api_ObjectMeta, api.DeepCopy_api_ObjectReference, api.DeepCopy_api_OwnerReference, api.DeepCopy_api_Service, api.DeepCopy_api_ServiceList, api.DeepCopy_api_ServicePort, api.DeepCopy_api_ServiceSpec, api.DeepCopy_api_ServiceStatus, ); err != nil { // if one of the deep copy functions is malformed, detect it immediately. panic(err) } } "} {"_id":"q-en-kubernetes-75b6393280866c79efe2b580c4cb85b12373b210e07e9124ecde60d9d092c237","text":"require ( github.com/gogo/protobuf v1.3.2 google.golang.org/grpc v1.51.0 k8s.io/klog/v2 v2.80.1 ) require ( github.com/go-logr/logr v1.2.3 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect golang.org/x/net v0.4.0 // indirect"} {"_id":"q-en-kubernetes-7609b717c8ebcc0dbf38bafb8c4462172ba2857fa3fa9d8415d4dd9b3792a043","text":" apiVersion: v1 kind: ReplicationController apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: name: openshift name: openshift spec: replicas: 1 selector: name: openshift selector: matchLabels: name: openshift template: metadata: labels:"} {"_id":"q-en-kubernetes-768ed7f224abbd55364ca6405e748724e74adcc449b1253d60efedff4fa06964","text":"} } // genEnumWithRuleAndValues creates a function that accepts an optional maxLength // with given validation rule and a set of enum values, following the convention of existing tests. // The test has two checks, first with maxLength unset to check if maxLength can be concluded from enums, // second with maxLength set to ensure it takes precedence. func genEnumWithRuleAndValues(rule string, values ...string) func(maxLength *int64) *schema.Structural { enums := make([]schema.JSON, 0, len(values)) for _, v := range values { enums = append(enums, schema.JSON{Object: v}) } return func(maxLength *int64) *schema.Structural { return &schema.Structural{ Generic: schema.Generic{ Type: \"string\", }, ValueValidation: &schema.ValueValidation{ MaxLength: maxLength, Enum: enums, }, Extensions: schema.Extensions{ XValidations: apiextensions.ValidationRules{ { Rule: rule, }, }, }, } } } func genBytesWithRule(rule string) func(maxLength *int64) *schema.Structural { return func(maxLength *int64) *schema.Structural { return &schema.Structural{"} {"_id":"q-en-kubernetes-76d7d746440f27d05dbf5070d75b26e44a97b2d98953ef4487573662b4c12fdc","text":"buf.Reset() } } func TestPrintCluster(t *testing.T) { tests := []struct { cluster federation.Cluster expect []metav1alpha1.TableRow showLabels bool }{ { federation.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: \"cluster1\", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, }, []metav1alpha1.TableRow{{Cells: []interface{}{\"cluster1\", \"Unknown\", \"0s\"}}}, false, }, { federation.Cluster{ ObjectMeta: metav1.ObjectMeta{ Name: \"cluster2\", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, Labels: map[string]string{\"label1\": \"\", \"label2\": \"cluster\"}, }, Status: federation.ClusterStatus{ Conditions: []federation.ClusterCondition{ { Status: api.ConditionTrue, Type: federation.ClusterReady, }, { Status: api.ConditionFalse, Type: federation.ClusterOffline, }, }, }, }, []metav1alpha1.TableRow{{Cells: []interface{}{\"cluster2\", \"Ready,NotOffline\", \"0s\", \"label1=,label2=cluster\"}}}, true, }, } for i, test := range tests { rows, err := printCluster(&test.cluster, printers.PrintOptions{ShowLabels: test.showLabels}) if err != nil { t.Fatal(err) } for i := range rows { rows[i].Object.Object = nil } if !reflect.DeepEqual(test.expect, rows) { t.Errorf(\"%d mismatch: %s\", i, diff.ObjectReflectDiff(test.expect, rows)) } } } func TestPrintClusterList(t *testing.T) { tests := []struct { clusters federation.ClusterList expect []metav1alpha1.TableRow showLabels bool }{ // Test podList's pod: name, num of containers, restarts, container ready status { federation.ClusterList{ Items: []federation.Cluster{ { ObjectMeta: metav1.ObjectMeta{ Name: \"cluster1\", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, Status: federation.ClusterStatus{ Conditions: []federation.ClusterCondition{ { Status: api.ConditionTrue, Type: federation.ClusterReady, }, }, }, }, { ObjectMeta: metav1.ObjectMeta{ Name: \"cluster2\", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, Labels: map[string]string{\"label1\": \"\", \"label2\": \"cluster2\"}, }, Status: federation.ClusterStatus{ Conditions: []federation.ClusterCondition{ { Status: api.ConditionTrue, Type: federation.ClusterReady, }, { Status: api.ConditionFalse, Type: federation.ClusterOffline, }, }, }, }, }, }, []metav1alpha1.TableRow{{Cells: []interface{}{\"cluster1\", \"Ready\", \"0s\", \"\"}}, {Cells: []interface{}{\"cluster2\", \"Ready,NotOffline\", \"0s\", \"label1=,label2=cluster2\"}}}, true, }, } for _, test := range tests { rows, err := printClusterList(&test.clusters, printers.PrintOptions{ShowLabels: test.showLabels}) if err != nil { t.Fatal(err) } for i := range rows { rows[i].Object.Object = nil } if !reflect.DeepEqual(test.expect, rows) { t.Errorf(\"mismatch: %s\", diff.ObjectReflectDiff(test.expect, rows)) } } } "} {"_id":"q-en-kubernetes-76ed9941f6568b10987402f1d02b195a933c4a81ab823dc2fcde884a44565718","text":"node := newNode(\"node1\", nil) node.Status.Conditions = []v1.NodeCondition{ {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}, {Type: v1.NodeInodePressure, Status: v1.ConditionFalse}, } return node }(),"} {"_id":"q-en-kubernetes-770e2b1fae79149520a4950ae6858e6c0953b566b24c8bd88e9f0a22990ed0be","text":"// utils.go contains functions used across test suites. const ( cniVersion = \"v0.8.7\" cniVersion = \"v0.9.1\" cniArch = \"amd64\" cniDirectory = \"cni/bin\" // The CNI tarball places binaries under directory under \"cni/bin\". cniConfDirectory = \"cni/net.d\""} {"_id":"q-en-kubernetes-7747b08b0a771e77cd63d35d2f07f578b745011577ce73e2ba70f68989171410","text":"func TestPriorityQueue_PendingPods(t *testing.T) { q := NewPriorityQueue(nil) q.Add(&medPriorityPod) q.unschedulableQ.addOrUpdate(&unschedulablePod) q.unschedulableQ.addOrUpdate(&highPriorityPod) addOrUpdateUnschedulablePod(q, &unschedulablePod) addOrUpdateUnschedulablePod(q, &highPriorityPod) expectedList := []*v1.Pod{&medPriorityPod, &unschedulablePod, &highPriorityPod} if !reflect.DeepEqual(expectedList, q.PendingPods()) { t.Error(\"Unexpected list of pending Pods for node.\")"} {"_id":"q-en-kubernetes-77551711d5317576d9bcf7bfcce2d67215470440912170b3cbd5c3ce03c8ac08","text":"return true, errors.New(\"not implemented\") } func (mounter *Mounter) EvalHostSymlinks(pathname string) (string, error) { return \"\", unsupportedErr } func (mounter *Mounter) PrepareSafeSubpath(subPath Subpath) (newHostPath string, cleanupAction func(), err error) { return subPath.Path, nil, unsupportedErr }"} {"_id":"q-en-kubernetes-779f61b2109c7949b85bc06cb7e9c72af0039630f64170d6c3bbaac8986a4bd8","text":"// Verify scheduler metrics. // TODO: Reset metrics at the beginning of the test. // We should do something similar to how we do it for APIserver. framework.ExpectNoError(framework.VerifySchedulerLatency(c)) if err = framework.VerifySchedulerLatency(c); err != nil { framework.Logf(\"Warning: Scheduler latency not calculated, %v\", err) } }) // Explicitly put here, to delete namespace at the end of the test"} {"_id":"q-en-kubernetes-77ab73f7c5e6f0fadc63071acf012c03dab36d9060b274e71b0ec0651b801d2e","text":"return errRequeue } // Check parameters. claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class) // Check parameters. Do not record event to Claim if its parameters are invalid, // syncKey will record the error. claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class, false) if err != nil { return err }"} {"_id":"q-en-kubernetes-77bdef0f77ba2b53a4d1c2b0a1e59df27d27fc565f25e39d21af376445457170","text":"kubectl get replicationcontrollers \"${kube_flags[@]}\" kubectl describe replicationcontroller frontend-controller \"${kube_flags[@]}\" | grep -q 'Replicas:.*3 desired' kubectl delete rc frontend-controller \"${kube_flags[@]}\" rcsbefore=\"$(kubectl get replicationcontrollers -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" kubectl create -f examples/guestbook/frontend-controller.json \"${kube_flags[@]}\" kubectl create -f examples/guestbook/redis-slave-controller.json \"${kube_flags[@]}\" kubectl delete rc frontend-controller redis-slave-controller \"${kube_flags[@]}\" # delete multiple controllers at once rcsafter=\"$(kubectl get replicationcontrollers -o template -t \"{{ len .items }}\" \"${kube_flags[@]}\")\" [ \"$((${rcsafter} - ${rcsbefore}))\" -eq 0 ] kube::log::status \"Testing kubectl(${version}:nodes)\" kubectl get nodes \"${kube_flags[@]}\""} {"_id":"q-en-kubernetes-77cfdc29a9a2fac9190c95e6468b990f68f0ecc85879ca28cb82b188f0af1077","text":"currentRevision *apps.ControllerRevision, updateRevision *apps.ControllerRevision, collisionCount int32, pods []*v1.Pod) (*apps.StatefulSetStatus, error) { pods []*v1.Pod) (statefulSetStatus *apps.StatefulSetStatus, updateErr error) { // get the current and update revisions of the set. currentSet, err := ApplyRevision(set, currentRevision) if err != nil {"} {"_id":"q-en-kubernetes-77df114c43a189b62632a05b84e9ca6446b2c39b2d9a7b7526a1a98e009f3dc3","text":"}, }, { // PV requires external deleter name: \"8-10-2 - external deleter when volume is static provisioning\", initialVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10-2\", \"1Gi\", \"uid10-1-2\", \"claim10-1-2\", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, expectedVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10-2\", \"1Gi\", \"uid10-1-2\", \"claim10-1-2\", v1.VolumeReleased, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, initialClaims: noclaims, expectedClaims: noclaims, expectedEvents: noevents, errors: noerrors, test: testSyncVolume, }, { // PV requires external deleter name: \"8-10-3 - external deleter when volume is migrated\", initialVolumes: []*v1.PersistentVolume{volumeWithAnnotation(volume.AnnMigratedTo, \"pd.csi.storage.gke.io\", volumeWithAnnotation(volume.AnnDynamicallyProvisioned, \"kubernetes.io/gce-pd\", newVolume(\"volume8-10-3\", \"1Gi\", \"uid10-1-3\", \"claim10-1-3\", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty, volume.AnnDynamicallyProvisioned)))}, expectedVolumes: []*v1.PersistentVolume{volumeWithAnnotation(volume.AnnMigratedTo, \"pd.csi.storage.gke.io\", volumeWithAnnotation(volume.AnnDynamicallyProvisioned, \"kubernetes.io/gce-pd\", newVolume(\"volume8-10-3\", \"1Gi\", \"uid10-1-3\", \"claim10-1-3\", v1.VolumeReleased, v1.PersistentVolumeReclaimDelete, classEmpty, volume.AnnDynamicallyProvisioned)))}, initialClaims: noclaims, expectedClaims: noclaims, expectedEvents: noevents, errors: noerrors, test: testSyncVolume, }, { // delete success - two PVs are provisioned for a single claim. // One of the PVs is deleted. name: \"8-11 - two PVs provisioned for a single claim\","} {"_id":"q-en-kubernetes-77e3d83a29034075042ac647e5b426607d4843e588df5eeb0176865a8a0d7104","text":"The `FLANNEL_NET` variable defines the IP range used for flannel overlay network, should not conflict with above `SERVICE_CLUSTER_IP_RANGE`. You can optionally provide additional Flannel network configuration through `FLANNEL_OTHER_NET_CONFIG`, as explained in `cluster/ubuntu/config-default.sh`. **Note:** When deploying, master needs to be connected to the Internet to download the necessary files. If your machines are located in a private network that need proxy setting to connect the Internet,"} {"_id":"q-en-kubernetes-77fe0578932a380737835c6b4aa2f30caee3c2892d04b655b3906681314137fc","text":"i := rand.Intn(x.NumField()) fuzzer.Fuzz(x.Field(i).Addr().Interface()) errs := validateNestedValueValidation(vv, false, false, nil) errs := validateNestedValueValidation(vv, false, false, fieldLevel, nil) if len(errs) == 0 && !reflect.DeepEqual(vv.ForbiddenExtensions, Extensions{}) { t.Errorf(\"expected ForbiddenExtensions validation errors for: %#v\", vv) }"} {"_id":"q-en-kubernetes-780eb534e26a61ce16161c17e19965545a5dd64f90bb6f70ac26dc25ada56427","text":"storageframework.DefaultFsInlineVolume, storageframework.DefaultFsPreprovisionedPV, storageframework.DefaultFsDynamicPV, storageframework.NtfsDynamicPV, } return InitCustomVolumeIOTestSuite(patterns) }"} {"_id":"q-en-kubernetes-78166db65ca37a91a7d74b4e89cc9208889ff6a9bf1545bf5137d94b7c48c55a","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package e2e_node import ( \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/kubelet\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\" \"k8s.io/kubernetes/pkg/util/uuid\" \"k8s.io/kubernetes/test/e2e/framework\" . \"github.com/onsi/ginkgo\" ) const logString = \"This is the expected log content of this node e2e test\" var _ = framework.KubeDescribe(\"ContainerLogPath\", func() { f := framework.NewDefaultFramework(\"kubelet-container-log-path\") Describe(\"Pod with a container\", func() { Context(\"printed log to stdout\", func() { It(\"should print log to correct log path\", func() { podClient := f.PodClient() ns := f.Namespace.Name logDirVolumeName := \"log-dir-vol\" logDir := kubelet.ContainerLogsDir logPodName := \"logger-\" + string(uuid.NewUUID()) logContName := \"logger-c-\" + string(uuid.NewUUID()) checkPodName := \"checker\" + string(uuid.NewUUID()) checkContName := \"checker-c-\" + string(uuid.NewUUID()) logPod := &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: logPodName, }, Spec: api.PodSpec{ // this pod is expected to exit successfully RestartPolicy: api.RestartPolicyNever, Containers: []api.Container{ { Image: \"gcr.io/google_containers/busybox:1.24\", Name: logContName, Command: []string{\"sh\", \"-c\", \"echo \" + logString}, }, }, }, } podClient.Create(logPod) err := framework.WaitForPodSuccessInNamespace(f.ClientSet, logPodName, ns) framework.ExpectNoError(err, \"Failed waiting for pod: %s to enter success state\", logPodName) // get containerID from created Pod createdLogPod, err := podClient.Get(logPodName) logConID := kubecontainer.ParseContainerID(createdLogPod.Status.ContainerStatuses[0].ContainerID) framework.ExpectNoError(err, \"Failed to get pod: %s\", logPodName) expectedlogFile := logDir + \"/\" + logPodName + \"_\" + ns + \"_\" + logContName + \"-\" + logConID.ID + \".log\" checkPod := &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: checkPodName, }, Spec: api.PodSpec{ // this pod is expected to exit successfully RestartPolicy: api.RestartPolicyNever, Containers: []api.Container{ { Image: \"gcr.io/google_containers/busybox:1.24\", Name: checkContName, // If we find expected log file and contains right content, exit 0 // else, keep checking until test timeout Command: []string{\"sh\", \"-c\", \"while true; do if [ -e \" + expectedlogFile + \" ] && grep -q \" + logString + \" \" + expectedlogFile + \"; then exit 0; fi; sleep 1; done\"}, VolumeMounts: []api.VolumeMount{ { Name: logDirVolumeName, // mount ContainerLogsDir to the same path in container MountPath: expectedlogFile, ReadOnly: true, }, }, }, }, Volumes: []api.Volume{ { Name: logDirVolumeName, VolumeSource: api.VolumeSource{ HostPath: &api.HostPathVolumeSource{ Path: expectedlogFile, }, }, }, }, }, } podClient.Create(checkPod) err = framework.WaitForPodSuccessInNamespace(f.ClientSet, checkPodName, ns) framework.ExpectNoError(err, \"Failed waiting for pod: %s to enter success state\", checkPodName) }) }) }) }) "} {"_id":"q-en-kubernetes-78a2d57d5542e1d6ccb581cae9dbf204cc879816a4a8ef60ba16202360d666b3","text":" #!/usr/bin/env bash # Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -o errexit set -o nounset set -o pipefail KUBE_ROOT=$(dirname \"${BASH_SOURCE[0]}\")/.. source \"${KUBE_ROOT}/hack/lib/init.sh\" # upstream shellcheck latest stable image as of January 10th, 2019 SHELLCHECK_IMAGE=\"koalaman/shellcheck-alpine:v0.6.0@sha256:7d4d712a2686da99d37580b4e2f45eb658b74e4b01caf67c1099adc294b96b52\" SHELLCHECK_CONTAINER=\"k8s-shellcheck\" # disabled lints disabled=( # this lint dissalows non-constant source, which we use extensively 1090 # this lint prefers command -v to which, they are not the same 2230 ) # comma separate for passing to shellcheck join_by() { local IFS=\"$1\"; shift; echo \"$*\"; } SHELLCHECK_DISABLED=\"$(join_by , \"${disabled[@]}\")\" readonly SHELLCHECK_DISABLED cd \"${KUBE_ROOT}\" # find all shell scripts excluding ./_*, ./.git/*, ./vendor*, # and anything git-ignored all_shell_scripts=() while IFS=$'n' read -r script; do git check-ignore -q \"$script\" || all_shell_scripts+=(\"$script\"); done < <(find . -name \"*.sh\" -not ( -path ./_* -o -path ./.git* -o -path ./vendor* )) # make sure known failures are sorted failure_file=\"${KUBE_ROOT}/hack/.shellcheck_failures\" if ! diff -u \"${failure_file}\" <(LC_ALL=C sort \"${failure_file}\"); then { echo echo \"hack/.shellcheck_failures is not in alphabetical order. Please sort it:\" echo echo \" LC_ALL=C sort -o hack/.shellcheck_failures hack/.shellcheck_failures\" echo } >&2 false fi # load known failure files failing_files=() while IFS=$'n' read -r script; do failing_files+=(\"$script\"); done < <(cat \"${failure_file}\") # TODO(bentheelder): we should probably move this and the copy in verify-golint.sh # to one of the bash libs array_contains () { local seeking=$1; shift # shift will iterate through the array local in=1 # in holds the exit status for the function for element; do if [[ \"$element\" == \"$seeking\" ]]; then in=0 # set in to 0 since we found it break fi done return $in } # creates the shellcheck container for later user create_container () { # TODO(bentheelder): this is a performance hack, we create the container with # a sleep MAX_INT32 so that it is effectively paused. # We then repeatedly exec to it to run each shellcheck, and later rm it when # we're done. # This is incredibly much faster than creating a container for each shellcheck # call ... docker run --name \"${SHELLCHECK_CONTAINER}\" -d --rm -v \"${KUBE_ROOT}:${KUBE_ROOT}\" -w \"${KUBE_ROOT}\" --entrypoint=\"sleep\" \"${SHELLCHECK_IMAGE}\" 2147483647 } # removes the shellcheck container remove_container () { docker rm -f \"${SHELLCHECK_CONTAINER}\" &> /dev/null || true } # remove any previous container, ensure we will attempt to cleanup on exit, # and create the container remove_container trap remove_container EXIT if ! output=\"$(create_container 2>&1)\"; then { echo \"Failed to create shellcheck container with output: \" echo \"\" echo \"${output}\" } >&2 exit 1 fi # lint each script, tracking failures errors=() not_failing=() for f in \"${all_shell_scripts[@]}\"; do set +o errexit failedLint=$(docker exec -t \"${SHELLCHECK_CONTAINER}\" shellcheck --exclude=\"${SHELLCHECK_DISABLED}\" \"${f}\") set -o errexit array_contains \"${f}\" \"${failing_files[@]}\" && in_failing=$? || in_failing=$? if [[ -n \"${failedLint}\" ]] && [[ \"${in_failing}\" -ne \"0\" ]]; then errors+=( \"${failedLint}\" ) fi if [[ -z \"${failedLint}\" ]] && [[ \"${in_failing}\" -eq \"0\" ]]; then not_failing+=( \"${f}\" ) fi done # Check to be sure all the packages that should pass lint are. if [ ${#errors[@]} -eq 0 ]; then echo 'Congratulations! All shell files have been linted.' else { echo \"Errors from shellcheck:\" for err in \"${errors[@]}\"; do echo \"$err\" done echo echo 'Please review the above warnings. You can test via \"./hack/verify-shellcheck\"' echo 'If the above warnings do not make sense, you can exempt this package from shellcheck' echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).' echo } >&2 false fi if [[ ${#not_failing[@]} -gt 0 ]]; then { echo \"Some packages in hack/.shellcheck_failures are passing shellcheck. Please remove them.\" echo for f in \"${not_failing[@]}\"; do echo \" $f\" done echo } >&2 false fi # Check that all failing_packages actually still exist gone=() for f in \"${failing_files[@]}\"; do array_contains \"$f\" \"${all_shell_scripts[@]}\" || gone+=( \"$f\" ) done if [[ ${#gone[@]} -gt 0 ]]; then { echo \"Some files in hack/.shellcheck_failures do not exist anymore. Please remove them.\" echo for f in \"${gone[@]}\"; do echo \" $f\" done echo } >&2 false fi "} {"_id":"q-en-kubernetes-78b102b7aa96c0d0cd845781c491378a8c9e0f4f46b03a9ffa3426f3d2e8ed55","text":"} } } func TestGetStorageAccount(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() cloud := &Cloud{} name := \"testAccount\" location := \"testLocation\" networkID := \"networkID\" accountProperties := storage.AccountProperties{ NetworkRuleSet: &storage.NetworkRuleSet{ VirtualNetworkRules: &[]storage.VirtualNetworkRule{ { VirtualNetworkResourceID: &networkID, Action: storage.Allow, State: \"state\", }, }, }} account := storage.Account{ Sku: &storage.Sku{ Name: \"testSku\", Tier: \"testSkuTier\", }, Kind: \"testKind\", Location: &location, Name: &name, AccountProperties: &accountProperties, } testResourceGroups := []storage.Account{account} accountOptions := &AccountOptions{ ResourceGroup: \"rg\", VirtualNetworkResourceIDs: []string{networkID}, } mockStorageAccountsClient := mockstorageaccountclient.NewMockInterface(ctrl) cloud.StorageAccountClient = mockStorageAccountsClient mockStorageAccountsClient.EXPECT().ListByResourceGroup(gomock.Any(), \"rg\").Return(testResourceGroups, nil).Times(1) accountsWithLocations, err := cloud.getStorageAccounts(accountOptions) if err != nil { t.Errorf(\"unexpected error: %v\", err) } if accountsWithLocations == nil { t.Error(\"unexpected error as returned accounts are nil\") } if len(accountsWithLocations) == 0 { t.Error(\"unexpected error as returned accounts slice is empty\") } expectedAccountWithLocation := accountWithLocation{ Name: \"testAccount\", StorageType: \"testSku\", Location: \"testLocation\", } accountWithLocation := accountsWithLocations[0] if accountWithLocation.Name != expectedAccountWithLocation.Name { t.Errorf(\"expected %s, but was %s\", accountWithLocation.Name, expectedAccountWithLocation.Name) } if accountWithLocation.StorageType != expectedAccountWithLocation.StorageType { t.Errorf(\"expected %s, but was %s\", accountWithLocation.StorageType, expectedAccountWithLocation.StorageType) } if accountWithLocation.Location != expectedAccountWithLocation.Location { t.Errorf(\"expected %s, but was %s\", accountWithLocation.Location, expectedAccountWithLocation.Location) } } func TestGetStorageAccountEdgeCases(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() cloud := &Cloud{} // default account with name, location, sku, kind name := \"testAccount\" location := \"testLocation\" sku := &storage.Sku{ Name: \"testSku\", Tier: \"testSkuTier\", } account := storage.Account{ Sku: sku, Kind: \"testKind\", Location: &location, Name: &name, } accountPropertiesWithoutNetworkRuleSet := storage.AccountProperties{NetworkRuleSet: nil} accountPropertiesWithoutVirtualNetworkRules := storage.AccountProperties{ NetworkRuleSet: &storage.NetworkRuleSet{ VirtualNetworkRules: nil, }} tests := []struct { testCase string testAccountOptions *AccountOptions testResourceGroups []storage.Account expectedResult []accountWithLocation expectedError error }{ { testCase: \"account name is nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", }, testResourceGroups: []storage.Account{}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account location is nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", }, testResourceGroups: []storage.Account{{Name: &name}}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account sku is nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", }, testResourceGroups: []storage.Account{{Name: &name, Location: &location}}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options type is not empty and not equal account storage type\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", Type: \"testAccountOptionsType\", }, testResourceGroups: []storage.Account{account}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options kind is not empty and not equal account type\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", Kind: \"testAccountOptionsKind\", }, testResourceGroups: []storage.Account{account}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options location is not empty and not equal account location\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", Location: \"testAccountOptionsLocation\", }, testResourceGroups: []storage.Account{account}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options account properties are nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", VirtualNetworkResourceIDs: []string{\"id\"}, }, testResourceGroups: []storage.Account{}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options account properties network rule set is nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", VirtualNetworkResourceIDs: []string{\"id\"}, }, testResourceGroups: []storage.Account{{Name: &name, Kind: \"kind\", Location: &location, Sku: sku, AccountProperties: &accountPropertiesWithoutNetworkRuleSet}}, expectedResult: []accountWithLocation{}, expectedError: nil, }, { testCase: \"account options account properties virtual network rule is nil\", testAccountOptions: &AccountOptions{ ResourceGroup: \"rg\", VirtualNetworkResourceIDs: []string{\"id\"}, }, testResourceGroups: []storage.Account{{Name: &name, Kind: \"kind\", Location: &location, Sku: sku, AccountProperties: &accountPropertiesWithoutVirtualNetworkRules}}, expectedResult: []accountWithLocation{}, expectedError: nil, }, } for _, test := range tests { t.Logf(\"running test case: %s\", test.testCase) mockStorageAccountsClient := mockstorageaccountclient.NewMockInterface(ctrl) cloud.StorageAccountClient = mockStorageAccountsClient mockStorageAccountsClient.EXPECT().ListByResourceGroup(gomock.Any(), \"rg\").Return(test.testResourceGroups, nil).AnyTimes() accountsWithLocations, err := cloud.getStorageAccounts(test.testAccountOptions) if err != test.expectedError { t.Errorf(\"unexpected error: %v\", err) } if len(accountsWithLocations) != len(test.expectedResult) { t.Error(\"unexpected error as returned accounts slice is not empty\") } } } "} {"_id":"q-en-kubernetes-78cf0c08fe6e7e894e6a1d7042e53761a45809ee04c9a04cb3d6c09248de1442","text":"} // we didn't validate against any provider, reject the pod and give the errors for each attempt klog.V(4).Infof(\"unable to validate pod %s (generate: %s) in namespace %s against any pod security policy: %v\", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) return admission.NewForbidden(a, fmt.Errorf(\"unable to validate against any pod security policy: %v\", validationErrs)) klog.V(4).Infof(\"unable to admit pod %s (generate: %s) in namespace %s against any pod security policy: %v\", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) return admission.NewForbidden(a, fmt.Errorf(\"PodSecurityPolicy: unable to admit pod: %v\", validationErrs)) } // Validate verifies attributes against the PodSecurityPolicy"} {"_id":"q-en-kubernetes-78ff5afa23de91ff6a37d9ac491c6b64d66b20e4f99bacd34c71088b1a0c077a","text":" 1.4 1.5 "} {"_id":"q-en-kubernetes-790ce1d1e1af11c65dc96d5f9e25024ec912f3647beeae4f789169aab489fd25","text":"Client: http.DefaultClient, Port: *kubelet_port, } random := rand.New(rand.NewSource(int64(time.Now().Nanosecond()))) storage := map[string]apiserver.RESTStorage{ \"pods\": registry.MakePodRegistryStorage(podRegistry, containerInfo, registry.MakeFirstFitScheduler(machineList, podRegistry)), \"pods\": registry.MakePodRegistryStorage(podRegistry, containerInfo, registry.MakeFirstFitScheduler(machineList, podRegistry, random)), \"replicationControllers\": registry.MakeControllerRegistryStorage(controllerRegistry), \"services\": registry.MakeServiceRegistryStorage(serviceRegistry), }"} {"_id":"q-en-kubernetes-791254237b92d1c50a3e918fd7b20d6938c2cc3634c627315dc9fa3e391bb9df","text":"value: 512M - name: HEAP_NEWSIZE value: 100M - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: gcr.io/google_containers/cassandra:v4 name: cassandra ports:"} {"_id":"q-en-kubernetes-79619cc714d88966391b6192a4dbd7c906b61e74235141101df701551937e425","text":"\"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/util\" ) func TestRunExposeService(t *testing.T) {"} {"_id":"q-en-kubernetes-799472561da969b8176a827cf6ba2744cf87790f8ad12161a2205164c7653266","text":"\"k8s.io/client-go/discovery\" \"k8s.io/client-go/dynamic\" \"k8s.io/client-go/kubernetes/fake\" scheme \"k8s.io/client-go/kubernetes/scheme\" \"k8s.io/client-go/metadata\" metadatafake \"k8s.io/client-go/metadata/fake\" restclient \"k8s.io/client-go/rest\""} {"_id":"q-en-kubernetes-79995acd2d6b8eef42217802ad36308670a372e69f3b1f71c3f8aa2150dce3e2","text":"} defer monitoring.CleanupDescriptors(gcmService, projectID) err = monitoring.CreateAdapter(tc.framework.Namespace.ObjectMeta.Name, monitoring.AdapterDefault) err = monitoring.CreateAdapter(monitoring.AdapterDefault) if err != nil { framework.Failf(\"Failed to set up: %v\", err) } defer monitoring.CleanupAdapter(tc.framework.Namespace.ObjectMeta.Name, monitoring.AdapterDefault) defer monitoring.CleanupAdapter(monitoring.AdapterDefault) // Run application that exports the metric err = createDeploymentToScale(tc.framework, tc.kubeClient, tc.deployment, tc.pod)"} {"_id":"q-en-kubernetes-799d065b91ee8da1c8ec9f07e9cf9fe7605b5729e05e7bea38d34bacd5aad24e","text":"defer CleanupDescriptors(gcmService, projectID) // Both deployments - for old and new resource model - expose External Metrics API. err = CreateAdapter(f.Namespace.Name, AdapterForOldResourceModel) err = CreateAdapter(AdapterForOldResourceModel) if err != nil { framework.Failf(\"Failed to set up: %s\", err) } defer CleanupAdapter(f.Namespace.Name, AdapterForOldResourceModel) defer CleanupAdapter(AdapterForOldResourceModel) _, err = kubeClient.RbacV1().ClusterRoleBindings().Create(context.TODO(), HPAPermissions, metav1.CreateOptions{}) if err != nil {"} {"_id":"q-en-kubernetes-79b4cdc9b7c98d59458911b10302739998f851371d6e03d4337b2d304ccc9153","text":"Corefile: | __PILLAR__DNS__DOMAIN__:53 { errors cache 30 cache { success 9984 30 denial 9984 5 } reload loop bind __PILLAR__LOCAL__DNS__"} {"_id":"q-en-kubernetes-79bcc461bc8d80201179cb07876ba1d6533924ce2fc4644ea6cb250d6c006bdc","text":"StabilityLevel: metrics.ALPHA, }, ) PreemptionVictims = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: SchedulerSubsystem, Name: \"pod_preemption_victims\", Help: \"Number of selected preemption victims\", PreemptionVictims = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: \"pod_preemption_victims\", Help: \"Number of selected preemption victims\", // we think #victims>50 is pretty rare, therefore [50, +Inf) is considered a single bucket. Buckets: metrics.LinearBuckets(5, 5, 10), StabilityLevel: metrics.ALPHA, }) PreemptionAttempts = metrics.NewCounter("} {"_id":"q-en-kubernetes-79e7d5526ea9f7287631b1dfc5a12237ddf8f082a0fd386cdf23991f8d6a4022","text":"# DOCKER_REGISTRY function start-kube-controller-manager { echo \"Start kubernetes controller-manager\" create-kubecontrollermanager-kubeconfig prepare-log-file /var/log/kube-controller-manager.log # Calculate variables and assemble the command line. local params=\"${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-\"--v=2\"} ${CONTROLLER_MANAGER_TEST_ARGS:-} ${CLOUD_CONFIG_OPT}\" params+=\" --use-service-account-credentials\" params+=\" --cloud-provider=gce\" params+=\" --master=127.0.0.1:8080\" params+=\" --kubeconfig=/etc/srv/kubernetes/kube-controller-manager/kubeconfig\" params+=\" --root-ca-file=/etc/srv/kubernetes/ca.crt\" params+=\" --service-account-private-key-file=/etc/srv/kubernetes/server.key\" if [[ -n \"${ENABLE_GARBAGE_COLLECTOR:-}\" ]]; then"} {"_id":"q-en-kubernetes-79fbc453a29b37c6ed37ce74d01ec8d101fffa10ad9b98ab631d5e02ce83047f","text":" apiVersion: v1 kind: ReplicationController metadata: name: es-data labels: component: elasticsearch role: data spec: replicas: 1 template: metadata: labels: component: elasticsearch role: data spec: serviceAccount: elasticsearch containers: - name: es-data securityContext: capabilities: add: - IPC_LOCK image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4 env: - name: KUBERNETES_CA_CERTIFICATE_FILE value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: \"CLUSTER_NAME\" value: \"myesdb\" - name: NODE_MASTER value: \"false\" - name: HTTP_ENABLE value: \"false\" ports: - containerPort: 9300 name: transport protocol: TCP volumeMounts: - mountPath: /data name: storage volumes: - name: storage emptyDir: {} "} {"_id":"q-en-kubernetes-79fcc80fe875ab470d3c2118f230c7076be428d6d4857d8af58b3a9ab0d9c5b4","text":"framework.Failf(\"Container port output missing expected value. Wanted:'%s', got: %s\", nginxDefaultOutput, body) } }) It(\"should handle in-cluster config\", func() { By(\"overriding icc with values provided by flags\") kubectlPath := framework.TestContext.KubectlPath inClusterHost := strings.TrimSpace(framework.RunHostCmdOrDie(ns, simplePodName, \"printenv KUBERNETES_SERVICE_HOST\")) inClusterPort := strings.TrimSpace(framework.RunHostCmdOrDie(ns, simplePodName, \"printenv KUBERNETES_SERVICE_PORT\")) framework.RunKubectlOrDie(\"cp\", kubectlPath, ns+\"/\"+simplePodName+\":/\") By(\"getting pods with in-cluster configs\") execOutput := framework.RunHostCmdOrDie(ns, simplePodName, \"/kubectl get pods\") if matched, err := regexp.MatchString(\"nginx +1/1 +Running\", execOutput); err != nil || !matched { framework.Failf(\"Unexpected kubectl exec output: \", execOutput) } By(\"trying to use kubectl with invalid token\") _, err := framework.RunHostCmd(ns, simplePodName, \"/kubectl get pods --token=invalid --v=7 2>&1\") framework.Logf(\"got err %v\", err) Expect(err).To(HaveOccurred()) Expect(err).To(ContainSubstring(\"User \"system:anonymous\" cannot list pods in the namespace\")) Expect(err).To(ContainSubstring(\"Using in-cluster namespace\")) Expect(err).To(ContainSubstring(\"Using in-cluster configuration\")) Expect(err).To(ContainSubstring(\"Authorization: Bearer invalid\")) Expect(err).To(ContainSubstring(\"Response Status: 403 Forbidden\")) By(\"trying to use kubectl with invalid server\") _, err = framework.RunHostCmd(ns, simplePodName, \"/kubectl get pods --server=invalid --v=6 2>&1\") framework.Logf(\"got err %v\", err) Expect(err).To(HaveOccurred()) Expect(err).To(ContainSubstring(\"Unable to connect to the server\")) Expect(err).To(ContainSubstring(\"GET http://invalid/api\")) By(\"trying to use kubectl with invalid namespace\") output, _ := framework.RunHostCmd(ns, simplePodName, \"/kubectl get pods --namespace=invalid --v=6 2>&1\") Expect(output).To(ContainSubstring(\"No resources found\")) Expect(output).ToNot(ContainSubstring(\"Using in-cluster namespace\")) Expect(output).To(ContainSubstring(\"Using in-cluster configuration\")) if matched, _ := regexp.MatchString(fmt.Sprintf(\"GET http[s]?://%s:%s/api/v1/namespaces/invalid/pods\", inClusterHost, inClusterPort), output); !matched { framework.Failf(\"Unexpected kubectl exec output: \", output) } }) }) framework.KubeDescribe(\"Kubectl api-versions\", func() {"} {"_id":"q-en-kubernetes-7a1aadd17d8f3dd3b6cd92351747a5efb92486aa3ea63933adf345036721e3f7","text":"import ( \"fmt\" \"math/rand\" \"net\" \"net/url\" \"time\""} {"_id":"q-en-kubernetes-7a48b8ac5e0cae6ba33a21d2b5bbf341da232bd27761733846144565921ac2dd","text":"return fmt.Errorf(\"error when parsing kube-proxy configmap template: %v\", err) } proxyDaemonSetBytes, err := kubeadmutil.ParseTemplate(KubeProxyDaemonSet, struct{ ImageRepository, Arch, Version, ImageOverride, ClusterCIDR, MasterTaintKey, CloudTaintKey string }{ proxyDaemonSetBytes, err := kubeadmutil.ParseTemplate(KubeProxyDaemonSet, struct{ ImageRepository, Arch, Version, ImageOverride, ExtraParams, ClusterCIDR, MasterTaintKey, CloudTaintKey string }{ ImageRepository: cfg.GetControlPlaneImageRepository(), Arch: runtime.GOARCH, Version: kubeadmutil.KubernetesVersionToImageTag(cfg.KubernetesVersion), ImageOverride: cfg.UnifiedControlPlaneImage, ExtraParams: getParams(cfg.FeatureGates), ClusterCIDR: getClusterCIDR(cfg.Networking.PodSubnet), MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster, CloudTaintKey: algorithm.TaintExternalCloudProvider,"} {"_id":"q-en-kubernetes-7a4bc052901e82c4306d3f664dc859710543265a61e7b2f68a33be1d90a96448","text":"description: The discovery.k8s.io API group MUST exist in the /apis discovery document. The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. API Server should create self referential Endpoints and EndpointSlices named \"kubernetes\" in the default namespace. discovery document. The cluster MUST have a service named \"kubernetes\" on the default namespace referencing the API servers. The \"kubernetes.default\" service MUST have Endpoints and EndpointSlices pointing to each API server instance. release: v1.21 file: test/e2e/network/endpointslice.go - testname: EndpointSlice API"} {"_id":"q-en-kubernetes-7a70c122d47eeac8b6552f28650eb832693e8798e2ab6c2ed44cc46aee0219bd","text":"} func wait(cmd string, args ...string) error { sigChannel := make(chan os.Signal, 1) signal.Notify(sigChannel, os.Interrupt) c := exec.Command(cmd, args...) c.Stdout = os.Stdout c.Stderr = os.Stderr if err := c.Start(); err != nil { return err } go func() { sig := <-sigChannel if err := c.Process.Signal(sig); err != nil { log.Fatalf(\"could not send %s signal %s: %v\", cmd, sig, err) } }() return c.Wait() }"} {"_id":"q-en-kubernetes-7a7d351108ce6bad18c930e677c6eca88f40d1f74edddc1822196cd6d823209d","text":"execAffinityTestForNonLBServiceWithTransition(f, cs, svc) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. // [LinuxOnly]: Windows does not support session affinity. ginkgo.It(\"should have session affinity work for LoadBalancer service with ESIPP on [Slow] [DisabledForLargeClusters] [LinuxOnly]\", func() { ginkgo.It(\"should have session affinity work for LoadBalancer service with ESIPP on [Slow] [LinuxOnly]\", func() { // L4 load balancer affinity `ClientIP` is not supported on AWS ELB. e2eskipper.SkipIfProviderIs(\"aws\")"} {"_id":"q-en-kubernetes-7ab914479a2e8961f7a53f8b4958ae57d52448c5b0b625e5703995c4af097808","text":"hostUpdates := make([]func() error, 0, len(ipConfigurationIDs)) nodeUpdates := make(map[vmssMetaInfo]map[string]compute.VirtualMachineScaleSetVM) errors := make([]error, 0) allErrs := make([]error, 0) for i := range ipConfigurationIDs { ipConfigurationID := ipConfigurationIDs[i]"} {"_id":"q-en-kubernetes-7abd83bfe44bf943e5544f3172037adf312c4613ac7796cd82c51faa9c573536","text":"KUBE_ROOT=$(dirname \"${BASH_SOURCE[0]}\")/.. cd \"${KUBE_ROOT}\" mapfile -t all_e2e_files < <(find test/e2e -name '*.go') # NOTE: This checks e2e test code without the e2e framework which contains Expect().To(HaveOccurred()) mapfile -t all_e2e_files < <(find test/e2e -name '*.go' | grep -v 'test/e2e/framework/') errors_expect_no_error=() for file in \"${all_e2e_files[@]}\" do"} {"_id":"q-en-kubernetes-7ad2a11ca21a4cffb52c55a961faf90e50cce02607ea1750876fa372c789a98a","text":"t.Errorf(\"Check ipset entries failed for ipset: %q, expect %d, got %d\", set, len(entries), len(ents)) continue } if len(entries) == 1 { if ents[0] != entries[0].String() { t.Errorf(\"Check ipset entries failed for ipset: %q\", set) } expectedEntries := []string{} for _, entry := range entries { expectedEntries = append(expectedEntries, entry.String()) } sort.Strings(ents) sort.Strings(expectedEntries) if !reflect.DeepEqual(ents, expectedEntries) { t.Errorf(\"Check ipset entries failed for ipset: %q\", set) } } }"} {"_id":"q-en-kubernetes-7ae0860eccbf97091645c26e577255334e2b875ab1619a58b59e841173da40f9","text":"} func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(mounter, dir) return isNotMountPoint(mounter, dir) } func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {"} {"_id":"q-en-kubernetes-7b083e4bd362b07ed8921f80f200df0ff4983d348d70c927f6ad2e33a55c109c","text":" load(\"@io_bazel_rules_go//go:def.bzl\", \"go_library\") go_library( name = \"go_default_library\", srcs = [\"fuzzer.go\"], importpath = \"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig/fuzzer\", visibility = [\"//visibility:public\"], deps = [ \"//pkg/kubelet/apis/kubeletconfig:go_default_library\", \"//pkg/kubelet/apis/kubeletconfig/v1alpha1:go_default_library\", \"//pkg/kubelet/qos:go_default_library\", \"//pkg/kubelet/types:go_default_library\", \"//pkg/master/ports:go_default_library\", \"//vendor/github.com/google/gofuzz:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library\", ], ) filegroup( name = \"package-srcs\", srcs = glob([\"**\"]), tags = [\"automanaged\"], visibility = [\"//visibility:private\"], ) filegroup( name = \"all-srcs\", srcs = [\":package-srcs\"], tags = [\"automanaged\"], visibility = [\"//visibility:public\"], ) "} {"_id":"q-en-kubernetes-7b0b706bbff80900a09bec18e1ded8a858a18c20b6a141de516ff3c5d6e7a8ef","text":"Name: \"foo\", }, Data: map[string][]byte{ v1.DockerConfigKey: secretData, v1.DockerConfigJsonKey: secretData, }, Type: v1.SecretTypeDockercfg, Type: v1.SecretTypeDockerConfigJson, }, expectErr: false, },"} {"_id":"q-en-kubernetes-7b10299e55d8707ba818ea889ba9c71cf79a004115f22f50d03ec71032faccd3","text":"/* Release : v1.23 Testname: Pod Lifecycle, prestop https hook Description: When a pre-stop handler is specified in the container lifecycle using a 'HttpGet' action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve https requests, create a second pod with a container lifecycle specifying a pre-stop that invokes the server pod to validate that the pre-stop is executed. Description: When a pre-stop handler is specified in the container lifecycle using a 'HttpGet' action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve https requests, create a second pod on the same node with a container lifecycle specifying a pre-stop that invokes the server pod to validate that the pre-stop is executed. */ ginkgo.It(\"should execute prestop https hook properly [MinimumKubeletVersion:1.23] [NodeConformance]\", func() { lifecycle := &v1.Lifecycle{"} {"_id":"q-en-kubernetes-7b18bab35e421acf1a8a6b1648d1e48f3ed68db49fa302b28e91cd8be214b4c1","text":"return } func getProxyEnvVars() []api.EnvVar { envs := []api.EnvVar{} for _, env := range os.Environ() { pos := strings.Index(env, \"=\") if pos == -1 { // malformed environment variable, skip it. continue } name := env[:pos] value := env[pos+1:] if strings.HasSuffix(strings.ToLower(name), \"_proxy\") && value != \"\" { envVar := api.EnvVar{Name: name, Value: value} envs = append(envs, envVar) } } return envs } "} {"_id":"q-en-kubernetes-7b2fe8f34a4abcf7473564fc5faee17287a950dd625a9d750d69f518bfbe06cf","text":"} newNodes, err := e2enode.CheckReady(c, len(origNodes.Items)-1, 5*time.Minute) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) framework.ExpectEqual(len(newNodes), len(origNodes.Items)-1) _, err = c.CoreV1().Nodes().Get(nodeToDelete.Name, metav1.GetOptions{})"} {"_id":"q-en-kubernetes-7b55276867dc9c84d53653062fab33bb2026f0ff9aba7d4d39a92a5a7c49dc74","text":"// * Multiple consumers and producers. In particular, it is allowed for an // item to be reenqueued while it is being processed. // * Shutdown notifications. package workqueue package workqueue // import \"k8s.io/client-go/util/workqueue\" "} {"_id":"q-en-kubernetes-7b698a9c158ddc9ebc3f49571212854332a2a9c61df827c739112793f91ce7f5","text":"failedGVs := map[schema.GroupVersion]error{} var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Switch on content-type server responded with: aggregated or unaggregated. switch responseContentType { case AcceptV1: err = json.Unmarshal(body, apiGroupList) if err != nil { return nil, nil, nil, err } case AcceptV2Beta1: switch { case isV2Beta1ContentType(responseContentType): var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil {"} {"_id":"q-en-kubernetes-7b9ec9286bba734cea6e6da7f304401d65fd6d12d01a50164a1b3788e2217d7f","text":"Reason: startWaitingReason, }}, }, map[string]api.ContainerState{ expectedInitState: map[string]api.ContainerState{ \"without-old-record\": {Waiting: &api.ContainerStateWaiting{ Reason: initWaitingReason, }}, \"with-old-record\": {Waiting: &api.ContainerStateWaiting{ Reason: initWaitingReason, }}, }, expectedLastTerminationState: map[string]api.ContainerState{ \"with-old-record\": {Terminated: &api.ContainerStateTerminated{}}, }, }, // For running container, State should be Running, LastTerminationState should be retrieved from latest terminated status. { []api.Container{{Name: \"running\"}}, []*kubecontainer.ContainerStatus{ containers: []api.Container{{Name: \"running\"}}, statuses: []*kubecontainer.ContainerStatus{ { Name: \"running\", State: kubecontainer.ContainerStateRunning,"} {"_id":"q-en-kubernetes-7b9f304dc3ce92447646beaaddac687823a796430ef24a41f0d464d894e0e811","text":"framework.ExpectNoError(waitErr, \"some pods failed to complete within %v\", completeTimeout) }) }) ginkgo.Context(\"Pods sharing a single local PV [Serial]\", func() { var ( pv *v1.PersistentVolume ) ginkgo.BeforeEach(func(ctx context.Context) { localVolume := &localTestVolume{ ltr: &utils.LocalTestResource{ Node: config.randomNode, Path: \"/tmp\", }, localVolumeType: DirectoryLocalVolumeType, } pvConfig := makeLocalPVConfig(config, localVolume) var err error pv, err = e2epv.CreatePV(ctx, config.client, f.Timeouts, e2epv.MakePersistentVolume(pvConfig)) framework.ExpectNoError(err) }) ginkgo.AfterEach(func(ctx context.Context) { if pv == nil { return } ginkgo.By(fmt.Sprintf(\"Clean PV %s\", pv.Name)) err := config.client.CoreV1().PersistentVolumes().Delete(ctx, pv.Name, metav1.DeleteOptions{}) framework.ExpectNoError(err) }) ginkgo.It(\"all pods should be running\", func(ctx context.Context) { var ( pvc *v1.PersistentVolumeClaim pods = map[string]*v1.Pod{} count = 2 err error ) pvc = e2epv.MakePersistentVolumeClaim(makeLocalPVCConfig(config, DirectoryLocalVolumeType), config.ns) ginkgo.By(fmt.Sprintf(\"Create a PVC %s\", pvc.Name)) pvc, err = e2epv.CreatePVC(ctx, config.client, config.ns, pvc) framework.ExpectNoError(err) ginkgo.By(fmt.Sprintf(\"Create %d pods to use this PVC\", count)) podConfig := e2epod.Config{ NS: config.ns, PVCs: []*v1.PersistentVolumeClaim{pvc}, SeLinuxLabel: selinuxLabel, } for i := 0; i < count; i++ { pod, err := e2epod.MakeSecPod(&podConfig) framework.ExpectNoError(err) pod, err = config.client.CoreV1().Pods(config.ns).Create(ctx, pod, metav1.CreateOptions{}) framework.ExpectNoError(err) pods[pod.Name] = pod } ginkgo.By(\"Wait for all pods are running\") const runningTimeout = 5 * time.Minute waitErr := wait.PollImmediate(time.Second, runningTimeout, func() (done bool, err error) { podsList, err := config.client.CoreV1().Pods(config.ns).List(ctx, metav1.ListOptions{}) if err != nil { return false, err } runningPods := 0 for _, pod := range podsList.Items { switch pod.Status.Phase { case v1.PodRunning: runningPods++ } } return runningPods == count, nil }) framework.ExpectNoError(waitErr, \"Some pods are not running within %v\", runningTimeout) }) }) }) func deletePodAndPVCs(ctx context.Context, config *localTestConfig, pod *v1.Pod) error {"} {"_id":"q-en-kubernetes-7baf1c17367e9fc1f5b8b9cae3062448b893f8a46ffe445d4dc3735b17a284d4","text":"ds: newDaemonSet(\"ds\"), shouldEnqueue: true, }, { test: \"Node Allocatable changed\", oldNode: newNode(\"node1\", nil), newNode: func() *v1.Node { node := newNode(\"node1\", nil) node.Status.Allocatable = allocatableResources(\"200M\", \"200m\") return node }(), ds: func() *apps.DaemonSet { ds := newDaemonSet(\"ds\") ds.Spec.Template.Spec = resourcePodSpecWithoutNodeName(\"200M\", \"200m\") return ds }(), expectedEventsFunc: func(strategyType apps.DaemonSetUpdateStrategyType) int { switch strategyType { case apps.OnDeleteDaemonSetStrategyType: return 2 case apps.RollingUpdateDaemonSetStrategyType: return 3 default: t.Fatalf(\"unexpected UpdateStrategy %+v\", strategyType) } return 0 }, shouldEnqueue: true, }, } for _, c := range cases { for _, strategy := range updateStrategies() {"} {"_id":"q-en-kubernetes-7bc1c87a0e7a9481ba4263b6b220a30a84d96aa446dc3b30c8eb09ab7e8ec5da","text":"\"//pkg/api/unversioned:go_default_library\", \"//pkg/client/cache:go_default_library\", \"//pkg/client/clientset_generated/internalclientset:go_default_library\", \"//pkg/kubelet:go_default_library\", \"//pkg/kubelet/api/v1alpha1/stats:go_default_library\", \"//pkg/kubelet/cm:go_default_library\", \"//pkg/kubelet/container:go_default_library\", \"//pkg/kubelet/dockertools:go_default_library\", \"//pkg/kubelet/images:go_default_library\", \"//pkg/kubelet/metrics:go_default_library\","} {"_id":"q-en-kubernetes-7be339b7d4909df1af51600658fca8bbbcd771380f847dabbc2a57834b823252","text":"return nil, fmt.Errorf(\"failed to run in container - Exec setup failed - %v\", err) } var buf bytes.Buffer wrBuf := bufio.NewWriter(&buf) startOpts := docker.StartExecOptions{ Detach: false, Tty: false, OutputStream: wrBuf, ErrorStream: wrBuf, OutputStream: &buf, ErrorStream: &buf, RawTerminal: false, } errChan := make(chan error, 1) go func() { errChan <- dm.client.StartExec(execObj.ID, startOpts) }() wrBuf.Flush() return buf.Bytes(), <-errChan err = dm.client.StartExec(execObj.ID, startOpts) return buf.Bytes(), err } // ExecInContainer uses nsenter to run the command inside the container identified by containerID."} {"_id":"q-en-kubernetes-7be4258d6cc49fe84d8c03dac26a7a2370bd5abd88fa6662673d60fdaa10bec5","text":"\"testing\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/validation/field\" \"k8s.io/kubernetes/federation/apis/federation\" \"k8s.io/kubernetes/pkg/api\" ) func TestValidateClusterSpec(t *testing.T) { type validateClusterSpecTest struct { testName string spec *federation.ClusterSpec path *field.Path } successCases := []validateClusterSpecTest{ { testName: \"normal CIDR\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"0.0.0.0/0\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, { testName: \"missing CIDR\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, { testName: \"no host in CIDR\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"0.0.0.0/32\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, } for _, successCase := range successCases { errs := ValidateClusterSpec(successCase.spec, successCase.path) if len(errs) != 0 { t.Errorf(\"expect success for testname: %q but got: %v\", successCase.testName, errs) } } errorCases := []validateClusterSpecTest{ { testName: \"invalid CIDR : network missing\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"0.0.0.0\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, { testName: \"invalid CIDR : invalid address value\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"256.0.0.0/16\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, { testName: \"invalid CIDR : invalid address formation\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"0.0.0/16\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, { testName: \"invalid CIDR : invalid network num\", spec: &federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { ClientCIDR: \"0.0.0.0/33\", ServerAddress: \"localhost:8888\", }, }, }, path: field.NewPath(\"spec\"), }, } for _, errorCase := range errorCases { errs := ValidateClusterSpec(errorCase.spec, errorCase.path) if len(errs) == 0 { t.Errorf(\"expect failure for testname : %q\", errorCase.testName) } } } func TestValidateCluster(t *testing.T) { successCases := []federation.Cluster{ {"} {"_id":"q-en-kubernetes-7c15bc19500faac6133ec5038e9b47ff7d6b03c9d859f68bc62b369849e3795d","text":"result := int32(0) for i := range pods { po := pods[i] if po.Status.Phase != v1.PodRunning { continue } for j := range po.Status.InitContainerStatuses { stat := po.Status.InitContainerStatuses[j] result += stat.RestartCount } for j := range po.Status.ContainerStatuses { stat := po.Status.ContainerStatuses[j] result += stat.RestartCount if po.Status.Phase == v1.PodRunning || po.Status.Phase == v1.PodPending { for j := range po.Status.InitContainerStatuses { stat := po.Status.InitContainerStatuses[j] result += stat.RestartCount } for j := range po.Status.ContainerStatuses { stat := po.Status.ContainerStatuses[j] result += stat.RestartCount } } } if *job.Spec.BackoffLimit == 0 {"} {"_id":"q-en-kubernetes-7c3a4d00d3ccce5fca869044821b604840a0bbe3e9e819ce0aae03c716c44273","text":"}, }, }, Required: []string{\"name\"}, }, }, Dependencies: []string{},"} {"_id":"q-en-kubernetes-7c3a89fd7f2ba045184a8808a8942a6e7ba395fb954a317629cb172fe4ab9584","text":"key = \"oops something went wrong with the key\" } // Record some output when items are deleted. outputSetLock.Lock() defer outputSetLock.Unlock() outputSet.Insert(key) // Report this deletion. deletionCounter <- key }, }, ) // Run the controller and run it until we close stop. stop := make(chan struct{}) defer close(stop) go controller.Run(stop) // Let's add a few objects to the source. for _, name := range []string{\"a-hello\", \"b-controller\", \"c-framework\"} { testIDs := []string{\"a-hello\", \"b-controller\", \"c-framework\"} for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or perform any other checking. // call validation or anything. source.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. time.Sleep(500 * time.Millisecond) close(stop) outputSet := util.StringSet{} for i := 0; i < len(testIDs); i++ { outputSet.Insert(<-deletionCounter) } outputSetLock.Lock() for _, key := range outputSet.List() { fmt.Println(key) }"} {"_id":"q-en-kubernetes-7c5bb456baa7b9d172640d79ca153592a2d630754dd811d9d0a1b4936e748f08","text":"}, { // PV requires external deleter name: \"8-10 - external deleter\", initialVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10\", \"1Gi\", \"uid10-1\", \"claim10-1\", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, expectedVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10\", \"1Gi\", \"uid10-1\", \"claim10-1\", v1.VolumeReleased, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, name: \"8-10-1 - external deleter when volume is dynamic provisioning\", initialVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10-1\", \"1Gi\", \"uid10-1-1\", \"claim10-1-1\", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, expectedVolumes: []*v1.PersistentVolume{newExternalProvisionedVolume(\"volume8-10-1\", \"1Gi\", \"uid10-1-1\", \"claim10-1-1\", v1.VolumeReleased, v1.PersistentVolumeReclaimDelete, classEmpty, gceDriver, nil, volume.AnnBoundByController)}, initialClaims: noclaims, expectedClaims: noclaims, expectedEvents: noevents,"} {"_id":"q-en-kubernetes-7c9d8af9a61997fc27922c486cdac55660c2134260f357190a7b916988b29ded","text":"namespace: kube-system labels: k8s-app: fluentd-gcp-scaler version: v0.1.0 version: v0.2.0 addonmanager.kubernetes.io/mode: Reconcile spec: selector:"} {"_id":"q-en-kubernetes-7cd8b49c5631068e4520ae09850148fcd0c464b3ce63cd7a8ec5a863c42825e7","text":"if limitedMode { limitedNum-- } if len(msg.log) > 0 { isNewLine = msg.log[len(msg.log)-1] == eol[0] } else { isNewLine = true } } }"} {"_id":"q-en-kubernetes-7d0ba8a8d6db28e11e579c355b4c0785cd65ae66172f4e604620bde745213b63","text":"func exportCustomMetricFromService(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer { serviceAnnotations := map[string]string{ \"prometheus.io/scrape\": \"true\", \"prometheus.io/path\": \"/Metrics\", \"prometheus.io/path\": \"/metrics\", \"prometheus.io/port\": \"8080\", } return common.NewMetricExporter(consumerName, f.Namespace.Name, nil, serviceAnnotations, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)"} {"_id":"q-en-kubernetes-7d1257c6785b283ce73e57d0649889e9500ef2dfd03d5767b81cdfb3331ceed2","text":"args: args, // PodStart is used as default because waiting for a pod is the // most common operation. timeout: TestContext.timeouts.PodStart, interval: TestContext.timeouts.Poll, timeout: TestContext.timeouts.PodStart, interval: TestContext.timeouts.Poll, consistently: consistently, } }"} {"_id":"q-en-kubernetes-7d16a34e411853baf86f3134286f70a5d33c285ee275776685e37ecc367e0e22","text":"// +groupName=samplecontroller.k8s.io // Package v1alpha1 is the v1alpha1 version of the API. package v1alpha1 package v1alpha1 // import \"k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1\" "} {"_id":"q-en-kubernetes-7d1a47e7ef0d0a1e97f26a7ef68552fea171769495bc5c0cfa96ebba7feb8c3f","text":"# Arguments: a list of kubernetes packages to build. # Expected variables: ${build_args} should be set to an array of Go build arguments. # In addition, ${package} and ${platform} should have been set earlier, and if # ${build_with_coverage} is set, coverage instrumentation will be enabled. # ${KUBE_BUILD_WITH_COVERAGE} is set, coverage instrumentation will be enabled. # # Invokes Go to actually build some packages. If coverage is disabled, simply invokes # go install. If coverage is enabled, builds covered binaries using go test, temporarily # producing the required unit test files and then cleaning up after itself. # Non-covered binaries are then built using go install as usual. kube::golang::build_some_binaries() { if [[ -n \"${build_with_coverage:-}\" ]]; then if [[ -n \"${KUBE_BUILD_WITH_COVERAGE:-}\" ]]; then local -a uncovered=() for package in \"$@\"; do if kube::golang::is_instrumented_package \"${package}\"; then"} {"_id":"q-en-kubernetes-7d225c6aa97cecba17eb37fd459e3bebf373d4bfbb2a450b0abbebb838d9ac6b","text":"# See the License for the specific language governing permissions and # limitations under the License. # The line below points to debian:jessie as of 2019-10-23. The SHA should be # kept in sycn with debian_jessie definition in the WORKSPACE file. FROM debian@sha256:e25703ee6ab5b2fac31510323d959cdae31eebdf48e88891c549e55b25ad7e94 # The line below points to distroless/base as of 2019-11-15. The SHA should be # kept in sycn with distroless_base definition in the WORKSPACE file. FROM gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5 COPY kubemark /kubemark"} {"_id":"q-en-kubernetes-7d324a6ea6c5c26c6c57e8a249eb77e963ccf019af15fc54fa7977d560bca64f","text":"hash := hash(podUpdate.nodeName()) select { case <-stopCh: tc.podUpdateQueue.Done(item) break case tc.podUpdateChannels[hash%workers] <- podUpdate: } tc.podUpdateQueue.Done(item) } }(stopCh)"} {"_id":"q-en-kubernetes-7d5567ae30b0a3fecb9cd1db02cd985bf42c5619aacc69f39d48455c6c2e2bac","text":" { \"apiVersion\": \"v1beta3\", \"kind\": \"ResourceQuota\", \"metadata\": { \"name\": \"quota\" }, \"spec\": { \"hard\": { \"memory\": \"1Gi\", \"cpu\": \"20\", \"pods\": \"10\", \"services\": \"5\", \"replicationcontrollers\":\"20\", \"resourcequotas\":\"1\", \"secrets\":\"10\", \"persistentvolumeclaims\":\"10\" } } } "} {"_id":"q-en-kubernetes-7d6ada37844e18cfa384fde5e4d5d2d0a97871e672ed27ef05bf9cccea5ecc9a","text":"return nil } // applyFSGroup applies the volume ownership it derives its logic // from https://github.com/kubernetes/kubernetes/issues/66323 // 1) if fstype is \"\", then skip fsgroup (could be indication of non-block filesystem) // 2) if fstype is provided and pv.AccessMode == ReadWriteOnly and !c.spec.ReadOnly then apply fsgroup func (c *csiMountMgr) applyFSGroup(fsType string, fsGroup *int64) error { if fsGroup != nil { if fsType == \"\" { glog.V(4).Info(log(\"mounter.SetupAt WARNING: skipping fsGroup, fsType not provided\")) return nil } accessModes := c.spec.PersistentVolume.Spec.AccessModes if c.spec.PersistentVolume.Spec.AccessModes == nil { glog.V(4).Info(log(\"mounter.SetupAt WARNING: skipping fsGroup, access modes not provided\")) return nil } if !hasReadWriteOnce(accessModes) { glog.V(4).Info(log(\"mounter.SetupAt WARNING: skipping fsGroup, only support ReadWriteOnce access mode\")) return nil } if c.readOnly { glog.V(4).Info(log(\"mounter.SetupAt WARNING: skipping fsGroup, volume is readOnly\")) return nil } err := volume.SetVolumeOwnership(c, fsGroup) if err != nil { return err } glog.V(4).Info(log(\"mounter.SetupAt fsGroup [%d] applied successfully to %s\", *fsGroup, c.volumeID)) } return nil } // isDirMounted returns the !notMounted result from IsLikelyNotMountPoint check func isDirMounted(plug *csiPlugin, dir string) (bool, error) { mounter := plug.host.GetMounter(plug.GetPluginName())"} {"_id":"q-en-kubernetes-7d6d311b7b3da3f4bd87d16b449086a94ec3bee04b86c15833ef770b4ee759aa","text":"resources: {} terminationMessagePath: \"/dev/termination-log\" imagePullPolicy: IfNotPresent capabilities: {} securityContext: capabilities: {} privileged: false"} {"_id":"q-en-kubernetes-7d72136beb552b5f5f010017cde9e8d9fa345450796075e2a7735feac96f7cb7","text":"} } if len(unknownLabels) > 0 { // TODO(liggitt): in 1.16, return an error klog.Warningf(\"unknown 'kubernetes.io' or 'k8s.io' labels specified with --node-labels: %v\", unknownLabels.List()) klog.Warningf(\"in 1.16, --node-labels in the 'kubernetes.io' namespace must begin with an allowed prefix (%s) or be in the specifically allowed set (%s)\", strings.Join(kubeletapis.KubeletLabelNamespaces(), \", \"), strings.Join(kubeletapis.KubeletLabels(), \", \")) return fmt.Errorf(\"unknown 'kubernetes.io' or 'k8s.io' labels specified with --node-labels: %vn--node-labels in the 'kubernetes.io' namespace must begin with an allowed prefix (%s) or be in the specifically allowed set (%s)\", unknownLabels.List(), strings.Join(kubeletapis.KubeletLabelNamespaces(), \", \"), strings.Join(kubeletapis.KubeletLabels(), \", \")) } return nil"} {"_id":"q-en-kubernetes-7d976756582ec9b042d01c3f733544ef13fe65befeedeea3789f5b6b10869fad","text":"reference, target, current, minPods, *minPods, maxPods, translateTimestamp(hpa.CreationTimestamp), ); err != nil {"} {"_id":"q-en-kubernetes-7dd85160b83d21cae33220ad6353d3e0934b5180d04692b3bac86e98489b6ac8","text":"ginkgo.By(\"updating the pod\") podClient.Update(pod.ObjectMeta.Name, func(pod *v1.Pod) { pod.ObjectMeta.Annotations = map[string]string{\"mysubpath\": \"mypath\"} if pod.ObjectMeta.Annotations == nil { pod.ObjectMeta.Annotations = make(map[string]string) } pod.ObjectMeta.Annotations[\"mysubpath\"] = \"mypath\" }) ginkgo.By(\"waiting for pod running\")"} {"_id":"q-en-kubernetes-7e2760fa517c288f288f08e535414e3e53a7287ed7a82fd6e97ed18568c4daa3","text":"return fmt.Errorf(\"unimplemented\") } func (f *fakeVMSet) GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) { return -1, fmt.Errorf(\"unimplemented\") } func (f *fakeVMSet) GetNextDiskLun(nodeName types.NodeName) (int32, error) { return -1, fmt.Errorf(\"unimplemented\") } func (f *fakeVMSet) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { func (f *fakeVMSet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) { return nil, fmt.Errorf(\"unimplemented\") }"} {"_id":"q-en-kubernetes-7e2c0253993eaa3db9ade0ba1d744ff780b65829006d75923c0afd95c19b1d77","text":"exec, syncPeriod, minSyncPeriod, filterCIDRs(true, excludeCIDRs), strictARP, tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit, localDetectors[1], hostname, nodeIP[1], nil, nil, scheduler, nodePortAddresses, kernelHandler) nil, nil, scheduler, nodePortAddresses6, kernelHandler) if err != nil { return nil, fmt.Errorf(\"unable to create ipv6 proxier: %v\", err) }"} {"_id":"q-en-kubernetes-7e532ba6e9001a608e002b2a34b8b480391799e7918ccdccbe41e2c2c4424e22","text":"frameworkruntime.WithCaptureProfile(frameworkruntime.CaptureProfile(c.frameworkCapturer)), frameworkruntime.WithClusterEventMap(c.clusterEventMap), frameworkruntime.WithParallelism(int(c.parallellism)), frameworkruntime.WithExtenders(extenders), ) if err != nil { return nil, fmt.Errorf(\"initializing profiles: %v\", err)"} {"_id":"q-en-kubernetes-7e69036018d565269b8b8f9641b0928f433fd8744aa2f7b91f337bcfb173311f","text":"v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/uuid\" \"k8s.io/kubernetes/pkg/kubelet/events\" \"k8s.io/kubernetes/test/e2e/framework\""} {"_id":"q-en-kubernetes-7eb5d61e07fff3a861dbc33f65dd69e7cadd89d166c82c5d550e5461926538c7","text":"AllNamespaces bool // true iff the action is namespaced but works on aggregate result for all namespaces } // An interface to see if one storage supports override its default verb for monitoring type StorageMetricsOverride interface { // OverrideMetricsVerb gives a storage object an opportunity to override the verb reported to the metrics endpoint OverrideMetricsVerb(oldVerb string) (newVerb string) } // An interface to see if an object supports swagger documentation as a method type documentable interface { SwaggerDoc() map[string]string"} {"_id":"q-en-kubernetes-7ebbd102419530e60005cf245cda13a58d04197bff1900153214ec8d3e1fd89c","text":"_, err = f.ClientSet.CoreV1().Endpoints(testNamespaceName).Get(context.TODO(), testEndpointName, metav1.GetOptions{}) framework.ExpectError(err, \"should not be able to fetch Endpoint\") }) ginkgo.It(\"should complete a service status lifecycle\", func() { ns := f.Namespace.Name svcResource := schema.GroupVersionResource{Group: \"\", Version: \"v1\", Resource: \"services\"} svcClient := f.ClientSet.CoreV1().Services(ns) testSvcName := \"test-service-\" + utilrand.String(5) testSvcLabels := map[string]string{\"test-service-static\": \"true\"} testSvcLabelsFlat := \"test-service-static=true\" w := &cache.ListWatch{ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = testSvcLabelsFlat return cs.CoreV1().Services(ns).Watch(context.TODO(), options) }, } svcList, err := cs.CoreV1().Services(\"\").List(context.TODO(), metav1.ListOptions{LabelSelector: testSvcLabelsFlat}) framework.ExpectNoError(err, \"failed to list Services\") ginkgo.By(\"creating a Service\") testService := v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: testSvcName, Labels: testSvcLabels, }, Spec: v1.ServiceSpec{ Type: \"ClusterIP\", Ports: []v1.ServicePort{{ Name: \"http\", Protocol: v1.ProtocolTCP, Port: int32(80), TargetPort: intstr.FromInt(80), }}, }, } _, err = cs.CoreV1().Services(ns).Create(context.TODO(), &testService, metav1.CreateOptions{}) framework.ExpectNoError(err, \"failed to create Service\") ginkgo.By(\"watching for the Service to be added\") ctx, cancel := context.WithTimeout(context.Background(), svcReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, svcList.ResourceVersion, w, func(event watch.Event) (bool, error) { if svc, ok := event.Object.(*v1.Service); ok { found := svc.ObjectMeta.Name == testService.ObjectMeta.Name && svc.ObjectMeta.Namespace == ns && svc.Labels[\"test-service-static\"] == \"true\" if !found { framework.Logf(\"observed Service %v in namespace %v with labels: %v & ports %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels, svc.Spec.Ports) return false, nil } framework.Logf(\"Found Service %v in namespace %v with labels: %v & ports %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels, svc.Spec.Ports) return found, nil } framework.Logf(\"Observed event: %+v\", event.Object) return false, nil }) framework.ExpectNoError(err, \"Failed to locate Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s created\", testSvcName) ginkgo.By(\"Getting /status\") svcStatusUnstructured, err := f.DynamicClient.Resource(svcResource).Namespace(ns).Get(context.TODO(), testSvcName, metav1.GetOptions{}, \"status\") framework.ExpectNoError(err, \"Failed to fetch ServiceStatus of Service %s in namespace %s\", testSvcName, ns) svcStatusBytes, err := json.Marshal(svcStatusUnstructured) framework.ExpectNoError(err, \"Failed to marshal unstructured response. %v\", err) var svcStatus v1.Service err = json.Unmarshal(svcStatusBytes, &svcStatus) framework.ExpectNoError(err, \"Failed to unmarshal JSON bytes to a Service object type\") framework.Logf(\"Service %s has LoadBalancer: %v\", testSvcName, svcStatus.Status.LoadBalancer) ginkgo.By(\"patching the ServiceStatus\") lbStatus := v1.LoadBalancerStatus{ Ingress: []v1.LoadBalancerIngress{{IP: \"203.0.113.1\"}}, } lbStatusJSON, err := json.Marshal(lbStatus) framework.ExpectNoError(err, \"Failed to marshal JSON. %v\", err) _, err = svcClient.Patch(context.TODO(), testSvcName, types.MergePatchType, []byte(`{\"metadata\":{\"annotations\":{\"patchedstatus\":\"true\"}},\"status\":{\"loadBalancer\":`+string(lbStatusJSON)+`}}`), metav1.PatchOptions{}, \"status\") framework.ExpectNoError(err, \"Could not patch service status\", err) ginkgo.By(\"watching for the Service to be patched\") ctx, cancel = context.WithTimeout(context.Background(), svcReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, svcList.ResourceVersion, w, func(event watch.Event) (bool, error) { if svc, ok := event.Object.(*v1.Service); ok { found := svc.ObjectMeta.Name == testService.ObjectMeta.Name && svc.ObjectMeta.Namespace == ns && svc.Annotations[\"patchedstatus\"] == \"true\" if !found { framework.Logf(\"observed Service %v in namespace %v with annotations: %v & LoadBalancer: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) return false, nil } framework.Logf(\"Found Service %v in namespace %v with annotations: %v & LoadBalancer: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) return found, nil } framework.Logf(\"Observed event: %+v\", event.Object) return false, nil }) framework.ExpectNoError(err, \"failed to locate Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s has service status patched\", testSvcName) ginkgo.By(\"updating the ServiceStatus\") var statusToUpdate, updatedStatus *v1.Service err = retry.RetryOnConflict(retry.DefaultRetry, func() error { statusToUpdate, err = svcClient.Get(context.TODO(), testSvcName, metav1.GetOptions{}) framework.ExpectNoError(err, \"Unable to retrieve service %s\", testSvcName) statusToUpdate.Status.Conditions = append(statusToUpdate.Status.Conditions, metav1.Condition{ Type: \"StatusUpdate\", Status: metav1.ConditionTrue, Reason: \"E2E\", Message: \"Set from e2e test\", }) updatedStatus, err = svcClient.UpdateStatus(context.TODO(), statusToUpdate, metav1.UpdateOptions{}) return err }) framework.ExpectNoError(err, \"nn Failed to UpdateStatus. %vnn\", err) framework.Logf(\"updatedStatus.Conditions: %#v\", updatedStatus.Status.Conditions) ginkgo.By(\"watching for the Service to be updated\") ctx, cancel = context.WithTimeout(context.Background(), svcReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, svcList.ResourceVersion, w, func(event watch.Event) (bool, error) { if svc, ok := event.Object.(*v1.Service); ok { found := svc.ObjectMeta.Name == testService.ObjectMeta.Name && svc.ObjectMeta.Namespace == ns && svc.Annotations[\"patchedstatus\"] == \"true\" if !found { framework.Logf(\"Observed Service %v in namespace %v with annotations: %v & Conditions: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) return false, nil } for _, cond := range svc.Status.Conditions { if cond.Type == \"StatusUpdate\" && cond.Reason == \"E2E\" && cond.Message == \"Set from e2e test\" { framework.Logf(\"Found Service %v in namespace %v with annotations: %v & Conditions: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.Conditions) return found, nil } else { framework.Logf(\"Observed Service %v in namespace %v with annotations: %v & Conditions: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) return false, nil } } } framework.Logf(\"Observed event: %+v\", event.Object) return false, nil }) framework.ExpectNoError(err, \"failed to locate Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s has service status updated\", testSvcName) ginkgo.By(\"patching the service\") servicePatchPayload, err := json.Marshal(v1.Service{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ \"test-service\": \"patched\", }, }, }) _, err = svcClient.Patch(context.TODO(), testSvcName, types.StrategicMergePatchType, []byte(servicePatchPayload), metav1.PatchOptions{}) framework.ExpectNoError(err, \"failed to patch service. %v\", err) ginkgo.By(\"watching for the Service to be patched\") ctx, cancel = context.WithTimeout(context.Background(), svcReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, svcList.ResourceVersion, w, func(event watch.Event) (bool, error) { if svc, ok := event.Object.(*v1.Service); ok { found := svc.ObjectMeta.Name == testService.ObjectMeta.Name && svc.ObjectMeta.Namespace == ns && svc.Labels[\"test-service\"] == \"patched\" if !found { framework.Logf(\"observed Service %v in namespace %v with labels: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels) return false, nil } framework.Logf(\"Found Service %v in namespace %v with labels: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels) return found, nil } framework.Logf(\"Observed event: %+v\", event.Object) return false, nil }) framework.ExpectNoError(err, \"failed to locate Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s patched\", testSvcName) ginkgo.By(\"deleting the service\") err = cs.CoreV1().Services(ns).Delete(context.TODO(), testSvcName, metav1.DeleteOptions{}) framework.ExpectNoError(err, \"failed to delete the Service. %v\", err) ginkgo.By(\"watching for the Service to be deleted\") ctx, cancel = context.WithTimeout(context.Background(), svcReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, svcList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Deleted: if svc, ok := event.Object.(*v1.Service); ok { found := svc.ObjectMeta.Name == testService.ObjectMeta.Name && svc.ObjectMeta.Namespace == ns && svc.Labels[\"test-service-static\"] == \"true\" if !found { framework.Logf(\"observed Service %v in namespace %v with labels: %v & annotations: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels, svc.Annotations) return false, nil } framework.Logf(\"Found Service %v in namespace %v with labels: %v & annotations: %v\", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Labels, svc.Annotations) return found, nil } default: framework.Logf(\"Observed event: %+v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to delete Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s deleted\", testSvcName) }) }) // execAffinityTestForSessionAffinityTimeout is a helper function that wrap the logic of"} {"_id":"q-en-kubernetes-7ec6b90cf4579506937b150fae0a35994eb6a522a11624ddd377c002f149dfae","text":"fi sudo -E \"${GO_OUT}/hyperkube\" kubelet ${priv_arg} --enable-cri=false --enable-cri=\"${ENABLE_CRI}\" --v=${LOG_LEVEL} --chaos-chance=\"${CHAOS_CHANCE}\" --container-runtime=\"${CONTAINER_RUNTIME}\" "} {"_id":"q-en-kubernetes-7ef257114cec1c2333e51bfc36e372afec659e258f7a2936d2f323d909ce2b0e","text":"\"/readyz/shutdown\", } checkExpectedPathsAtRoot(server.URL, expectedPaths, t) // wait for health (max-in-flight-filter is initialized asynchronously, can take a few milliseconds to initialize) if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { // healthz checks are installed in PrepareRun resp, err := http.Get(server.URL + \"/healthz?exclude=wrapping-health&exclude=delegate-health\") if err != nil { t.Fatal(err) } data, _ := ioutil.ReadAll(resp.Body) if http.StatusOK != resp.StatusCode { t.Logf(\"got %d\", resp.StatusCode) t.Log(string(data)) return false, nil } return true, nil }); err != nil { t.Fatal(err) } checkPath(server.URL+\"/healthz\", http.StatusInternalServerError, `[+]ping ok [+]log ok [-]wrapping-health failed: reason withheld"} {"_id":"q-en-kubernetes-7f1c4ae81bcfc19facc81332b323d5b418d0ba79b10f5d0e94c13a06c381a468","text":"} } func verifyContainerStatuses(statuses []api.ContainerStatus, state, lastTerminationState map[string]api.ContainerState) error { for _, s := range statuses { if !reflect.DeepEqual(s.State, state[s.Name]) { return fmt.Errorf(\"unexpected state: %s\", diff.ObjectDiff(state[s.Name], s.State)) } if !reflect.DeepEqual(s.LastTerminationState, lastTerminationState[s.Name]) { return fmt.Errorf(\"unexpected last termination state %s\", diff.ObjectDiff( lastTerminationState[s.Name], s.LastTerminationState)) } } return nil } // Test generateAPIPodStatus with different reason cache and old api pod status. func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { // The following waiting reason and message are generated in convertStatusToAPIStatus() startWaitingReason := \"ContainerCreating\" initWaitingReason := \"PodInitializing\" testTimestamp := time.Unix(123456789, 987654321) testErrorReason := fmt.Errorf(\"test-error\") emptyContainerID := (&kubecontainer.ContainerID{}).String() verifyStatus := func(t *testing.T, c int, podStatus api.PodStatus, state, lastTerminationState map[string]api.ContainerState) { statuses := podStatus.ContainerStatuses for _, s := range statuses { if !reflect.DeepEqual(s.State, state[s.Name]) { t.Errorf(\"case #%d, unexpected state: %s\", c, diff.ObjectDiff(state[s.Name], s.State)) } if !reflect.DeepEqual(s.LastTerminationState, lastTerminationState[s.Name]) { t.Errorf(\"case #%d, unexpected last termination state %s\", c, diff.ObjectDiff( lastTerminationState[s.Name], s.LastTerminationState)) } } } testKubelet := newTestKubelet(t) kubelet := testKubelet.kubelet pod := podWithUidNameNs(\"12345678\", \"foo\", \"new\")"} {"_id":"q-en-kubernetes-7f42e3f634f3f5eb957b40cfdc946217fd3f9f5f3ad6555d2cc5a7c8abd2905e","text":"\"net\" \"os\" \"strconv\" \"time\" \"github.com/golang/glog\" \"github.com/spf13/pflag\""} {"_id":"q-en-kubernetes-7f5f423606f68e31c4843868fbdbea1add32dc8468db8147561b8cbad4e2504a","text":"} if svc := h.ClientConfig.Service; svc != nil { serverName := svc.Name + \".\" + svc.Namespace + \".svc\" restConfig, err := cm.authInfoResolver.ClientConfigFor(serverName) restConfig, err := cm.authInfoResolver.ClientConfigForService(svc.Name, svc.Namespace) if err != nil { return nil, err } cfg := rest.CopyConfig(restConfig) serverName := svc.Name + \".\" + svc.Namespace + \".svc\" host := serverName + \":443\" cfg.Host = \"https://\" + host if svc.Path != nil {"} {"_id":"q-en-kubernetes-7f747efaf75d516bf52bf23ce4b852385d4295745abfb63abbae5199662ec5df","text":"--pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg RUNNERIMAGE=$(RUNNERIMAGE) ${TEMP_DIR} rm -rf \"${TEMP_DIR}\""} {"_id":"q-en-kubernetes-7f8ae8717ecb93389b9203882f515bcd519cedb24d7ad3e7ba21d73e3aea7db0","text":"// TODO(#58034): This is not a static file, so it's not quite as straightforward as --google-json-key. // We need to figure out how ACR users can dynamically provide pull credentials before we can deprecate this. pflagRegister(global, local, \"azure-container-registry-config\") local.MarkDeprecated(\"azure-container-registry-config\", \"Use --image-credential-provider-config and --image-credential-provider-bin-dir to setup acr credential provider instead. Will be removed in a future release.\") }"} {"_id":"q-en-kubernetes-8021ffd2c29350fd4ce695e987bbbc630397440601ace240dc16a0216892a71c","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package proxy import ( \"crypto/tls\" \"crypto/x509\" \"fmt\" \"net\" \"net/http\" \"net/http/httptest\" \"net/url\" \"reflect\" \"strings\" \"testing\" utilnet \"k8s.io/kubernetes/pkg/util/net\" ) func TestDialURL(t *testing.T) { roots := x509.NewCertPool() if !roots.AppendCertsFromPEM(localhostCert) { t.Fatal(\"error setting up localhostCert pool\") } cert, err := tls.X509KeyPair(localhostCert, localhostKey) if err != nil { t.Fatal(err) } testcases := map[string]struct { TLSConfig *tls.Config Dial func(network, addr string) (net.Conn, error) ExpectError string }{ \"insecure\": { TLSConfig: &tls.Config{InsecureSkipVerify: true}, }, \"secure, no roots\": { TLSConfig: &tls.Config{InsecureSkipVerify: false}, ExpectError: \"unknown authority\", }, \"secure with roots\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots}, }, \"secure with mismatched server\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: \"bogus.com\"}, ExpectError: \"not bogus.com\", }, \"secure with matched server\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: \"example.com\"}, }, \"insecure, custom dial\": { TLSConfig: &tls.Config{InsecureSkipVerify: true}, Dial: net.Dial, }, \"secure, no roots, custom dial\": { TLSConfig: &tls.Config{InsecureSkipVerify: false}, Dial: net.Dial, ExpectError: \"unknown authority\", }, \"secure with roots, custom dial\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots}, Dial: net.Dial, }, \"secure with mismatched server, custom dial\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: \"bogus.com\"}, Dial: net.Dial, ExpectError: \"not bogus.com\", }, \"secure with matched server, custom dial\": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: \"example.com\"}, Dial: net.Dial, }, } for k, tc := range testcases { func() { ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {})) defer ts.Close() ts.TLS = &tls.Config{Certificates: []tls.Certificate{cert}} ts.StartTLS() tlsConfigCopy := utilnet.CloneTLSConfig(tc.TLSConfig) transport := &http.Transport{ Dial: tc.Dial, TLSClientConfig: tlsConfigCopy, } extractedDial, err := utilnet.Dialer(transport) if err != nil { t.Fatal(err) } if fmt.Sprintf(\"%p\", extractedDial) != fmt.Sprintf(\"%p\", tc.Dial) { t.Fatalf(\"%s: Unexpected dial\", k) } extractedTLSConfig, err := utilnet.TLSClientConfig(transport) if err != nil { t.Fatal(err) } if extractedTLSConfig == nil { t.Fatalf(\"%s: Expected tlsConfig\", k) } u, _ := url.Parse(ts.URL) _, p, _ := net.SplitHostPort(u.Host) u.Host = net.JoinHostPort(\"127.0.0.1\", p) conn, err := DialURL(u, transport) // Make sure dialing doesn't mutate the transport's TLSConfig if !reflect.DeepEqual(tc.TLSConfig, tlsConfigCopy) { t.Errorf(\"%s: transport's copy of TLSConfig was mutatedn%#vnn%#v\", k, tc.TLSConfig, tlsConfigCopy) } if err != nil { if tc.ExpectError == \"\" { t.Errorf(\"%s: expected no error, got %q\", k, err.Error()) } if !strings.Contains(err.Error(), tc.ExpectError) { t.Errorf(\"%s: expected error containing %q, got %q\", k, tc.ExpectError, err.Error()) } return } conn.Close() if tc.ExpectError != \"\" { t.Errorf(\"%s: expected error %q, got none\", k, tc.ExpectError) } }() } } // localhostCert was generated from crypto/tls/generate_cert.go with the following command: // go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h var localhostCert = []byte(`-----BEGIN CERTIFICATE----- MIIBdzCCASOgAwIBAgIBADALBgkqhkiG9w0BAQUwEjEQMA4GA1UEChMHQWNtZSBD bzAeFw03MDAxMDEwMDAwMDBaFw00OTEyMzEyMzU5NTlaMBIxEDAOBgNVBAoTB0Fj bWUgQ28wWjALBgkqhkiG9w0BAQEDSwAwSAJBAN55NcYKZeInyTuhcCwFMhDHCmwa IUSdtXdcbItRB/yfXGBhiex00IaLXQnSU+QZPRZWYqeTEbFSgihqi1PUDy8CAwEA AaNoMGYwDgYDVR0PAQH/BAQDAgCkMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1Ud EwEB/wQFMAMBAf8wLgYDVR0RBCcwJYILZXhhbXBsZS5jb22HBH8AAAGHEAAAAAAA AAAAAAAAAAAAAAEwCwYJKoZIhvcNAQEFA0EAAoQn/ytgqpiLcZu9XKbCJsJcvkgk Se6AbGXgSlq+ZCEVo0qIwSgeBqmsJxUu7NCSOwVJLYNEBO2DtIxoYVk+MA== -----END CERTIFICATE-----`) // localhostKey is the private key for localhostCert. var localhostKey = []byte(`-----BEGIN RSA PRIVATE KEY----- MIIBPAIBAAJBAN55NcYKZeInyTuhcCwFMhDHCmwaIUSdtXdcbItRB/yfXGBhiex0 0IaLXQnSU+QZPRZWYqeTEbFSgihqi1PUDy8CAwEAAQJBAQdUx66rfh8sYsgfdcvV NoafYpnEcB5s4m/vSVe6SU7dCK6eYec9f9wpT353ljhDUHq3EbmE4foNzJngh35d AekCIQDhRQG5Li0Wj8TM4obOnnXUXf1jRv0UkzE9AHWLG5q3AwIhAPzSjpYUDjVW MCUXgckTpKCuGwbJk7424Nb8bLzf3kllAiA5mUBgjfr/WtFSJdWcPQ4Zt9KTMNKD EUO0ukpTwEIl6wIhAMbGqZK3zAAFdq8DD2jPx+UJXnh0rnOkZBzDtJ6/iN69AiEA 1Aq8MJgTaYsDQWyU/hDq5YkDJc9e9DSCvUIzqxQWMQE= -----END RSA PRIVATE KEY-----`) "} {"_id":"q-en-kubernetes-803aee470ae7e7b4c45653f289b419ac8bd1654bfefdcc05226cb2cf68204503","text":"\"k8s.io/klog\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" )"} {"_id":"q-en-kubernetes-803b15ed802e9ffa59825a965a50fb957f615a58bdc52b4cd2b93434b3e93d63","text":"jig := framework.NewServiceTestJig(cs, serviceName) nodes := jig.GetNodes(framework.MaxNodesForEndpointsTests) svc := jig.CreateOnlyLocalLoadBalancerService(namespace, serviceName, loadBalancerCreateTimeout, false, nil) svc := jig.CreateOnlyLocalLoadBalancerService(namespace, serviceName, loadBalancerCreateTimeout, false, func(svc *v1.Service) { // Change service port to avoid collision with opened hostPorts // in other tests that run in parallel. if len(svc.Spec.Ports) != 0 { svc.Spec.Ports[0].TargetPort = intstr.FromInt(int(svc.Spec.Ports[0].Port)) svc.Spec.Ports[0].Port = 8081 } }) serviceLBNames = append(serviceLBNames, cloudprovider.GetLoadBalancerName(svc)) defer func() { jig.ChangeServiceType(svc.Namespace, svc.Name, v1.ServiceTypeClusterIP, loadBalancerCreateTimeout)"} {"_id":"q-en-kubernetes-804a219c1997de0611cf2b0c8e1682c21f388e42f38ec0e1970a2a6e66135c0c","text":"{\"name\" : \"ServiceSpreadingPriority\", \"weight\" : 1}, {\"name\" : \"EqualPriority\", \"weight\" : 1} ], \"extenders\":[ \"extenders\" : [ { \"urlPrefix\": \"http://127.0.0.1:12346/scheduler\", \"apiVersion\": \"v1beta1\","} {"_id":"q-en-kubernetes-805116ed3c91c3a20e839b0310283ee03b8ad3575efd6c2dde9c433b9ff7d43a","text":"var _ = framework.KubeDescribe(\"Pods\", func() { f := framework.NewDefaultFramework(\"pods\") var podClient *framework.PodClient var dc dynamic.Interface ginkgo.BeforeEach(func() { podClient = f.PodClient() dc = f.DynamicClient }) /*"} {"_id":"q-en-kubernetes-80547700908d4d8f6b34e5f8ce1d059da424e8ca5e3eab1bf750fb83fa185143","text":"// rules separately to systemd) we can safely skip entries that don't // have a corresponding path. if _, err := os.Stat(entry.Path); err != nil { logrus.Debugf(\"skipping device %s for systemd: %s\", entry.Path, err) continue // Also check /sys/dev so that we don't depend on /dev/{block,char} // being populated. (/dev/{block,char} is populated by udev, which // isn't strictly required for systemd). Ironically, this happens most // easily when starting containerd within a runc created container // itself. // We don't bother with securejoin here because we create entry.Path // right above here, so we know it's safe. if _, err := os.Stat(\"/sys\" + entry.Path); err != nil { logrus.Warnf(\"skipping device %s for systemd: %s\", entry.Path, err) continue } } } deviceAllowList = append(deviceAllowList, entry)"} {"_id":"q-en-kubernetes-807c14cc58e6fdcfeee57f90b915209f4c72cb88e93099389589da588f0766a1","text":" This file has moved to [https://github.com/kubernetes/examples/blob/master/staging/elasticsearch/production_cluster/README.md](https://github.com/kubernetes/examples/blob/master/staging/elasticsearch/production_cluster/README.md) "} {"_id":"q-en-kubernetes-80873da499d1f101fde86cb7b064a82a9d1aa22ebf282a6c82296a06e75471f9","text":"} } // ensure KUBE-MARK-DROP chain exist but do not change any rules for _, ch := range iptablesEnsureChains { if _, err := proxier.iptables.EnsureChain(ch.table, ch.chain); err != nil { klog.Errorf(\"Failed to ensure that %s chain %s exists: %v\", ch.table, ch.chain, err) return } } // // Below this point we will not return until we try to write the iptables rules. //"} {"_id":"q-en-kubernetes-8092a661b389c0d9a779af2986180a627f9f4796e6884cd8e9ca30bc25c65855","text":"}, { \"ImportPath\": \"github.com/docker/libnetwork/ipvs\", \"Comment\": \"v0.8.0-dev.2-908-gd5c82231\", \"Rev\": \"d5c822319097cc01cc9bd5ffedd74c7ce7c894f2\" \"Rev\": \"ba46b928444931e6865d8618dc03622cac79aa6f\" }, { \"ImportPath\": \"github.com/docker/libtrust\","} {"_id":"q-en-kubernetes-80b79a5a1ff8246bc14f28da6f0523e13151322307d296da92f9593a01170544","text":"isReady, err := testutils.PodRunningReady(p) framework.ExpectNoError(err) framework.ExpectEqual(isReady, true, \"pod should be ready\") readyIn := readyTime.Sub(startedTime) framework.Logf(\"Container started at %v, pod became ready at %v, %v after startupProbe succeeded\", startedTime, readyTime, readyIn) if readyIn < 0 { framework.Failf(\"Pod became ready before startupProbe succeeded\") } if readyIn > 5*time.Second { framework.Failf(\"Pod became ready in %v, more than 5s after startupProbe succeeded. It means that the delay readiness probes were not initiated immediately after startup finished.\", readyIn) } }) /*"} {"_id":"q-en-kubernetes-80cafa6f4f2486128f867f7c8d42b4fcf6f63b6c35115223c15ba974760e2d88","text":"// unset or false and it can be flipped later when storage // capacity information has been published. // // This field is immutable. // This field was immutable in Kubernetes <= 1.22 and now is mutable. // // This is a beta field and only available when the CSIStorageCapacity // feature is enabled. The default is false."} {"_id":"q-en-kubernetes-81086183f73a39618f88d6d4ab71ce42d13ffbe48413818442fa7c99be5955d3","text":"kubelet.kubeClient = fakeKubeClient kubelet.os = kubecontainer.FakeOS{} kubelet.hostname = \"testnode\" kubelet.hostname = testKubeletHostname kubelet.runtimeUpThreshold = maxWaitForContainerRuntime kubelet.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, \"\", network.NewFakeHost(nil)) if tempDir, err := ioutil.TempDir(\"/tmp\", \"kubelet_test.\"); err != nil {"} {"_id":"q-en-kubernetes-815253d83112bec34d2b4354675b46ada938c704e7558a35f7fcdba7b1c8857e","text":" ntp: pkg: - installed ntp-service: service: - running - name: ntp - watch: - pkg: ntp "} {"_id":"q-en-kubernetes-8156c6402445227737f12ba1603a50ddeeab1700874cba9d72417366c695ff70","text":"// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. // If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. func (vs *VSphere) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) { var nodeName string nodes, err := vs.nodeManager.GetNodeDetails() nodeName, err := vs.GetNodeNameFromProviderID(providerID) if err != nil { glog.Errorf(\"Error while obtaining Kubernetes node nodeVmDetail details. error : %+v\", err) glog.Errorf(\"Error while getting nodename for providerID %s\", providerID) return false, err } for _, node := range nodes { // ProviderID is UUID for nodes v1.9.3+ if node.VMUUID == GetUUIDFromProviderID(providerID) || node.NodeName == providerID { nodeName = node.NodeName break } } if nodeName == \"\" { msg := fmt.Sprintf(\"Error while obtaining Kubernetes nodename for providerID %s.\", providerID) return false, errors.New(msg) } _, err = vs.InstanceID(ctx, convertToK8sType(nodeName)) if err == nil { return true, nil"} {"_id":"q-en-kubernetes-8158677c116d83b2bb18a0ef35df7521d99c8a88a1263b04f99ac456a35ce8c3","text":". \"github.com/onsi/gomega\" ) func runLivenessTest(c *client.Client, podDescr *api.Pod) { func runLivenessTest(c *client.Client, podDescr *api.Pod, expectRestart bool) { ns := \"e2e-test-\" + string(util.NewUUID()) By(fmt.Sprintf(\"Creating pod %s in namespace %s\", podDescr.Name, ns))"} {"_id":"q-en-kubernetes-81608425dfcbd2e96c854a2c42df027809867c7435e640ade348ea730f341be9","text":"import ( \"fmt\" \"reflect\" \"sort\" \"strings\" \"testing\""} {"_id":"q-en-kubernetes-81673d7a3502e88554df9ac53bcae358082e341c4d604a586dc41373bb5c326c","text":"return &serverList[0], nil } func findAddrs(netblob interface{}) []string { // Run-time types for the win :( ret := []string{} list, ok := netblob.([]interface{}) if !ok { return ret } for _, item := range list { props, ok := item.(map[string]interface{}) if !ok { continue } tmp, ok := props[\"addr\"] func getAddressesByName(client *gophercloud.ServiceClient, name string) ([]api.NodeAddress, error) { srv, err := getServerByName(client, name) if err != nil { return nil, err } addrs := []api.NodeAddress{} for network, netblob := range srv.Addresses { list, ok := netblob.([]interface{}) if !ok { continue } addr, ok := tmp.(string) if !ok { continue for _, item := range list { var addressType api.NodeAddressType props, ok := item.(map[string]interface{}) if !ok { continue } extIPType, ok := props[\"OS-EXT-IPS:type\"] if (ok && extIPType == \"floating\") || (!ok && network == \"public\") { addressType = api.NodeExternalIP } else { addressType = api.NodeInternalIP } tmp, ok := props[\"addr\"] if !ok { continue } addr, ok := tmp.(string) if !ok { continue } api.AddToNodeAddresses(&addrs, api.NodeAddress{ Type: addressType, Address: addr, }, ) } ret = append(ret, addr) } return ret // AccessIPs are usually duplicates of \"public\" addresses. if srv.AccessIPv4 != \"\" { api.AddToNodeAddresses(&addrs, api.NodeAddress{ Type: api.NodeExternalIP, Address: srv.AccessIPv4, }, ) } if srv.AccessIPv6 != \"\" { api.AddToNodeAddresses(&addrs, api.NodeAddress{ Type: api.NodeExternalIP, Address: srv.AccessIPv6, }, ) } return addrs, nil } func getAddressByName(api *gophercloud.ServiceClient, name string) (string, error) { srv, err := getServerByName(api, name) func getAddressByName(client *gophercloud.ServiceClient, name string) (string, error) { addrs, err := getAddressesByName(client, name) if err != nil { return \"\", err } else if len(addrs) == 0 { return \"\", ErrNoAddressFound } var s string if s == \"\" { if tmp := findAddrs(srv.Addresses[\"private\"]); len(tmp) >= 1 { s = tmp[0] } } if s == \"\" { if tmp := findAddrs(srv.Addresses[\"public\"]); len(tmp) >= 1 { s = tmp[0] for _, addr := range addrs { if addr.Type == api.NodeInternalIP { return addr.Address, nil } } if s == \"\" { s = srv.AccessIPv4 } if s == \"\" { s = srv.AccessIPv6 } if s == \"\" { return \"\", ErrNoAddressFound } return s, nil return addrs[0].Address, nil } // Implementation of Instances.CurrentNodeName"} {"_id":"q-en-kubernetes-816a85c3621479d60db4e6522fb3f1b4098b11a8364726b882dd1c8a0e481898","text":"} trap cleanup EXIT goarch=$(go env GOARCH) kind build node-image --image \"$tag\" \"$(pwd)\" curl -L --silent https://github.com/kind-ci/containerd-nightlies/releases/download/$containerd/$containerd-linux-amd64.tar.gz | tar -C \"$tmpdir\" -vzxf - curl -L --silent https://github.com/kind-ci/containerd-nightlies/releases/download/$containerd/runc.amd64 >\"$tmpdir/runc\" curl -L --silent https://github.com/kind-ci/containerd-nightlies/releases/download/$containerd/$containerd-linux-\"$goarch\".tar.gz | tar -C \"$tmpdir\" -vzxf - curl -L --silent https://github.com/kind-ci/containerd-nightlies/releases/download/$containerd/runc.\"$goarch\" >\"$tmpdir/runc\" cat >\"$tmpdir/Dockerfile\" < Env: getProxyEnvVars(), }, volumes...), kubeScheduler: componentPod(api.Container{ Name: kubeScheduler,"} {"_id":"q-en-kubernetes-81d112ed7a6a330977489c27dde8641533e82f081855863b4e5ed8ae471b388c","text":"dial = (&net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second}).DialContext } d := connrotation.NewDialer(dial) a.onRotate = d.CloseAll a.mu.Lock() defer a.mu.Unlock() a.onRotateList = append(a.onRotateList, d.CloseAll) onRotateListLength := len(a.onRotateList) if onRotateListLength > onRotateListWarningLength { klog.Warningf(\"constructing many client instances from the same exec auth config can cause performance problems during cert rotation and can exhaust available network connections; %d clients constructed calling %q\", onRotateListLength, a.cmd) } c.Dial = d.DialContext return nil"} {"_id":"q-en-kubernetes-81d68fbf27852a57afe694945a19509f573f04cc3e125b35f2b3dac52be8ee18","text":"fs.StringVar(&o.ConfigFile, \"config\", o.ConfigFile, \"The path to the configuration file.\") fs.StringVar(&o.WriteConfigTo, \"write-config-to\", o.WriteConfigTo, \"If set, write the default configuration values to this file and exit.\") fs.StringVar(&o.config.ClientConnection.Kubeconfig, \"kubeconfig\", o.config.ClientConnection.Kubeconfig, \"Path to kubeconfig file with authorization information (the master location can be overridden by the master flag).\") fs.StringVar(&o.config.ClusterCIDR, \"cluster-cidr\", o.config.ClusterCIDR, \"The CIDR range of pods in the cluster. When configured, traffic sent to a Service cluster IP from outside this range will be masqueraded and traffic sent from pods to an external LoadBalancer IP will be directed to the respective cluster IP instead\") fs.StringVar(&o.config.ClusterCIDR, \"cluster-cidr\", o.config.ClusterCIDR, \"The CIDR range of pods in the cluster. When configured, traffic sent to a Service cluster IP from outside this range will be masqueraded and traffic sent from pods to an external LoadBalancer IP will be directed to the respective cluster IP instead. This parameter is ignored if a config file is specified by --config.\") fs.StringVar(&o.config.ClientConnection.ContentType, \"kube-api-content-type\", o.config.ClientConnection.ContentType, \"Content type of requests sent to apiserver.\") fs.StringVar(&o.master, \"master\", o.master, \"The address of the Kubernetes API server (overrides any value in kubeconfig)\") fs.StringVar(&o.hostnameOverride, \"hostname-override\", o.hostnameOverride, \"If non-empty, will use this string as identification instead of the actual hostname.\")"} {"_id":"q-en-kubernetes-825f3807cfa161a4ddffe2e8ab04417734cc47ff6f0541094e56f197b9659dba","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package plugin import ( \"context\" \"fmt\" \"net\" \"os\" \"path/filepath\" \"sync\" \"testing\" \"github.com/stretchr/testify/assert\" \"google.golang.org/grpc\" drapb \"k8s.io/kubelet/pkg/apis/dra/v1alpha4\" \"k8s.io/kubernetes/test/utils/ktesting\" ) const ( v1alpha4Version = \"v1alpha4\" ) type fakeV1alpha4GRPCServer struct { drapb.UnimplementedNodeServer } var _ drapb.NodeServer = &fakeV1alpha4GRPCServer{} func (f *fakeV1alpha4GRPCServer) NodePrepareResources(ctx context.Context, in *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { return &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{\"claim-uid\": { Devices: []*drapb.Device{ { RequestNames: []string{\"test-request\"}, CDIDeviceIDs: []string{\"test-cdi-id\"}, }, }, }}}, nil } func (f *fakeV1alpha4GRPCServer) NodeUnprepareResources(ctx context.Context, in *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { return &drapb.NodeUnprepareResourcesResponse{}, nil } type tearDown func() func setupFakeGRPCServer(version string) (string, tearDown, error) { p, err := os.MkdirTemp(\"\", \"dra_plugin\") if err != nil { return \"\", nil, err } closeCh := make(chan struct{}) addr := filepath.Join(p, \"server.sock\") teardown := func() { close(closeCh) os.RemoveAll(addr) } listener, err := net.Listen(\"unix\", addr) if err != nil { teardown() return \"\", nil, err } s := grpc.NewServer() switch version { case v1alpha4Version: fakeGRPCServer := &fakeV1alpha4GRPCServer{} drapb.RegisterNodeServer(s, fakeGRPCServer) default: return \"\", nil, fmt.Errorf(\"unsupported version: %s\", version) } go func() { go s.Serve(listener) <-closeCh s.GracefulStop() }() return addr, teardown, nil } func TestGRPCConnIsReused(t *testing.T) { tCtx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(v1alpha4Version) if err != nil { t.Fatal(err) } defer teardown() reusedConns := make(map[*grpc.ClientConn]int) wg := sync.WaitGroup{} m := sync.Mutex{} p := &Plugin{ backgroundCtx: tCtx, endpoint: addr, clientCallTimeout: defaultClientCallTimeout, } conn, err := p.getOrCreateGRPCConn() defer func() { err := conn.Close() if err != nil { t.Error(err) } }() if err != nil { t.Fatal(err) } // ensure the plugin we are using is registered draPlugins.add(\"dummy-plugin\", p) defer draPlugins.delete(\"dummy-plugin\") // we call `NodePrepareResource` 2 times and check whether a new connection is created or the same is reused for i := 0; i < 2; i++ { wg.Add(1) go func() { defer wg.Done() client, err := NewDRAPluginClient(\"dummy-plugin\") if err != nil { t.Error(err) return } req := &drapb.NodePrepareResourcesRequest{ Claims: []*drapb.Claim{ { Namespace: \"dummy-namespace\", UID: \"dummy-uid\", Name: \"dummy-claim\", }, }, } _, err = client.NodePrepareResources(tCtx, req) assert.NoError(t, err) client.mutex.Lock() conn := client.conn client.mutex.Unlock() m.Lock() defer m.Unlock() reusedConns[conn]++ }() } wg.Wait() // We should have only one entry otherwise it means another gRPC connection has been created if len(reusedConns) != 1 { t.Errorf(\"expected length to be 1 but got %d\", len(reusedConns)) } if counter, ok := reusedConns[conn]; ok && counter != 2 { t.Errorf(\"expected counter to be 2 but got %d\", counter) } } func TestNewDRAPluginClient(t *testing.T) { for _, test := range []struct { description string setup func(string) tearDown pluginName string shouldError bool }{ { description: \"plugin name is empty\", setup: func(_ string) tearDown { return func() {} }, pluginName: \"\", shouldError: true, }, { description: \"plugin name not found in the list\", setup: func(_ string) tearDown { return func() {} }, pluginName: \"plugin-name-not-found-in-the-list\", shouldError: true, }, { description: \"plugin exists\", setup: func(name string) tearDown { draPlugins.add(name, &Plugin{}) return func() { draPlugins.delete(name) } }, pluginName: \"dummy-plugin\", }, } { t.Run(test.description, func(t *testing.T) { teardown := test.setup(test.pluginName) defer teardown() client, err := NewDRAPluginClient(test.pluginName) if test.shouldError { assert.Nil(t, client) assert.Error(t, err) } else { assert.NotNil(t, client) assert.Nil(t, err) } }) } } func TestNodeUnprepareResources(t *testing.T) { for _, test := range []struct { description string serverSetup func(string) (string, tearDown, error) serverVersion string request *drapb.NodeUnprepareResourcesRequest }{ { description: \"server supports v1alpha4\", serverSetup: setupFakeGRPCServer, serverVersion: v1alpha4Version, request: &drapb.NodeUnprepareResourcesRequest{}, }, } { t.Run(test.description, func(t *testing.T) { tCtx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(test.serverVersion) if err != nil { t.Fatal(err) } defer teardown() p := &Plugin{ backgroundCtx: tCtx, endpoint: addr, clientCallTimeout: defaultClientCallTimeout, } conn, err := p.getOrCreateGRPCConn() defer func() { err := conn.Close() if err != nil { t.Error(err) } }() if err != nil { t.Fatal(err) } draPlugins.add(\"dummy-plugin\", p) defer draPlugins.delete(\"dummy-plugin\") client, err := NewDRAPluginClient(\"dummy-plugin\") if err != nil { t.Fatal(err) } _, err = client.NodeUnprepareResources(tCtx, test.request) if err != nil { t.Fatal(err) } }) } } "} {"_id":"q-en-kubernetes-82714b23078de7d9c916a4ec258ac0f36c10a97c8448b15fa39ab417c21257e5","text":") const ( // When these values are updated, also update test/e2e/framework/util.go // When these values are updated, also update test/utils/image/manifest.go defaultPodSandboxImageName = \"gcr.io/google_containers/pause\" defaultPodSandboxImageVersion = \"3.0\" defaultPodSandboxImageVersion = \"3.1\" // From pkg/kubelet/rkt/rkt.go to avoid circular import defaultRktAPIServiceEndpoint = \"localhost:15441\" )"} {"_id":"q-en-kubernetes-8282b9d5dab86a982db92cd7c9d2b87c04c469a0395a8eeacb6c44bda3d91424","text":"e := exec.New() hostIfName, err := findPairInterfaceOfContainerInterface(e, containerInterfaceName, containerDesc, nsenterArgs) if err != nil { glog.Infof(\"Unable to find pair interface, setting up all interfaces: %v\", err) return setUpAllInterfaces() return err } return setUpInterface(hostIfName) }"} {"_id":"q-en-kubernetes-8283226613d2840ca538cf66f5aaf63662cfe5cb84446edefd3c3dff96025a6d","text":"framework.ExpectNoError(verifyServeHostnameServiceUp(cs, ns, host, podNames2, svc2IP, servicePort)) }) ginkgo.It(\"should be able to preserve UDP traffic when server pod cycles for a NodePort service\", func() { serviceName := \"clusterip-test\" serverPod1Name := \"server-1\" serverPod2Name := \"server-2\" ns := f.Namespace.Name nodeIP, err := e2enode.PickIP(cs) // for later framework.ExpectNoError(err) // Create a NodePort service udpJig := e2eservice.NewTestJig(cs, ns, serviceName) ginkgo.By(\"creating a UDP service \" + serviceName + \" with type=NodePort in \" + ns) udpService, err := udpJig.CreateUDPService(func(svc *v1.Service) { svc.Spec.Type = v1.ServiceTypeNodePort svc.Spec.Ports = []v1.ServicePort{ {Port: 80, Name: \"http\", Protocol: v1.ProtocolUDP, TargetPort: intstr.FromInt(80)}, } }) framework.ExpectNoError(err) // Add a backend pod to the service ginkgo.By(\"creating a backend pod for the service \" + serviceName) serverPod1 := newAgnhostPod(serverPod1Name, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod1.Labels = udpJig.Labels _, err = cs.CoreV1().Pods(ns).Create(context.TODO(), serverPod1, metav1.CreateOptions{}) ginkgo.By(fmt.Sprintf(\"checking NodePort service %s on node with public IP %s\", serviceName, nodeIP)) framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, serverPod1.Name, f.Namespace.Name, framework.PodStartTimeout)) // Waiting for service to expose endpoint. err = validateEndpointsPorts(cs, ns, serviceName, portsByPodName{serverPod1Name: {80}}) framework.ExpectNoError(err, \"failed to validate endpoints for service %s in namespace: %s\", serviceName, ns) // Check that the pod reveives the traffic ginkgo.By(\"Sending UDP traffic to NodePort service \" + serviceName + \" on node with publicIP \" + nodeIP) errorChannel := make(chan error) signal := make(chan struct{}, 1) go continuousEcho(nodeIP, int(udpService.Spec.Ports[0].NodePort), 3*time.Second, 20, signal, errorChannel) // Create a second pod ginkgo.By(\"creating a second pod for the service \" + serviceName) serverPod2 := newAgnhostPod(serverPod2Name, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod2.Labels = udpJig.Labels _, err = cs.CoreV1().Pods(ns).Create(context.TODO(), serverPod2, metav1.CreateOptions{}) framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, serverPod2.Name, f.Namespace.Name, framework.PodStartTimeout)) // and delete the first pod framework.Logf(\"Cleaning up %s pod\", serverPod1Name) err = cs.CoreV1().Pods(ns).Delete(context.TODO(), serverPod1Name, metav1.DeleteOptions{}) framework.ExpectNoError(err, \"failed to delete pod: %s on node\", serverPod1Name) // Check that the second pod keeps receiving traffic ginkgo.By(\"Sending UDP traffic to NodePort service \" + serviceName + \" on node with publicIP \" + nodeIP) signal <- struct{}{} // Check that there are no errors err = <-errorChannel framework.ExpectNoError(err, \"pod communication failed\") }) /* Release : v1.16 Testname: Service, NodePort Service"} {"_id":"q-en-kubernetes-82c311b6f319e9f436a0ec0caf0b550e9d9cbd534080cf4e5025c93b27dd20cc","text":"import ( \"fmt\" \"strings\" \"testing\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\""} {"_id":"q-en-kubernetes-82db5fab83dc792afe74f953697507bf1283050c02eed553a38b2a671e3c0cd8","text":"framework.ExpectNoError(err, \"found a pod(s)\") }) ginkgo.It(\"should run through the lifecycle of Pods and PodStatus\", func() { /* Release: v1.20 Testname: Pods, completes the lifecycle of a Pod and the PodStatus Description: A Pod is created with a static label which MUST succeed. It MUST succeed when patching the label and the pod data. When checking and replacing the PodStatus it MUST succeed. It MUST succeed when deleting the Pod. */ framework.ConformanceIt(\"should run through the lifecycle of Pods and PodStatus\", func() { podResource := schema.GroupVersionResource{Group: \"\", Version: \"v1\", Resource: \"pods\"} testNamespaceName := f.Namespace.Name testPodName := \"pod-test\""} {"_id":"q-en-kubernetes-82e46b041a2046c946a7effe3167b3c10a853cb52ceb12587e0933061e47ec9a","text":"removed := map[int]bool{} for i := 0; i < 5; i++ { if i != 0 { klog.V(3).Infof(\"Attempt %v failed to kill all unwanted process. Retyring\", i) klog.V(3).Infof(\"Attempt %v failed to kill all unwanted process from cgroup: %v. Retyring\", i, podCgroup) } errlist = []error{} for _, pid := range pidsToKill { if _, ok := removed[pid]; ok { continue } klog.V(3).Infof(\"Attempt to kill process with pid: %v\", pid) klog.V(3).Infof(\"Attempt to kill process with pid: %v from cgroup: %v\", pid, podCgroup) if err := m.killOnePid(pid); err != nil { klog.V(3).Infof(\"failed to kill process with pid: %v\", pid) klog.V(3).Infof(\"failed to kill process with pid: %v from cgroup: %v\", pid, podCgroup) errlist = append(errlist, err) } else { removed[pid] = true } } if len(errlist) == 0 { klog.V(3).Infof(\"successfully killed all unwanted processes.\") klog.V(3).Infof(\"successfully killed all unwanted processes from cgroup: %v\", podCgroup) return nil } }"} {"_id":"q-en-kubernetes-8316223e20259fe461d460e2dd299079e3b7912d299749f0925b4c4cb895b776","text":"return f.Err } // DeleteTCPLoadBalancer is a test-spy implementation of TCPLoadBalancer.DeleteTCPLoadBalancer. // EnsureTCPLoadBalancerDeleted is a test-spy implementation of TCPLoadBalancer.EnsureTCPLoadBalancerDeleted. // It adds an entry \"delete\" into the internal method call record. func (f *FakeCloud) DeleteTCPLoadBalancer(name, region string) error { func (f *FakeCloud) EnsureTCPLoadBalancerDeleted(name, region string) error { f.addCall(\"delete\") return f.Err }"} {"_id":"q-en-kubernetes-834afccd0e045bd0e6cc6d66378347941577afc89fd3f6c054a5ee2b1606eef3","text":"kubelet.masterServiceNamespace = metav1.NamespaceDefault kubelet.serviceLister = testServiceLister{} kubelet.serviceHasSynced = func() bool { return true } kubelet.nodeHasSynced = func() bool { return true } kubelet.nodeLister = testNodeLister{ nodes: []*v1.Node{ {"} {"_id":"q-en-kubernetes-8359b74da41c66ae6cd4b76528d2bbfdec4160fe4da5db8601f78081ad4c5cc5","text":"return fmt.Errorf(\"PersistentVolumeClaims %v not all in phase %s within %v\", pvcNames, phase, timeout) } // findAvailableNamespaceName random namespace name starting with baseName. func findAvailableNamespaceName(baseName string, c clientset.Interface) (string, error) { var name string err := wait.PollImmediate(Poll, 30*time.Second, func() (bool, error) { name = fmt.Sprintf(\"%v-%v\", baseName, randomSuffix()) _, err := c.CoreV1().Namespaces().Get(name, metav1.GetOptions{}) if err == nil { // Already taken return false, nil } if apierrs.IsNotFound(err) { return true, nil } Logf(\"Unexpected error while getting namespace: %v\", err) return false, nil }) return name, err } // CreateTestingNS should be used by every test, note that we append a common prefix to the provided test name. // Please see NewFramework instead of using this directly. func CreateTestingNS(baseName string, c clientset.Interface, labels map[string]string) (*v1.Namespace, error) {"} {"_id":"q-en-kubernetes-835e2b4a89ac5297285607e50095bf8deb56f4565253c51d2d63e2208b59a864","text":"endpointsAvailableForLB := !allEndpointsTerminating && !allEndpointsNonServing proxier.deleteExistingLoadBalancer(hns, svcInfo.winProxyOptimization, &svcInfo.hnsID, sourceVip, Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), uint16(svcInfo.Port()), hnsEndpoints, queriedLoadBalancers) if endpointsAvailableForLB { // clusterIPEndpoints is the endpoint list used for creating ClusterIP loadbalancer. clusterIPEndpoints := hnsEndpoints if svcInfo.internalTrafficLocal { // Take local endpoints for clusterip loadbalancer when internal traffic policy is local. clusterIPEndpoints = hnsLocalEndpoints } // clusterIPEndpoints is the endpoint list used for creating ClusterIP loadbalancer. clusterIPEndpoints := hnsEndpoints if svcInfo.internalTrafficLocal { // Take local endpoints for clusterip loadbalancer when internal traffic policy is local. clusterIPEndpoints = hnsLocalEndpoints } if len(clusterIPEndpoints) > 0 { // If all endpoints are terminating, then no need to create Cluster IP LoadBalancer // Cluster IP LoadBalancer creation"} {"_id":"q-en-kubernetes-8386259c4824b98108e451a17ba26050cd1d43f7bfc0bb76104576cf7bf0460c","text":"} mountComplete := false err = wait.Poll(5*time.Second, 10*time.Minute, func() (bool, error) { err = wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) { err := b.mounter.MountSensitive(source, dir, \"cifs\", mountOptions, sensitiveMountOptions) mountComplete = true return true, err"} {"_id":"q-en-kubernetes-838c2678175b6946c432f6f6338edea4801902be38f352ccefe554fbda1e4761","text":"klog.V(4).Info(log(\"attacher.Attach finished OK with VolumeAttachment object [%s]\", attachID)) // TODO(71164): In 1.15, return empty devicePath return attachID, nil } func (c *csiAttacher) WaitForAttach(spec *volume.Spec, attachID string, pod *v1.Pod, timeout time.Duration) (string, error) { func (c *csiAttacher) WaitForAttach(spec *volume.Spec, _ string, pod *v1.Pod, timeout time.Duration) (string, error) { source, err := getCSISourceFromSpec(spec) if err != nil { klog.Error(log(\"attacher.WaitForAttach failed to extract CSI volume source: %v\", err)) return \"\", err } attachID := getAttachmentName(source.VolumeHandle, source.Driver, string(c.plugin.host.GetNodeName())) skip, err := c.plugin.skipAttach(source.Driver) if err != nil { klog.Error(log(\"attacher.Attach failed to find if driver is attachable: %v\", err))"} {"_id":"q-en-kubernetes-839cd7cb3d8561e304a58b07bd138ab1f324e09cbd1d73e9d67d51bebedbb819","text":"\"fmt\" \"io\" \"os\" \"strconv\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" cmdutil \"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util\""} {"_id":"q-en-kubernetes-83a651d24fdd1abbc5c865eca76961c3186e91441365ed99b8370cd52be93e51","text":"} ) func TestConflictingCurrentContext(t *testing.T) { commandLineFile, _ := ioutil.TempFile(\"\", \"\") defer os.Remove(commandLineFile.Name()) envVarFile, _ := ioutil.TempFile(\"\", \"\") defer os.Remove(envVarFile.Name()) mockCommandLineConfig := clientcmdapi.Config{ CurrentContext: \"any-context-value\", } mockEnvVarConfig := clientcmdapi.Config{ CurrentContext: \"a-different-context\", } WriteToFile(mockCommandLineConfig, commandLineFile.Name()) WriteToFile(mockEnvVarConfig, envVarFile.Name()) loadingRules := ClientConfigLoadingRules{ CommandLinePath: commandLineFile.Name(), EnvVarPath: envVarFile.Name(), } mergedConfig, err := loadingRules.Load() if err != nil { t.Errorf(\"Unexpected error: %v\", err) } if mergedConfig.CurrentContext != mockCommandLineConfig.CurrentContext { t.Errorf(\"expected %v, got %v\", mockCommandLineConfig.CurrentContext, mergedConfig.CurrentContext) } } func TestResolveRelativePaths(t *testing.T) { pathResolutionConfig1 := clientcmdapi.Config{ AuthInfos: map[string]clientcmdapi.AuthInfo{"} {"_id":"q-en-kubernetes-83a6c439d4aa2b2ad43f81bb5695d8631579171540c67f30e5afe4deea434252","text":"UpdateFake(obj *metav1.PartialObjectMetadata, opts metav1.UpdateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) } // NewTestScheme creates a unique Scheme for each test. func NewTestScheme() *runtime.Scheme { return runtime.NewScheme() } // NewSimpleMetadataClient creates a new client that will use the provided scheme and respond with the // provided objects when requests are made. It will track actions made to the client which can be checked // with GetActions()."} {"_id":"q-en-kubernetes-83aa217d98247c74a6352d157d0749da944ebf6b39dc84955fdee6a06efa1808","text":"cache.ResourceEventHandlerFuncs{UpdateFunc: vs.syncNodeZoneLabels}, zoneLabelsResyncPeriod, ) nodeLister := informerFactory.Core().V1().Nodes().Lister() vs.nodeManager.SetNodeLister(nodeLister) klog.V(4).Infof(\"Node informers in vSphere cloud provider initialized\") }"} {"_id":"q-en-kubernetes-83b2b776a2e64f877ed0226431aa85eff80c84767731c73e4982e391db9a8e7e","text":"// Status of containers in the pod. ContainerStatuses []*ContainerStatus // Status of the pod sandbox. // Only for kuberuntime now, other runtime may keep it nil. SandboxStatuses []*runtimeapi.PodSandboxStatus }"} {"_id":"q-en-kubernetes-83c093008c63be620505930e3ff974f921b7cbc00bde6eac1a282f99a6e075fc","text":"metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/client-go/kubernetes/fake\" \"k8s.io/kubernetes/pkg/apis/apps\" kubepod \"k8s.io/kubernetes/pkg/kubelet/pod\" \"k8s.io/kubernetes/pkg/kubelet/prober/results\" \"k8s.io/kubernetes/pkg/kubelet/status\""} {"_id":"q-en-kubernetes-83e7571f94062f9be00fab22d77c397c3903abf53d57e84e39b915ce53f4472f","text":"expectedErrMsg: fmt.Errorf(\"failure of getting instance metadata\"), }, { name: \"NodeAddresses should report error if VMSS instanceID is invalid\", nodeName: \"vm123456\", metadataName: \"vmss_$123\", vmType: vmTypeVMSS, useInstanceMetadata: true, expectedErrMsg: fmt.Errorf(\"failed to parse VMSS instanceID %q: strconv.ParseInt: parsing %q: invalid syntax\", \"$123\", \"$123\"), }, { name: \"NodeAddresses should report error if cloud.vmSet is nil\", nodeName: \"vm1\", vmType: vmTypeStandard,"} {"_id":"q-en-kubernetes-83fc1383f2484af86bd93e52b7720acb211dfefd83bd33a496b341ea6e6c1fb9","text":"OOMScoreAdj: config.OOMScoreAdj, ConfigSyncPeriod: config.ConfigSyncPeriod.Duration, HealthzServer: healthzServer, UseEndpointSlices: false, }, nil }"} {"_id":"q-en-kubernetes-840a4c4d10dc0b459a5952ff34aed8bcadcf340a0df2b2537b07f569e355c461","text":"}) It(\"should serve a basic image on each replica with a private image\", func() { switch testContext.Provider { case \"gce\", \"gke\": ServeImageOrFail(c, \"private\", \"gcr.io/_b_k8s_authenticated_test/serve_hostname:1.1\") default: if !providerIs(\"gce\", \"gke\") { By(fmt.Sprintf(\"Skipping private variant, which is only supported for providers gce and gke (not %s)\", testContext.Provider)) return } ServeImageOrFail(c, \"private\", \"gcr.io/_b_k8s_authenticated_test/serve_hostname:1.1\") }) })"} {"_id":"q-en-kubernetes-84621684bd6c380719c7fff4929287f62abfd945d806de7f5557173e2713605c","text":"DeleteLocalData bool Selector string PodSelector string Out io.Writer ErrOut io.Writer // DisableEviction forces drain to use delete rather than evict DisableEviction bool Out io.Writer ErrOut io.Writer // TODO(justinsb): unnecessary? DryRun bool"} {"_id":"q-en-kubernetes-84a592279cf74a2e6e7de5d831af54272a1792c704ba412b3e4ebea6774239db","text":"// RemoveContainer removes the container. func (ds *dockerService) RemoveContainer(_ context.Context, r *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error) { ds.performPlatformSpecificContainerForContainer(r.ContainerId) // Ideally, log lifecycle should be independent of container lifecycle. // However, docker will remove container log after container is removed, // we can't prevent that now, so we also clean up the symlink here."} {"_id":"q-en-kubernetes-84f207fa68c444cc8e2226260715474e961ee7a619b9f2cc50546cbcfa22c6b1","text":"t.Fatalf(\"unexpected proxy user: %v\", authUser) } } // The channel must be closed before any of the connections are closed close(closed) }) } })"} {"_id":"q-en-kubernetes-8527f1762aa8c9623597004716e633fb9b2f430f3c92a77bf4219e1b87d86b74","text":"network_mode: openvswitch node_ip: $MINION_IP etcd_servers: $MASTER_IP api_servers: $MASTER_IP networkInterfaceName: eth1 apiservers: $MASTER_IP roles:"} {"_id":"q-en-kubernetes-855ae5a86b901ddba759970a4b331ab71561fd3db3f6cbbbf8804baaf24944f4","text":"\"Foo\": defaultbinder.New, } cases := []struct { name string opts []Option wantErr string wantProfiles []string name string opts []Option wantErr string wantProfiles []string wantExtenders []string }{ { name: \"valid out-of-tree registry\","} {"_id":"q-en-kubernetes-856813cb7f4fc55181803a09f916e14c23eb6e99467cfbf7ebd23eb93a96465d","text":"} t.Logf(\"rc._internal -> rc.v1\") data, err = runtime.Encode(defaultGroup.Codec(), rc) data, err = runtime.Encode(defaultCodec, rc) if err != nil { t.Fatalf(\"unexpected encoding error: %v\", err) }"} {"_id":"q-en-kubernetes-85bd6562d4deaa063e017d874880ee1caac967937aa729c3e365c248f7e1c1a7","text":"addNodes(manager.nodeStore, 0, 1, nil) addPods(manager.podStore, \"node-0\", simpleDaemonSetLabel, ds, 1) addPods(manager.podStore, \"node-1\", simpleDaemonSetLabel, ds, 1) podScheduledUsingAffinity := newPod(\"pod1-node-3\", \"\", simpleDaemonSetLabel, ds) podScheduledUsingAffinity.Spec.Affinity = &v1.Affinity{ NodeAffinity: &v1.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { MatchFields: []v1.NodeSelectorRequirement{ { Key: schedulerapi.NodeFieldSelectorKeyNodeName, Operator: v1.NodeSelectorOpIn, Values: []string{\"node-2\"}, }, }, }, }, }, }, } manager.podStore.Add(podScheduledUsingAffinity) if f { syncAndValidateDaemonSets(t, manager, ds, podControl, 0, 1, 0) } else {"} {"_id":"q-en-kubernetes-85cf3dcceb648052dd83ebcc1ec400d721c28e5d582ce2a1f83a1e4900efd095","text":"ID: volumeV3.ID, Name: volumeV3.Name, Status: volumeV3.Status, Size: volumeV3.Size, } if len(volumeV3.Attachments) > 0 {"} {"_id":"q-en-kubernetes-85f584455feb7b140ef016b8896597b2ed4dbfe253fc0c9e0b4984bdd1b1e9b1","text":"// +build !ignore_autogenerated /* Copyright 2016 The Kubernetes Authors. Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License."} {"_id":"q-en-kubernetes-8608cded23b1e748b032bd930ac65990b2019e0d0c20353039b6a8d9df1418c8","text":" apiVersion: v1beta3 kind: Namespace metadata: name: quota-example "} {"_id":"q-en-kubernetes-865516108e14fa4f856d2c73418e0e5ab5db037e022ddb6e620a2c5478e754c4","text":"func TestPriorityQueue_AddIfNotPresent(t *testing.T) { q := NewPriorityQueue(nil) q.unschedulableQ.addOrUpdate(&highPriNominatedPod) addOrUpdateUnschedulablePod(q, &highPriNominatedPod) q.AddIfNotPresent(&highPriNominatedPod) // Must not add anything. q.AddIfNotPresent(&medPriorityPod) q.AddIfNotPresent(&unschedulablePod)"} {"_id":"q-en-kubernetes-866e09d1b4a9794262d6f48b0c9a67e0f3a501b86c6ca459821277377bee86df","text":"}, }, { name: \"UnschedulableAndUnschedulableFilters\", plugins: []*TestPlugin{ { name: \"TestPlugin1\", inj: injectedResult{FilterStatus: int(framework.Unschedulable)}, }, { name: \"TestPlugin2\", inj: injectedResult{FilterStatus: int(framework.Unschedulable)}, }, }, wantStatus: framework.NewStatus(framework.Unschedulable, injectFilterReason).WithFailedPlugin(\"TestPlugin1\"), wantStatusMap: framework.PluginToStatus{ \"TestPlugin1\": framework.NewStatus(framework.Unschedulable, injectFilterReason).WithFailedPlugin(\"TestPlugin1\"), }, }, { name: \"SuccessAndSuccessFilters\", plugins: []*TestPlugin{ {"} {"_id":"q-en-kubernetes-86a25aed3aa0af9d5c4e2b2180ea579278ca5076c77702b4bb8b4fb1b2da2778","text":"} }() err = r.cmd.Wait() stopped <- true close(stopped) if exiterr, ok := err.(*exec.ExitError); ok { klog.Infof(\"etcd server stopped (signal: %s)\", exiterr.Error()) // stopped"} {"_id":"q-en-kubernetes-86a4be9e94cce166db2d3af74966a4b750a47b16d8b1f9e07827558ed6dab97a","text":"- mkdir -p /home/kubernetes/containerized_mounter/rootfs - mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/ - mount -o remount, exec /home/kubernetes/containerized_mounter/ - wget https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar -O /tmp/mounter.tar - wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar - tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs - mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet - mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet"} {"_id":"q-en-kubernetes-86a4f4978cbf12989e58e71644d003fa854b6acbf9333aa5e00fadf23e57f1ab","text":"glog.Infof(\"managing multiple zones: %v\", managedZones) } operationPollRateLimiter := flowcontrol.NewTokenBucketRateLimiter(10, 100) // 10 qps, 100 bucket size. return &GCECloud{ service: svc, containerService: containerSvc, projectID: projectID, region: region, localZone: zone, managedZones: managedZones, networkURL: networkURL, nodeTags: nodeTags, useMetadataServer: useMetadataServer, operationPollRateLimiter: operationPollRateLimiter, service: svc, containerService: containerSvc, projectID: projectID, region: region, localZone: zone, managedZones: managedZones, networkURL: networkURL, nodeTags: nodeTags, useMetadataServer: useMetadataServer, }, nil }"} {"_id":"q-en-kubernetes-86e5b23601f6a99129f514a43dac81f3cd61d23b71702835c773af8383693370","text":"} servicePrincipalToken, err := auth.GetServicePrincipalToken(&config.AzureAuthConfig, env) if err != nil { if err == auth.ErrorNoAuth { if !config.UseInstanceMetadata { // No credentials provided, useInstanceMetadata should be enabled. return nil, fmt.Errorf(\"useInstanceMetadata must be enabled without Azure credentials\") } klog.V(2).Infof(\"Azure cloud provider is starting without credentials\") } else if err != nil { return nil, err }"} {"_id":"q-en-kubernetes-871ee5a5fba56088d31e0a14ea1f30bb49d81bb0c45746b71740fd920803e799","text":"execAffinityTestForLBService(f, cs, svc) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. // [LinuxOnly]: Windows does not support session affinity. ginkgo.It(\"should be able to switch session affinity for LoadBalancer service with ESIPP off [Slow] [DisabledForLargeClusters] [LinuxOnly]\", func() { ginkgo.It(\"should be able to switch session affinity for LoadBalancer service with ESIPP off [Slow] [LinuxOnly]\", func() { // L4 load balancer affinity `ClientIP` is not supported on AWS ELB. e2eskipper.SkipIfProviderIs(\"aws\")"} {"_id":"q-en-kubernetes-871ee9d4f7d34f2cf5d05fbdcc6261a23c6125936de0e44dd751e3bfaa7c8cd7","text":"out.Description = in.Description if in.Type != \"\" { out.Type = spec.StringOrArray([]string{in.Type}) if in.Nullable { out.Type = append(out.Type, \"null\") } } if in.XIntOrString { out.VendorExtensible.AddExtension(\"x-kubernetes-int-or-string\", true) out.Type = spec.StringOrArray{\"integer\", \"string\"} } if out.Type != nil && in.Nullable { out.Type = append(out.Type, \"null\") } out.Format = in.Format out.Title = in.Title"} {"_id":"q-en-kubernetes-8741e24353e28b19c9dfc249781e7e773d8837d2937e5855d93bda5ec41614d0","text":"local -ra docker_cmd=( \"${DOCKER[@]}\" run \"${docker_run_opts[@]}\" \"${KUBE_BUILD_IMAGE}\") # Remove the container if it is left over from some previous aborted run \"${DOCKER[@]}\" rm -f -v \"${KUBE_BUILD_CONTAINER_NAME}\" >/dev/null 2>&1 || true # Clean up container from any previous run kube::build::destroy_container \"${KUBE_BUILD_CONTAINER_NAME}\" \"${docker_cmd[@]}\" \"$@\" # Remove the container after we run. '--rm' might be appropriate but it # appears that sometimes it fails. See # https://github.com/docker/docker/issues/3968 \"${DOCKER[@]}\" rm -f -v \"${KUBE_BUILD_CONTAINER_NAME}\" >/dev/null 2>&1 || true kube::build::destroy_container \"${KUBE_BUILD_CONTAINER_NAME}\" } # Test if the output directory is remote (and can only be accessed through"} {"_id":"q-en-kubernetes-87498deae5bd4bea7e96d4e7916257e1b1d621370b1cc323623c16733900ccd3","text":"if diff := cmp.Diff(tc.wantProfiles, profiles); diff != \"\" { t.Errorf(\"unexpected profiles (-want, +got):n%s\", diff) } // Extenders if len(tc.wantExtenders) != 0 { // Scheduler.Extenders extenders := make([]string, 0, len(s.Extenders)) for _, e := range s.Extenders { extenders = append(extenders, e.Name()) } if diff := cmp.Diff(tc.wantExtenders, extenders); diff != \"\" { t.Errorf(\"unexpected extenders (-want, +got):n%s\", diff) } // framework.Handle.Extenders() for _, p := range s.Profiles { extenders := make([]string, 0, len(p.Extenders())) for _, e := range p.Extenders() { extenders = append(extenders, e.Name()) } if diff := cmp.Diff(tc.wantExtenders, extenders); diff != \"\" { t.Errorf(\"unexpected extenders (-want, +got):n%s\", diff) } } } }) } }"} {"_id":"q-en-kubernetes-87642e3f1a588c9f37e5e76a83825d6ca131e26dd77be0c9ef5af3d40d534c5f","text":"if err != nil { return \"\", err } if isLocalInstance { if metadata.Compute.VMSize != \"\" { return metadata.Compute.VMSize, nil if !isLocalInstance { if az.vmSet != nil { return az.vmSet.GetInstanceTypeByNodeName(string(name)) } // vmSet == nil indicates credentials are not provided. return \"\", fmt.Errorf(\"no credentials provided for Azure cloud provider\") } if metadata.Compute.VMSize != \"\" { return metadata.Compute.VMSize, nil } }"} {"_id":"q-en-kubernetes-8797eef8b1200c8afc4252295c0dc42c980ff804d63269f52784a9e4700ef9be","text":"jig.SanityCheckService(svc, v1.ServiceTypeLoadBalancer) defer func() { framework.StopServeHostnameService(cs, f.InternalClientset, f.ScalesGetter, ns, serviceName) lb := cloudprovider.GetLoadBalancerName(svc) framework.Logf(\"cleaning gce resource for %s\", lb) framework.CleanupServiceGCEResources(cs, lb, framework.TestContext.CloudConfig.Region, framework.TestContext.CloudConfig.Zone) }() ingressIP := framework.GetIngressPoint(&svc.Status.LoadBalancer.Ingress[0]) port := int(svc.Spec.Ports[0].Port)"} {"_id":"q-en-kubernetes-87c306b425bc125bf871a09365c98051645696b3c7f30df0d761489cc308589c","text":"} } func TestCertSatisfiesTemplate(t *testing.T) { testCases := []struct { name string cert *x509.Certificate template *x509.CertificateRequest shouldSatisfy bool }{ { name: \"No certificate, no template\", cert: nil, template: nil, shouldSatisfy: false, }, { name: \"No certificate\", cert: nil, template: &x509.CertificateRequest{}, shouldSatisfy: false, }, { name: \"No template\", cert: &x509.Certificate{ Subject: pkix.Name{ CommonName: \"system:node:fake-node-name\", }, }, template: nil, shouldSatisfy: true, }, { name: \"Mismatched common name\", cert: &x509.Certificate{ Subject: pkix.Name{ CommonName: \"system:node:fake-node-name-2\", }, }, template: &x509.CertificateRequest{ Subject: pkix.Name{ CommonName: \"system:node:fake-node-name\", }, }, shouldSatisfy: false, }, { name: \"Missing orgs in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{ Organization: []string{\"system:nodes\"}, }, }, template: &x509.CertificateRequest{ Subject: pkix.Name{ Organization: []string{\"system:nodes\", \"foobar\"}, }, }, shouldSatisfy: false, }, { name: \"Extra orgs in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{ Organization: []string{\"system:nodes\", \"foobar\"}, }, }, template: &x509.CertificateRequest{ Subject: pkix.Name{ Organization: []string{\"system:nodes\"}, }, }, shouldSatisfy: true, }, { name: \"Missing DNS names in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{}, DNSNames: []string{\"foo.example.com\"}, }, template: &x509.CertificateRequest{ Subject: pkix.Name{}, DNSNames: []string{\"foo.example.com\", \"bar.example.com\"}, }, shouldSatisfy: false, }, { name: \"Extra DNS names in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{}, DNSNames: []string{\"foo.example.com\", \"bar.example.com\"}, }, template: &x509.CertificateRequest{ Subject: pkix.Name{}, DNSNames: []string{\"foo.example.com\"}, }, shouldSatisfy: true, }, { name: \"Missing IP addresses in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\")}, }, template: &x509.CertificateRequest{ Subject: pkix.Name{}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\"), net.ParseIP(\"192.168.1.2\")}, }, shouldSatisfy: false, }, { name: \"Extra IP addresses in certificate\", cert: &x509.Certificate{ Subject: pkix.Name{}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\"), net.ParseIP(\"192.168.1.2\")}, }, template: &x509.CertificateRequest{ Subject: pkix.Name{}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\")}, }, shouldSatisfy: true, }, { name: \"Matching certificate\", cert: &x509.Certificate{ Subject: pkix.Name{ CommonName: \"system:node:fake-node-name\", Organization: []string{\"system:nodes\"}, }, DNSNames: []string{\"foo.example.com\"}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\")}, }, template: &x509.CertificateRequest{ Subject: pkix.Name{ CommonName: \"system:node:fake-node-name\", Organization: []string{\"system:nodes\"}, }, DNSNames: []string{\"foo.example.com\"}, IPAddresses: []net.IP{net.ParseIP(\"192.168.1.1\")}, }, shouldSatisfy: true, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { var tlsCert *tls.Certificate if tc.cert != nil { tlsCert = &tls.Certificate{ Leaf: tc.cert, } } m := manager{ cert: tlsCert, getTemplate: func() *x509.CertificateRequest { return tc.template }, } result := m.certSatisfiesTemplate() if result != tc.shouldSatisfy { t.Errorf(\"cert: %+v, template: %+v, certSatisfiesTemplate returned %v, want %v\", m.cert, tc.template, result, tc.shouldSatisfy) } }) } } func TestRotateCertCreateCSRError(t *testing.T) { now := time.Now() m := manager{"} {"_id":"q-en-kubernetes-88183a9c9cc2e64a1f6a35fade43de26e30978106f8384ec7d0445680db2acfa","text":"var cpuFractionMap = make(map[string]float64) var memFractionMap = make(map[string]float64) // For each node, stores its pods info nodeNameToPodList := podListForEachNode(cs) for _, node := range nodes { cpuFraction, memFraction, _, _ := computeCPUMemFraction(cs, node, requestedResource) cpuFraction, memFraction, _, _ := computeCPUMemFraction(node, requestedResource, nodeNameToPodList[node.Name]) cpuFractionMap[node.Name] = cpuFraction memFractionMap[node.Name] = memFraction if cpuFraction > maxCPUFraction {"} {"_id":"q-en-kubernetes-8835cb86de7b2830ad47740edbe064640ba6539238589dc83be01c6e34c91698","text":"# sleep 4 # i=$[$i+1] # done apiVersion: v1beta1 apiVersion: v1beta3 kind: Pod id: synthetic-logger-0.25lps-pod desiredState: manifest: version: v1beta1 id: synth-logger-0.25lps containers: - name: synth-lgr image: ubuntu:14.04 command: [\"bash\", \"-c\", \"i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 4; i=$[$i+1]; done\"] labels: name: synth-logging-source metadata: labels: name: synth-logging-source name: synthetic-logger-0.25lps-pod spec: containers: - args: - bash - -c - 'i=\"0\"; while true; do echo -n \"`hostname`: $i: \"; date --rfc-3339 ns; sleep 4; i=$[$i+1]; done' image: ubuntu:14.04 name: synth-lgr ``` The other YAML file [synthetic_10lps.yaml](synthetic_10lps.yaml) specifies a similar synthetic logger that emits 10 log messages every second. To run both synthetic loggers:"} {"_id":"q-en-kubernetes-88716c2d0fbf6aec0c8b57194ba6cebca563440aeb5ae06ccc776be19e871111","text":"if m == nil { return &Timestamp{} } // truncate precision to microseconds to match JSON marshaling/unmarshaling truncatedNanoseconds := time.Duration(m.Time.Nanosecond()).Truncate(time.Microsecond) return &Timestamp{ Seconds: m.Time.Unix(), Nanos: int32(m.Time.Nanosecond()), Nanos: int32(truncatedNanoseconds), } }"} {"_id":"q-en-kubernetes-88771ef3870a258503ddf7e2f96b3e7265871912b273f8994480d45143ab921c","text":"func (plugin *flexVolumePlugin) getExecutable() string { parts := strings.Split(plugin.driverName, \"/\") execName := parts[len(parts)-1] return path.Join(plugin.execPath, execName) execPath := path.Join(plugin.execPath, execName) if runtime.GOOS == \"windows\" { execPath = volume.GetWindowsPath(execPath) } return execPath } // Name is part of the volume.VolumePlugin interface."} {"_id":"q-en-kubernetes-887ea752de759c78914705d32b2a19f1fbd25076dc9b094b6c63b504a7bb8dff","text":"if err := s.validate(); err != nil { return nil, err } dockercfgContent, err := handleDockercfgContent(s.Username, s.Password, s.Email, s.Server) dockercfgJsonContent, err := handleDockerCfgJsonContent(s.Username, s.Password, s.Email, s.Server) if err != nil { return nil, err } secret := &v1.Secret{} secret.Name = s.Name secret.Type = v1.SecretTypeDockercfg secret.Type = v1.SecretTypeDockerConfigJson secret.Data = map[string][]byte{} secret.Data[v1.DockerConfigKey] = dockercfgContent secret.Data[v1.DockerConfigJsonKey] = dockercfgJsonContent if s.AppendHash { h, err := hash.SecretHash(secret) if err != nil {"} {"_id":"q-en-kubernetes-891256752de78dc4da8910f52912fc0d5e794913677ec30484cbc3641f9a2a1b","text":"``` Note that we are still working on making all containerized the master components run smoothly in rkt. Before that we are not able to run the master node with rkt yet. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/getting-started-guides/rkt/README.md?pixel)]() "} {"_id":"q-en-kubernetes-897669b991c62501896f51c892a088a243744e05ee365704b7f9c65b70ee0ec1","text":"}) It(\"should schedule a pod w/ a RW PD, remove it, then schedule it on another host\", func() { if testContext.Provider != \"gce\" && testContext.Provider != \"aws\" { if !providerIs(\"gce\", \"aws\") { By(fmt.Sprintf(\"Skipping PD test, which is only supported for providers gce & aws (not %s)\", testContext.Provider)) return"} {"_id":"q-en-kubernetes-89b69b2b4a0c0fd5280b357025f1541bdeb31bd53485ff1ea5e0606ecb6929d6","text":"Contexts: map[string]clientcmdapi.Context{ \"gothic-context\": {AuthInfo: \"blue-user\", Cluster: \"chicken-cluster\", Namespace: \"plane-ns\"}}, } testConfigConflictAlfa = clientcmdapi.Config{ AuthInfos: map[string]clientcmdapi.AuthInfo{ \"red-user\": {Token: \"a-different-red-token\"},"} {"_id":"q-en-kubernetes-89b903eb62fe0d6b39a16c729a937f57183139fe48a64307e20db765bf81dae1","text":"cloud *Cloud } // AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI, and lun. func (c *controllerCommon) AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error { // 1. vmType is standard, attach with availabilitySet.AttachDisk. // getNodeVMSet gets the VMSet interface based on config.VMType and the real virtual machine type. func (c *controllerCommon) getNodeVMSet(nodeName types.NodeName) (VMSet, error) { // 1. vmType is standard, return cloud.vmSet directly. if c.cloud.VMType == vmTypeStandard { return c.cloud.vmSet.AttachDisk(isManagedDisk, diskName, diskURI, nodeName, lun, cachingMode) return c.cloud.vmSet, nil } // 2. vmType is Virtual Machine Scale Set (vmss), convert vmSet to scaleSet. ss, ok := c.cloud.vmSet.(*scaleSet) if !ok { return fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) return nil, fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) } // 3. If the node is managed by availability set, then attach with availabilitySet.AttachDisk. // 3. If the node is managed by availability set, then return ss.availabilitySet. managedByAS, err := ss.isNodeManagedByAvailabilitySet(mapNodeNameToVMName(nodeName)) if err != nil { return err return nil, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.AttachDisk(isManagedDisk, diskName, diskURI, nodeName, lun, cachingMode) return ss.availabilitySet, nil } // 4. Node is managed by vmss, attach with scaleSet.AttachDisk. return ss.AttachDisk(isManagedDisk, diskName, diskURI, nodeName, lun, cachingMode) // 4. Node is managed by vmss return ss, nil } // DetachDiskByName detaches a vhd from host. The vhd can be identified by diskName or diskURI. func (c *controllerCommon) DetachDiskByName(diskName, diskURI string, nodeName types.NodeName) error { // 1. vmType is standard, detach with availabilitySet.DetachDiskByName. if c.cloud.VMType == vmTypeStandard { return c.cloud.vmSet.DetachDiskByName(diskName, diskURI, nodeName) // AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI, and lun. func (c *controllerCommon) AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error { vmset, err := c.getNodeVMSet(nodeName) if err != nil { return err } // 2. vmType is Virtual Machine Scale Set (vmss), convert vmSet to scaleSet. ss, ok := c.cloud.vmSet.(*scaleSet) if !ok { return fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) } return vmset.AttachDisk(isManagedDisk, diskName, diskURI, nodeName, lun, cachingMode) } // 3. If the node is managed by availability set, then detach with availabilitySet.DetachDiskByName. managedByAS, err := ss.isNodeManagedByAvailabilitySet(mapNodeNameToVMName(nodeName)) // DetachDiskByName detaches a vhd from host. The vhd can be identified by diskName or diskURI. func (c *controllerCommon) DetachDiskByName(diskName, diskURI string, nodeName types.NodeName) error { vmset, err := c.getNodeVMSet(nodeName) if err != nil { return err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.DetachDiskByName(diskName, diskURI, nodeName) } // 4. Node is managed by vmss, detach with scaleSet.DetachDiskByName. return ss.DetachDiskByName(diskName, diskURI, nodeName) return vmset.DetachDiskByName(diskName, diskURI, nodeName) } // GetDiskLun finds the lun on the host that the vhd is attached to, given a vhd's diskName and diskURI. func (c *controllerCommon) GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) { // 1. vmType is standard, get with availabilitySet.GetDiskLun. if c.cloud.VMType == vmTypeStandard { return c.cloud.vmSet.GetDiskLun(diskName, diskURI, nodeName) // getNodeDataDisks invokes vmSet interfaces to get data disks for the node. func (c *controllerCommon) getNodeDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) { vmset, err := c.getNodeVMSet(nodeName) if err != nil { return nil, err } // 2. vmType is Virtual Machine Scale Set (vmss), convert vmSet to scaleSet. ss, ok := c.cloud.vmSet.(*scaleSet) if !ok { return -1, fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) } return vmset.GetDataDisks(nodeName) } // 3. If the node is managed by availability set, then get with availabilitySet.GetDiskLun. managedByAS, err := ss.isNodeManagedByAvailabilitySet(mapNodeNameToVMName(nodeName)) // GetDiskLun finds the lun on the host that the vhd is attached to, given a vhd's diskName and diskURI. func (c *controllerCommon) GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) { disks, err := c.getNodeDataDisks(nodeName) if err != nil { glog.Errorf(\"error of getting data disks for node %q: %v\", nodeName, err) return -1, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetDiskLun(diskName, diskURI, nodeName) } // 4. Node is managed by vmss, get with scaleSet.GetDiskLun. return ss.GetDiskLun(diskName, diskURI, nodeName) for _, disk := range disks { if disk.Lun != nil && (disk.Name != nil && diskName != \"\" && *disk.Name == diskName) || (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != \"\" && *disk.Vhd.URI == diskURI) || (disk.ManagedDisk != nil && *disk.ManagedDisk.ID == diskURI) { // found the disk glog.V(4).Infof(\"azureDisk - find disk: lun %d name %q uri %q\", *disk.Lun, diskName, diskURI) return *disk.Lun, nil } } return -1, fmt.Errorf(\"Cannot find Lun for disk %s\", diskName) } // GetNextDiskLun searches all vhd attachment on the host and find unused lun. Return -1 if all luns are used. func (c *controllerCommon) GetNextDiskLun(nodeName types.NodeName) (int32, error) { // 1. vmType is standard, get with availabilitySet.GetNextDiskLun. if c.cloud.VMType == vmTypeStandard { return c.cloud.vmSet.GetNextDiskLun(nodeName) } // 2. vmType is Virtual Machine Scale Set (vmss), convert vmSet to scaleSet. ss, ok := c.cloud.vmSet.(*scaleSet) if !ok { return -1, fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) } // 3. If the node is managed by availability set, then get with availabilitySet.GetNextDiskLun. managedByAS, err := ss.isNodeManagedByAvailabilitySet(mapNodeNameToVMName(nodeName)) disks, err := c.getNodeDataDisks(nodeName) if err != nil { glog.Errorf(\"error of getting data disks for node %q: %v\", nodeName, err) return -1, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetNextDiskLun(nodeName) } // 4. Node is managed by vmss, get with scaleSet.GetNextDiskLun. return ss.GetNextDiskLun(nodeName) used := make([]bool, maxLUN) for _, disk := range disks { if disk.Lun != nil { used[*disk.Lun] = true } } for k, v := range used { if !v { return int32(k), nil } } return -1, fmt.Errorf(\"all luns are used\") } // DisksAreAttached checks if a list of volumes are attached to the node with the specified NodeName. func (c *controllerCommon) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { // 1. vmType is standard, check with availabilitySet.DisksAreAttached. if c.cloud.VMType == vmTypeStandard { return c.cloud.vmSet.DisksAreAttached(diskNames, nodeName) } // 2. vmType is Virtual Machine Scale Set (vmss), convert vmSet to scaleSet. ss, ok := c.cloud.vmSet.(*scaleSet) if !ok { return nil, fmt.Errorf(\"error of converting vmSet (%q) to scaleSet with vmType %q\", c.cloud.vmSet, c.cloud.VMType) attached := make(map[string]bool) for _, diskName := range diskNames { attached[diskName] = false } // 3. If the node is managed by availability set, then check with availabilitySet.DisksAreAttached. managedByAS, err := ss.isNodeManagedByAvailabilitySet(mapNodeNameToVMName(nodeName)) disks, err := c.getNodeDataDisks(nodeName) if err != nil { return nil, err if err == cloudprovider.InstanceNotFound { // if host doesn't exist, no need to detach glog.Warningf(\"azureDisk - Cannot find node %q, DisksAreAttached will assume disks %v are not attached to it.\", nodeName, diskNames) return attached, nil } return attached, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.DisksAreAttached(diskNames, nodeName) for _, disk := range disks { for _, diskName := range diskNames { if disk.Name != nil && diskName != \"\" && *disk.Name == diskName { attached[diskName] = true } } } // 4. Node is managed by vmss, check with scaleSet.DisksAreAttached. return ss.DisksAreAttached(diskNames, nodeName) return attached, nil }"} {"_id":"q-en-kubernetes-89d4152a66acc472f732ca356d45eb558c97d42bffb6d96217c14f8c7bc29827","text":"if err != nil { if apierrors.IsNotFound(err) { c.triggerTimeTracker.DeleteService(namespace, name) // The service has been deleted, return nil so that it won't be retried. return nil } return err }"} {"_id":"q-en-kubernetes-89dc010d6ac8766c568d5e5936b339ceeec510a0c0082a23242eede031c6ff4b","text":"\"sort\" \"strconv\" \"strings\" \"sync\" \"testing\" \"github.com/vmware/govmomi/find\""} {"_id":"q-en-kubernetes-8a08a7221b814f5400af87e04be96461d5bb455376aabc62c6f0051d41a1062e","text":"for _, file := range files { fileName := file.Name() // Make a copy It(fmt.Sprintf(\"tests that %v passes\", fileName), func() { // A number of scripts only work on gce if !providerIs(\"gce\", \"gke\") { By(fmt.Sprintf(\"Skipping Shell test %s, which is only supported for provider gce and gke (not %s)\", fileName, testContext.Provider)) return } runCmdTest(filepath.Join(bashE2ERoot, fileName)) }) }"} {"_id":"q-en-kubernetes-8a24aee8beb1a8d4ac362630e22675b2fb661e88c86b5a009e165fa86c1ee62a","text":"WhenScaled: apps.DeletePersistentVolumeClaimRetentionPolicyType, WhenDeleted: apps.DeletePersistentVolumeClaimRetentionPolicyType, }, // tests the case when no policy is set. nil, } { subtestName := pvcDeletePolicyString(policy) + \"/StatefulSetAutoDeletePVCEnabled\" if testName != \"\" {"} {"_id":"q-en-kubernetes-8a75104517f024130b1511e58ed3ee381b976144e44c56d3812622fc4fcfe861","text":"FindBoundSatsified: true, }, eventReason: \"FailedScheduling\", expectError: makePredicateError(\"1 VolumeBindingNoMatch\"), expectError: makePredicateError(\"1 node(s) didn't find available persistent volumes to bind\"), }, \"bound-and-unbound-unsatisfied\": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{"} {"_id":"q-en-kubernetes-8a847e2cea909eaaab7638c220b89fbc1ea74bdd65321ba50dad97a86f61471b","text":"ginkgo.By(\"Waiting for container to stop restarting\") stableCount := int(0) stableThreshold := int(time.Minute / framework.Poll) err = wait.PollImmediate(framework.Poll, 2*time.Minute, func() (bool, error) { err = wait.PollImmediate(framework.Poll, framework.PodStartTimeout, func() (bool, error) { pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(context.TODO(), pod.Name, metav1.GetOptions{}) if err != nil { return false, err"} {"_id":"q-en-kubernetes-8ab764be11aaaa9d4a3094e05c9736abb48eee1f9fdef6bb0be64fcb7e5b11a7","text":"It(\"should lookup the Schema by its GroupVersionKind\", func() { schema = resources.LookupResource(gvk) Expect(schema).ToNot(BeNil()) }) var sarspec *proto.Kind It(\"should be a Kind and have a spec\", func() { sar := schema.(*proto.Kind) Expect(sar).ToNot(BeNil()) Expect(sar.Fields).To(HaveKey(\"spec\")) specRef := sar.Fields[\"spec\"].(proto.Reference) Expect(specRef).ToNot(BeNil()) Expect(specRef.Reference()).To(Equal(\"io.k8s.api.authorization.v1.SubjectAccessReviewSpec\")) sarspec = specRef.SubSchema().(*proto.Kind) Expect(sarspec).ToNot(BeNil()) Expect(specRef.SubSchema().(*proto.Kind)).ToNot(BeNil()) }) })"} {"_id":"q-en-kubernetes-8ac8a8253b6c65a48168eec0fa70d40419b9d34f3feb615741c19bb03c6e685f","text":"kubetypes.HTTPSource, &api.Pod{ ObjectMeta: api.ObjectMeta{ UID: \"111\", Name: \"foo\" + \"-\" + hostname, Namespace: \"mynamespace\", SelfLink: getSelfLink(\"foo-\"+hostname, \"mynamespace\"), UID: \"111\", Name: \"foo\" + \"-\" + hostname, Namespace: \"mynamespace\", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: \"111\"}, SelfLink: getSelfLink(\"foo-\"+hostname, \"mynamespace\"), }, Spec: api.PodSpec{ NodeName: hostname,"} {"_id":"q-en-kubernetes-8af178860a3c1800ecf419aa518069c607460de0970fb5edf5d40402c80f5995","text":"{ code: http.StatusBadRequest, expected: &Error{ Retriable: true, Retriable: false, HTTPStatusCode: http.StatusBadRequest, RawError: fmt.Errorf(\"HTTP response: 400\"), },"} {"_id":"q-en-kubernetes-8b7bd46d1c75c3cad8a320f3adcca87a4acdb2f2662b2a9069d40bb0814046d6","text":"const ( operationDeleteCollection operation = \"deleteCollection\" operationList operation = \"list\" // assume a default estimate for finalizers to complete when found on items pending deletion. finalizerEstimateSeconds int64 = int64(15) ) // operationKey is an entry in a cache."} {"_id":"q-en-kubernetes-8c00eacceb432666c5619a2f9e86e0cc27fa32e42ace4c52c183b10ce16bc244","text":"// in https://github.com/kubernetes/kubernetes/issues/120720. // We are already hinting the external cloud provider via the annotation AnnotationAlphaProvidedIPAddr. if !nodeIPSpecified { node.Status.Addresses = []v1.NodeAddress{ {Type: v1.NodeHostName, Address: hostname}, } return nil } }"} {"_id":"q-en-kubernetes-8c2b7daeb2f2fd8ba7fdad2df8322b95cced33a6dff3d9257c5a56bd56282fc8","text":"return err } glog.V(4).Info(\"Successfully created federation controller manager deployment\") fmt.Println(cmdOut, \" done\") fmt.Fprintln(cmdOut, \" done\") fmt.Fprint(cmdOut, \"Updating kubeconfig...\") glog.V(4).Info(\"Updating kubeconfig\")"} {"_id":"q-en-kubernetes-8c467caecf5200eafa8b8a2f263bf3c6b6e121e690618ce8a661a0f3e40a61a9","text":"\"//test/e2e_node/services:go_default_library\", \"//test/e2e_node/system:go_default_library\", \"//test/utils:go_default_library\", \"//vendor:github.com/coreos/go-systemd/util\", \"//vendor:github.com/davecgh/go-spew/spew\", \"//vendor:github.com/golang/glog\", \"//vendor:github.com/kardianos/osext\","} {"_id":"q-en-kubernetes-8c67e36baf5601adbf26705e24ce125af1a5d362667df6aca04c9d3819961dfd","text":"return } klog.V(4).Infof(\"Updating customresourcedefinition %s\", oldCRD.Name) klog.V(4).Infof(\"Updating customresourcedefinition %s\", newCRD.Name) r.removeStorage_locked(newCRD.UID) } if oldInfo, ok := storageMap[types.UID(oldCRD.UID)]; ok { // removeStorage_locked removes the cached storage with the given uid as key from the storage map. This function // updates r.customStorage with the cleaned-up storageMap and tears down the old storage. // NOTE: Caller MUST hold r.customStorageLock to write r.customStorage thread-safely. func (r *crdHandler) removeStorage_locked(uid types.UID) { storageMap := r.customStorage.Load().(crdStorageMap) if oldInfo, ok := storageMap[uid]; ok { // Copy because we cannot write to storageMap without a race // as it is used without locking elsewhere. storageMap2 := storageMap.clone() // Remove from the CRD info map and store the map delete(storageMap2, types.UID(oldCRD.UID)) delete(storageMap2, uid) r.customStorage.Store(storageMap2) // Tear down the old storage"} {"_id":"q-en-kubernetes-8c6af7196bdb34714ca3a0b55ef7cd6c33a35deecbcfe6e8652fea83b762000c","text":"extensions.Kind(\"ReplicaSet\"): &ReplicaSetDescriber{c}, extensions.Kind(\"NetworkPolicy\"): &ExtensionsNetworkPolicyDescriber{c}, extensions.Kind(\"PodSecurityPolicy\"): &PodSecurityPolicyDescriber{c}, autoscaling.Kind(\"HorizontalPodAutoscaler\"): &HorizontalPodAutoscalerDescriber{c}, extensions.Kind(\"DaemonSet\"): &DaemonSetDescriber{c}, extensions.Kind(\"Deployment\"): &DeploymentDescriber{c, versionedClientsetForDeployment(c)},"} {"_id":"q-en-kubernetes-8c9cad5ab9934801e5e0096c9835e7a1cd1a3fff6d905c8e7a67eb93670ea907","text":"value: 512M - name: HEAP_NEWSIZE value: 100M - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace volumes: - name: data emptyDir: {}"} {"_id":"q-en-kubernetes-8ca30b6fe0a058f21d123edb518016758be1d4b1ae4725a6ffaac453bbd91ddd","text":"isMigratedOnNode := mpaSet.Has(pluginName) if isMigratedOnNode { installed := false driverName, err := csiMigratedPluginManager.GetCSINameFromInTreeName(pluginName) if err != nil { return isMigratedOnNode, err } for _, driver := range csiNode.Spec.Drivers { if driver.Name == driverName { installed = true break } } if !installed { return true, fmt.Errorf(\"in-tree plugin %s is migrated on node %s but driver %s is not installed\", pluginName, string(nodeName), driverName) } } return isMigratedOnNode, nil }"} {"_id":"q-en-kubernetes-8cb17090ac0b7f807ada5fce8ceb5df265aeb62cf70d00589d8485c362956ff4","text":"if err != nil { return err } if existingRole.AggregationRule != nil { // the old role already moved to an aggregated role, so there are no custom rules to migrate at this point return nil } glog.V(1).Infof(\"migrating %v to %v\", existingRole.Name, newName) existingRole.Name = newName existingRole.ResourceVersion = \"\" // clear this so the object can be created."} {"_id":"q-en-kubernetes-8ce1f7123faf139192f1ba727ed3da36529cce120c33a879b9fc5229cdd5286d","text":"\"net/http\" \"net/url\" \"os\" \"path/filepath\" \"testing\" \"github.com/stretchr/testify/assert\" ) // copied from k8s.io/client-go/transport/round_trippers_test.go"} {"_id":"q-en-kubernetes-8d2d955142b0c9fcf62cd999d56cd72ac79b377d0e250a88d6a487d10ab07bed","text":"return false, nil, nil }, }, { name: \"API watch error happen\", volID: \"vol-005\", attachID: getAttachmentName(\"vol-005\", testDriver, nodeName), shouldFail: true, watcherError: true, reactor: func(action core.Action) (handled bool, ret runtime.Object, err error) { if action.Matches(\"get\", \"volumeattachments\") { return true, makeTestAttachment(getAttachmentName(\"vol-005\", testDriver, nodeName), nodeName, \"vol-005\"), nil } return false, nil, nil }, }, } for _, tc := range testCases {"} {"_id":"q-en-kubernetes-8d32d5d0bfd9c0bd3c6005814799c863547cc8b4308cfc50442b5a781efa5270","text":"\"testing\" \"github.com/imdario/mergo\" \"k8s.io/kubernetes/pkg/client/restclient\" clientcmdapi \"k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api\" )"} {"_id":"q-en-kubernetes-8d3fcbdaf86325c05a4f1528159bfeae0a48d3dc0b9adcaaef99775054cae001","text":"targetNumNodes := int32(framework.TestContext.CloudConfig.NumNodes - 1) ginkgo.By(fmt.Sprintf(\"decreasing cluster size to %d\", targetNumNodes)) err = framework.ResizeGroup(group, targetNumNodes) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) err = framework.WaitForGroupSize(group, targetNumNodes) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) err = e2enode.WaitForReadyNodes(c, framework.TestContext.CloudConfig.NumNodes-1, 10*time.Minute) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) targetNodes, err := e2enode.GetReadySchedulableNodes(c) framework.ExpectNoError(err) framework.ExpectEqual(len(targetNodes.Items), int(targetNumNodes))"} {"_id":"q-en-kubernetes-8d46d01c3e78078817bc77c7a4819d3eeee857470db70a5d4fd6c208160fa746","text":"assert.Equal(t, c.expected, real, fmt.Sprintf(\"TestCase[%d]: %s\", i, c.desc)) } } func TestEnsureLoadBalancerDeleted(t *testing.T) { const vmCount = 8 const availabilitySetCount = 4 const serviceCount = 9 tests := []struct { desc string service v1.Service expectCreateError bool }{ { desc: \"external service should be created and deleted successfully\", service: getTestService(\"test1\", v1.ProtocolTCP, 80), }, { desc: \"internal service should be created and deleted successfully\", service: getInternalTestService(\"test2\", 80), }, { desc: \"annotated service with same resourceGroup should be created and deleted successfully\", service: getResourceGroupTestService(\"test3\", \"rg\", \"\", 80), }, { desc: \"annotated service with different resourceGroup shouldn't be created but should be deleted successfully\", service: getResourceGroupTestService(\"test4\", \"random-rg\", \"1.2.3.4\", 80), expectCreateError: true, }, } az := getTestCloud() for i, c := range tests { clusterResources := getClusterResources(az, vmCount, availabilitySetCount) getTestSecurityGroup(az) if c.service.Annotations[ServiceAnnotationLoadBalancerInternal] == \"true\" { addTestSubnet(t, az, &c.service) } // create the service first. lbStatus, err := az.EnsureLoadBalancer(context.TODO(), testClusterName, &c.service, clusterResources.nodes) if c.expectCreateError { assert.NotNil(t, err, \"TestCase[%d]: %s\", i, c.desc) } else { assert.Nil(t, err, \"TestCase[%d]: %s\", i, c.desc) assert.NotNil(t, lbStatus, \"TestCase[%d]: %s\", i, c.desc) result, err := az.LoadBalancerClient.List(context.TODO(), az.Config.ResourceGroup) assert.Nil(t, err, \"TestCase[%d]: %s\", i, c.desc) assert.Equal(t, len(result), 1, \"TestCase[%d]: %s\", i, c.desc) assert.Equal(t, len(*result[0].LoadBalancingRules), 1, \"TestCase[%d]: %s\", i, c.desc) } // finally, delete it. err = az.EnsureLoadBalancerDeleted(context.TODO(), testClusterName, &c.service) assert.Nil(t, err, \"TestCase[%d]: %s\", i, c.desc) result, err := az.LoadBalancerClient.List(context.Background(), az.Config.ResourceGroup) assert.Nil(t, err, \"TestCase[%d]: %s\", i, c.desc) assert.Equal(t, len(result), 0, \"TestCase[%d]: %s\", i, c.desc) } } "} {"_id":"q-en-kubernetes-8d7447ee23b804223b90f4154bff0d506eda92bab0292a358d051fb0d1819cf9","text":"\"fmt\" \"io\" \"net\" \"net/http\" \"regexp\" \"time\""} {"_id":"q-en-kubernetes-8d833bb18376202ab108268d89fe2bfddcf2ae90481aac2480f57df85594cbeb","text":"SSLContext ctx = SSLContext.getInstance(\"SSL\"); ctx.init(null, trustAll, new SecureRandom()); URL url = new URL(host + path + serviceName); URL url = new URL(proto + host + \":\" + port + path + serviceName); logger.info(\"Getting endpoints from \" + url); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();"} {"_id":"q-en-kubernetes-8d96894a8a0baecd878fa71e59bf311de1a0c2a8c74cb3bc0bf49191c2b44a6e","text":"while true; do if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then if [[ ! -z \"${GREP_REGEX}\" ]]; then result=$(echo \"${result}\" | grep \"${GREP_REGEX}\") result=$(echo \"${result}\" | grep \"${GREP_REGEX}\" || true) fi echo \"${result}\" return"} {"_id":"q-en-kubernetes-8db58878320cdab5cd92960035d738ca6f04596f6f20348aee3210e384540eff","text":"} // Filter based on extender implemented predicate functions. The filtered list is // expected to be a subset of the supplied list. failedNodesMap optionally contains // the list of failed nodes and failure reasons. // expected to be a subset of the supplied list; otherwise the function returns an error. // failedNodesMap optionally contains the list of failed nodes and failure reasons. func (h *HTTPExtender) Filter( pod *v1.Pod, nodes []*v1.Node, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo,"} {"_id":"q-en-kubernetes-8dee938c7c2dcbe6bab58b1159674e71fce686e46ffa979cf53a8308172c26ec","text":"// IsNotMountPoint determines if a directory is a mountpoint. func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(mounter, dir) return isNotMountPoint(mounter, dir) } // IsLikelyNotMountPoint determines if a directory is not a mountpoint."} {"_id":"q-en-kubernetes-8e02a1b38f1087d4e8443824f8508a8683cc4db935d00986edf9d3a20f67b916","text":"kind: Service apiVersion: v1beta1 id: nginxExample id: nginx-example # the port that this service should serve on port: 8000 # just like the selector in the replication controller, # but this time it identifies the set of pods to load balance # traffic to. selector: - name: nginx name: nginx # the container on each pod to connect to, can be a name # (e.g. 'www') or a number (e.g. 80) containerPort: 80"} {"_id":"q-en-kubernetes-8e1e658472189b90bd77fab65ae3b86f1b935834a4e9284c37d75de77a71796b","text":"} } func createSocketFile(socketDir string) (string, error) { testSocketFile := filepath.Join(socketDir, \"mt.sock\") // Switch to volume path and create the socket file // socket file can not have length of more than 108 character // and hence we must use relative path oldDir, _ := os.Getwd() err := os.Chdir(socketDir) if err != nil { return \"\", err } defer func() { os.Chdir(oldDir) }() _, socketCreateError := net.Listen(\"unix\", \"mt.sock\") return testSocketFile, socketCreateError } func TestFindExistingPrefix(t *testing.T) { defaultPerm := os.FileMode(0750) tests := []struct {"} {"_id":"q-en-kubernetes-8e55848d5b327d75e554bb8732266e15fb48ac1f5d6641f6727e9307b35ff9a9","text":" load(\"@io_bazel_rules_go//go:def.bzl\", \"go_library\") load(\"@io_bazel_rules_go//go:def.bzl\", \"go_library\", \"go_test\") go_library( name = \"go_default_library\","} {"_id":"q-en-kubernetes-8ec3a774aa176fce66df3737fa08ceb58d984fb7c16165941972c6e05995d7ae","text":"(disk.ManagedDisk != nil && diskURI != \"\" && strings.EqualFold(*disk.ManagedDisk.ID, diskURI)) { // found the disk klog.V(2).Infof(\"azureDisk - detach disk: name %q uri %q\", diskName, diskURI) disks[i].ToBeDetached = to.BoolPtr(true) if strings.EqualFold(ss.cloud.Environment.Name, \"AZURESTACKCLOUD\") { disks = append(disks[:i], disks[i+1:]...) } else { disks[i].ToBeDetached = to.BoolPtr(true) } bFoundDisk = true break }"} {"_id":"q-en-kubernetes-8ec6406138c62bb8b97d5a7b8eacde39b51043d4a4f75c43407f578c7ba8df6d","text":"REGISTRY ?= gcr.io/kubernetes-e2e-test-images GOARM=7 QEMUVERSION=v2.9.1 GOLANG_VERSION=1.8.3 GOLANG_VERSION=1.9.1 export ifndef WHAT"} {"_id":"q-en-kubernetes-8efcbb15dec65e745bef4b59c6754f957448ccf484d1a9234cdea3578d1c746a","text":"// remove all existing c.RemoveStreams(stream0, stream1) // remove nil stream should not crash c.RemoveStreams(nil) if len(c.streams) != 0 { t.Fatalf(\"should not have any streams, has %d\", len(c.streams)) }"} {"_id":"q-en-kubernetes-8f11fbe91fcc9e6c9655ad66308de8ae050820f484175e463906dfc40ef087ab","text":"if _, err := dc.coreClient.CoreV1().Pods(tc.pod.Namespace).Create(ctx, tc.pod, metav1.CreateOptions{}); err != nil { t.Fatalf(\"Failed to create pod: %v\", err) } dc.clock.Sleep(tc.timePassed) if err := dc.informerFactory.Core().V1().Pods().Informer().GetIndexer().Add(tc.pod); err != nil { t.Fatalf(\"Failed adding pod to indexer: %v\", err) } dc.clock.Sleep(tc.timePassed) diff := \"\" if err := wait.Poll(100*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { return dc.stalePodDisruptionQueue.Len() == 0, nil pod, err := dc.kubeClient.CoreV1().Pods(tc.pod.Namespace).Get(ctx, tc.pod.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Failed getting updated pod: %v\", err) } diff = cmp.Diff(tc.wantConditions, pod.Status.Conditions, cmpopts.IgnoreFields(v1.PodCondition{}, \"LastTransitionTime\")) return diff == \"\", nil }); err != nil { t.Fatalf(\"Failed waiting for worker to sync: %v\", err) } pod, err := dc.kubeClient.CoreV1().Pods(tc.pod.Namespace).Get(ctx, tc.pod.Name, metav1.GetOptions{}) if err != nil { t.Fatalf(\"Failed getting updated pod: %v\", err) } diff := cmp.Diff(tc.wantConditions, pod.Status.Conditions, cmpopts.IgnoreFields(v1.PodCondition{}, \"LastTransitionTime\")) if diff != \"\" { t.Errorf(\"Obtained pod conditions (-want,+got):n%s\", diff) t.Fatalf(\"Failed waiting for worker to sync: %v, (-want,+got):n%s\", err, diff) } }) }"} {"_id":"q-en-kubernetes-8f331c45627274ac8fff69c65876c04c18b4a61cc8edc92a00ba2361f90b93e8","text":"k8s-app: nvidia-gpu-device-plugin addonmanager.kubernetes.io/mode: Reconcile spec: selector: matchLabels: k8s-app: nvidia-gpu-device-plugin template: metadata: labels:"} {"_id":"q-en-kubernetes-8f402cd9e780cac89ee852b185a256ebc76a205b55cb097d736a0483668fbc48","text":"containers: - name: fluentd-elasticsearch image: gcr.io/google_containers/fluentd-elasticsearch:1.5 resources: limits: cpu: 100m env: - name: \"FLUENTD_ARGS\" value: \"-qq\""} {"_id":"q-en-kubernetes-8f5cd44b3f59397983a613f7b52974af70138af8bee2229e47786a6622258d93","text":"}, { manifest: KubeProxyDaemonSet, data: struct{ ImageRepository, Arch, Version, ImageOverride, ClusterCIDR, MasterTaintKey, CloudTaintKey string }{ data: struct{ ImageRepository, Arch, Version, ImageOverride, ExtraParams, ClusterCIDR, MasterTaintKey, CloudTaintKey string }{ ImageRepository: \"foo\", Arch: \"foo\", Version: \"foo\", ImageOverride: \"foo\", ExtraParams: \"foo\", ClusterCIDR: \"foo\", MasterTaintKey: \"foo\", CloudTaintKey: \"foo\","} {"_id":"q-en-kubernetes-901be35611ea647ab9219a5e31219d67c30015a3d7719610b2a2a92576023f3c","text":"Description string `json:\"description,omitempty\"` // Versions are versions for this third party object // +optional Versions []APIVersion `json:\"versions,omitempty\"` }"} {"_id":"q-en-kubernetes-901fe3681178dda850bc11d4c95b7a4c4310c7f22d77c15a45204107c812ab80","text":"nodeTime = time.Now() bootTime, err = util.GetBootTime() gomega.Expect(err).To(gomega.BeNil()) framework.ExpectNoError(err) // Set lookback duration longer than node up time. // Assume the test won't take more than 1 hour, in fact it usually only takes 90 seconds."} {"_id":"q-en-kubernetes-9027c23491064882a52715c7c4ced9e3fc76ab4bbe0a16f366f6f0a7c95a6a66","text":"genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) } webhookAuthResolver := func(delegate webhookconfig.AuthenticationInfoResolver) webhookconfig.AuthenticationInfoResolver { return webhookconfig.AuthenticationInfoResolverFunc(func(server string) (*rest.Config, error) { if server == \"kubernetes.default.svc\" { return genericConfig.LoopbackClientConfig, nil } ret, err := delegate.ClientConfigFor(server) if err != nil { return nil, err } if proxyTransport != nil && proxyTransport.Dial != nil { ret.Dial = proxyTransport.Dial } return ret, err }) webhookAuthResolverWrapper := func(delegate webhookconfig.AuthenticationInfoResolver) webhookconfig.AuthenticationInfoResolver { return &webhookconfig.AuthenticationInfoResolverDelegator{ ClientConfigForFunc: func(server string) (*rest.Config, error) { if server == \"kubernetes.default.svc\" { return genericConfig.LoopbackClientConfig, nil } return delegate.ClientConfigFor(server) }, ClientConfigForServiceFunc: func(serviceName, serviceNamespace string) (*rest.Config, error) { if serviceName == \"kubernetes\" && serviceNamespace == \"default\" { return genericConfig.LoopbackClientConfig, nil } ret, err := delegate.ClientConfigForService(serviceName, serviceNamespace) if err != nil { return nil, err } if proxyTransport != nil && proxyTransport.Dial != nil { ret.Dial = proxyTransport.Dial } return ret, err }, } } pluginInitializers, err := BuildAdmissionPluginInitializers( s, client, sharedInformers, serviceResolver, webhookAuthResolver, webhookAuthResolverWrapper, ) if err != nil { return nil, nil, nil, nil, nil, fmt.Errorf(\"failed to create admission plugin initializer: %v\", err)"} {"_id":"q-en-kubernetes-90280c2e8dddfd4a483193840427cd08f1a4ac75473d05f84e7ebfb71537f47b","text":"// recent start error or not, State should be Terminated, LastTerminationState should be retrieved from second latest // terminated status. { []api.Container{{Name: \"without-reason\"}, {Name: \"with-reason\"}}, []*kubecontainer.ContainerStatus{ containers: []api.Container{{Name: \"without-reason\"}, {Name: \"with-reason\"}}, statuses: []*kubecontainer.ContainerStatus{ { Name: \"without-reason\", State: kubecontainer.ContainerStateExited,"} {"_id":"q-en-kubernetes-9055a964750ffaba0809bc197fef094c7fffbe95aac76e5a1e654931233e6a4f","text":"} } func k8sVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume { func isPkiVolumeMountNeeded() bool { // On some systems were we host-mount /etc/ssl/certs, it is also required to mount /etc/pki. This is needed // due to symlinks pointing from files in /etc/ssl/certs into /etc/pki/ if _, err := os.Stat(\"/etc/pki\"); err == nil { return true } return false } func pkiVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume { return api.Volume{ Name: \"pki\", VolumeSource: api.VolumeSource{ // TODO(phase1+) make path configurable HostPath: &api.HostPathVolumeSource{Path: \"/etc/pki\"}, }, } } func pkiVolumeMount() api.VolumeMount { return api.VolumeMount{ Name: \"pki\", MountPath: \"/etc/pki\", } } func k8sVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume { return api.Volume{ Name: \"k8s\", VolumeSource: api.VolumeSource{ HostPath: &api.HostPathVolumeSource{Path: kubeadmapi.GlobalEnvParams.KubernetesDir}, }, }"} {"_id":"q-en-kubernetes-9096211cf39ca4e83d703d5a0298032a402b8a9bcc2c1a13fd5a866c10a3eaa9","text":"Namespace: pod.Namespace, } tests := []struct { containers []api.Container statuses []*kubecontainer.ContainerStatus reasons map[string]error oldStatuses []api.ContainerStatus expectedState map[string]api.ContainerState containers []api.Container statuses []*kubecontainer.ContainerStatus reasons map[string]error oldStatuses []api.ContainerStatus expectedState map[string]api.ContainerState // Only set expectedInitState when it is different from expectedState expectedInitState map[string]api.ContainerState expectedLastTerminationState map[string]api.ContainerState }{ // For container with no historical record, State should be Waiting, LastTerminationState should be retrieved from // old status from apiserver. { []api.Container{{Name: \"without-old-record\"}, {Name: \"with-old-record\"}}, []*kubecontainer.ContainerStatus{}, map[string]error{}, []api.ContainerStatus{{ containers: []api.Container{{Name: \"without-old-record\"}, {Name: \"with-old-record\"}}, statuses: []*kubecontainer.ContainerStatus{}, reasons: map[string]error{}, oldStatuses: []api.ContainerStatus{{ Name: \"with-old-record\", LastTerminationState: api.ContainerState{Terminated: &api.ContainerStateTerminated{}}, }}, map[string]api.ContainerState{ expectedState: map[string]api.ContainerState{ \"without-old-record\": {Waiting: &api.ContainerStateWaiting{ Reason: startWaitingReason, }},"} {"_id":"q-en-kubernetes-90d75b92aebc087d99c19766369daecf20c8f367c33cfba375452fd2b82b356d","text":"rs := &apps.ReplicaSet{} rc := &api.ReplicationController{} extGroup := schema.GroupVersion{Group: \"apps\", Version: \"v1\"} extCodec := legacyscheme.Codecs.LegacyCodec(extGroup) extGroup := testapi.Apps defaultGroup := testapi.Default defaultGroup := schema.GroupVersion{Group: \"\", Version: \"v1\"} defaultCodec := legacyscheme.Codecs.LegacyCodec(defaultGroup) fuzzInternalObject(t, schema.GroupVersion{Group: \"apps\", Version: runtime.APIVersionInternal}, rs, rand.Int63())"} {"_id":"q-en-kubernetes-90fdc7bf07c3019ef559594aed6e65e7cfc05ad0d43cfd9a2e1a53a2c2df0605","text":"kubeClient := testKubelet.fakeKubeClient kubeClient.ReactFn = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ { ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}, ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, Status: api.NodeStatus{ Conditions: []api.NodeCondition{"} {"_id":"q-en-kubernetes-91174186c4fd8ef29f5dbdf91609014da46d86563a33891124ea09fa5bea1e99","text":"# # We specify -X to avoid a race condition that can cause minion failure to # install. See https://github.com/saltstack/salt-bootstrap/issues/270 curl -L http://bootstrap.saltstack.com | sh -s -- -X curl -L --connect-timeout 20 --retry 6 --retry-delay 10 http://bootstrap.saltstack.com | sh -s -- -X "} {"_id":"q-en-kubernetes-918b309685e171a82b1807300314b0e301fec6fad0f296c355012112aa38f273","text":"if err := os.MkdirAll(dest, 0o755); err != nil { return err } return utils.WithProcfd(c.root, m.Destination, func(procfd string) error { if err := mount(m.Source, m.Destination, procfd, \"cgroup2\", uintptr(m.Flags), m.Data); err != nil { // when we are in UserNS but CgroupNS is not unshared, we cannot mount cgroup2 (#2158) if errors.Is(err, unix.EPERM) || errors.Is(err, unix.EBUSY) { src := fs2.UnifiedMountpoint if c.cgroupns && c.cgroup2Path != \"\" { // Emulate cgroupns by bind-mounting // the container cgroup path rather than // the whole /sys/fs/cgroup. src = c.cgroup2Path } err = mount(src, m.Destination, procfd, \"\", uintptr(m.Flags)|unix.MS_BIND, \"\") if c.rootlessCgroups && errors.Is(err, unix.ENOENT) { err = nil } } return err } return nil err = utils.WithProcfd(c.root, m.Destination, func(procfd string) error { return mount(m.Source, m.Destination, procfd, \"cgroup2\", uintptr(m.Flags), m.Data) }) if err == nil || !(errors.Is(err, unix.EPERM) || errors.Is(err, unix.EBUSY)) { return err } // When we are in UserNS but CgroupNS is not unshared, we cannot mount // cgroup2 (#2158), so fall back to bind mount. bindM := &configs.Mount{ Device: \"bind\", Source: fs2.UnifiedMountpoint, Destination: m.Destination, Flags: unix.MS_BIND | m.Flags, PropagationFlags: m.PropagationFlags, } if c.cgroupns && c.cgroup2Path != \"\" { // Emulate cgroupns by bind-mounting the container cgroup path // rather than the whole /sys/fs/cgroup. bindM.Source = c.cgroup2Path } // mountToRootfs() handles remounting for MS_RDONLY. // No need to set c.fd here, because mountToRootfs() calls utils.WithProcfd() by itself in mountPropagate(). err = mountToRootfs(bindM, c) if c.rootlessCgroups && errors.Is(err, unix.ENOENT) { // ENOENT (for `src = c.cgroup2Path`) happens when rootless runc is being executed // outside the userns+mountns. // // Mask `/sys/fs/cgroup` to ensure it is read-only, even when `/sys` is mounted // with `rbind,ro` (`runc spec --rootless` produces `rbind,ro` for `/sys`). err = utils.WithProcfd(c.root, m.Destination, func(procfd string) error { return maskPath(procfd, c.label) }) } return err } func doTmpfsCopyUp(m *configs.Mount, rootfs, mountLabel string) (Err error) {"} {"_id":"q-en-kubernetes-9193350c46f90fcba863fe730753ca88a2c7e627b9f6e798745899178328a0f9","text":"import ( \"fmt\" \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/api/v1\" \"k8s.io/kubernetes/pkg/runtime\" )"} {"_id":"q-en-kubernetes-919fd37fcf804ff8c704ca14d4a4ab403bab771779c38d5cc67e21eb1f9a483c","text":"framework.ExpectNoError(framework.VerifyServeHostnameServiceUp(cs, ns, host, podNames1, svc1IP, servicePort)) // Restart apiserver initialRestartCount, err := framework.GetApiserverRestartCount(cs) Expect(err).NotTo(HaveOccurred(), \"failed to get apiserver's restart count\") By(\"Restarting apiserver\") if err := framework.RestartApiserver(cs.Discovery()); err != nil { if err := framework.RestartApiserver(cs); err != nil { framework.Failf(\"error restarting apiserver: %v\", err) } By(\"Waiting for apiserver to be restarted\") if err := framework.WaitForApiserverRestarted(cs, initialRestartCount); err != nil { framework.Failf(\"error while waiting for apiserver to be restarted: %v\", err) } By(\"Waiting for apiserver to come up by polling /healthz\") if err := framework.WaitForApiserverUp(cs); err != nil { framework.Failf(\"error while waiting for apiserver up: %v\", err)"} {"_id":"q-en-kubernetes-91a3199cc3708fdd3890213945390c771560de5ff310d38c5cec64990b0e9e55","text":"serviceHasSynced cache.InformerSynced // nodeLister knows how to list nodes nodeLister corelisters.NodeLister // nodeHasSynced indicates whether nodes have been sync'd at least once. // Check this before trusting a response from the node lister. nodeHasSynced cache.InformerSynced // a list of node labels to register nodeLabels map[string]string"} {"_id":"q-en-kubernetes-91b28e4f471ab497bc1d28bee252a54898e7a67f0bb6a0e7ca4856173670cca1","text":"echo \"Prepare kube-addons manifests and start kube addon manager\" local -r src_dir=\"${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty\" local -r dst_dir=\"/etc/kubernetes/addons\" # prep the additional bindings that are particular to e2e users and groups setup-addon-manifests \"addons\" \"e2e-rbac-bindings\" # Set up manifests of other addons. if [[ \"${ENABLE_CLUSTER_MONITORING:-}\" == \"influxdb\" ]] || [[ \"${ENABLE_CLUSTER_MONITORING:-}\" == \"google\" ]] || "} {"_id":"q-en-kubernetes-91bbce143c59e6edc9d1cf267df92f82d75647c7c19f32dafdda38daee566e40","text":"\"context\" \"encoding/json\" \"fmt\" \"mime\" \"net/http\" \"net/url\" \"sort\""} {"_id":"q-en-kubernetes-91c71d2f57c6688994674e2b0d54365cf384190e1f91904fea33317f3fa521e2","text":"echo ${short_hash:0:5} } # Pedantically kill, wait-on and remove a container. The -f -v options # to rm don't actually seem to get the job done, so force kill the # container, wait to ensure it's stopped, then try the remove. This is # a workaround for bug https://github.com/docker/docker/issues/3968. function kube::build::destroy_container() { \"${DOCKER[@]}\" kill \"$1\" >/dev/null 2>&1 || true \"${DOCKER[@]}\" wait \"$1\" >/dev/null 2>&1 || true \"${DOCKER[@]}\" rm -f -v \"$1\" >/dev/null 2>&1 || true } # --------------------------------------------------------------------------- # Building"} {"_id":"q-en-kubernetes-92107579e54d96400b617b596f54e43e809d8c4aca2e3eed9f48d3018b8306a8","text":"\"k8s.io/client-go/tools/cache\" \"k8s.io/client-go/tools/record\" cloudprovider \"k8s.io/cloud-provider\" csilibplugins \"k8s.io/csi-translation-lib/plugins\" proxyutil \"k8s.io/kubernetes/pkg/proxy/util\" . \"k8s.io/kubernetes/pkg/volume\" \"k8s.io/kubernetes/pkg/volume/util/hostutil\""} {"_id":"q-en-kubernetes-923f7a01728f7eefd81183197eb1e34dd14d98d01db31b3ce848e2969018e5ed","text":"// ResourceConfiguration stores per resource configuration. type ResourceConfiguration struct { // resources is a list of kubernetes resources which have to be encrypted. // resources is a list of kubernetes resources which have to be encrypted. The resource names are derived from `resource` or `resource.group` of the group/version/resource. // eg: pandas.awesome.bears.example is a custom resource with 'group': awesome.bears.example, 'resource': pandas) Resources []string // providers is a list of transformers to be used for reading and writing the resources to disk. // eg: aesgcm, aescbc, secretbox, identity."} {"_id":"q-en-kubernetes-92618f9008bfb67b8195de8208c30a4726f24c48504df0cd40f940aeab112be8","text":"registry = \"k8s.gcr.io/build-image\", repository = \"debian-base\", # Ensure the digests above are updated to match a new tag tag = \"buster-v1.3.0\", # ignored, but kept here for documentation tag = \"buster-v1.4.0\", # ignored, but kept here for documentation ) container_pull("} {"_id":"q-en-kubernetes-92620ae8f83e66e75708e6c8a93876ad52d1b44ed51cd73e94803198f6e5dc76","text":" /* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package network import ( \"fmt\" \"strings\" \"time\" \"github.com/onsi/ginkgo\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/intstr\" clientset \"k8s.io/client-go/kubernetes\" \"k8s.io/kubernetes/test/e2e/framework\" e2enode \"k8s.io/kubernetes/test/e2e/framework/node\" e2epod \"k8s.io/kubernetes/test/e2e/framework/pod\" e2eservice \"k8s.io/kubernetes/test/e2e/framework/service\" e2eskipper \"k8s.io/kubernetes/test/e2e/framework/skipper\" ) const ( serviceName = \"svc-udp\" podClient = \"pod-client\" podBackend1 = \"pod-server-1\" podBackend2 = \"pod-server-2\" srcPort = 12345 ) // Linux NAT uses conntrack to perform NAT, everytime a new // flow is seen, a connection is created in the conntrack table, and it // is being used by the NAT module. // Each entry in the conntrack table has associated a timeout, that removes // the connection once it expires. // UDP is a connectionless protocol, so the conntrack module tracking functions // are not very advanced. // It uses a short timeout (30 sec by default) that is renewed if there are new flows // matching the connection. Otherwise it expires the entry. // This behaviour can cause issues in Kubernetes when one entry on the conntrack table // is never expired because the sender does not stop sending traffic, but the pods or // endpoints were deleted, blackholing the traffic // In order to mitigate this problem, Kubernetes delete the stale entries: // - when an endpoint is removed // - when a service goes from no endpoints to new endpoint // Ref: https://api.semanticscholar.org/CorpusID:198903401 // Boye, Magnus. “Netfilter Connection Tracking and NAT Implementation.” (2012). var _ = SIGDescribe(\"Conntrack\", func() { fr := framework.NewDefaultFramework(\"conntrack\") type nodeInfo struct { name string nodeIP string } var ( cs clientset.Interface ns string clientNodeInfo, serverNodeInfo nodeInfo ) ginkgo.BeforeEach(func() { cs = fr.ClientSet ns = fr.Namespace.Name nodes, err := e2enode.GetBoundedReadySchedulableNodes(cs, 2) framework.ExpectNoError(err) if len(nodes.Items) < 2 { e2eskipper.Skipf( \"Test requires >= 2 Ready nodes, but there are only %v nodes\", len(nodes.Items)) } ips := e2enode.CollectAddresses(nodes, v1.NodeInternalIP) clientNodeInfo = nodeInfo{ name: nodes.Items[0].Name, nodeIP: ips[0], } serverNodeInfo = nodeInfo{ name: nodes.Items[1].Name, nodeIP: ips[1], } }) ginkgo.It(\"should be able to preserve UDP traffic when server pod cycles for a NodePort service\", func() { // Create a NodePort service udpJig := e2eservice.NewTestJig(cs, ns, serviceName) ginkgo.By(\"creating a UDP service \" + serviceName + \" with type=NodePort in \" + ns) udpService, err := udpJig.CreateUDPService(func(svc *v1.Service) { svc.Spec.Type = v1.ServiceTypeNodePort svc.Spec.Ports = []v1.ServicePort{ {Port: 80, Name: \"udp\", Protocol: v1.ProtocolUDP, TargetPort: intstr.FromInt(80)}, } }) framework.ExpectNoError(err) // Create a pod in one node to create the UDP traffic against the NodePort service every 5 seconds ginkgo.By(\"creating a client pod for probing the service \" + serviceName) clientPod := newAgnhostPod(podClient, \"\") clientPod.Spec.NodeName = clientNodeInfo.name cmd := fmt.Sprintf(`date; for i in $(seq 1 300); do echo \"$(date) Try: ${i}\"; echo hostname | nc -u -w 5 -p %d %s %d; echo; done`, srcPort, serverNodeInfo.nodeIP, udpService.Spec.Ports[0].NodePort) clientPod.Spec.Containers[0].Command = []string{\"/bin/sh\", \"-c\", cmd} clientPod.Spec.Containers[0].Name = podClient fr.PodClient().CreateSync(clientPod) // Read the client pod logs logs, err := e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) // Add a backend pod to the service in the other node ginkgo.By(\"creating a backend pod \" + podBackend1 + \" for the service \" + serviceName) serverPod1 := newAgnhostPod(podBackend1, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod1.Labels = udpJig.Labels serverPod1.Spec.NodeName = serverNodeInfo.name fr.PodClient().CreateSync(serverPod1) // Waiting for service to expose endpoint. err = validateEndpointsPorts(cs, ns, serviceName, portsByPodName{podBackend1: {80}}) framework.ExpectNoError(err, \"failed to validate endpoints for service %s in namespace: %s\", serviceName, ns) // Check that the pod receives the traffic // UDP conntrack entries timeout is 30 sec by default ginkgo.By(\"checking client pod connected to the backend 1 on Node IP \" + serverNodeInfo.nodeIP) time.Sleep(30 * time.Second) logs, err = e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) if !strings.Contains(string(logs), podBackend1) { framework.Failf(\"Failed to connecto to backend 1\") } // Create a second pod ginkgo.By(\"creating a second backend pod \" + podBackend2 + \" for the service \" + serviceName) serverPod2 := newAgnhostPod(podBackend2, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod2.Labels = udpJig.Labels serverPod2.Spec.NodeName = serverNodeInfo.name fr.PodClient().CreateSync(serverPod2) // and delete the first pod framework.Logf(\"Cleaning up %s pod\", podBackend1) fr.PodClient().DeleteSync(podBackend1, metav1.DeleteOptions{}, framework.DefaultPodDeletionTimeout) // Check that the second pod keeps receiving traffic // UDP conntrack entries timeout is 30 sec by default ginkgo.By(\"checking client pod connected to the backend 2 on Node IP \" + serverNodeInfo.nodeIP) time.Sleep(30 * time.Second) logs, err = e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) if !strings.Contains(string(logs), podBackend2) { framework.Failf(\"Failed to connecto to backend 2\") } }) ginkgo.It(\"should be able to preserve UDP traffic when server pod cycles for a ClusterIP service\", func() { // Create a NodePort service udpJig := e2eservice.NewTestJig(cs, ns, serviceName) ginkgo.By(\"creating a UDP service \" + serviceName + \" with type=ClusterIP in \" + ns) udpService, err := udpJig.CreateUDPService(func(svc *v1.Service) { svc.Spec.Type = v1.ServiceTypeClusterIP svc.Spec.Ports = []v1.ServicePort{ {Port: 80, Name: \"udp\", Protocol: v1.ProtocolUDP, TargetPort: intstr.FromInt(80)}, } }) framework.ExpectNoError(err) // Create a pod in one node to create the UDP traffic against the NodePort service every 5 seconds ginkgo.By(\"creating a client pod for probing the service \" + serviceName) clientPod := newAgnhostPod(podClient, \"\") clientPod.Spec.NodeName = clientNodeInfo.name cmd := fmt.Sprintf(`date; for i in $(seq 1 300); do echo \"$(date) Try: ${i}\"; echo hostname | nc -u -w 5 -p %d %s %d; echo; done`, srcPort, udpService.Spec.ClusterIP, udpService.Spec.Ports[0].Port) clientPod.Spec.Containers[0].Command = []string{\"/bin/sh\", \"-c\", cmd} clientPod.Spec.Containers[0].Name = podClient fr.PodClient().CreateSync(clientPod) // Read the client pod logs logs, err := e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) // Add a backend pod to the service in the other node ginkgo.By(\"creating a backend pod \" + podBackend1 + \" for the service \" + serviceName) serverPod1 := newAgnhostPod(podBackend1, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod1.Labels = udpJig.Labels serverPod1.Spec.NodeName = serverNodeInfo.name fr.PodClient().CreateSync(serverPod1) // Waiting for service to expose endpoint. err = validateEndpointsPorts(cs, ns, serviceName, portsByPodName{podBackend1: {80}}) framework.ExpectNoError(err, \"failed to validate endpoints for service %s in namespace: %s\", serviceName, ns) // Check that the pod receives the traffic // UDP conntrack entries timeout is 30 sec by default ginkgo.By(\"checking client pod connected to the backend 1 on Node IP \" + serverNodeInfo.nodeIP) time.Sleep(30 * time.Second) logs, err = e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) if !strings.Contains(string(logs), podBackend1) { framework.Failf(\"Failed to connecto to backend 1\") } // Create a second pod ginkgo.By(\"creating a second backend pod \" + podBackend2 + \" for the service \" + serviceName) serverPod2 := newAgnhostPod(podBackend2, \"netexec\", fmt.Sprintf(\"--udp-port=%d\", 80)) serverPod2.Labels = udpJig.Labels serverPod2.Spec.NodeName = serverNodeInfo.name fr.PodClient().CreateSync(serverPod2) // and delete the first pod framework.Logf(\"Cleaning up %s pod\", podBackend1) fr.PodClient().DeleteSync(podBackend1, metav1.DeleteOptions{}, framework.DefaultPodDeletionTimeout) // Check that the second pod keeps receiving traffic // UDP conntrack entries timeout is 30 sec by default ginkgo.By(\"checking client pod connected to the backend 2 on Node IP \" + serverNodeInfo.nodeIP) time.Sleep(30 * time.Second) logs, err = e2epod.GetPodLogs(cs, ns, podClient, podClient) framework.ExpectNoError(err) framework.Logf(\"Pod client logs: %s\", logs) if !strings.Contains(string(logs), podBackend2) { framework.Failf(\"Failed to connecto to backend 2\") } }) }) "} {"_id":"q-en-kubernetes-92743c6358e0bad6ac9d7d238a92ee22571b88ffaefaedc04c71c8086c6a496e","text":"return \"\", err } if _, err := os.Stat(filepath.Join(*k8sBinDir, bin)); err != nil { return \"\", fmt.Errorf(\"Could not find %s under directory %s.\", bin, absPath) return \"\", fmt.Errorf(\"Could not find kube-apiserver under directory %s.\", absPath) } return filepath.Join(absPath, bin), nil }"} {"_id":"q-en-kubernetes-92aba47a49f2bb5b00191424b531674b36a0131c6285e4b059d802eb0b43cfce","text":"- Ingress - Egress ``` ### Negative caching The `denial` cache TTL has been reduced to the minimum of 5 seconds [here](https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L37). In the unlikely event that this impacts performance, setting this TTL to a higher value make help alleviate issues, but be aware that operations that rely on DNS polling for orchestration may fail (for example operators with StatefulSets). "} {"_id":"q-en-kubernetes-92b07e258327c702b113d679e8227626af70349fa8d0c3ba02d8de545eff6bde","text":"if [[ \"${master}\" == \"true\" && \"${MASTER_OS_DISTRIBUTION}\" == \"gci\" ]] || [[ \"${master}\" == \"false\" && \"${NODE_OS_DISTRIBUTION}\" == \"gci\" ]]; then cat >>$file < VOLUME_PLUGIN_DIR: $(yaml-quote ${VOLUME_PLUGIN_DIR:-/home/kubernetes/flexvolume}) VOLUME_PLUGIN_DIR: $(yaml-quote ${VOLUME_PLUGIN_DIR:-/etc/srv/kubernetes/kubelet-plugins/volume/exec}) EOF fi"} {"_id":"q-en-kubernetes-92b3f3efe33931a6178c3e2997ba6b83a7e2a2dc64936e51ef2be6f23b1a6429","text":"readonly node_logfiles=\"kube-proxy\" readonly aws_logfiles=\"cloud-init-output\" readonly gce_logfiles=\"startupscript\" readonly common_logfiles=\"kern\" readonly kern_logfile=\"kern\" readonly initd_logfiles=\"docker\" readonly supervisord_logfiles=\"kubelet supervisor/supervisord supervisor/kubelet-stdout supervisor/kubelet-stderr supervisor/docker-stdout supervisor/docker-stderr\""} {"_id":"q-en-kubernetes-92b83be58a3423a3d14d59c74ecb197980725ffcd0c8783f644cff67c0cb806e","text":"} } } func TestGetRbdImageInfo(t *testing.T) { tmpDir, err := utiltesting.MkTmpdir(\"rbd_test\") if err != nil { t.Fatalf(\"error creating temp dir: %v\", err) } defer os.RemoveAll(tmpDir) for i, c := range []struct { DeviceMountPath string TargetRbdImageInfo *rbdImageInfo }{ { DeviceMountPath: fmt.Sprintf(\"%s/plugins/kubernetes.io/rbd/rbd/pool1-image-image1\", tmpDir), TargetRbdImageInfo: &rbdImageInfo{pool: \"pool1\", name: \"image1\"}, }, { DeviceMountPath: fmt.Sprintf(\"%s/plugins/kubernetes.io/rbd/mounts/pool2-image-image2\", tmpDir), TargetRbdImageInfo: &rbdImageInfo{pool: \"pool2\", name: \"image2\"}, }, } { rbdImageInfo, err := getRbdImageInfo(c.DeviceMountPath) if err != nil { t.Errorf(\"Case %d: getRbdImageInfo failed: %v\", i, err) continue } if !reflect.DeepEqual(rbdImageInfo, c.TargetRbdImageInfo) { t.Errorf(\"Case %d: unexpected RbdImageInfo, wanted %v, got %v\", i, c.TargetRbdImageInfo, rbdImageInfo) } } } "} {"_id":"q-en-kubernetes-9345ac39a77107687b5b29a10e081ec8110cb0ab456b04e3a850b06465c685cd","text":"\"k8s.io/apimachinery/pkg/util/strategicpatch\" core \"k8s.io/client-go/testing\" \"time\" ) func TestRealHistory_ListControllerRevisions(t *testing.T) {"} {"_id":"q-en-kubernetes-935a674b6f0846aa008c9e64c6b59be3b89ea60a35b52057b71ebf1bf3c47cef","text":"### Hook Handler Implementations Hook handlers are the way that hooks are surfaced to containers.  Containers can select the type of hook handler they would like to implement.  Kubernetes currently supports two different hook handler types: * Exec - Executes a specific command (e.g. pre-stop.sh) inside the cgroup and namespaces of the container.  Resources consumed by the command are counted against the container.  Commands which return non-zero values are treated as container failures (and will cause kubelet to forcibly restart the container).  Parameters are passed to the command as traditional linux command line flags (e.g. pre-stop.sh --reason=HEALTH) * Exec - Executes a specific command (e.g. pre-stop.sh) inside the cgroup and namespaces of the container.  Resources consumed by the command are counted against the container.  Commands which print \"ok\" to standard out (stdout) are treated as healthy, any other output is treated as container failures (and will cause kubelet to forcibly restart the container).  Parameters are passed to the command as traditional linux command line flags (e.g. pre-stop.sh --reason=HEALTH) * HTTP - Executes an HTTP request against a specific endpoint on the container.  HTTP error codes (5xx) and non-response/failure to connect are treated as container failures. Parameters are passed to the http endpoint as query args (e.g. http://some.server.com/some/path?reason=HEALTH)"} {"_id":"q-en-kubernetes-935a80e9380fb718b6022ed1a33deb275424039d5d4580430665f5fad71fa4a9","text":"func rcByNameContainer(name string, replicas int, image string, labels map[string]string, c api.Container) *api.ReplicationController { // Add \"name\": name to the labels, overwriting if it exists. labels[\"name\"] = name gracePeriod := int64(0) return &api.ReplicationController{ TypeMeta: unversioned.TypeMeta{ Kind: \"ReplicationController\","} {"_id":"q-en-kubernetes-93816507baee97d6583b60234241b114f8a7263c4e7163179ff32ca694fe2ff2","text":"} if kernelVersion.LessThan(version.MustParseGeneric(connReuseMinSupportedKernelVersion)) { klog.ErrorS(nil, fmt.Sprintf(\"can't set sysctl %s, kernel version must be at least %s\", sysctlConnReuse, connReuseMinSupportedKernelVersion)) } else if kernelVersion.AtLeast(version.MustParseGeneric(connReuseFixedKernelVersion)) { // https://github.com/kubernetes/kubernetes/issues/93297 klog.V(2).InfoS(\"Left as-is\", \"sysctl\", sysctlConnReuse) } else { // Set the connection reuse mode if err := utilproxy.EnsureSysctl(sysctl, sysctlConnReuse, 0); err != nil {"} {"_id":"q-en-kubernetes-93b1720a67957e573b7fbca288d2491833fedcc0b71eb5a798db8a3d71c07ce0","text":"mkdir -p \"${download_path}\" if [[ $(which gsutil) ]] && [[ \"$url\" =~ ^https://storage.googleapis.com/.* ]]; then gsutil cp \"${url//'https://storage.googleapis.com/'/'gs://'}\" \"${download_path}/${file}\" gsutil cp \"${url//'https://storage.googleapis.com/'/gs://}\" \"${download_path}/${file}\" elif [[ $(which curl) ]]; then # if the url belongs to GCS API we should use oauth2_token in the headers curl_headers=\"\""} {"_id":"q-en-kubernetes-93de0853518d296b8addb0a0f44e08ef96bd2464541fc7c375812a5d98ec1725","text":"Expect(err).ToNot(HaveOccurred()) podZone := node.Labels[apis.LabelZoneFailureDomain] // TODO (verult) Consider using node taints to simulate zonal failure instead. By(\"deleting instance group belonging to pod's zone\") // Asynchronously detect a pod reschedule is triggered during/after instance group deletion. waitStatus := make(chan error) go func() { waitStatus <- waitForStatefulSetReplicasNotReady(statefulSet.Name, ns, c) }() cloud, err := gce.GetGCECloud() if err != nil { Expect(err).NotTo(HaveOccurred()) } instanceGroupName := framework.TestContext.CloudConfig.NodeInstanceGroup instanceGroup, err := cloud.GetInstanceGroup(instanceGroupName, podZone) Expect(err).NotTo(HaveOccurred(), \"Error getting instance group %s in zone %s\", instanceGroupName, podZone) templateName, err := framework.GetManagedInstanceGroupTemplateName(podZone) Expect(err).NotTo(HaveOccurred(), \"Error getting instance group template in zone %s\", podZone) err = framework.DeleteManagedInstanceGroup(podZone) Expect(err).NotTo(HaveOccurred(), \"Error deleting instance group in zone %s\", podZone) By(\"tainting nodes in the zone the pod is scheduled in\") selector := labels.SelectorFromSet(labels.Set(map[string]string{apis.LabelZoneFailureDomain: podZone})) nodesInZone, err := c.CoreV1().Nodes().List(metav1.ListOptions{LabelSelector: selector.String()}) Expect(err).ToNot(HaveOccurred()) removeTaintFunc := addTaint(c, ns, nodesInZone.Items, podZone) defer func() { framework.Logf(\"recreating instance group %s\", instanceGroup.Name) framework.ExpectNoError(framework.CreateManagedInstanceGroup(instanceGroup.Size, podZone, templateName), \"Error recreating instance group %s in zone %s\", instanceGroup.Name, podZone) framework.ExpectNoError(framework.WaitForReadyNodes(c, nodeCount, framework.RestartNodeReadyAgainTimeout), \"Error waiting for nodes from the new instance group to become ready.\") framework.Logf(\"removing previously added node taints\") removeTaintFunc() }() err = <-waitStatus Expect(err).ToNot(HaveOccurred(), \"Error waiting for replica to be deleted during failover: %v\", err) By(\"deleting StatefulSet pod\") err = c.CoreV1().Pods(ns).Delete(pod.Name, &metav1.DeleteOptions{}) // Verify the pod is scheduled in the other zone. By(\"verifying the pod is scheduled in a different zone.\") var otherZone string if cloudZones[0] == podZone { otherZone = cloudZones[1] } else { otherZone = cloudZones[0] } err = wait.PollImmediate(framework.Poll, statefulSetReadyTimeout, func() (bool, error) { framework.Logf(\"checking whether new pod is scheduled in zone %q\", otherZone) pod = getPod(c, ns, regionalPDLabels) nodeName = pod.Spec.NodeName node, err = c.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{}) if err != nil { return false, nil } newPodZone := node.Labels[apis.LabelZoneFailureDomain] return newPodZone == otherZone, nil }) Expect(err).NotTo(HaveOccurred(), \"Error waiting for pod to be scheduled in a different zone (%q): %v\", otherZone, err) err = framework.WaitForStatefulSetReplicasReady(statefulSet.Name, ns, c, 3*time.Second, framework.RestartPodReadyAgainTimeout) if err != nil {"} {"_id":"q-en-kubernetes-93f17d6e2cb4bf0817e42e37b36fef28ff5294627170246125a74f60f283597e","text":"cp \"${src_file}\" /etc/kubernetes/manifests } # Starts k8s cluster autoscaler. start_cluster_autoscaler() { if [ \"${ENABLE_NODE_AUTOSCALER:-}\" = \"true\" ]; then # Remove salt comments and replace variables with values src_file=\"${kube_home}/kube-manifests/kubernetes/gci-trusty/cluster-autoscaler.manifest\" remove_salt_config_comments \"${src_file}\" local params=`sed 's/^/\"/;s/ /\",\"/g;s/$/\",/' <<< \"${AUTOSCALER_MIG_CONFIG}\"` sed -i -e \"s@\"{{param}}\",@${params}@g\" \"${src_file}\" sed -i -e \"s@{%.*%}@@g\" \"${src_file}\" cp \"${src_file}\" /etc/kubernetes/manifests fi } # Starts a fluentd static pod for logging. start_fluentd() { if [ \"${ENABLE_NODE_LOGGING:-}\" = \"true\" ]; then"} {"_id":"q-en-kubernetes-93f38e1f38c89bf4240f1c3d70513fe4e3713350f280b631be4cfa0d14cf19a7","text":"// Will operate in the host mount namespace if kubelet is running in a container. // Error is returned on any other error than \"file not found\". ExistsPath(pathname string) (bool, error) // EvalHostSymlinks returns the path name after evaluating symlinks. // Will operate in the host mount namespace if kubelet is running in a container. EvalHostSymlinks(pathname string) (string, error) // CleanSubPaths removes any bind-mounts created by PrepareSafeSubpath in given // pod volume directory. CleanSubPaths(podDir string, volumeName string) error"} {"_id":"q-en-kubernetes-940386b6c522679b990d5f7fadeb1b62fc25bd5b14acfe2d17b7ea7267758640","text":"func GetNodeAddresses(node *v1.Node, addressType v1.NodeAddressType) (ips []string) { for j := range node.Status.Addresses { nodeAddress := &node.Status.Addresses[j] if nodeAddress.Type == addressType { if nodeAddress.Type == addressType && nodeAddress.Address != \"\" { ips = append(ips, nodeAddress.Address) } }"} {"_id":"q-en-kubernetes-9405089d2ba195518d1beb276e12e7a4e5ff9eefeb639d3fd71b09ed628b780e","text":"// SortControllerRevisions sorts revisions by their Revision. func SortControllerRevisions(revisions []*apps.ControllerRevision) { sort.Sort(byRevision(revisions)) sort.Stable(byRevision(revisions)) } // EqualRevision returns true if lhs and rhs are either both nil, or both point to non-nil ControllerRevisions that"} {"_id":"q-en-kubernetes-94db617fac4b7006c1c59d42d7d889bebe5ab182b326ab066c1c80a30992d1a6","text":"embed = [\":go_default_library\"], deps = [ \"//pkg/kubelet/cri/remote/fake:go_default_library\", \"//pkg/kubelet/cri/remote/util:go_default_library\", \"//staging/src/k8s.io/cri-api/pkg/apis:go_default_library\", \"//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library\", \"//vendor/github.com/stretchr/testify/assert:go_default_library\","} {"_id":"q-en-kubernetes-95228b5a246acc6e8b3f998063e1338e38a2572a47c77a724112c9e857597e71","text":"cmd.SetUsageFunc(func(cmd *cobra.Command) error { fmt.Fprintf(cmd.OutOrStderr(), usageFmt, cmd.UseLine()) cliflag.PrintSections(cmd.OutOrStderr(), namedFlagSets, cols) cliflag.PrintSections(cmd.OutOrStderr(), additionalFlags, cols) return nil }) cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { fmt.Fprintf(cmd.OutOrStdout(), \"%snn\"+usageFmt, cmd.Long, cmd.UseLine()) cliflag.PrintSections(cmd.OutOrStdout(), namedFlagSets, cols) cliflag.PrintSections(cmd.OutOrStdout(), additionalFlags, cols) }) return cmd"} {"_id":"q-en-kubernetes-95265eace8ca3a2e32f22c55fb2c1b018bccf45fb59bfaf772e40ea87b1eb6f8","text":"return p.Attach.Attach(\"POST\", req.URL(), p.Config, p.In, p.Out, p.Err, t.Raw, sizeQueue) } if !p.Quiet && stderr != nil { fmt.Fprintln(stderr, \"If you don't see a command prompt, try pressing enter.\") } if err := t.Safe(fn); err != nil { return err }"} {"_id":"q-en-kubernetes-9543782f9f12fa4559a6dede0c9ffea8636fbf6ca800c33763147df6802a3ef4","text":"deps = [ \"//pkg/kubelet/container:go_default_library\", \"//pkg/kubelet/container/testing:go_default_library\", \"//pkg/kubelet/metrics:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library\", \"//vendor/github.com/prometheus/client_model/go:go_default_library\", \"//vendor/github.com/stretchr/testify/assert:go_default_library\", ], )"} {"_id":"q-en-kubernetes-9577c72f65cedc865808a3680255942f22d772b914ee857d864a9bad5f14d58b","text":"\"k8s.io/klog\" ) var ( // ErrorNoAuth indicates that no credentials are provided. ErrorNoAuth = fmt.Errorf(\"no credentials provided for Azure cloud provider\") ) // AzureAuthConfig holds auth related part of cloud config type AzureAuthConfig struct { // The cloud environment identifier. Takes values from https://github.com/Azure/go-autorest/blob/ec5f4903f77ed9927ac95b19ab8e44ada64c1356/autorest/azure/environments.go#L13"} {"_id":"q-en-kubernetes-957f071ab3f013c13c1c88a8acf4e4c91db5f2282d8403e1158f3355d77c438c","text":"Containers: []v1.Container{ { Image: image.GetE2EImage(), Name: podName, Name: \"stat-container\", Command: []string{ \"powershell.exe\", \"-Command\","} {"_id":"q-en-kubernetes-95c3538aa6ab8387bc6396ea14c9edbaa931ecfdc8d673546b640129e05637f9","text":"GetProtocol() v1.Protocol // GetHealthCheckNodePort returns service health check node port if present. If return 0, it means not present. GetHealthCheckNodePort() int // GetNodePort returns a service Node port if present. If return 0, it means not present. GetNodePort() int } // Endpoint in an interface which abstracts information about an endpoint."} {"_id":"q-en-kubernetes-95c58e1230e051455e52970857e78f2c2a51ca86f779d02394eca54298f5f413","text":"timedout := make(chan bool) go func() { time.Sleep(gracefulWait) timedout <- true close(timedout) }() go func() { select {"} {"_id":"q-en-kubernetes-95df3ef735676da7abf5dda22ef31f3b5764483ebf74ad4e263e015f69503fc5","text":"import ( \"fmt\" \"os\" \"path/filepath\" \"strings\" \"github.com/golang/glog\""} {"_id":"q-en-kubernetes-961763de8b7afa4c0b02b8b173c4aca9ed5c1249b2b8cf1db5662f4b6843feee","text":"}) It(\"verify monitoring pods and all cluster nodes are available on influxdb using heapster.\", func() { if testContext.Provider != \"gce\" { if !providerIs(\"gce\") { By(fmt.Sprintf(\"Skipping Monitoring test, which is only supported for provider gce (not %s)\", testContext.Provider)) return"} {"_id":"q-en-kubernetes-961ac5c2985441ac4ed7f0ecc434c3f823b052e5b259095d44f5a34126863c8d","text":"serviceConfig.RegisterEventHandler(s.Proxier) go serviceConfig.Run(wait.NeverStop) if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice) { if s.UseEndpointSlices { endpointSliceConfig := config.NewEndpointSliceConfig(informerFactory.Discovery().V1beta1().EndpointSlices(), s.ConfigSyncPeriod) endpointSliceConfig.RegisterEventHandler(s.Proxier) go endpointSliceConfig.Run(wait.NeverStop)"} {"_id":"q-en-kubernetes-96452bb278782147452f76fa8973789650a789cd6eac47a241599f2239b2c129","text":"annotations: storageclass.beta.kubernetes.io/is-default-class: \"true\" labels: addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: EnsureExists provisioner: kubernetes.io/host-path"} {"_id":"q-en-kubernetes-96a58620b58fcfcd6bc0773da4a5dc959037b7274515deb88f78ae5f902afaa6","text":"get(t, \"valid TLS cert again\", false) } func TestConcurrentUpdateTransportConfig(t *testing.T) { n := time.Now() now := func() time.Time { return n } env := []string{\"\"} environ := func() []string { s := make([]string, len(env)) copy(s, env) return s } c := api.ExecConfig{ Command: \"./testdata/test-plugin.sh\", APIVersion: \"client.authentication.k8s.io/v1alpha1\", } a, err := newAuthenticator(newCache(), &c) if err != nil { t.Fatal(err) } a.environ = environ a.now = now a.stderr = ioutil.Discard stopCh := make(chan struct{}) defer close(stopCh) numConcurrent := 2 for i := 0; i < numConcurrent; i++ { go func() { for { tc := &transport.Config{} a.UpdateTransportConfig(tc) select { case <-stopCh: return default: continue } } }() } time.Sleep(2 * time.Second) } // genClientCert generates an x509 certificate for testing. Certificate and key // are returned in PEM encoding. func genClientCert(t *testing.T) ([]byte, []byte) {"} {"_id":"q-en-kubernetes-96a79def1d0d1a3b3b3c00c2f4cb2a19cfe4ed8e5b02b145827aded5ee34a843","text":" apiVersion: extensions/v1beta1 apiVersion: apps/v1 kind: DaemonSet metadata: name: nvidia-gpu-device-plugin"} {"_id":"q-en-kubernetes-96bf0cb11c24496f34756412935817aa0c22f8c4f3640c5c7a0069ad0b7bb0fd","text":"fmt.Fprint(out, \"n\") } func printMissingMetricsNodeLine(out io.Writer, nodeName string) { printValue(out, nodeName) unknownMetricsStatus := \"\" for i := 0; i < len(MeasuredResources); i++ { printValue(out, unknownMetricsStatus) printValue(out, \"t\") printValue(out, unknownMetricsStatus) printValue(out, \"t\") } fmt.Fprint(out, \"n\") } func printValue(out io.Writer, value interface{}) { fmt.Fprintf(out, \"%vt\", value) }"} {"_id":"q-en-kubernetes-96d9e05f369fcc20609eab1df50252f2664cec1161fff63917f06fcea4578388","text":"import ( \"context\" \"fmt\" \"math/rand\" \"strings\" \"time\" v1 \"k8s.io/api/core/v1\""} {"_id":"q-en-kubernetes-972480b799835319e79f426057c0f3ab842b1766c6eff29ec453803ba22102c6","text":"// Ensure all of the pods that we found on this node before the reboot are // running / healthy. if !checkPodsRunningReady(c, ns, podNames, rebootPodReadyAgainTimeout) { newPods := ps.List() printStatusAndLogsForNotReadyPods(c, pods, newPods) return false }"} {"_id":"q-en-kubernetes-97841307970fc4c3a76d20aeb9714b48f4ac302c42e29261356da2d85cc6436e","text":"\"reason\": \"FailedScheduling\", }.AsSelector()) expectNoError(err) // If we failed to find event with a capitalized first letter of reason // try looking for one starting with a small one for backward compatibility. // If we don't do it we end up in #15806. // TODO: remove this block when we don't care about supporting v1.0 too much. if len(schedEvents.Items) == 0 { schedEvents, err = c.Events(ns).List( labels.Everything(), fields.Set{ \"involvedObject.kind\": \"Pod\", \"involvedObject.name\": podName, \"involvedObject.namespace\": ns, \"source\": \"scheduler\", \"reason\": \"failedScheduling\", }.AsSelector()) expectNoError(err) } printed := false printOnce := func(msg string) string {"} {"_id":"q-en-kubernetes-97aeb43cbcfebe3d7e45367081df6cb1dc231e7a84c06e2e7acc1421de861075","text":"import ( \"fmt\" \"net\" \"os\" \"strconv\" \"strings\" \"testing\""} {"_id":"q-en-kubernetes-97d25bcb5bcb02b65b6b05ad5491508b270f00875aeae81bb91a431d886a8dc3","text":"serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder) isIPv6 := ipt.IsIPv6() var incorrectAddresses []string nodePortAddresses, incorrectAddresses = utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, isIPv6) if len(incorrectAddresses) > 0 { klog.Warning(\"NodePortAddresses of wrong family; \", incorrectAddresses) } proxier := &Proxier{ portsMap: make(map[utilproxy.LocalPort]utilproxy.Closeable), serviceMap: make(proxy.ServiceMap),"} {"_id":"q-en-kubernetes-980d2df2f7941661651ba968f0ef0457b805ef3cfd0c96a16ff8984f0dd0d908","text":"go_library( name = \"go_default_library\", srcs = [ \"bindata.go\", \"main.go\", \":bindata\", ], ) genrule( name = \"bindata\", srcs = [ \"//examples:sources\", \"//test/images:sources\", \"//test/fixtures:sources\", \"//test/e2e/testing-manifests:sources\", ], outs = [\"bindata.go\"], cmd = \"\"\" $(location //vendor:github.com/jteeuwen/go-bindata/go-bindata) -nometadata -o \"$(OUTS)\" -pkg generated -prefix $$(pwd) -ignore .jpg -ignore .png -ignore .md $(SRCS) \"\"\", tools = [ \"//vendor:github.com/jteeuwen/go-bindata/go-bindata\", ], tags = [\"automanaged\"], )"} {"_id":"q-en-kubernetes-98265b155578a94de2d8391a7d4a48d899ff560bac6662052e09cd4dbd93a80c","text":"ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Start to follow the container's log. fileName := file.Name() go func(ctx context.Context) { podLogOptions := v1.PodLogOptions{ Follow: true, } opts := NewLogOptions(&podLogOptions, time.Now()) ReadLogs(ctx, file.Name(), containerID, opts, fakeRuntimeService, stdoutBuf, stderrBuf) _ = ReadLogs(ctx, fileName, containerID, opts, fakeRuntimeService, stdoutBuf, stderrBuf) }(ctx) // log in stdout"} {"_id":"q-en-kubernetes-989bbde8d227797953a8f4fd3865ff2a6e64fdf5d7999e646ff43deb9ba82519","text":"return nc.evictionLimiterQPS } // ReducedQPSFunc returns the QPS for when a the cluster is large make // ReducedQPSFunc returns the QPS for when the cluster is large make // evictions slower, if they're small stop evictions altogether. func (nc *Controller) ReducedQPSFunc(nodeNum int) float32 { if int32(nodeNum) > nc.largeClusterThreshold {"} {"_id":"q-en-kubernetes-98b98ebfc8e72bdd15c13a474bfe70bd078df8ff7afdaa649a069f534356f8b6","text":"name = \"go_default_test\", srcs = [\"healthz_test.go\"], embed = [\":go_default_library\"], deps = [ \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\", ], ) go_library("} {"_id":"q-en-kubernetes-98bc6556d7f3a8f24abd0676961aa299639e10ed8dcea635ab43d4b08033862f","text":"}, } var betaTest *testsuites.StorageClassTest for i, t := range tests { // Beware of closure, use local variables instead of those from // outer scope"} {"_id":"q-en-kubernetes-98d44487b5668a5f53df99f195813b0951c6d35860639aa5986ce72755df7202","text":"t.Errorf(\"No client request should have been made\") } } // TestAdmissionNamespaceExistsUnknownToHandler func TestAdmissionNamespaceExistsUnknownToHandler(t *testing.T) { namespace := \"test\" mockClient := &client.Fake{ Err: errors.NewAlreadyExists(\"namespaces\", namespace), } store := cache.NewStore(cache.MetaNamespaceKeyFunc) handler := &provision{ client: mockClient, store: store, } pod := api.Pod{ ObjectMeta: api.ObjectMeta{Name: \"123\", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: \"vol\"}}, Containers: []api.Container{{Name: \"ctr\", Image: \"image\"}}, }, } err := handler.Admit(admission.NewAttributesRecord(&pod, namespace, \"pods\", \"CREATE\")) if err != nil { t.Errorf(\"Unexpected error returned from admission handler\") } } "} {"_id":"q-en-kubernetes-98db40faf68511f11736447debfb18b041695b510634831aadc506b9499efde0","text":"// will not need to be updated until new changes are applied (detach is triggered again) time.Sleep(100 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) // After the first detach fails, reconciler will wait for a period of time before retrying to detach. // The wait time is increasing exponentially from initial value of 0.5s (0.5, 1, 2, 4, ...). // The test here waits for 100 Millisecond to make sure it is in exponential backoff period after // the first detach operation. At this point, volumes status should not be updated time.Sleep(100 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeNoStatusUpdateNeeded(t, logger, generatedVolumeName, nodeName1, asw) // Wait for 600ms to make sure second detach operation triggered. Again, The volume will be // removed from being reported as attached on node status and then added back as attached. // The volume will be in the list of attached volumes that need to be updated to node status. time.Sleep(600 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) // Add a second pod which tries to attach the volume to the same node. // After adding pod to the same node, detach will not be triggered any more."} {"_id":"q-en-kubernetes-991a0cc7419cd89b7f84d2e7945b766273bb2bda91d4fb894682e992d77f79f6","text":" apiVersion: admissionregistration.k8s.io/v1alpha1 kind: ValidatingAdmissionPolicy metadata: annotations: annotationsKey: annotationsValue creationTimestamp: \"2008-01-01T01:01:01Z\" deletionGracePeriodSeconds: 10 deletionTimestamp: \"2009-01-01T01:01:01Z\" finalizers: - finalizersValue generateName: generateNameValue generation: 7 labels: labelsKey: labelsValue managedFields: - apiVersion: apiVersionValue fieldsType: fieldsTypeValue fieldsV1: {} manager: managerValue operation: operationValue subresource: subresourceValue time: \"2004-01-01T01:01:01Z\" name: nameValue namespace: namespaceValue ownerReferences: - apiVersion: apiVersionValue blockOwnerDeletion: true controller: true kind: kindValue name: nameValue uid: uidValue resourceVersion: resourceVersionValue selfLink: selfLinkValue uid: uidValue spec: auditAnnotations: - key: keyValue valueExpression: valueExpressionValue failurePolicy: failurePolicyValue matchConditions: - expression: expressionValue name: nameValue matchConstraints: excludeResourceRules: - apiGroups: - apiGroupsValue apiVersions: - apiVersionsValue operations: - operationsValue resourceNames: - resourceNamesValue resources: - resourcesValue scope: scopeValue matchPolicy: matchPolicyValue namespaceSelector: matchExpressions: - key: keyValue operator: operatorValue values: - valuesValue matchLabels: matchLabelsKey: matchLabelsValue objectSelector: matchExpressions: - key: keyValue operator: operatorValue values: - valuesValue matchLabels: matchLabelsKey: matchLabelsValue resourceRules: - apiGroups: - apiGroupsValue apiVersions: - apiVersionsValue operations: - operationsValue resourceNames: - resourceNamesValue resources: - resourcesValue scope: scopeValue paramKind: apiVersion: apiVersionValue kind: kindValue validations: - expression: expressionValue message: messageValue messageExpression: messageExpressionValue reason: reasonValue variables: null status: conditions: - lastTransitionTime: \"2004-01-01T01:01:01Z\" message: messageValue observedGeneration: 3 reason: reasonValue status: statusValue type: typeValue observedGeneration: 1 typeChecking: expressionWarnings: - fieldRef: fieldRefValue warning: warningValue "} {"_id":"q-en-kubernetes-991bfa0df38d7b6d69bfe41a50781c1f2c0fbdddc402c208ef55f15e7c1b5b2f","text":"return } func (az *azPublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) { if !az.rateLimiterReader.TryAccept() { err = createRateLimitErr(false, \"VMSSPublicIPGet\") return } klog.V(10).Infof(\"azPublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress(%q,%q): start\", resourceGroupName, publicIPAddressName) defer func() { klog.V(10).Infof(\"azPublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress(%q,%q): end\", resourceGroupName, publicIPAddressName) }() mc := newMetricContext(\"vmss_public_ip_addresses\", \"get\", resourceGroupName, az.client.SubscriptionID, \"\") result, err = az.client.GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) mc.Observe(err) return } func (az *azPublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) ([]network.PublicIPAddress, error) { if !az.rateLimiterReader.TryAccept() { return nil, createRateLimitErr(false, \"PublicIPList\")"} {"_id":"q-en-kubernetes-9982afcd4199a0e30dda450beb036b88d1bc86f3b2b2f3ad4be7286f14bc0a73","text":"return nil, err } res := metricObj.(*v1beta2.MetricValueList) var res *v1beta2.MetricValueList var ok bool if res, ok = metricObj.(*v1beta2.MetricValueList); !ok { return nil, fmt.Errorf(\"the custom metrics API server didn't return MetricValueList, the type is %v\", reflect.TypeOf(metricObj)) } return res, nil }"} {"_id":"q-en-kubernetes-999b4636edc0ed8d9ce206a995589f1df66a1ad88449ec5c37f2290de1596b43","text":"if protocol == \"udp\" { // TODO: It would be enough to pass 1s+epsilon to timeout, but unfortunately // busybox timeout doesn't support non-integer values. cmd = fmt.Sprintf(\"echo 'hostName' | nc -w 1 -u %s %d\", targetIP, targetPort) cmd = fmt.Sprintf(\"echo hostName | nc -w 1 -u %s %d\", targetIP, targetPort) } else { ipPort := net.JoinHostPort(targetIP, strconv.Itoa(targetPort)) // The current versions of curl included in CentOS and RHEL distros"} {"_id":"q-en-kubernetes-99a57b466d39325790f7acb7b692e1eda697b932c9efa649fe4da7b33b7c7c34","text":"} func mountPointsEqual(a, b *MountPoint) bool { if a.Device != b.Device || a.Path != b.Path || a.Type != b.Type || !slicesEqual(a.Opts, b.Opts) || a.Pass != b.Pass || a.Freq != b.Freq { if a.Device != b.Device || a.Path != b.Path || a.Type != b.Type || !reflect.DeepEqual(a.Opts, b.Opts) || a.Pass != b.Pass || a.Freq != b.Freq { return false } return true } func slicesEqual(a, b []string) bool { if len(a) != len(b) { return false } for i := range a { if a[i] != b[i] { return false } } return true } func TestGetMountRefs(t *testing.T) { fm := &FakeMounter{ MountPoints: []MountPoint{"} {"_id":"q-en-kubernetes-99cd58416e85601ae1c02fa9583ce6dff19e642192e8c2cb213d1fe00c2496f6","text":"} // Verify the proxy server logs saw the connection expectedProxyLog := fmt.Sprintf(\"Accepting CONNECT to %s\", strings.TrimRight(strings.TrimLeft(framework.TestContext.Host, \"https://\"), \"/api\")) expectedProxyLog := fmt.Sprintf(\"Accepting CONNECT to %s\", strings.TrimSuffix(strings.TrimPrefix(framework.TestContext.Host, \"https://\"), \"/api\")) proxyLog := proxyLogs.String() if !strings.Contains(proxyLog, expectedProxyLog) {"} {"_id":"q-en-kubernetes-99d35e6ff66d8241fd163312bb7fd9e796f74f675c8c79d853ce85310e38c881","text":"framework.ExpectNoError(err, \"error deleting Service\") return svc } // endpointSlicesEqual compare if the Endpoint and the EndpointSliceList contains the same endpoints values // as in addresses and ports, considering Ready and Unready addresses func endpointSlicesEqual(endpoints *v1.Endpoints, endpointSliceList *discoveryv1.EndpointSliceList) bool { // get the apiserver endpoint addresses epAddresses := sets.NewString() epPorts := sets.NewInt32() for _, subset := range endpoints.Subsets { for _, addr := range subset.Addresses { epAddresses.Insert(addr.IP) } for _, addr := range subset.NotReadyAddresses { epAddresses.Insert(addr.IP) } for _, port := range subset.Ports { epPorts.Insert(port.Port) } } framework.Logf(\"Endpoints addresses: %v , ports: %v\", epAddresses.List(), epPorts.List()) // Endpoints are single stack, and must match the primary IP family of the Service kubernetes.default // However, EndpointSlices can be IPv4 or IPv6, we can only compare the Slices that match the same IP family // framework.TestContext.ClusterIsIPv6() reports the IP family of the kubernetes.default service var addrType discoveryv1.AddressType if framework.TestContext.ClusterIsIPv6() { addrType = discoveryv1.AddressTypeIPv6 } else { addrType = discoveryv1.AddressTypeIPv4 } // get the apiserver addresses from the endpoint slice list sliceAddresses := sets.NewString() slicePorts := sets.NewInt32() for _, slice := range endpointSliceList.Items { if slice.AddressType != addrType { framework.Logf(\"Skipping slice %s: wanted %s family, got %s\", slice.Name, addrType, slice.AddressType) continue } for _, s := range slice.Endpoints { sliceAddresses.Insert(s.Addresses...) } for _, ports := range slice.Ports { if ports.Port != nil { slicePorts.Insert(*ports.Port) } } } framework.Logf(\"EndpointSlices addresses: %v , ports: %v\", sliceAddresses.List(), slicePorts.List()) if sliceAddresses.Equal(epAddresses) && slicePorts.Equal(epPorts) { return true } return false } "} {"_id":"q-en-kubernetes-99df29ea730fb11a83c6b490c6f031e43d534c8163d6696c3cce6bd658a3c495","text":"docs/user-guide/kubectl/kubectl_alpha.md docs/user-guide/kubectl/kubectl_alpha_diff.md docs/user-guide/kubectl/kubectl_annotate.md docs/user-guide/kubectl/kubectl_api-resources.md docs/user-guide/kubectl/kubectl_api-versions.md docs/user-guide/kubectl/kubectl_apply.md docs/user-guide/kubectl/kubectl_apply_edit-last-applied.md"} {"_id":"q-en-kubernetes-99df2f0270740022a532746a24ed9d7144f74862dd41c7283ee358de0dc3849a","text":"fs.MarkDeprecated(\"non-masquerade-cidr\", \"will be removed in a future version\") fs.BoolVar(&f.KeepTerminatedPodVolumes, \"keep-terminated-pod-volumes\", f.KeepTerminatedPodVolumes, \"Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.\") fs.MarkDeprecated(\"keep-terminated-pod-volumes\", \"will be removed in a future version\") fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, \"enable-cadvisor-json-endpoints\", f.EnableCAdvisorJSONEndpoints, \"Enable cAdvisor json /spec and /stats/* endpoints. [default=false]\") fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, \"enable-cadvisor-json-endpoints\", f.EnableCAdvisorJSONEndpoints, \"Enable cAdvisor json /spec and /stats/* endpoints. This flag has no effect on the /stats/summary endpoint. [default=false]\") // TODO: Remove this flag in 1.20+. https://github.com/kubernetes/kubernetes/issues/68522 fs.MarkDeprecated(\"enable-cadvisor-json-endpoints\", \"will be removed in a future version\") fs.BoolVar(&f.ReallyCrashForTesting, \"really-crash-for-testing\", f.ReallyCrashForTesting, \"If true, when panics occur crash. Intended for testing.\")"} {"_id":"q-en-kubernetes-99ff62c2022af1a3ed2e6bcdac5346cae6b5612ae4d3c5fc1ecc65360713a811","text":" ## JSON-Patch # JSON-Patch `jsonpatch` is a library which provides functionallity for both applying [RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). Provides the ability to modify and test a JSON according to a [RFC6902 JSON patch](http://tools.ietf.org/html/rfc6902) and [RFC7396 JSON Merge Patch](https://tools.ietf.org/html/rfc7396). [![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) [![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) [![Report Card](https://goreportcard.com/badge/github.com/evanphx/json-patch)](https://goreportcard.com/report/github.com/evanphx/json-patch) *Version*: **1.0** # Get It! [![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) **Latest and greatest**: ```bash go get -u github.com/evanphx/json-patch ``` [![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) **Stable Versions**: * Version 3: `go get -u gopkg.in/evanphx/json-patch.v3` (previous versions below `v3` are unavailable) # Use It! * [Create and apply a merge patch](#create-and-apply-a-merge-patch) * [Create and apply a JSON Patch](#create-and-apply-a-json-patch) * [Comparing JSON documents](#comparing-json-documents) * [Combine merge patches](#combine-merge-patches) ## Create and apply a merge patch Given both an original JSON document and a modified JSON document, you can create a [Merge Patch](https://tools.ietf.org/html/rfc7396) document. It can describe the changes needed to convert from the original to the modified JSON document. Once you have a merge patch, you can apply it to other JSON documents using the `jsonpatch.MergePatch(document, patch)` function. ```go package main import ( \"fmt\" jsonpatch \"github.com/evanphx/json-patch\" ) func main() { // Let's create a merge patch from these two documents... original := []byte(`{\"name\": \"John\", \"age\": 24, \"height\": 3.21}`) target := []byte(`{\"name\": \"Jane\", \"age\": 24}`) patch, err := jsonpatch.CreateMergePatch(original, target) if err != nil { panic(err) } // Now lets apply the patch against a different JSON document... alternative := []byte(`{\"name\": \"Tina\", \"age\": 28, \"height\": 3.75}`) modifiedAlternative, err := jsonpatch.MergePatch(alternative, patch) fmt.Printf(\"patch document: %sn\", patch) fmt.Printf(\"updated alternative doc: %sn\", modifiedAlternative) } ``` When ran, you get the following output: ```bash $ go run main.go patch document: {\"height\":null,\"name\":\"Jane\"} updated tina doc: {\"age\":28,\"name\":\"Jane\"} ``` ## Create and apply a JSON Patch You can create patch objects using `DecodePatch([]byte)`, which can then be applied against JSON documents. The following is an example of creating a patch from two operations, and applying it against a JSON document. ```go package main import ( \"fmt\" jsonpatch \"github.com/evanphx/json-patch\" ) func main() { original := []byte(`{\"name\": \"John\", \"age\": 24, \"height\": 3.21}`) patchJSON := []byte(`[ {\"op\": \"replace\", \"path\": \"/name\", \"value\": \"Jane\"}, {\"op\": \"remove\", \"path\": \"/height\"} ]`) patch, err := jsonpatch.DecodePatch(patchJSON) if err != nil { panic(err) } modified, err := patch.Apply(original) if err != nil { panic(err) } fmt.Printf(\"Original document: %sn\", original) fmt.Printf(\"Modified document: %sn\", modified) } ``` When ran, you get the following output: ```bash $ go run main.go Original document: {\"name\": \"John\", \"age\": 24, \"height\": 3.21} Modified document: {\"age\":24,\"name\":\"Jane\"} ``` ## Comparing JSON documents Due to potential whitespace and ordering differences, one cannot simply compare JSON strings or byte-arrays directly. As such, you can instead use `jsonpatch.Equal(document1, document2)` to determine if two JSON documents are _structurally_ equal. This ignores whitespace differences, and key-value ordering. ```go package main import ( \"fmt\" jsonpatch \"github.com/evanphx/json-patch\" ) func main() { original := []byte(`{\"name\": \"John\", \"age\": 24, \"height\": 3.21}`) similar := []byte(` { \"age\": 24, \"height\": 3.21, \"name\": \"John\" } `) different := []byte(`{\"name\": \"Jane\", \"age\": 20, \"height\": 3.37}`) if jsonpatch.Equal(original, similar) { fmt.Println(`\"original\" is structurally equal to \"similar\"`) } if !jsonpatch.Equal(original, different) { fmt.Println(`\"original\" is _not_ structurally equal to \"similar\"`) } } ``` When ran, you get the following output: ```bash $ go run main.go \"original\" is structurally equal to \"similar\" \"original\" is _not_ structurally equal to \"similar\" ``` ## Combine merge patches Given two JSON merge patch documents, it is possible to combine them into a single merge patch which can describe both set of changes. The resulting merge patch can be used such that applying it results in a document structurally similar as merging each merge patch to the document in succession. ```go package main import ( \"fmt\" jsonpatch \"github.com/evanphx/json-patch\" ) func main() { original := []byte(`{\"name\": \"John\", \"age\": 24, \"height\": 3.21}`) nameAndHeight := []byte(`{\"height\":null,\"name\":\"Jane\"}`) ageAndEyes := []byte(`{\"age\":4.23,\"eyes\":\"blue\"}`) // Let's combine these merge patch documents... combinedPatch, err := jsonpatch.MergeMergePatches(nameAndHeight, ageAndEyes) if err != nil { panic(err) } // Apply each patch individual against the original document withoutCombinedPatch, err := jsonpatch.MergePatch(original, nameAndHeight) if err != nil { panic(err) } withoutCombinedPatch, err = jsonpatch.MergePatch(withoutCombinedPatch, ageAndEyes) if err != nil { panic(err) } // Apply the combined patch against the original document withCombinedPatch, err := jsonpatch.MergePatch(original, combinedPatch) if err != nil { panic(err) } // Do both result in the same thing? They should! if jsonpatch.Equal(withCombinedPatch, withoutCombinedPatch) { fmt.Println(\"Both JSON documents are structurally the same!\") } fmt.Printf(\"combined merge patch: %s\", combinedPatch) } ``` When ran, you get the following output: ```bash $ go run main.go Both JSON documents are structurally the same! combined merge patch: {\"age\":4.23,\"eyes\":\"blue\",\"height\":null,\"name\":\"Jane\"} ``` # CLI for comparing JSON documents You can install the commandline program `json-patch`. This program can take multiple JSON patch documents as arguments, and fed a JSON document from `stdin`. It will apply the patch(es) against the document and output the modified doc. **patch.1.json** ```json [ {\"op\": \"replace\", \"path\": \"/name\", \"value\": \"Jane\"}, {\"op\": \"remove\", \"path\": \"/height\"} ] ``` **patch.2.json** ```json [ {\"op\": \"add\", \"path\": \"/address\", \"value\": \"123 Main St\"}, {\"op\": \"replace\", \"path\": \"/age\", \"value\": \"21\"} ] ``` ### API Usage **document.json** ```json { \"name\": \"John\", \"age\": 24, \"height\": 3.21 } ``` * Given a `[]byte`, obtain a Patch object You can then run: `obj, err := jsonpatch.DecodePatch(patch)` ```bash $ go install github.com/evanphx/json-patch/cmd/json-patch $ cat document.json | json-patch -p patch.1.json -p patch.2.json {\"address\":\"123 Main St\",\"age\":\"21\",\"name\":\"Jane\"} ``` * Apply the patch and get a new document back # Help It! Contributions are welcomed! Leave [an issue](https://github.com/evanphx/json-patch/issues) or [create a PR](https://github.com/evanphx/json-patch/compare). `out, err := obj.Apply(doc)` * Create a JSON Merge Patch document based on two json documents (a to b): Before creating a pull request, we'd ask that you make sure tests are passing and that you have added new tests when applicable. `mergeDoc, err := jsonpatch.CreateMergePatch(a, b)` * Bonus API: compare documents for structural equality Contributors can run tests using: `jsonpatch.Equal(doca, docb)` ```bash go test -cover ./... ``` Builds for pull requests are tested automatically using [TravisCI](https://travis-ci.org/evanphx/json-patch). "} {"_id":"q-en-kubernetes-9a0b9185ee586b2da20cc3631977604149db73070176de267f7992383dadba4e","text":"glog.Fatalf(\"unable to create flag defaults: %v\", err) } opts.AddFlags(pflag.CommandLine) opts.AddFlags(cmd.Flags()) cmd.MarkFlagFilename(\"config\", \"yaml\", \"yml\", \"json\")"} {"_id":"q-en-kubernetes-9a1c1de2c8454232d2df0e8c6309c985ca7ff90337c6d2e6d42d862ca82aac6b","text":"if [ ! -w $(dirname `which gcloud`) ]; then sudo_prefix=\"sudo\" fi ${sudo_prefix} gcloud ${gcloud_prompt:-} components update alpha || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update beta || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components install alpha || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components install beta || true ${sudo_prefix} gcloud ${gcloud_prompt:-} components update || true }"} {"_id":"q-en-kubernetes-9a37a5fc6b2c420b9f7387f1d9cea53e81adb6a5f47afdfbd9e96672dd8ea14c","text":"package testing import ( \"encoding/json\" \"fmt\" \"math/rand\" \"os\" \"path/filepath\" \"sigs.k8s.io/structured-merge-diff/v4/typed\" \"strconv\" \"strings\" \"sync\" \"testing\""} {"_id":"q-en-kubernetes-9a3911e23d79b609d32b7100c79844384085a6ac9c5f38eacdce2c1e3dfecd4f","text":" apiVersion: v1beta1 desiredState: manifest: containers: - image: kubernetes/pause name: testpd volumeMounts: - mountPath: \"/testpd\" name: \"testpd\" id: testpd version: v1beta1 volumes: - name: testpd source: persistentDisk: # This GCE PD must already exist and be formatted ext4 pdName: \"%insert_pd_name_here%\" fsType: ext4 id: testpd kind: Pod labels: test: testpd "} {"_id":"q-en-kubernetes-9a4fe3d35b495ec3148d7b4d3569fda7c2f4335e2632548313cd9d00ed7b42fa","text":"- subresource - verb - version - name: apiserver_storage_object_counts help: Number of stored objects at the time of last check split by kind. type: Gauge stabilityLevel: STABLE labels: - resource "} {"_id":"q-en-kubernetes-9a681cc131426e27814583936498eeaf5511d3a37b2562028a8968a6c0e3a4af","text":"return nil } //waitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum. func waitForServiceEndpointsNum(c *client.Client, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error { return wait.Poll(interval, timeout, func() (bool, error) { Logf(\"Waiting for amount of service:%s endpoints to %d\", serviceName, expectNum) list, err := c.Endpoints(namespace).List(labels.Everything()) if err != nil { return false, err } for _, e := range list.Items { if e.Name == serviceName && countEndpointsNum(&e) == expectNum { return true, nil } } return false, nil }) } func countEndpointsNum(e *api.Endpoints) int { num := 0 for _, sub := range e.Subsets { num += len(sub.Addresses) } return num } // waitForReplicationController waits until the RC appears (exist == true), or disappears (exist == false) func waitForReplicationController(c *client.Client, namespace, name string, exist bool, interval, timeout time.Duration) error { err := wait.Poll(interval, timeout, func() (bool, error) {"} {"_id":"q-en-kubernetes-9a6ceaa827eaa0a2e28ad41abd07db96af7953bb5d21da50a7d24b992b1ce682","text":"import ( \"fmt\" \"path\" \"runtime\" \"strings\" \"sync\""} {"_id":"q-en-kubernetes-9a81dd5834be35eb6afc5480f1d6744bf802d32107eaf2722b12eb9c07da54d1","text":"// 3. CurrentDirectoryPath // 4. HomeDirectoryPath // Empty filenames are ignored. Files with non-deserializable content produced errors. // The first file to set a particular value or map key wins and the value or map key is never changed. // This means that the first file to set CurrentContext will have its context preserved. It also means // that if two files specify a \"red-user\", only values from the first file's red-user are used. Even // The first file to set a particular map key wins and map key's value is never changed. // BUT, if you set a struct value that is NOT contained inside of map, the value WILL be changed. // This results in some odd looking logic to merge in one direction, merge in the other, and then merge the two. // It also means that if two files specify a \"red-user\", only values from the first file's red-user are used. Even // non-conflicting entries from the second file's \"red-user\" are discarded. // Relative paths inside of the .kubeconfig files are resolved against the .kubeconfig file's parent folder // and only absolute file paths are returned. func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { config := clientcmdapi.NewConfig() mergeConfigWithFile(config, rules.CommandLinePath) resolveLocalPaths(rules.CommandLinePath, config) kubeConfigFiles := []string{rules.CommandLinePath, rules.EnvVarPath, rules.CurrentDirectoryPath, rules.HomeDirectoryPath} mergeConfigWithFile(config, rules.EnvVarPath) resolveLocalPaths(rules.EnvVarPath, config) // first merge all of our maps mapConfig := clientcmdapi.NewConfig() for _, file := range kubeConfigFiles { mergeConfigWithFile(mapConfig, file) resolveLocalPaths(file, mapConfig) } mergeConfigWithFile(config, rules.CurrentDirectoryPath) resolveLocalPaths(rules.CurrentDirectoryPath, config) // merge all of the struct values in the reverse order so that priority is given correctly nonMapConfig := clientcmdapi.NewConfig() for i := len(kubeConfigFiles) - 1; i >= 0; i-- { file := kubeConfigFiles[i] mergeConfigWithFile(nonMapConfig, file) resolveLocalPaths(file, nonMapConfig) } mergeConfigWithFile(config, rules.HomeDirectoryPath) resolveLocalPaths(rules.HomeDirectoryPath, config) // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and // get the values we expect. config := clientcmdapi.NewConfig() mergo.Merge(config, mapConfig) mergo.Merge(config, nonMapConfig) return config, nil }"} {"_id":"q-en-kubernetes-9a94143329d61cadccef10b4aca33433169b0eaee89bcc4382be2cc537fb0835","text":"apiGroup = apiVersionsToAPIGroup(&v) } apiGroupList.Groups = []metav1.APIGroup{apiGroup} case AcceptV2Beta1: var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) default: return nil, nil, nil, fmt.Errorf(\"Unknown discovery response content-type: %s\", responseContentType) } return apiGroupList, resourcesByGV, failedGVs, nil"} {"_id":"q-en-kubernetes-9aba69d915c18acbd6541f0e63aed3b04a17e27cc234607d80e9ba46c6d273e5","text":"fmt.Fprintf(&verboseOut, \"[+]%v okn\", check.Name()) } } if excluded.Len() > 0 { fmt.Fprintf(&verboseOut, \"warn: some health checks cannot be excluded: no matches for %vn\", formatQuoted(excluded.List()...)) klog.Warningf(\"cannot exclude some health checks, no health checks are installed matching %v\", formatQuoted(excluded.List()...)) } // always be verbose on failure if failed { http.Error(w, fmt.Sprintf(\"%vhealthz check failed\", verboseOut.String()), http.StatusInternalServerError)"} {"_id":"q-en-kubernetes-9ad4d8895717dde040bb6028ab289f3c6012f271453f450efaaa258c0ed5510d","text":"http.Error(w, err.Error(), 400) } // When resetting between tests, a marker object is patched until this webhook // observes it, at which point it is considered ready. if pod.Namespace == reinvocationMarkerFixture.Namespace && pod.Name == reinvocationMarkerFixture.Name { recorder.MarkerReceived() allow(w) return } recorder.IncrementCount(r.URL.Path) switch r.URL.Path { case \"/marker\": // When resetting between tests, a marker object is patched until this webhook // observes it, at which point it is considered ready. recorder.MarkerReceived() allow(w) return case \"/noop\": allow(w) case \"/settrue\":"} {"_id":"q-en-kubernetes-9ae9d858ba1bdd98493fcba9acfeefc23a07b4063b8c51fafe33c6dc0d58d275","text":"Name: dsName, }, Spec: apps.DaemonSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: label, }, Template: v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: label,"} {"_id":"q-en-kubernetes-9b1730f6557045174dd304b6dff008bf3afe828fa6238ee84b4608a0b542dd93","text":"t.Fatalf(\"Unexpected error: %v\", err) } } func TestCreateMissingContext(t *testing.T) { const expectedErrorContains = \"Context was not found for specified context\" const expectedErrorContains = \"context was not found for specified context: not-present\" config := createValidTestConfig() clientBuilder := NewNonInteractiveClientConfig(*config, \"not-present\", &ConfigOverrides{ ClusterDefaults: DefaultCluster, }, nil) clientConfig, err := clientBuilder.ClientConfig() if err != nil { t.Fatalf(\"Unexpected error: %v\", err) _, err := clientBuilder.ClientConfig() if err == nil { t.Fatalf(\"Expected error: %v\", expectedErrorContains) } expectedConfig := &restclient.Config{Host: clientConfig.Host} if !reflect.DeepEqual(expectedConfig, clientConfig) { t.Errorf(\"Expected %#v, got %#v\", expectedConfig, clientConfig) if !strings.Contains(err.Error(), expectedErrorContains) { t.Fatalf(\"Expected error: %v, but got %v\", expectedErrorContains, err) } }"} {"_id":"q-en-kubernetes-9b206f955426a91127921292d543b454347bd843809717fcf466aa230cef8965","text":"_, err := framework.RunHostCmd(pausePod1.Namespace, pausePod1.Name, cmd) framework.ExpectError(err, \"expected error when trying to connect to cluster IP\") } }) ginkgo.It(\"should respect internalTrafficPolicy=Local Pod (hostNetwork: true) to Pod (hostNetwork: true) [Feature:ServiceInternalTrafficPolicy]\", func() { // windows kube-proxy does not support this feature yet // TODO: remove this skip when windows-based proxies implement internalTrafficPolicy e2eskipper.SkipIfNodeOSDistroIs(\"windows\") // This behavior is not supported if Kube-proxy is in \"userspace\" mode. // So we check the kube-proxy mode and skip this test if that's the case. if proxyMode, err := proxyMode(f); err == nil { if proxyMode == \"userspace\" { e2eskipper.Skipf(\"The test doesn't work with kube-proxy in userspace mode\") } } else { framework.Logf(\"Couldn't detect KubeProxy mode - test failure may be expected: %v\", err) } ginkgo.By(\"Creating 2 pause hostNetwork pods that will try to connect to the webserver\") pausePod2 := e2epod.NewAgnhostPod(ns, \"pause-pod-2\", nil, nil, nil) pausePod2.Spec.HostNetwork = true e2epod.SetNodeSelection(&pausePod2.Spec, e2epod.NodeSelection{Name: node0.Name}) nodes, err := e2enode.GetBoundedReadySchedulableNodes(cs, 2) pausePod2, err = cs.CoreV1().Pods(ns).Create(context.TODO(), pausePod2, metav1.CreateOptions{}) framework.ExpectNoError(err) nodeCounts := len(nodes.Items) if nodeCounts < 2 { e2eskipper.Skipf(\"The test requires at least two ready nodes on %s, but found %v\", framework.TestContext.Provider, nodeCounts) } node0 := nodes.Items[0] node1 := nodes.Items[1] framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, pausePod2.Name, f.Namespace.Name, framework.PodStartTimeout)) serviceName := \"svc-itp\" ns := f.Namespace.Name servicePort := 80 pausePod3 := e2epod.NewAgnhostPod(ns, \"pause-pod-3\", nil, nil, nil) pausePod3.Spec.HostNetwork = true e2epod.SetNodeSelection(&pausePod3.Spec, e2epod.NodeSelection{Name: node1.Name}) ginkgo.By(\"creating a TCP service \" + serviceName + \" with type=ClusterIP and internalTrafficPolicy=Local in namespace \" + ns) local := v1.ServiceInternalTrafficPolicyLocal jig := e2eservice.NewTestJig(cs, ns, serviceName) svc, err := jig.CreateTCPService(func(svc *v1.Service) { svc.Spec.Ports = []v1.ServicePort{ {Port: 80, Name: \"http\", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(80)}, } svc.Spec.InternalTrafficPolicy = &local }) framework.ExpectNoError(err) ginkgo.By(\"Creating 1 webserver pod to be part of the TCP service\") webserverPod0 := e2epod.NewAgnhostPod(ns, \"echo-hostname-0\", nil, nil, nil, \"netexec\", \"--http-port\", strconv.Itoa(servicePort)) webserverPod0.Labels = jig.Labels webserverPod0.Spec.HostNetwork = true e2epod.SetNodeSelection(&webserverPod0.Spec, e2epod.NodeSelection{Name: node0.Name}) _, err = cs.CoreV1().Pods(ns).Create(context.TODO(), webserverPod0, metav1.CreateOptions{}) pausePod3, err = cs.CoreV1().Pods(ns).Create(context.TODO(), pausePod3, metav1.CreateOptions{}) framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, webserverPod0.Name, f.Namespace.Name, framework.PodStartTimeout)) validateEndpointsPortsOrFail(cs, ns, serviceName, portsByPodName{webserverPod0.Name: {servicePort}}) ginkgo.By(\"Creating 2 pause pods that will try to connect to the webservers\") pausePod0 := e2epod.NewAgnhostPod(ns, \"pause-pod-0\", nil, nil, nil) pausePod0.Spec.HostNetwork = true e2epod.SetNodeSelection(&pausePod0.Spec, e2epod.NodeSelection{Name: node0.Name}) pausePod0, err = cs.CoreV1().Pods(ns).Create(context.TODO(), pausePod0, metav1.CreateOptions{}) framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, pausePod0.Name, f.Namespace.Name, framework.PodStartTimeout)) pausePod1 := e2epod.NewAgnhostPod(ns, \"pause-pod-1\", nil, nil, nil) pausePod1.Spec.HostNetwork = true e2epod.SetNodeSelection(&pausePod1.Spec, e2epod.NodeSelection{Name: node1.Name}) pausePod1, err = cs.CoreV1().Pods(ns).Create(context.TODO(), pausePod1, metav1.CreateOptions{}) framework.ExpectNoError(err) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, pausePod1.Name, f.Namespace.Name, framework.PodStartTimeout)) framework.ExpectNoError(e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, pausePod3.Name, f.Namespace.Name, framework.PodStartTimeout)) // assert 5 times that the first pause pod can connect to the Service locally and the second one errors with a timeout serviceAddress := net.JoinHostPort(svc.Spec.ClusterIP, strconv.Itoa(servicePort)) for i := 0; i < 5; i++ { // the first pause pod should be on the same node as the webserver, so it can connect to the local pod using clusterIP // note that the expected hostname is the node name because the backend pod is on host network execHostnameTest(*pausePod0, serviceAddress, node0.Name) execHostnameTest(*pausePod2, serviceAddress, node0.Name) // the second pause pod is on a different node, so it should see a connection error every time cmd := fmt.Sprintf(`curl -q -s --connect-timeout 5 %s/hostname`, serviceAddress) _, err := framework.RunHostCmd(pausePod1.Namespace, pausePod1.Name, cmd) _, err := framework.RunHostCmd(pausePod3.Namespace, pausePod3.Name, cmd) framework.ExpectError(err, \"expected error when trying to connect to cluster IP\") } })"} {"_id":"q-en-kubernetes-9b4c29c45f4004a82db84e5085406c7cb24f7c11e7af6ad0cf0bfaa0286f0111","text":"Message: \"currentMessage\", }, currentNominatedNodeName: \"node1\", expectedPatchRequests: 1, expectedPatchRequests: 0, }, { name: \"Should make patch request if pod condition already exists and is identical but nominated node name is set and different\","} {"_id":"q-en-kubernetes-9b7222491dcdc7d0d627302146a3c6eee75341261abecd22390bb3eb43836b84","text":"continue } By(fmt.Sprintf(\"Successfully fetched pod logs:%vn\", string(logs))) By(fmt.Sprintf(\"Successfully fetched pod logs:%vn\", logs)) break } for _, m := range expectedOutput { Expect(string(logs)).To(matcher(m), \"%q in container output\", m) Expect(logs).To(matcher(m), \"%q in container output\", m) } }"} {"_id":"q-en-kubernetes-9b92b4673470b62a9de042e85d9815453d3958733bb52d786c58acb922d917f1","text":"func TestPriorityQueue_MoveAllToActiveQueue(t *testing.T) { q := NewPriorityQueue(nil) q.Add(&medPriorityPod) q.unschedulableQ.addOrUpdate(&unschedulablePod) q.unschedulableQ.addOrUpdate(&highPriorityPod) addOrUpdateUnschedulablePod(q, &unschedulablePod) addOrUpdateUnschedulablePod(q, &highPriorityPod) q.MoveAllToActiveQueue() if q.activeQ.Len() != 3 { t.Error(\"Expected all items to be in activeQ.\")"} {"_id":"q-en-kubernetes-9bb0f66cb6907ae8ec820c8cc974880df8d22c641894f68bed4b479de40945e0","text":"// created before this test, and may not be infra // containers. They should be excluded from the test. existingPausePIDs, err := getPidsForProcess(\"pause\", \"\") gomega.Expect(err).To(gomega.BeNil(), \"failed to list all pause processes on the node\") framework.ExpectNoError(err, \"failed to list all pause processes on the node\") existingPausePIDSet := sets.NewInt(existingPausePIDs...) podClient := f.PodClient()"} {"_id":"q-en-kubernetes-9bee74aa741376fd4ddaf2a203c930fac02a04bd7b35543ee6ec1e7cd26886ae","text":"It(\"deployment should create new pods\", func() { testNewDeployment(f) }) It(\"deployment should delete old pods and create new ones [Flaky]\", func() { It(\"RollingUpdateDeployment should delete old pods and create new ones [Flaky]\", func() { testRollingUpdateDeployment(f) }) It(\"deployment should scale up and down in the right order [Flaky]\", func() { It(\"RollingUpdateDeployment should scale up and down in the right order [Flaky]\", func() { testRollingUpdateDeploymentEvents(f) }) It(\"RecreateDeployment should delete old pods and create new ones [Flaky]\", func() { testRecreateDeployment(f) }) It(\"deployment should support rollover [Flaky]\", func() { testRolloverDeployment(f) })"} {"_id":"q-en-kubernetes-9c1ccba6552e49dcef76df7e9c12a57ada18d9e990b88b37b31b35218ace1a6b","text":"echo \"Detecting nodes in the cluster\" detect-node-names &> /dev/null if [[ \"${#NODE_NAMES[@]}\" == 0 ]]; then if [[ -z \"${NODE_NAMES:-}\" ]]; then echo \"No nodes found!\" return fi"} {"_id":"q-en-kubernetes-9c4edf00366ff424623bbd4fccda612ecda83299e99d199e00886c331808a7bd","text":"// ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging. func ClusterLevelLoggingWithElasticsearch(c *client.Client) { // TODO: For now assume we are only testing cluster logging with Elasticsearch // on GCE. Once we are sure that Elasticsearch cluster level logging // works for other providers we should widen this scope of this test. if testContext.Provider != \"gce\" { if !providerIs(\"gce\") { Logf(\"Skipping cluster level logging test for provider %s\", testContext.Provider) return }"} {"_id":"q-en-kubernetes-9c66f978c09a6a01a1dc6145b60d7d603b912d1dd7bcf53de96f2ccffad8151e","text":"assert.Len(t, client.Actions(), 0) } // Ensure SyncService for service with pending deletion results in no action func TestSyncServicePendingDeletion(t *testing.T) { ns := metav1.NamespaceDefault serviceName := \"testing-1\" deletionTimestamp := metav1.Now() client, esController := newController([]string{\"node-1\"}, time.Duration(0)) esController.serviceStore.Add(&v1.Service{ ObjectMeta: metav1.ObjectMeta{Name: serviceName, Namespace: ns, DeletionTimestamp: &deletionTimestamp}, Spec: v1.ServiceSpec{ Selector: map[string]string{\"foo\": \"bar\"}, Ports: []v1.ServicePort{{TargetPort: intstr.FromInt(80)}}, }, }) err := esController.syncService(fmt.Sprintf(\"%s/%s\", ns, serviceName)) assert.Nil(t, err) assert.Len(t, client.Actions(), 0) } // Ensure SyncService for service with selector but no pods results in placeholder EndpointSlice func TestSyncServiceWithSelector(t *testing.T) { ns := metav1.NamespaceDefault"} {"_id":"q-en-kubernetes-9cb109f42c4a0061468becdd099d4383525e1f23b98ba763b731d082a8510ba2","text":"ginkgo.By(\"Expanding non-expandable pvc\") newSize := resource.MustParse(\"6Gi\") pvc, err = expandPVCSize(pvc, newSize, c) gomega.Expect(err).To(gomega.HaveOccurred(), \"While updating non-expandable PVC\") framework.ExpectError(err, \"While updating non-expandable PVC\") }) ginkgo.It(\"Verify if editing PVC allows resize\", func() {"} {"_id":"q-en-kubernetes-9cb3bd98229bc4c6725b8a75dc135965b17c5674b103bd331e4f316a1ed95479","text":"test/e2e/common/secrets_volume.go: \"should be able to mount in a volume regardless of a different secret existing with same name in different namespace\" test/e2e/common/secrets_volume.go: \"should be consumable in multiple volumes in a pod\" test/e2e/common/secrets_volume.go: \"optional updates should be reflected in volume\" test/e2e/common/security_context.go: \"should run the container with uid 65534\" test/e2e/common/security_context.go: \"should run the container with writable rootfs when readOnlyRootFilesystem=false\" test/e2e/common/security_context.go: \"should run the container as unprivileged when false\" test/e2e/common/security_context.go: \"should not allow privilege escalation when false\" test/e2e/kubectl/kubectl.go: \"should create and stop a replication controller\" test/e2e/kubectl/kubectl.go: \"should scale a replication controller\" test/e2e/kubectl/kubectl.go: \"should do a rolling update of a replication controller\""} {"_id":"q-en-kubernetes-9ce1e1e9fefca58331188ffbf1da46ff5f09b8140023284a6e5ce966f936d22e","text":"testCases := []struct { name string modifyRest func(rest *REST) oldSvc *api.Service svc api.Service expectedIPFamilyPolicy *api.IPFamilyPolicyType"} {"_id":"q-en-kubernetes-9ce6d39f210c1071a80a91f537ccf7e861330a59a98cdb1499fcbe3611f67caa","text":"func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*scheduler.Config, error) { glog.V(2).Infof(\"Creating scheduler with fit predicates '%v' and priority functions '%v\", predicateKeys, priorityKeys) if f.GetHardPodAffinitySymmetricWeight() < 0 || f.GetHardPodAffinitySymmetricWeight() > 100 { return nil, fmt.Errorf(\"invalid hardPodAffinitySymmetricWeight: %d, must be in the range 0-100\", f.GetHardPodAffinitySymmetricWeight()) if f.GetHardPodAffinitySymmetricWeight() < 1 || f.GetHardPodAffinitySymmetricWeight() > 100 { return nil, fmt.Errorf(\"invalid hardPodAffinitySymmetricWeight: %d, must be in the range 1-100\", f.GetHardPodAffinitySymmetricWeight()) } predicateFuncs, err := f.GetPredicates(predicateKeys)"} {"_id":"q-en-kubernetes-9d028013d3a202390a977e79d1f017f5eb4031ffba14609b5f4ee0b0d3c22238","text":"return nil, err } res := metricObj.(*v1beta2.MetricValueList) var res *v1beta2.MetricValueList var ok bool if res, ok = metricObj.(*v1beta2.MetricValueList); !ok { return nil, fmt.Errorf(\"the custom metrics API server didn't return MetricValueList, the type is %v\", reflect.TypeOf(metricObj)) } if len(res.Items) != 1 { return nil, fmt.Errorf(\"the custom metrics API server returned %v results when we asked for exactly one\", len(res.Items)) }"} {"_id":"q-en-kubernetes-9d3c34e0541c971177c0fcc2a535ef9a770b08e32a7315a6dfa420b62347aa38","text":"return svc } func getResourceGroupTestService(identifier, resourceGroup, loadBalancerIP string, requestedPorts ...int32) v1.Service { svc := getTestService(identifier, v1.ProtocolTCP, requestedPorts...) svc.Spec.LoadBalancerIP = loadBalancerIP svc.Annotations[ServiceAnnotationLoadBalancerResourceGroup] = resourceGroup return svc } func setLoadBalancerModeAnnotation(service *v1.Service, lbMode string) { service.Annotations[ServiceAnnotationLoadBalancerMode] = lbMode }"} {"_id":"q-en-kubernetes-9d730cd43a86d1d194c08a666b7c4ea237baff9e736083247c4b512d4bfaccff","text":"LOGGING_DESTINATION=elasticsearch # options: elasticsearch, gcp ENABLE_CLUSTER_MONITORING=false # Don't require https for registries in our local RFC1918 network EXTRA_DOCKER_OPTS=\"--insecure-registry 10.0.0.0/8\" "} {"_id":"q-en-kubernetes-9d82ed537d27da371d710b4ba6862bdafe6e2ce81470b171c93acb8ec346c85d","text":"\"k8s.io/client-go/tools/leaderelection\" cliflag \"k8s.io/component-base/cli/flag\" \"k8s.io/component-base/cli/globalflag\" \"k8s.io/component-base/logs\" \"k8s.io/component-base/metrics/legacyregistry\" \"k8s.io/component-base/version\" \"k8s.io/component-base/version/verflag\""} {"_id":"q-en-kubernetes-9d84761c0064dfb227ad9c7954dc8de4c28dac9b9e65511f8043ce07ca9e36bd","text":"} else { klog.V(4).InfoS(\"Added volume to desired state\", \"pod\", klog.KObj(pod), \"volumeName\", podVolume.Name, \"volumeSpecName\", volumeSpec.Name()) } // sync reconstructed volume dswp.actualStateOfWorld.SyncReconstructedVolume(uniqueVolumeName, uniquePodName, podVolume.Name) if expandInUsePV { dswp.checkVolumeFSResize(pod, podVolume, pvc, volumeSpec,"} {"_id":"q-en-kubernetes-9da647ad38eea54dc2b00dc99f1ca395efd65e9d3687d4791c8eb5ee077daa47","text":"// Otherwise we should delete the victim. if waitingPod := fh.GetWaitingPod(victim.UID); waitingPod != nil { waitingPod.Reject(pluginName, \"preempted\") klog.V(2).InfoS(\"Preemptor pod rejected a waiting pod\", \"preemptor\", klog.KObj(pod), \"waitingPod\", klog.KObj(victim), \"node\", c.Name()) } else { if feature.DefaultFeatureGate.Enabled(features.PodDisruptionConditions) { victimPodApply := corev1apply.Pod(victim.Name, victim.Namespace).WithStatus(corev1apply.PodStatus())"} {"_id":"q-en-kubernetes-9dbeb28184259505efc7b93aacf2ca55fddccbdf35239e1bf605e61c73364635","text":"} const ( testPodSpecFile = `{ \"kind\": \"Pod\", \"apiVersion\": \"v1beta3\", \"metadata\": { \"name\": \"container-vm-guestbook-pod-spec\" }, \"spec\": { \"containers\": [ { \"name\": \"redis\", \"image\": \"dockerfile/redis\", \"volumeMounts\": [{ \"name\": \"redis-data\", \"mountPath\": \"/data\" }] }, { \"name\": \"guestbook\", \"image\": \"google/guestbook-python-redis\", \"ports\": [{ \"name\": \"www\", \"hostPort\": 80, \"containerPort\": 80 }] }], \"volumes\": [{\t\"name\": \"redis-data\" }] } }` ) const ( // This is copied from, and should be kept in sync with: // https://raw.githubusercontent.com/GoogleCloudPlatform/container-vm-guestbook-redis-python/master/manifest.yaml // Note that kubelet complains about these containers not having a self link. testManifestFile = `version: v1beta2 id: container-vm-guestbook id: container-vm-guestbook-manifest containers: - name: redis image: dockerfile/redis"} {"_id":"q-en-kubernetes-9ddef8812cad782f4c5e8137ed479959bc608d8f005148172df935e1d20d011d","text":"/* Release : v1.23 Testname: Pod Lifecycle, poststart https hook Description: When a post-start handler is specified in the container lifecycle using a 'HttpGet' action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve https requests, create a second pod with a container lifecycle specifying a post-start that invokes the server pod to validate that the post-start is executed. Description: When a post-start handler is specified in the container lifecycle using a 'HttpGet' action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve https requests, create a second pod on the same node with a container lifecycle specifying a post-start that invokes the server pod to validate that the post-start is executed. */ ginkgo.It(\"should execute poststart https hook properly [MinimumKubeletVersion:1.23] [NodeConformance]\", func() { lifecycle := &v1.Lifecycle{"} {"_id":"q-en-kubernetes-9e65032d5be8d1eb334d7d135d9d0bd3b466ac135631274abed97cccfa3bb82f","text":"# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE # INSTRUCTIONS AT https://kubernetes.io/security/ cjcullen joelsmith liggitt philips caesarxuchao deads2k lavalamp sttts tallclair "} {"_id":"q-en-kubernetes-9e83e63ec7f36b10e779fe6f9b2f6d8291d23f7fa92f7cc79d9af6af6954ba77","text":"func (detacher *vsphereVMDKDetacher) Detach(volumeName string, nodeName types.NodeName) error { volPath := getVolPathfromVolumeName(volumeName) attached, err := detacher.vsphereVolumes.DiskIsAttached(volPath, nodeName) attached, newVolumePath, err := detacher.vsphereVolumes.DiskIsAttached(volPath, nodeName) if err != nil { // Log error and continue with detach klog.Errorf("} {"_id":"q-en-kubernetes-9e8a193df356d1bfa4ea4013a630b82e7f28bfbc8a84ff32231370d87c7ab4d3","text":"prepare-e2e while true; do ${KUBECTL} --watch-only get events ${KUBECTL} get events --watch-only done"} {"_id":"q-en-kubernetes-9e9600bc3e4e00d4074aaf5006c18cbc89098c3534383fb71fc932f6f4f5ec65","text":"], \"volumes\": [{ \"name\":\"kubectl\", \"hostPath\":{\"path\": \"/usr/bin/kubectl\"} \"hostPath\":{\"path\": \"$KUBECTL_PATH\"} }] } }"} {"_id":"q-en-kubernetes-9ea8d31209f711b11930431c5c060293c0355db1ff8d807eda73d81a903b2f96","text":"readCloser, err := client.RESTClient.Get(). Prefix(\"proxy\"). Resource(\"minions\"). Resource(\"nodes\"). Name(pod.Spec.Host). Suffix(\"containerLogs\", namespace, podID, container). Param(\"follow\", strconv.FormatBool(follow))."} {"_id":"q-en-kubernetes-9ef4928e312270530d85863e3f09af40a35f466fbbb33077c0f95e0c107922d4","text":"}, \"fieldRef\": { \"$ref\": \"#/definitions/io.k8s.api.core.v1.ObjectFieldSelector\", \"description\": \"Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\" \"description\": \"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\" }, \"resourceFieldRef\": { \"$ref\": \"#/definitions/io.k8s.api.core.v1.ResourceFieldSelector\","} {"_id":"q-en-kubernetes-9f282c409a5e9f21e1339f81b521757c3d9e12c155eff764de0359ffa9dbd385","text":"framework.ExpectNoError(err, \"Failed to remove %s cronjob in namespace %s\", cronJob.Name, f.Namespace.Name) }) // cleanup of successful/failed finished jobs, with successfulJobsHistoryLimit and failedJobsHistoryLimit ginkgo.It(\"should delete successful/failed finished jobs with limit of one job [Flaky]\", func() { testCases := []struct { description string command []string successLimit int32 failedLimit int32 }{ { description: \"successful-jobs-history-limit\", command: successCommand, successLimit: 1, // keep one successful job failedLimit: 0, // keep none failed job }, { description: \"failed-jobs-history-limit\", command: failureCommand, successLimit: 0, // keep none succcessful job failedLimit: 1, // keep one failed job }, } // cleanup of successful finished jobs, with limit of one successful job ginkgo.It(\"should delete successful finished jobs with limit of one successful job\", func() { ginkgo.By(\"Creating an AllowConcurrent cronjob with custom history limit\") successLimit := int32(1) failedLimit := int32(0) cronJob := newTestCronJob(\"successful-jobs-history-limit\", \"*/1 * * * ?\", batchv1beta1.AllowConcurrent, successCommand, &successLimit, &failedLimit) ensureHistoryLimits(f.ClientSet, f.Namespace.Name, cronJob) }) for _, t := range testCases { ginkgo.By(fmt.Sprintf(\"Creating a AllowConcurrent cronjob with custom %s\", t.description)) cronJob := newTestCronJob(t.description, \"*/1 * * * ?\", batchv1beta1.AllowConcurrent, t.command, &t.successLimit, &t.failedLimit) cronJob, err := createCronJob(f.ClientSet, f.Namespace.Name, cronJob) framework.ExpectNoError(err, \"Failed to create allowconcurrent cronjob with custom history limits in namespace %s\", f.Namespace.Name) // Job is going to complete instantly: do not check for an active job // as we are most likely to miss it ginkgo.By(\"Ensuring a finished job exists\") err = waitForAnyFinishedJob(f.ClientSet, f.Namespace.Name) framework.ExpectNoError(err, \"Failed to ensure a finished cronjob exists in namespace %s\", f.Namespace.Name) ginkgo.By(\"Ensuring a finished job exists by listing jobs explicitly\") jobs, err := f.ClientSet.BatchV1().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) framework.ExpectNoError(err, \"Failed to ensure a finished cronjob exists by listing jobs explicitly in namespace %s\", f.Namespace.Name) activeJobs, finishedJobs := filterActiveJobs(jobs) if len(finishedJobs) != 1 { framework.Logf(\"Expected one finished job in namespace %s; activeJobs=%v; finishedJobs=%v\", f.Namespace.Name, activeJobs, finishedJobs) framework.ExpectEqual(len(finishedJobs), 1) } // cleanup of failed finished jobs, with limit of one failed job ginkgo.It(\"should delete failed finished jobs with limit of one job\", func() { ginkgo.By(\"Creating an AllowConcurrent cronjob with custom history limit\") successLimit := int32(0) failedLimit := int32(1) cronJob := newTestCronJob(\"failed-jobs-history-limit\", \"*/1 * * * ?\", batchv1beta1.AllowConcurrent, failureCommand, &successLimit, &failedLimit) // Job should get deleted when the next job finishes the next minute ginkgo.By(\"Ensuring this job and its pods does not exist anymore\") err = waitForJobToDisappear(f.ClientSet, f.Namespace.Name, finishedJobs[0]) framework.ExpectNoError(err, \"Failed to ensure that job does not exists anymore in namespace %s\", f.Namespace.Name) err = waitForJobsPodToDisappear(f.ClientSet, f.Namespace.Name, finishedJobs[0]) framework.ExpectNoError(err, \"Failed to ensure that pods for job does not exists anymore in namespace %s\", f.Namespace.Name) ginkgo.By(\"Ensuring there is 1 finished job by listing jobs explicitly\") jobs, err = f.ClientSet.BatchV1().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) framework.ExpectNoError(err, \"Failed to ensure there is one finished job by listing job explicitly in namespace %s\", f.Namespace.Name) _, finishedJobs = filterActiveJobs(jobs) framework.ExpectEqual(len(finishedJobs), 1) ginkgo.By(\"Removing cronjob\") err = deleteCronJob(f.ClientSet, f.Namespace.Name, cronJob.Name) framework.ExpectNoError(err, \"Failed to remove the %s cronjob in namespace %s\", cronJob.Name, f.Namespace.Name) } ensureHistoryLimits(f.ClientSet, f.Namespace.Name, cronJob) }) }) func ensureHistoryLimits(c clientset.Interface, ns string, cronJob *batchv1beta1.CronJob) { cronJob, err := createCronJob(c, ns, cronJob) framework.ExpectNoError(err, \"Failed to create allowconcurrent cronjob with custom history limits in namespace %s\", ns) // Job is going to complete instantly: do not check for an active job // as we are most likely to miss it ginkgo.By(\"Ensuring a finished job exists\") err = waitForAnyFinishedJob(c, ns) framework.ExpectNoError(err, \"Failed to ensure a finished cronjob exists in namespace %s\", ns) ginkgo.By(\"Ensuring a finished job exists by listing jobs explicitly\") jobs, err := c.BatchV1().Jobs(ns).List(metav1.ListOptions{}) framework.ExpectNoError(err, \"Failed to ensure a finished cronjob exists by listing jobs explicitly in namespace %s\", ns) activeJobs, finishedJobs := filterActiveJobs(jobs) if len(finishedJobs) != 1 { framework.Logf(\"Expected one finished job in namespace %s; activeJobs=%v; finishedJobs=%v\", ns, activeJobs, finishedJobs) framework.ExpectEqual(len(finishedJobs), 1) } // Job should get deleted when the next job finishes the next minute ginkgo.By(\"Ensuring this job and its pods does not exist anymore\") err = waitForJobToDisappear(c, ns, finishedJobs[0]) framework.ExpectNoError(err, \"Failed to ensure that job does not exists anymore in namespace %s\", ns) err = waitForJobsPodToDisappear(c, ns, finishedJobs[0]) framework.ExpectNoError(err, \"Failed to ensure that pods for job does not exists anymore in namespace %s\", ns) ginkgo.By(\"Ensuring there is 1 finished job by listing jobs explicitly\") jobs, err = c.BatchV1().Jobs(ns).List(metav1.ListOptions{}) framework.ExpectNoError(err, \"Failed to ensure there is one finished job by listing job explicitly in namespace %s\", ns) activeJobs, finishedJobs = filterActiveJobs(jobs) if len(finishedJobs) != 1 { framework.Logf(\"Expected one finished job in namespace %s; activeJobs=%v; finishedJobs=%v\", ns, activeJobs, finishedJobs) framework.ExpectEqual(len(finishedJobs), 1) } ginkgo.By(\"Removing cronjob\") err = deleteCronJob(c, ns, cronJob.Name) framework.ExpectNoError(err, \"Failed to remove the %s cronjob in namespace %s\", cronJob.Name, ns) } // newTestCronJob returns a cronjob which does one of several testing behaviors. func newTestCronJob(name, schedule string, concurrencyPolicy batchv1beta1.ConcurrencyPolicy, command []string, successfulJobsHistoryLimit *int32, failedJobsHistoryLimit *int32) *batchv1beta1.CronJob {"} {"_id":"q-en-kubernetes-9f49c1bd3dd87cb062469e04bcec7d56ac8d57af26fee05a4821c9687d9f4bdc","text":"return false, nil } func (f *FakeMounter) EvalHostSymlinks(pathname string) (string, error) { return pathname, nil } func (f *FakeMounter) PrepareSafeSubpath(subPath Subpath) (newHostPath string, cleanupAction func(), err error) { return subPath.Path, nil, nil }"} {"_id":"q-en-kubernetes-9f60228400e9569121547cf37f7cf82af4c5b399131e2c5f74b451f9e9818659","text":"\"github.com/vmware/govmomi/object\" \"github.com/vmware/govmomi/vim25/mo\" \"k8s.io/klog/v2\" v1 \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" k8stypes \"k8s.io/apimachinery/pkg/types\" coreclients \"k8s.io/client-go/kubernetes/typed/core/v1\" corelisters \"k8s.io/client-go/listers/core/v1\" cloudprovider \"k8s.io/cloud-provider\" \"k8s.io/klog/v2\" \"k8s.io/legacy-cloud-providers/vsphere/vclib\" )"} {"_id":"q-en-kubernetes-9f6c363e5132a9e87b5efae07ee69369c2cc668ac7116c48c3e7ad9601dae140","text":"if index != -1 { // Delete element `index` addr_pairs[index] = addr_pairs[len(routes)-1] addr_pairs = addr_pairs[:len(routes)-1] addr_pairs[index] = addr_pairs[len(addr_pairs)-1] addr_pairs = addr_pairs[:len(addr_pairs)-1] unwind, err := updateAllowedAddressPairs(r.network, &port, addr_pairs) if err != nil {"} {"_id":"q-en-kubernetes-9fa9a8fa4a655f3b6fdb1af28ca7924f44f68b87457fec0ae7137a5302ab4f53","text":"- /eventer - --source=kubernetes:'' - --sink=influxdb:http://monitoring-influxdb:8086 - image: gcr.io/google_containers/addon-resizer:1.5 - image: gcr.io/google_containers/addon-resizer:1.6 name: heapster-nanny resources: limits:"} {"_id":"q-en-kubernetes-9ffdebbae9526c98b1778c42b0bf762161b195aef3f5ad0041ac7df917e95674","text":"source := framework.NewFakeControllerSource() // Let's do threadsafe output to get predictable test results. outputSetLock := sync.Mutex{} outputSet := util.StringSet{} deletionCounter := make(chan string, 1000) // Make a controller that immediately deletes anything added to it, and // logs anything deleted."} {"_id":"q-en-kubernetes-a07b51b16ccd5ae2e42cad417f3353be8fe0125fa99325f81d73f1744d34cae9","text":"// klog.V(4).Infof(\"rbd: info %s using mon %s, pool %s id %s key %s\", b.Image, mon, b.Pool, id, secret) output, err = b.exec.Run(\"rbd\", \"info\", b.Image, \"--pool\", b.Pool, \"-m\", mon, \"--id\", id, \"--key=\"+secret, \"--format=json\") \"info\", b.Image, \"--pool\", b.Pool, \"-m\", mon, \"--id\", id, \"--key=\"+secret, \"-k=/dev/null\", \"--format=json\") if err, ok := err.(*exec.Error); ok { if err.Err == exec.ErrNotFound {"} {"_id":"q-en-kubernetes-a0cd06e09067dfe599c3ed5eba73f13d6ea7f47b8b3a3e6494815635b9278124","text":"testRCReleaseControlledNotMatching(f) }) ginkgo.It(\"[Flaky] should test the lifecycle of a ReplicationController\", func() { /* Release: v1.20 Testname: Replication Controller, lifecycle Description: A Replication Controller (RC) is created, read, patched, and deleted with verification. */ framework.ConformanceIt(\"should test the lifecycle of a ReplicationController\", func() { testRcName := \"rc-test\" testRcNamespace := ns testRcInitialReplicaCount := int32(1)"} {"_id":"q-en-kubernetes-a1383eea73f5cee2c37ff7baa26be38d8b780aa3633358b3ef0a403c091f1f2f","text":" 1.0 1.0.1 "} {"_id":"q-en-kubernetes-a15cf79de2f5216b3530301aa6a55ddb7813fb466b1e42b10f8f9302e52826df","text":"**All done !** You can also use kubectl command to see if the newly created k8s is working correctly. You can also use `kubectl` command to see if the newly created k8s is working correctly. The `kubectl` binary is under the `cluster/ubuntu/binaries` directory. You can move it into your PATH. Then you can use the below command smoothly. For example, use `$ kubectl get minions` to see if you get all your minion nodes comming up and ready. It may take some times for the minions be ready to use like below."} {"_id":"q-en-kubernetes-a1685023e31121624d5cc4c2fb9ee289e05a0dcbafedddcb64eb993d84723675","text":"var enqueued bool cases := []struct { test string newNode *v1.Node oldNode *v1.Node ds *apps.DaemonSet shouldEnqueue bool test string newNode *v1.Node oldNode *v1.Node ds *apps.DaemonSet expectedEventsFunc func(strategyType apps.DaemonSetUpdateStrategyType) int shouldEnqueue bool }{ { test: \"Nothing changed, should not enqueue\","} {"_id":"q-en-kubernetes-a16f4d0361d9022bd49314597410d9af998f54441a6dadaf8476561b0709e74f","text":"} func (f *fakeAttachDetachVolumeHost) CSINodeLister() storagelistersv1.CSINodeLister { // not needed for testing return nil csiNode := &storagev1.CSINode{ ObjectMeta: metav1.ObjectMeta{Name: f.nodeName}, Spec: storagev1.CSINodeSpec{ Drivers: []storagev1.CSINodeDriver{}, }, } enableMigrationOnNode(csiNode, csilibplugins.GCEPDInTreePluginName) return getFakeCSINodeLister(csiNode) } func enableMigrationOnNode(csiNode *storagev1.CSINode, pluginName string) { nodeInfoAnnotations := csiNode.GetAnnotations() if nodeInfoAnnotations == nil { nodeInfoAnnotations = map[string]string{} } newAnnotationSet := sets.NewString() newAnnotationSet.Insert(pluginName) nas := strings.Join(newAnnotationSet.List(), \",\") nodeInfoAnnotations[v1.MigratedPluginsAnnotationKey] = nas csiNode.Annotations = nodeInfoAnnotations } func (f *fakeAttachDetachVolumeHost) CSIDriverLister() storagelistersv1.CSIDriverLister {"} {"_id":"q-en-kubernetes-a17f665f8d373d7b1270ad6d2270a2d2d077ee4c0ab30adb63d1585fe80a474f","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package topologymanager import ( \"k8s.io/api/core/v1\" \"k8s.io/kubernetes/pkg/kubelet/cm/containermap\" \"k8s.io/kubernetes/pkg/kubelet/lifecycle\" ) type noneScope struct { scope } // Ensure noneScope implements Scope interface var _ Scope = &noneScope{} // NewNoneScope returns a none scope. func NewNoneScope() Scope { return &noneScope{ scope{ name: noneTopologyScope, podTopologyHints: podTopologyHints{}, policy: NewNonePolicy(), podMap: containermap.NewContainerMap(), }, } } func (s *noneScope) Admit(pod *v1.Pod) lifecycle.PodAdmitResult { return s.admitPolicyNone(pod) } "} {"_id":"q-en-kubernetes-a1be3c263fdb3d0d9c4f9204e7f5710c90807cf1bedc715d2fb3c95d7df79c62","text":"assert.Equal(t, test.output, output) } } func TestPodResourcesAreReclaimed(t *testing.T) { type args struct { pod *v1.Pod status v1.PodStatus runtimeStatus kubecontainer.PodStatus } tests := []struct { name string args args want bool }{ { \"pod with running containers\", args{ pod: &v1.Pod{}, status: v1.PodStatus{ ContainerStatuses: []v1.ContainerStatus{ runningState(\"containerA\"), runningState(\"containerB\"), }, }, }, false, }, { \"pod with containers in runtime cache\", args{ pod: &v1.Pod{}, status: v1.PodStatus{}, runtimeStatus: kubecontainer.PodStatus{ ContainerStatuses: []*kubecontainer.ContainerStatus{ {}, }, }, }, false, }, { \"pod with sandbox present\", args{ pod: &v1.Pod{}, status: v1.PodStatus{}, runtimeStatus: kubecontainer.PodStatus{ SandboxStatuses: []*runtimeapi.PodSandboxStatus{ {}, }, }, }, false, }, } testKubelet := newTestKubelet(t, false) defer testKubelet.Cleanup() kl := testKubelet.kubelet for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { testKubelet.fakeRuntime.PodStatus = tt.args.runtimeStatus if got := kl.PodResourcesAreReclaimed(tt.args.pod, tt.args.status); got != tt.want { t.Errorf(\"PodResourcesAreReclaimed() = %v, want %v\", got, tt.want) } }) } } "} {"_id":"q-en-kubernetes-a1c27088226a051543776b6c7b60f7faf877c7158cb6e4e6dba63772108d9c3f","text":"echo -n Attempt \"$(($attempt+1))\" to check for SSH to master local output local ok=1 output=$(ssh -oStrictHostKeyChecking=no -i \"${AWS_SSH_KEY}\" ubuntu@${KUBE_MASTER_IP} uptime 2> $LOG) || ok=0 output=$(ssh -oStrictHostKeyChecking=no -i \"${AWS_SSH_KEY}\" ${SSH_USER}@${KUBE_MASTER_IP} uptime 2> $LOG) || ok=0 if [[ ${ok} == 0 ]]; then if (( attempt > 30 )); then echo"} {"_id":"q-en-kubernetes-a1e028e45bfa45e7706363df57647dc39fd2ce503cbddc406b56a5c23c96a89a","text":"// Enable swagger api on master. components.KubeMaster.InstallSwaggerAPI() cluster := clientcmdapi.NewCluster() cluster.Server = components.ApiServer.URL cluster.InsecureSkipTLSVerify = true cfg.Contexts = map[string]*clientcmdapi.Context{\"test\": ctx} cfg.CurrentContext = \"test\" overrides := clientcmd.ConfigOverrides{ ClusterInfo: *cluster, Context: *ctx, CurrentContext: \"test\", ClusterInfo: *cluster, } cmdConfig := clientcmd.NewNonInteractiveClientConfig(*cfg, \"test\", &overrides, nil) factory := util.NewFactory(cmdConfig)"} {"_id":"q-en-kubernetes-a1e2e1f001285d227dd3f4a9f515b6d707b31ea87e1604cd5be04274137bc8c4","text":"klog.Errorf(\"Unsupported protocol type: %s\", protocol) } if nodePortLocalSet != nil { if valid := nodePortLocalSet.validateEntry(entry); !valid { klog.Errorf(\"%s\", fmt.Sprintf(EntryInvalidErr, entry, nodePortLocalSet.Name)) entryInvalidErr := false for _, entry := range entries { if valid := nodePortLocalSet.validateEntry(entry); !valid { klog.Errorf(\"%s\", fmt.Sprintf(EntryInvalidErr, entry, nodePortLocalSet.Name)) entryInvalidErr = true break } nodePortLocalSet.activeEntries.Insert(entry.String()) } if entryInvalidErr { continue } nodePortLocalSet.activeEntries.Insert(entry.String()) } }"} {"_id":"q-en-kubernetes-a209490dbd9991254bb002ca22aa5e648bc9d54ccab63bb554259dcfca8490fd","text":"return b } // ResourceTypeOrNameArgs indicates that the builder should accept one or two arguments // of the form `([,,...]| )`. When one argument is received, the types // provided will be retrieved from the server (and be comma delimited). When two arguments are // received, they must be a single type and name. If more than two arguments are provided an // error is set. The allowEmptySelector permits to select all the resources (via Everything func). // ResourceTypeOrNameArgs indicates that the builder should accept arguments // of the form `([,,...]| [,,...])`. When one argument is // received, the types provided will be retrieved from the server (and be comma delimited). // When two or more arguments are received, they must be a single type and resource name(s). // The allowEmptySelector permits to select all the resources (via Everything func). func (b *Builder) ResourceTypeOrNameArgs(allowEmptySelector bool, args ...string) *Builder { switch len(args) { case 2: b.name = args[1] switch { case len(args) > 2: b.names = append(b.names, args[1:]...) b.ResourceTypes(SplitResourceArgument(args[0])...) case len(args) == 2: b.names = append(b.names, args[1]) b.ResourceTypes(SplitResourceArgument(args[0])...) case 1: case len(args) == 1: b.ResourceTypes(SplitResourceArgument(args[0])...) if b.selector == nil && allowEmptySelector { b.selector = labels.Everything() } case 0: case len(args) == 0: default: b.errs = append(b.errs, fmt.Errorf(\"when passing arguments, must be resource or resource and name\")) }"} {"_id":"q-en-kubernetes-a214aa178f8b771b96976633ed66db162d781e78ad065de0d71ac3bd8053469b","text":"Expect(err).NotTo(HaveOccurred(), \"error failing a daemon pod\") err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds)) Expect(err).NotTo(HaveOccurred(), \"error waiting for daemon pod to revive\") By(\"Wait for the failed daemon pod to be completely deleted.\") err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, waitFailedDaemonPodDeleted(c, &pod)) Expect(err).NotTo(HaveOccurred(), \"error waiting for the failed daemon pod to be completely deleted\") }) // This test should not be added to conformance. We will consider deprecating OnDelete when the"} {"_id":"q-en-kubernetes-a22daa94ea0c204ac857019f7acce1bdbc0beefbde890538eaaad7ac6143ce99","text":"}, expectErr: false, }, // IPVS Timeout can be 0 { config: kubeproxyconfig.KubeProxyIPVSConfiguration{ SyncPeriod: metav1.Duration{Duration: 5 * time.Second}, TCPTimeout: metav1.Duration{Duration: 0 * time.Second}, TCPFinTimeout: metav1.Duration{Duration: 0 * time.Second}, UDPTimeout: metav1.Duration{Duration: 0 * time.Second}, }, expectErr: false, }, // IPVS Timeout > 0 { config: kubeproxyconfig.KubeProxyIPVSConfiguration{ SyncPeriod: metav1.Duration{Duration: 5 * time.Second}, TCPTimeout: metav1.Duration{Duration: 1 * time.Second}, TCPFinTimeout: metav1.Duration{Duration: 2 * time.Second}, UDPTimeout: metav1.Duration{Duration: 3 * time.Second}, }, expectErr: false, }, // TCPTimeout Timeout < 0 { config: kubeproxyconfig.KubeProxyIPVSConfiguration{ SyncPeriod: metav1.Duration{Duration: 5 * time.Second}, TCPTimeout: metav1.Duration{Duration: -1 * time.Second}, }, expectErr: true, reason: \"TCPTimeout must be greater than or equal to 0\", }, // TCPFinTimeout Timeout < 0 { config: kubeproxyconfig.KubeProxyIPVSConfiguration{ SyncPeriod: metav1.Duration{Duration: 5 * time.Second}, TCPFinTimeout: metav1.Duration{Duration: -1 * time.Second}, }, expectErr: true, reason: \"TCPFinTimeout must be greater than or equal to 0\", }, // UDPTimeout Timeout < 0 { config: kubeproxyconfig.KubeProxyIPVSConfiguration{ SyncPeriod: metav1.Duration{Duration: 5 * time.Second}, UDPTimeout: metav1.Duration{Duration: -1 * time.Second}, }, expectErr: true, reason: \"UDPTimeout must be greater than or equal to 0\", }, } for _, test := range testCases {"} {"_id":"q-en-kubernetes-a23b20b0a17c704d46dd45ea45eb59ba8b69bf430355b035d90dda341b4bfc68","text":"}, }, }, map[string]interface{}{\"field\": \"foo\"}, }, true}, failingObjects: []interface{}{map[string]interface{}{\"field\": \"foo\"}}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { validator, _, err := NewSchemaValidator(&apiextensions.CustomResourceValidation{OpenAPIV3Schema: &tt.args.schema}) validator, _, err := NewSchemaValidator(&apiextensions.CustomResourceValidation{OpenAPIV3Schema: &tt.schema}) if err != nil { t.Fatal(err) } if err := ValidateCustomResource(tt.args.object, validator); (err != nil) != tt.wantErr { if err == nil { t.Error(\"expected error, but didn't get one\") } else { t.Errorf(\"unexpected validation error: %v\", err) for _, obj := range tt.objects { if err := ValidateCustomResource(obj, validator); err != nil { t.Errorf(\"unexpected validation error for %v: %v\", obj, err) } } for _, obj := range tt.failingObjects { if err := ValidateCustomResource(obj, validator); err == nil { t.Errorf(\"missing error for %v\", obj) } } })"} {"_id":"q-en-kubernetes-a26e1c704819c66bc05353aae69c0cc074075daf98a731ac845cfdff285249b3","text":"CSI: &v1.CSIPersistentVolumeSource{ Driver: AzureDiskDriverName, VolumeHandle: azureSource.DataDiskURI, ReadOnly: *azureSource.ReadOnly, FSType: *azureSource.FSType, VolumeAttributes: map[string]string{azureDiskKind: \"Managed\"}, }, }, AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, }, } if azureSource.ReadOnly != nil { pv.Spec.PersistentVolumeSource.CSI.ReadOnly = *azureSource.ReadOnly } if *azureSource.CachingMode != \"\" { if azureSource.CachingMode != nil && *azureSource.CachingMode != \"\" { pv.Spec.PersistentVolumeSource.CSI.VolumeAttributes[azureDiskCachingMode] = string(*azureSource.CachingMode) } if *azureSource.FSType != \"\" { if azureSource.FSType != nil { pv.Spec.PersistentVolumeSource.CSI.FSType = *azureSource.FSType pv.Spec.PersistentVolumeSource.CSI.VolumeAttributes[azureDiskFSType] = *azureSource.FSType } if azureSource.Kind != nil {"} {"_id":"q-en-kubernetes-a29f0fd0b6aed058b0bc2782346bfc8471d0ad238fa1d4a687719eab985a60d2","text":"// Volume is added to asw. Because attach operation fails, volume should not be reported as attached to the node. waitForVolumeAddedToNode(t, generatedVolumeName, nodeName1, asw) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateUncertain, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, false, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, false, asw, volumeAttachedCheckTimeout) // When volume is added to the node, it is set to mounted by default. Then the status will be updated by checking node status VolumeInUse. // Without this, the delete operation will be delayed due to mounted status"} {"_id":"q-en-kubernetes-a2b6b55667915031196503afc2ed8aab70a8d6d06638bf406b4c5ca34ce96307","text":"func FilterActivePods(pods []api.Pod) []*api.Pod { var result []*api.Pod for i := range pods { if api.PodSucceeded != pods[i].Status.Phase && api.PodFailed != pods[i].Status.Phase && pods[i].DeletionTimestamp == nil { result = append(result, &pods[i]) p := pods[i] if api.PodSucceeded != p.Status.Phase && api.PodFailed != p.Status.Phase && p.DeletionTimestamp == nil { result = append(result, &p) } else { glog.V(4).Infof(\"Ignoring inactive pod %v/%v in state %v, deletion time %v\", p.Namespace, p.Name, p.Status.Phase, p.DeletionTimestamp) } } return result } // SyncAllPodsWithStore lists all pods and inserts them into the given store. // Though this function is written in a generic manner, it is only used by the // controllers for a specific purpose, to synchronously populate the store // with the first batch of pods that would otherwise be sent by the Informer. // Doing this avoids more complicated forms of synchronization with the // Informer, though it also means that the controller calling this function // will receive \"OnUpdate\" events for all the pods in the store, instead of // \"OnAdd\". This should be ok, since most controllers are level triggered // and make decisions based on the contents of the store. // // TODO: Extend this logic to load arbitrary local state for the controllers // instead of just pods. func SyncAllPodsWithStore(kubeClient client.Interface, store cache.Store) { var allPods *api.PodList var err error listOptions := api.ListOptions{LabelSelector: labels.Everything(), FieldSelector: fields.Everything()} for { if allPods, err = kubeClient.Pods(api.NamespaceAll).List(listOptions); err != nil { glog.Warningf(\"Retrying pod list: %v\", err) continue } break } pods := []interface{}{} for i := range allPods.Items { p := allPods.Items[i] glog.V(4).Infof(\"Initializing store with pod %v/%v\", p.Namespace, p.Name) pods = append(pods, &p) } store.Replace(pods, allPods.ResourceVersion) return } "} {"_id":"q-en-kubernetes-a2df3fb8e50ced712520a3f56e222d8fa123c6ce62c43cd52fee14d43f624e86","text":" /* Copyright 2015 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Tests for liveness probes, both with http and with docker exec. // These tests use the descriptions in examples/liveness to create test pods. package e2e import ( \"time\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\" \"github.com/GoogleCloudPlatform/kubernetes/pkg/util\" \"github.com/golang/glog\" . \"github.com/onsi/ginkgo\" . \"github.com/onsi/gomega\" ) func runLivenessTest(c *client.Client, podDescr *api.Pod) bool { ns := \"e2e-test-\" + string(util.NewUUID()) glog.Infof(\"Creating pod %s in namespace %s\", podDescr.Name, ns) _, err := c.Pods(ns).Create(podDescr) if err != nil { glog.Infof(\"Failed to create pod %s: %v\", podDescr.Name, err) return false } // At the end of the test, clean up by removing the pod. defer c.Pods(ns).Delete(podDescr.Name) // Wait until the pod is not pending. (Here we need to check for something other than // 'Pending' other than checking for 'Running', since when failures occur, we go to // 'Terminated' which can cause indefinite blocking.) err = waitForPodNotPending(c, ns, podDescr.Name, 60*time.Second) if err != nil { glog.Infof(\"Failed to start pod %s in namespace %s: %v\", podDescr.Name, ns, err) return false } glog.Infof(\"Started pod %s in namespace %s\", podDescr.Name, ns) // Check the pod's current state and verify that restartCount is present. pod, err := c.Pods(ns).Get(podDescr.Name) if err != nil { glog.Errorf(\"Get pod %s in namespace %s failed: %v\", podDescr.Name, ns, err) return false } initialRestartCount := pod.Status.Info[\"liveness\"].RestartCount glog.Infof(\"Initial restart count of pod %s is %d\", podDescr.Name, initialRestartCount) // Wait for at most 48 * 5 = 240s = 4 minutes until restartCount is incremented for i := 0; i < 48; i++ { // Wait until restartCount is incremented. time.Sleep(5 * time.Second) pod, err = c.Pods(ns).Get(podDescr.Name) if err != nil { glog.Errorf(\"Get pod %s failed: %v\", podDescr.Name, err) return false } restartCount := pod.Status.Info[\"liveness\"].RestartCount glog.Infof(\"Restart count of pod %s in namespace %s is now %d\", podDescr.Name, ns, restartCount) if restartCount > initialRestartCount { glog.Infof(\"Restart count of pod %s in namespace %s increased from %d to %d during the test\", podDescr.Name, ns, initialRestartCount, restartCount) return true } } glog.Errorf(\"Did not see the restart count of pod %s in namespace %s increase from %d during the test\", podDescr.Name, ns, initialRestartCount) return false } // TestLivenessHttp tests restarts with a /healthz http liveness probe. func TestLivenessHttp(c *client.Client) bool { return runLivenessTest(c, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"liveness-http\", Labels: map[string]string{\"test\": \"liveness\"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"liveness\", Image: \"kubernetes/liveness\", Command: []string{\"/server\"}, LivenessProbe: &api.Probe{ Handler: api.Handler{ HTTPGet: &api.HTTPGetAction{ Path: \"/healthz\", Port: util.NewIntOrStringFromInt(8080), }, }, InitialDelaySeconds: 15, }, }, }, }, }) } // TestLivenessExec tests restarts with a docker exec \"cat /tmp/health\" liveness probe. func TestLivenessExec(c *client.Client) bool { return runLivenessTest(c, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"liveness-exec\", Labels: map[string]string{\"test\": \"liveness\"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"liveness\", Image: \"busybox\", Command: []string{\"/bin/sh\", \"-c\", \"echo ok >/tmp/health; sleep 10; echo fail >/tmp/health; sleep 600\"}, LivenessProbe: &api.Probe{ Handler: api.Handler{ Exec: &api.ExecAction{ Command: []string{\"cat\", \"/tmp/health\"}, }, }, InitialDelaySeconds: 15, }, }, }, }, }) } var _ = Describe(\"TestLivenessHttp\", func() { It(\"should pass\", func() { c, err := loadClient() Expect(err).NotTo(HaveOccurred()) Expect(TestLivenessHttp(c)).To(BeTrue()) }) }) var _ = Describe(\"TestLivenessExec\", func() { It(\"should pass\", func() { c, err := loadClient() Expect(err).NotTo(HaveOccurred()) Expect(TestLivenessExec(c)).To(BeTrue()) }) }) "} {"_id":"q-en-kubernetes-a3542af8c701543a3992b139ee67543d6f012ba6a20cda3b4877dc6c6fd5fe94","text":"} // Write stores the given \"val\" in CycleState with the given \"key\". // This function is not thread safe. In multi-threaded code, lock should be // acquired first. // This function is thread safe by acquiring an internal lock first. func (c *CycleState) Write(key StateKey, val StateData) { c.mx.Lock() c.storage[key] = val c.mx.Unlock() } // Delete deletes data with the given key from CycleState. // This function is not thread safe. In multi-threaded code, lock should be // acquired first. // This function is thread safe by acquiring an internal lock first. func (c *CycleState) Delete(key StateKey) { delete(c.storage, key) } // Lock acquires CycleState lock. func (c *CycleState) Lock() { c.mx.Lock() } // Unlock releases CycleState lock. func (c *CycleState) Unlock() { delete(c.storage, key) c.mx.Unlock() } // RLock acquires CycleState read lock. func (c *CycleState) RLock() { c.mx.RLock() } // RUnlock releases CycleState read lock. func (c *CycleState) RUnlock() { c.mx.RUnlock() } "} {"_id":"q-en-kubernetes-a35e2f6d2278a3d4338b67f593ae860d215763fd0fd83cb1828782d189d661f4","text":"creationTimestamp: null labels: kubernetes.io/bootstrapping: rbac-defaults name: system:csi-external-attacher rules: - apiGroups: - \"\" resources: - persistentvolumes verbs: - get - list - patch - update - watch - apiGroups: - \"\" resources: - nodes verbs: - get - list - watch - apiGroups: - storage.k8s.io resources: - volumeattachments verbs: - get - list - patch - update - watch - apiGroups: - \"\" resources: - events verbs: - create - get - list - patch - update - watch - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: annotations: rbac.authorization.kubernetes.io/autoupdate: \"true\" creationTimestamp: null labels: kubernetes.io/bootstrapping: rbac-defaults name: system:csi-external-provisioner rules: - apiGroups: - \"\" resources: - persistentvolumes verbs: - create - delete - get - list - watch - apiGroups: - \"\" resources: - persistentvolumeclaims verbs: - get - list - patch - update - watch - apiGroups: - storage.k8s.io resources: - storageclasses verbs: - list - watch - apiGroups: - \"\" resources: - events verbs: - create - get - list - patch - update - watch - apiGroups: - \"\" resources: - nodes verbs: - get - list - watch - apiGroups: - storage.k8s.io resources: - csinodes verbs: - get - list - watch - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: annotations: rbac.authorization.kubernetes.io/autoupdate: \"true\" creationTimestamp: null labels: kubernetes.io/bootstrapping: rbac-defaults name: system:discovery rules: - nonResourceURLs:"} {"_id":"q-en-kubernetes-a39cc3ab0b3c6533e0d5ae41a116f8db22fed924febaec5332c7512948eb1b39","text":"\"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library\", \"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library\", \"//staging/src/k8s.io/client-go/dynamic:go_default_library\", \"//staging/src/k8s.io/client-go/kubernetes:go_default_library\", \"//staging/src/k8s.io/client-go/tools/cache:go_default_library\", \"//staging/src/k8s.io/client-go/tools/watch:go_default_library\","} {"_id":"q-en-kubernetes-a3ed6a2f28d1ce850d761442170dc51e3e527fbc10b354b6a44639196574966d","text":"func (s *sourceFile) processEvent(e *inotify.Event) error { // Ignore file start with dots if strings.HasPrefix(e.Name, \".\") { if strings.HasPrefix(filepath.Base(e.Name), \".\") { glog.V(4).Infof(\"Ignored pod manifest: %s, because it starts with dots\", e.Name) return nil }"} {"_id":"q-en-kubernetes-a40216cdead09cc699620e52cf17038828aa969465664589af69a56a033aaa42","text":"return nil, err } defer os.RemoveAll(tmpDir) out, err := exec.Command(\"nice\", \"-n\", \"19\", \"du\", \"-s\", \"-B\", \"1\", tmpDir).CombinedOutput() out, err := exec.Command(\"nice\", \"-n\", \"19\", \"du\", \"-x\", \"-s\", \"-B\", \"1\", tmpDir).CombinedOutput() if err != nil { return nil, fmt.Errorf(\"failed command 'du' on %s with error %v\", tmpDir, err) }"} {"_id":"q-en-kubernetes-a4183fa66f98b6732082303e9c067fb3222a6ce06f424aa792ab7f109d5d10e3","text":"restful \"github.com/emicklei/go-restful\" cadvisorapi \"github.com/google/cadvisor/info/v1\" \"github.com/pkg/errors\" \"k8s.io/klog\" \"k8s.io/api/core/v1\""} {"_id":"q-en-kubernetes-a41a8a1855b1e266eefe75bf8d12fcd40452e568666db14cb2cc5961333e6e39","text":"\"//federation/apis/federation:go_default_library\", \"//pkg/api:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library\", ], )"} {"_id":"q-en-kubernetes-a44e0f4084835fb01bc7a089a822fcb44a953d3a0bf70c73df5fe749905c355c","text":"}, }, }, }) }, true) }) It(\"should *not* be restarted with a docker exec \"cat /tmp/health\" liveness probe\", func() { runLivenessTest(c, &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: \"liveness-exec\", Labels: map[string]string{\"test\": \"liveness\"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name: \"liveness\", Image: \"gcr.io/google_containers/busybox\", Command: []string{\"/bin/sh\", \"-c\", \"echo ok >/tmp/health; sleep 600\"}, LivenessProbe: &api.Probe{ Handler: api.Handler{ Exec: &api.ExecAction{ Command: []string{\"cat\", \"/tmp/health\"}, }, }, InitialDelaySeconds: 15, }, }, }, }, }, false) }) It(\"should be restarted with a /healthz http liveness probe\", func() {"} {"_id":"q-en-kubernetes-a44f6cb5e869eccf248b8ac505e27244011ef25c2c80e1233583629299af7a4f","text":"`service`, a client can simply connect to $MYAPP_SERVICE_HOST on port $MYAPP_SERVICE_PORT. ## Service without selector Services, in addition to providing clean abstraction to access pods, can also abstract any kind of backend: - you want to have an external database cluster in production, but in test you use your own databases. - you want to point your service to a service in another [`namespace`](namespaces.md) or on another cluster. - you are migrating your workload to Kubernetes and some of your backends run outside of Kubernetes. In any of these scenarios you can define a service without a selector: ```json \"kind\": \"Service\", \"apiVersion\": \"v1beta1\", \"id\": \"myapp\", \"port\": 8765 ``` then you can explicitly map the service to a specific endpoint(s): ```json \"kind\": \"Endpoints\", \"apiVersion\": \"v1beta1\", \"id\": \"myapp\", \"endpoints\": [\"173.194.112.206:80\"] ``` Access to the service without a selector works the same as if it had selector. The traffic will be routed to endpoints defined by the user (`173.194.112.206:80` in case of this example). ## How do they work? Each node in a Kubernetes cluster runs a `service proxy`. This application"} {"_id":"q-en-kubernetes-a466b9e63c540584048e9bacc1300b9f74afd17d614bd11edff383774d1ea5f2","text":"if plug.GetPluginName() != \"testPlugin\" { t.Errorf(\"Wrong name: %s\", plug.GetPluginName()) } plug, err = vpm.FindPluginBySpec(nil) if err == nil { t.Errorf(\"Should return error if volume spec is nil\") } volumeSpec := &Spec{} plug, err = vpm.FindPluginBySpec(volumeSpec) if err != nil { t.Errorf(\"Should return test plugin if volume spec is not nil\") } } func Test_ValidatePodTemplate(t *testing.T) {"} {"_id":"q-en-kubernetes-a488ab7256b4fcb0fadbded6d0bc5f28418fdb73d767c40b027b5e6964ad7b7c","text":"if host == \"\" { // No external IPs were found, let's try to use internal as plan B for _, a := range node.Status.Addresses { if a.Type == v1.NodeInternalIP { if a.Type == v1.NodeInternalIP && a.Address != \"\" { host = net.JoinHostPort(a.Address, sshPort) break }"} {"_id":"q-en-kubernetes-a4a209b7171b9aa8c094647eef09956300a575bc73759a1dcdcbebf01825676d","text":"import ( \"context\" \"fmt\" \"strings\" \"sync\" v1 \"k8s.io/api/core/v1\""} {"_id":"q-en-kubernetes-a4aa0ffea015c7284836f585216784e6c120c3fd758872fd75c1f8df890ccf6f","text":"return admission.NewForbidden(a, fmt.Errorf(\"node requested token bound to a pod scheduled on a different node\")) } // Note: A token may only be bound to one object at a time. By requiring // the Pod binding, noderestriction eliminates the opportunity to spoof // a Node binding. Instead, kube-apiserver automatically infers and sets // the Node binding when it receives a Pod binding. See: // https://github.com/kubernetes/kubernetes/issues/121723 for more info. return nil }"} {"_id":"q-en-kubernetes-a4ce69cc8100ded1683c886462a275a072b27d656155a2dc3ea86e211b08586b","text":"FailedPreStopHook = \"FailedPreStopHook\" UnfinishedPreStopHook = \"UnfinishedPreStopHook\" ) // ToObjectReference takes an old style object reference and converts it to a client-go one func ToObjectReference(ref *v1.ObjectReference) *clientv1.ObjectReference { if ref == nil { return nil } return &clientv1.ObjectReference{ Kind: ref.Kind, Namespace: ref.Namespace, Name: ref.Name, UID: ref.UID, APIVersion: ref.APIVersion, ResourceVersion: ref.ResourceVersion, FieldPath: ref.FieldPath, } } "} {"_id":"q-en-kubernetes-a4d320751528f78384b9a160437157d1b0581273363616ed802fd7552bf18b71","text":"failedPodsObserved += failedPodsObservedOnNode } // Remove pods assigned to not existing nodes when daemonset pods are scheduled by default scheduler. // Remove unscheduled pods assigned to not existing nodes when daemonset pods are scheduled by scheduler. // If node doesn't exist then pods are never scheduled and can't be deleted by PodGCController. if utilfeature.DefaultFeatureGate.Enabled(features.ScheduleDaemonSetPods) { podsToDelete = append(podsToDelete, getPodsWithoutNode(nodeList, nodeToDaemonPods)...) podsToDelete = append(podsToDelete, getUnscheduledPodsWithoutNode(nodeList, nodeToDaemonPods)...) } // Label new pods using the hash label value of the current history when creating them"} {"_id":"q-en-kubernetes-a516243635fb744399c8da04724fecc7d86e9ccb58a3fb3cac909bc904571e1c","text":"\"k8s.io/apimachinery/pkg/util/sets\" utilfeature \"k8s.io/apiserver/pkg/util/feature\" cliflag \"k8s.io/component-base/cli/flag\" \"k8s.io/klog\" \"k8s.io/kubelet/config/v1beta1\" \"k8s.io/kubernetes/pkg/apis/core\" \"k8s.io/kubernetes/pkg/features\""} {"_id":"q-en-kubernetes-a51ef2e6038ae62038970c53eb0371837726b81b7e9469671466c96ea6452f8c","text":"\"spec.version[v1].schema.openAPIV3Schema.properties[d]: Required value: because it is defined in spec.version[v1].schema.openAPIV3Schema.not.properties[d]\", }, }, { desc: \"metadata with non-properties\", globalSchema: ` type: object properties: metadata: minimum: 42.0 `, expectedViolations: []string{ \"spec.validation.openAPIV3Schema.properties[metadata]: Forbidden: must not specify anything other than name and generateName, but metadata is implicitly specified\", \"spec.validation.openAPIV3Schema.properties[metadata].type: Required value: must not be empty for specified object fields\", }, }, { desc: \"metadata with other properties\", globalSchema: ` type: object properties: metadata: properties: name: pattern: \"^[a-z]+$\" labels: type: object maxLength: 4 `, expectedViolations: []string{ \"spec.validation.openAPIV3Schema.properties[metadata]: Forbidden: must not specify anything other than name and generateName, but metadata is implicitly specified\", \"spec.validation.openAPIV3Schema.properties[metadata].type: Required value: must not be empty for specified object fields\", \"spec.validation.openAPIV3Schema.properties[metadata].properties[name].type: Required value: must not be empty for specified object fields\", }, }, { desc: \"metadata with name property\", globalSchema: ` type: object properties: metadata: type: object properties: name: type: string pattern: \"^[a-z]+$\" `, expectedViolations: []string{}, }, { desc: \"metadata with generateName property\", globalSchema: ` type: object properties: metadata: type: object properties: generateName: type: string pattern: \"^[a-z]+$\" `, expectedViolations: []string{}, }, { desc: \"metadata with name and generateName property\", globalSchema: ` type: object properties: metadata: type: object properties: name: type: string pattern: \"^[a-z]+$\" generateName: type: string pattern: \"^[a-z]+$\" `, expectedViolations: []string{}, }, { desc: \"metadata under junctors\", globalSchema: ` type: object properties: metadata: type: object properties: name: type: string pattern: \"^[a-z]+$\" allOf: - properties: metadata: {} anyOf: - properties: metadata: {} oneOf: - properties: metadata: {} not: properties: metadata: {} `, expectedViolations: []string{ \"spec.validation.openAPIV3Schema.anyOf[0].properties[metadata]: Forbidden: must not be specified in a nested context\", \"spec.validation.openAPIV3Schema.allOf[0].properties[metadata]: Forbidden: must not be specified in a nested context\", \"spec.validation.openAPIV3Schema.oneOf[0].properties[metadata]: Forbidden: must not be specified in a nested context\", \"spec.validation.openAPIV3Schema.not.properties[metadata]: Forbidden: must not be specified in a nested context\", }, }, } for i := range tests {"} {"_id":"q-en-kubernetes-a574ad834c454170f53f47111f06258f88e29758d5d397cc0e21a02c600b0762","text":"// IsFitPredicateRegistered is useful for testing providers. func IsFitPredicateRegistered(name string) bool { schedulerFactoryMutex.Lock() defer schedulerFactoryMutex.Unlock() schedulerFactoryMutex.RLock() defer schedulerFactoryMutex.RUnlock() _, ok := fitPredicateMap[name] return ok }"} {"_id":"q-en-kubernetes-a5e0825a9e4c0413d67bc0c514897f150cbf14c9831056f3407f1b5b7bcd15a4","text":"name = \"go_default_library\", srcs = [\"event.go\"], tags = [\"automanaged\"], deps = [\"//vendor/k8s.io/api/core/v1:go_default_library\"], ) filegroup("} {"_id":"q-en-kubernetes-a5f510111ba0fa9274e518c02f796091ca400ed8faeb5631315120a7b4045817","text":"} func (dc *DeploymentController) syncRecreateDeployment(deployment extensions.Deployment) error { // TODO: implement me. newRC, err := dc.getNewRC(deployment) if err != nil { return err } oldRCs, err := dc.getOldRCs(deployment) if err != nil { return err } allRCs := append(oldRCs, newRC) // scale down old rcs scaledDown, err := dc.scaleDownOldRCsForRecreate(oldRCs, deployment) if err != nil { return err } if scaledDown { // Update DeploymentStatus return dc.updateDeploymentStatus(allRCs, newRC, deployment) } // scale up new rc scaledUp, err := dc.scaleUpNewRCForRecreate(newRC, deployment) if err != nil { return err } if scaledUp { // Update DeploymentStatus return dc.updateDeploymentStatus(allRCs, newRC, deployment) } return nil }"} {"_id":"q-en-kubernetes-a5f63c695c7a7fd3e106f81a353c7857116c33873d36a846a1dbbea7047d87cd","text":"continue } if o.Local || cmdutil.GetDryRunFlag(o.Cmd) { if cmdutil.GetDryRunFlag(o.Cmd) { fmt.Fprintln(o.Err, \"info: running in local mode...\") return o.PrintObject(o.Cmd, o.Mapper, info.Object, o.Out) }"} {"_id":"q-en-kubernetes-a5fd77247d73ccb39ef29b9b2173fb7359d3bc2a3821f09118697f9dd145a1e3","text":" #!/bin/bash # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Launches a container and verifies it can be reached. Assumes that # we're being called by hack/e2e-test.sh (we use some env vars it sets up). # TODO: Convert uses of gcutil to gcloud set -o errexit set -o nounset set -o pipefail KUBE_ROOT=$(dirname \"${BASH_SOURCE}\")/../.. source \"${KUBE_ROOT}/cluster/kube-env.sh\" source \"${KUBE_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh\" if [[ \"$KUBERNETES_PROVIDER\" != \"gce\" ]]; then echo \"PD test is only run for GCE\" return 0 fi disk_name=\"e2e-$(date +%H-%M-%s)\" config=\"/tmp/${disk_name}.yaml\" function teardown() { echo \"Cleaning up test artifacts\" ${KUBECFG} delete pods/testpd rm -rf ${config} echo \"Waiting for disk to become unmounted\" sleep 20 gcutil deletedisk -f --zone=${ZONE} ${disk_name} } trap \"teardown\" EXIT perl -p -e \"s/%.*%/${disk_name}/g\" ${KUBE_ROOT}/examples/gce-pd/testpd.yaml > ${config} # Create and mount the disk. gcutil adddisk --size_gb=10 --zone=${ZONE} ${disk_name} gcutil attachdisk --disk ${disk_name} ${MASTER_NAME} gcutil ssh ${MASTER_NAME} sudo rm -rf /mnt/tmp gcutil ssh ${MASTER_NAME} sudo mkdir /mnt/tmp gcutil ssh ${MASTER_NAME} sudo /usr/share/google/safe_format_and_mount /dev/disk/by-id/google-${disk_name} /mnt/tmp gcutil ssh ${MASTER_NAME} sudo umount /mnt/tmp gcloud compute instances detach-disk --disk ${disk_name} --zone ${ZONE} ${MASTER_NAME} ${KUBECFG} -c ${config} create pods pod_id_list=$($KUBECFG '-template={{range.items}}{{.id}} {{end}}' -l test=testpd list pods) # Pod turn up on a clean cluster can take a while for the docker image pull. all_running=0 for i in $(seq 1 24); do echo \"Waiting for pods to come up.\" sleep 5 all_running=1 for id in $pod_id_list; do current_status=$($KUBECFG -template '{{.currentState.status}}' get pods/$id) || true if [[ \"$current_status\" != \"Running\" ]]; then all_running=0 break fi done if [[ \"${all_running}\" == 1 ]]; then break fi done if [[ \"${all_running}\" == 0 ]]; then echo \"Pods did not come up in time\" exit 1 fi "} {"_id":"q-en-kubernetes-a6230681f6cd44905810676af4cf1a61b3e1fb0fc64d64f6d4a8f2a8818d0c5f","text":" tagged_release ci012abc 012abc pr101 Merge PR #101 ci012abc->pr101 ci345cde 345cde pr101->ci345cde pr102 Merge PR #102 ci345cde->pr102 pr100 Merge PR #100 pr102->pr100 version_commit 678fed dev_commit 456dcb version_commit->dev_commit dev_commit->pr100 release_info pkg/version/base.go: gitVersion = "v0.5"; dev_info pkg/version/base.go: gitVersion = "v0.5-dev"; pr99 Merge PR #99 pr99->ci012abc pr99->version_commit tag $ git tag -a v0.5 tag->version_commit "} {"_id":"q-en-kubernetes-a62793a3b95d6154d92dbb5c2a9dce87a97b4035747cff8d90565e03c4cdd943","text":"// If the ordinal could not be parsed (ord < 0), ignore the Pod. } // make sure to update the latest status even if there is an error later defer func() { // update the set's status statusErr := ssc.updateStatefulSetStatus(ctx, set, &status) if statusErr == nil { klog.V(4).InfoS(\"Updated status\", \"statefulSet\", klog.KObj(set), \"replicas\", status.Replicas, \"readyReplicas\", status.ReadyReplicas, \"currentReplicas\", status.CurrentReplicas, \"updatedReplicas\", status.UpdatedReplicas) } else if updateErr == nil { updateErr = statusErr } else { klog.V(4).InfoS(\"Could not update status\", \"statefulSet\", klog.KObj(set), \"err\", statusErr) } }() // for any empty indices in the sequence [0,set.Spec.Replicas) create a new Pod at the correct revision for ord := 0; ord < replicaCount; ord++ { if replicas[ord] == nil {"} {"_id":"q-en-kubernetes-a62df326aabecbe22d6130e8c85254673b9dda4732ea745e85d1ba0b23efb4ee","text":"NoSnatTest = ImageConfig{e2eRegistry, \"no-snat-test\", \"1.0\", true} NoSnatTestProxy = ImageConfig{e2eRegistry, \"no-snat-test-proxy\", \"1.0\", true} NWayHTTP = ImageConfig{e2eRegistry, \"n-way-http\", \"1.0\", true} // When these values are updated, also update cmd/kubelet/app/options/options.go Pause = ImageConfig{gcRegistry, \"pause\", \"3.0\", true} // When these values are updated, also update cmd/kubelet/app/options/container_runtime.go Pause = ImageConfig{gcRegistry, \"pause\", \"3.1\", true} Porter = ImageConfig{e2eRegistry, \"porter\", \"1.0\", true} PortForwardTester = ImageConfig{e2eRegistry, \"port-forward-tester\", \"1.0\", true} Redis = ImageConfig{e2eRegistry, \"redis\", \"1.0\", true}"} {"_id":"q-en-kubernetes-a688c882943d891e578f38d10a181b608761cb3841c8683b7d4e998158b9799d","text":"} func pvcDeletePolicyString(policy *apps.StatefulSetPersistentVolumeClaimRetentionPolicy) string { if policy == nil { return \"nullPolicy\" } const retain = apps.RetainPersistentVolumeClaimRetentionPolicyType const delete = apps.DeletePersistentVolumeClaimRetentionPolicyType switch {"} {"_id":"q-en-kubernetes-a6c7888653047e866b89738d62ef682b2c33577692edf0e5b92cc40b604b488a","text":"\"os/exec\" \"path\" \"path/filepath\" \"runtime\" \"strconv\" \"strings\" \"sync\""} {"_id":"q-en-kubernetes-a6df48e174beefffa0800f0afb38d17410ec77c007cc0658e26039ff501b959e","text":"// Write 10 lines to log file. // Let ReadLogs start. time.Sleep(50 * time.Millisecond) for line := 0; line < 10; line++ { // Write the first three lines to log file now := time.Now().Format(types.RFC3339NanoLenient)"} {"_id":"q-en-kubernetes-a701d97f6b606857ad676eaf7e3e874536f0587c7e9331d78d581bc9fc9ae5b5","text":"\"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/stats\" \"k8s.io/kubernetes/test/e2e/framework\" systemdutil \"github.com/coreos/go-systemd/util\" . \"github.com/onsi/ginkgo\" . \"github.com/onsi/gomega\" \"github.com/onsi/gomega/gstruct\""} {"_id":"q-en-kubernetes-a77481b09911abf81cebe0f1adf50907281f6589dc406684ffa0acdde3888577","text":"```yaml kind: Service apiVersion: v1beta1 id: nginxExample # must be a DNS compatible name id: nginx-example # the port that this service should serve on port: 8000 # just like the selector in the replication controller, # but this time it identifies the set of pods to load balance # traffic to. selector: - name: nginx name: nginx # the container on each pod to connect to, can be a name # (e.g. 'www') or a number (e.g. 80) containerPort: 80"} {"_id":"q-en-kubernetes-a7903da6be812df496914eab316874f755b430ef5ba0268f91fe4f7c225f0f24","text":"}) }) ginkgo.Context(\"when creating a pod in the host PID namespace\", func() { makeHostPidPod := func(podName, image string, command []string, hostPID bool) *v1.Pod { return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, HostPID: hostPID, Containers: []v1.Container{ { Image: image, Name: podName, Command: command, }, }, }, } } createAndWaitHostPidPod := func(podName string, hostPID bool) { podClient.Create(makeHostPidPod(podName, busyboxImage, []string{\"sh\", \"-c\", \"pidof nginx || true\"}, hostPID, )) podClient.WaitForSuccess(podName, framework.PodStartTimeout) } nginxPid := \"\" ginkgo.BeforeEach(func() { nginxPodName := \"nginx-hostpid-\" + string(uuid.NewUUID()) podClient.CreateSync(makeHostPidPod(nginxPodName, imageutils.GetE2EImage(imageutils.Nginx), nil, true, )) output := f.ExecShellInContainer(nginxPodName, nginxPodName, \"cat /var/run/nginx.pid\") nginxPid = strings.TrimSpace(output) }) ginkgo.It(\"should show its pid in the host PID namespace [NodeFeature:HostAccess]\", func() { busyboxPodName := \"busybox-hostpid-\" + string(uuid.NewUUID()) createAndWaitHostPidPod(busyboxPodName, true) logs, err := e2epod.GetPodLogs(f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName) if err != nil { framework.Failf(\"GetPodLogs for pod %q failed: %v\", busyboxPodName, err) } pids := strings.TrimSpace(logs) framework.Logf(\"Got nginx's pid %q from pod %q\", pids, busyboxPodName) if pids == \"\" { framework.Failf(\"nginx's pid should be seen by hostpid containers\") } pidSets := sets.NewString(strings.Split(pids, \" \")...) if !pidSets.Has(nginxPid) { framework.Failf(\"nginx's pid should be seen by hostpid containers\") } }) ginkgo.It(\"should not show its pid in the non-hostpid containers [NodeFeature:HostAccess]\", func() { busyboxPodName := \"busybox-non-hostpid-\" + string(uuid.NewUUID()) createAndWaitHostPidPod(busyboxPodName, false) logs, err := e2epod.GetPodLogs(f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName) if err != nil { framework.Failf(\"GetPodLogs for pod %q failed: %v\", busyboxPodName, err) } pids := strings.TrimSpace(logs) framework.Logf(\"Got nginx's pid %q from pod %q\", pids, busyboxPodName) pidSets := sets.NewString(strings.Split(pids, \" \")...) if pidSets.Has(nginxPid) { framework.Failf(\"nginx's pid should not be seen by non-hostpid containers\") } }) }) ginkgo.Context(\"when creating a pod in the host IPC namespace\", func() { makeHostIPCPod := func(podName, image string, command []string, hostIPC bool) *v1.Pod { return &v1.Pod{"} {"_id":"q-en-kubernetes-a7fd09a436b53fb7dfa652732c093e614b5e19b8b01acf6471e820421d9d938c","text":"m.mutex.Lock() defer m.mutex.Unlock() if _, exists := m.endpoints[resourceName]; exists { if ep, exists := m.endpoints[resourceName]; exists { m.markResourceUnhealthy(resourceName) klog.V(2).InfoS(\"Endpoint became unhealthy\", \"resourceName\", resourceName, \"endpoint\", m.endpoints[resourceName]) } klog.V(2).InfoS(\"Endpoint became unhealthy\", \"resourceName\", resourceName, \"endpoint\", ep) m.endpoints[resourceName].e.setStopTime(time.Now()) ep.e.setStopTime(time.Now()) } } // PluginListAndWatchReceiver receives ListAndWatchResponse from a device plugin"} {"_id":"q-en-kubernetes-a83cd53bae5825829bd5f8d34cf762ad40cdf7fb413b5b2cadce3c6877143e08","text":"allErrs = append(allErrs, field.Duplicate(fldPath.Child(\"name\"), driver.Name)) } driverNamesInSpecs.Insert(driver.Name) topoKeys := make(sets.String) topoKeys := sets.New[string]() for _, key := range driver.TopologyKeys { if len(key) == 0 { allErrs = append(allErrs, field.Required(fldPath, key))"} {"_id":"q-en-kubernetes-a845d1c61cf7444ea9e038c7d67dcecdcb1834ec56a5a39866b3820705feb46d","text":"e.clientConn.Close() } // dial establishes the gRPC communication with the registered device plugin. // dial establishes the gRPC communication with the registered device plugin. https://godoc.org/google.golang.org/grpc#Dial func dial(unixSocketPath string) (pluginapi.DevicePluginClient, *grpc.ClientConn, error) { c, err := grpc.Dial(unixSocketPath, grpc.WithInsecure(), c, err := grpc.Dial(unixSocketPath, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(10*time.Second), grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout(\"unix\", addr, timeout) }),"} {"_id":"q-en-kubernetes-a86859753535cf42bb99a82c1fcaa44dfe5c935f7b008dba9c957466dcec9c92","text":"type LRUExpireCache struct { cache *lru.Cache lock sync.RWMutex lock sync.Mutex } func NewLRUExpireCache(maxSize int) *LRUExpireCache {"} {"_id":"q-en-kubernetes-a884b6f9cb8344dc90ae47cb46a2a5bee81676705d8985974446e1ec66074cc2","text":"\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\" \"k8s.io/apimachinery/pkg/runtime\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/client-go/dynamic\" \"k8s.io/client-go/kubernetes\""} {"_id":"q-en-kubernetes-a8dd1917797bc5f482daee60bf0f29aa78e79fe2e7a014099ddb78a0099f1600","text":"\"attachRequired\": \"attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.nnThis field is immutable.\", \"podInfoOnMount\": \"If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volumen defined by a CSIVolumeSource, otherwise \"false\"nn\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.nnThis field is immutable.\", \"volumeLifecycleModes\": \"VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.nnThis field is immutable.\", \"storageCapacity\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field is immutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"storageCapacity\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field was immutable in Kubernetes <= 1.22 and now is mutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"fsGroupPolicy\": \"Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.nnThis field is immutable.nnDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.\", \"tokenRequests\": \"TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {n \"\": {n \"token\": ,n \"expirationTimestamp\": ,n },n ...n}nnNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\", \"requiresRepublish\": \"RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.nnNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\","} {"_id":"q-en-kubernetes-a8e7be87469f3db4b87b353f0c5442e105958d66686a072ebeba0ec2f9c5238f","text":"allErrs := errs.ValidationErrorList{} allErrs = append(allErrs, ValidateObjectMetaUpdate(&oldNamespace.ObjectMeta, &newNamespace.ObjectMeta).Prefix(\"metadata\")...) newNamespace.Spec = oldNamespace.Spec if newNamespace.DeletionTimestamp.IsZero() { if newNamespace.Status.Phase != api.NamespaceActive { allErrs = append(allErrs, errs.NewFieldInvalid(\"Status.Phase\", newNamespace.Status.Phase, \"A namespace may only be in active status if it does not have a deletion timestamp.\")) } } else { if newNamespace.Status.Phase != api.NamespaceTerminating { allErrs = append(allErrs, errs.NewFieldInvalid(\"Status.Phase\", newNamespace.Status.Phase, \"A namespace may only be in terminating status if it has a deletion timestamp.\")) } } return allErrs }"} {"_id":"q-en-kubernetes-a8ecd5f427bafb546097a1791a95d81e1e2cf9cb3776f47c98f8a6cc9c76e25d","text":"opts.Client = c opts.PodName = name opts.Namespace = ns // TODO: opts.Run sets opts.Err to nil, we need to find a better way stderr := opts.Err if err := opts.Run(); err != nil { fmt.Fprintf(opts.Err, \"Error attaching, falling back to logs: %vn\", err) fmt.Fprintf(stderr, \"Error attaching, falling back to logs: %vn\", err) req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: ctrName}) if err != nil { return err"} {"_id":"q-en-kubernetes-a9036c71391bef63fbd276b3b23ffa2572e4e4d5fe9611814be8a20ab57999b7","text":") const ( defaultSandboxImage = \"gcr.io/google_containers/pause-amd64:3.0\" defaultSandboxImage = \"gcr.io/google_containers/pause-amd64:3.1\" // Various default sandbox resources requests/limits. defaultSandboxCPUshares int64 = 2"} {"_id":"q-en-kubernetes-a91084b567a3a4271cdda2fe5a4c99255e3423efb8e261aed9543bf3311eba0d","text":"expectedReconciledRole: aggregatedRole(aggregationrule([]map[string]string{{\"alpha\": \"bravo\"}, {\"foo\": \"bar\"}})), expectedReconciliationNeeded: true, }, \"unexpected aggregation\": { // desired role is not aggregated expectedRole: role(rules(\"pods\", \"nodes\", \"secrets\"), nil, nil), // existing role is aggregated actualRole: aggregatedRole(aggregationrule([]map[string]string{{\"alpha\": \"bravo\"}})), removeExtraPermissions: false, // reconciled role should have desired permissions and not be aggregated expectedReconciledRole: role(rules(\"pods\", \"nodes\", \"secrets\"), nil, nil), expectedReconciliationNeeded: true, }, \"unexpected aggregation with differing permissions\": { // desired role is not aggregated expectedRole: role(rules(\"pods\", \"nodes\", \"secrets\"), nil, nil), // existing role is aggregated and has other permissions actualRole: func() *rbac.ClusterRole { r := aggregatedRole(aggregationrule([]map[string]string{{\"alpha\": \"bravo\"}})) r.Rules = rules(\"deployments\") return r }(), removeExtraPermissions: false, // reconciled role should have aggregation removed, preserve differing permissions, and include desired permissions expectedReconciledRole: role(rules(\"deployments\", \"pods\", \"nodes\", \"secrets\"), nil, nil), expectedReconciliationNeeded: true, }, } for k, tc := range tests {"} {"_id":"q-en-kubernetes-a9894783a43b93fe5e0a627e2645d94f7c8bf0f9017e126f6ccfeb3313b04aa3","text":"## Set resource limits/request of a deployment # Pre-condition: no deployment exists kube::test::get_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" '' # Set resources of a local file without talking to the server kubectl set resources -f hack/testdata/deployment-multicontainer.yaml -c=perl --limits=cpu=300m --requests=cpu=300m --local -o yaml \"${kube_flags[@]}\" ! kubectl set resources -f hack/testdata/deployment-multicontainer.yaml -c=perl --limits=cpu=300m --requests=cpu=300m --dry-run -o yaml \"${kube_flags[@]}\" # Create a deployment kubectl create -f hack/testdata/deployment-multicontainer.yaml \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{$id_field}}:{{end}}\" 'nginx-deployment:' kube::test::get_object_assert deployment \"{{range.items}}{{$deployment_image_field}}:{{end}}\" \"${IMAGE_DEPLOYMENT_R1}:\" kube::test::get_object_assert deployment \"{{range.items}}{{$deployment_second_image_field}}:{{end}}\" \"${IMAGE_PERL}:\" # Set the deployment's cpu limits kubectl set resources deployment nginx-deployment --limits=cpu=200m \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"200m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.limits.cpu}}:{{end}}\" \"200m:\" # Set the deployments memory limits without affecting the cpu limits kubectl set resources deployment nginx-deployment --limits=memory=256Mi \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"200m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.memory}}:{{end}}\" \"256Mi:\" # Set the deployments resource requests without effecting the deployments limits kubectl set resources deployment nginx-deployment --requests=cpu=100m,memory=256Mi \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"200m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.memory}}:{{end}}\" \"256Mi:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.requests.cpu}}:{{end}}\" \"100m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.requests.memory}}:{{end}}\" \"256Mi:\" # Set the deployments resource requests and limits to zero kubectl set resources deployment nginx-deployment --requests=cpu=0,memory=0 --limits=cpu=0,memory=0 \"${kube_flags[@]}\" kubectl set resources deployment nginx-deployment --limits=cpu=100m \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"100m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.limits.cpu}}:{{end}}\" \"100m:\" # Set a non-existing container should fail ! kubectl set resources deployment nginx-deployment -c=redis --limits=cpu=100m # Set the limit of a specific container in deployment kubectl set resources deployment nginx-deployment --limits=cpu=100m \"${kube_flags[@]}\" kubectl set resources deployment nginx-deployment -c=nginx --limits=cpu=200m \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"200m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.limits.cpu}}:{{end}}\" \"100m:\""} {"_id":"q-en-kubernetes-a9a56b4a6ade3668a7f9f5fcff4beb2d43641c365c33284dbae7180f2c8a15e7","text":"// we have removed content, so mark it finalized by us result, err := retryOnConflictError(kubeClient, namespace, finalizeNamespaceFunc) if err != nil { // in normal practice, this should not be possible, but if a deployment is running // two controllers to do namespace deletion that share a common finalizer token it's // possible that a not found could occur since the other controller would have finished the delete. if errors.IsNotFound(err) { return nil } return err }"} {"_id":"q-en-kubernetes-a9ab3762a0a4d0fec1dd07cd29c0a59db124419a72e81cf29f7562474b24e8ff","text":"klog.Errorf(\"cannot convert to *v1.Pod: %v\", obj) return } klog.V(3).Infof(\"add event for scheduled pod %s/%s \", pod.Namespace, pod.Name) if err := sched.SchedulerCache.AddPod(pod); err != nil { klog.Errorf(\"scheduler cache AddPod failed: %v\", err)"} {"_id":"q-en-kubernetes-a9ac6b55a394d8008f12142a87651ac19dadbfabf469a4064b2c16382416509d","text":"// we can recreate it cleanly. if cachedService.Spec.CreateExternalLoadBalancer { glog.Infof(\"Deleting existing load balancer for service %s that needs an updated load balancer.\", namespacedName) if err := s.ensureLBDeleted(cachedService); err != nil { if err := s.balancer.EnsureTCPLoadBalancerDeleted(s.loadBalancerName(cachedService), s.zone.Region); err != nil { return err, retryable } }"} {"_id":"q-en-kubernetes-aa05ce0d76b9bc116e13d2106a38ef8cff549dcc1af5bcdc1d9ddd74c8e2567e","text":"err = wait.PollImmediate(podRetryPeriod, podRetryTimeout, checkPodListQuantity(f, \"type=Testing\", 0)) framework.ExpectNoError(err, \"found a pod(s)\") }) ginkgo.It(\"should run through the lifecycle of Pods and PodStatus\", func() { podResource := schema.GroupVersionResource{Group: \"\", Version: \"v1\", Resource: \"pods\"} testNamespaceName := f.Namespace.Name testPodName := \"pod-test\" testPodImage := imageutils.GetE2EImage(imageutils.Agnhost) testPodImage2 := imageutils.GetE2EImage(imageutils.Httpd) testPodLabels := map[string]string{\"test-pod-static\": \"true\"} testPodLabelsFlat := \"test-pod-static=true\" zero := int64(0) w := &cache.ListWatch{ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = testPodLabelsFlat return f.ClientSet.CoreV1().Pods(testNamespaceName).Watch(context.TODO(), options) }, } podsList, err := f.ClientSet.CoreV1().Pods(\"\").List(context.TODO(), metav1.ListOptions{LabelSelector: testPodLabelsFlat}) framework.ExpectNoError(err, \"failed to list Pods\") testPod := v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: testPodName, Labels: testPodLabels, }, Spec: v1.PodSpec{ TerminationGracePeriodSeconds: &zero, Containers: []v1.Container{ { Name: testPodName, Image: testPodImage, }, }, }, } ginkgo.By(\"creating a Pod with a static label\") _, err = f.ClientSet.CoreV1().Pods(testNamespaceName).Create(context.TODO(), &testPod, metav1.CreateOptions{}) framework.ExpectNoError(err, \"failed to create Pod %v in namespace %v\", testPod.ObjectMeta.Name, testNamespaceName) ginkgo.By(\"watching for Pod to be ready\") ctx, cancel := context.WithTimeout(context.Background(), podReadyTimeout) defer cancel() _, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) { if pod, ok := event.Object.(*v1.Pod); ok { found := pod.ObjectMeta.Name == testPod.ObjectMeta.Name && pod.ObjectMeta.Namespace == testNamespaceName && pod.Labels[\"test-pod-static\"] == \"true\" && pod.Status.Phase == v1.PodRunning if !found { framework.Logf(\"observed Pod %v in namespace %v in phase %v conditions %v\", pod.ObjectMeta.Name, pod.ObjectMeta.Namespace, pod.Status.Phase, pod.Status.Conditions) } return found, nil } return false, nil }) framework.ExpectNoError(err, \"failed to see Pod %v in namespace %v running\", testPod.ObjectMeta.Name, testNamespaceName) ginkgo.By(\"patching the Pod with a new Label and updated data\") podPatch, err := json.Marshal(v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{\"test-pod\": \"patched\"}, }, Spec: v1.PodSpec{ TerminationGracePeriodSeconds: &zero, Containers: []v1.Container{{ Name: testPodName, Image: testPodImage2, }}, }, }) framework.ExpectNoError(err, \"failed to marshal JSON patch for Pod\") _, err = f.ClientSet.CoreV1().Pods(testNamespaceName).Patch(context.TODO(), testPodName, types.StrategicMergePatchType, []byte(podPatch), metav1.PatchOptions{}) framework.ExpectNoError(err, \"failed to patch Pod %s in namespace %s\", testPodName, testNamespaceName) ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Modified: if pod, ok := event.Object.(*v1.Pod); ok { found := pod.ObjectMeta.Name == pod.Name && pod.Labels[\"test-pod-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Modified) ginkgo.By(\"getting the Pod and ensuring that it's patched\") pod, err := f.ClientSet.CoreV1().Pods(testNamespaceName).Get(context.TODO(), testPodName, metav1.GetOptions{}) framework.ExpectNoError(err, \"failed to fetch Pod %s in namespace %s\", testPodName, testNamespaceName) framework.ExpectEqual(pod.ObjectMeta.Labels[\"test-pod\"], \"patched\", \"failed to patch Pod - missing label\") framework.ExpectEqual(pod.Spec.Containers[0].Image, testPodImage2, \"failed to patch Pod - wrong image\") ginkgo.By(\"getting the PodStatus\") podStatusUnstructured, err := dc.Resource(podResource).Namespace(testNamespaceName).Get(context.TODO(), testPodName, metav1.GetOptions{}, \"status\") framework.ExpectNoError(err, \"failed to fetch PodStatus of Pod %s in namespace %s\", testPodName, testNamespaceName) podStatusBytes, err := json.Marshal(podStatusUnstructured) framework.ExpectNoError(err, \"failed to marshal unstructured response\") var podStatus v1.Pod err = json.Unmarshal(podStatusBytes, &podStatus) framework.ExpectNoError(err, \"failed to unmarshal JSON bytes to a Pod object type\") ginkgo.By(\"replacing the Pod's status Ready condition to False\") podStatusUpdated := podStatus podStatusFieldPatchCount := 0 podStatusFieldPatchCountTotal := 2 for pos, cond := range podStatusUpdated.Status.Conditions { if (cond.Type == v1.PodReady && cond.Status == v1.ConditionTrue) || (cond.Type == v1.ContainersReady && cond.Status == v1.ConditionTrue) { podStatusUpdated.Status.Conditions[pos].Status = v1.ConditionFalse podStatusFieldPatchCount++ } } framework.ExpectEqual(podStatusFieldPatchCount, podStatusFieldPatchCountTotal, \"failed to patch all relevant Pod conditions\") podStatusUpdate, err := f.ClientSet.CoreV1().Pods(testNamespaceName).UpdateStatus(context.TODO(), &podStatusUpdated, metav1.UpdateOptions{}) framework.ExpectNoError(err, \"failed to update PodStatus of Pod %s in namespace %s\", testPodName, testNamespaceName) ginkgo.By(\"check the Pod again to ensure its Ready conditions are False\") podStatusFieldPatchCount = 0 podStatusFieldPatchCountTotal = 2 for _, cond := range podStatusUpdate.Status.Conditions { if (cond.Type == v1.PodReady && cond.Status == v1.ConditionFalse) || (cond.Type == v1.ContainersReady && cond.Status == v1.ConditionFalse) { podStatusFieldPatchCount++ } } framework.ExpectEqual(podStatusFieldPatchCount, podStatusFieldPatchCountTotal, \"failed to update PodStatus - field patch count doesn't match the total\") ginkgo.By(\"deleting the Pod via a Collection with a LabelSelector\") err = f.ClientSet.CoreV1().Pods(testNamespaceName).DeleteCollection(context.TODO(), metav1.DeleteOptions{GracePeriodSeconds: &zero}, metav1.ListOptions{LabelSelector: testPodLabelsFlat}) framework.ExpectNoError(err, \"failed to delete Pod by collection\") ginkgo.By(\"watching for the Pod to be deleted\") ctx, cancel = context.WithTimeout(context.Background(), 1*time.Minute) defer cancel() _, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) { switch event.Type { case watch.Deleted: if pod, ok := event.Object.(*v1.Pod); ok { found := pod.ObjectMeta.Name == pod.Name && pod.Labels[\"test-pod-static\"] == \"true\" return found, nil } default: framework.Logf(\"observed event type %v\", event.Type) } return false, nil }) framework.ExpectNoError(err, \"failed to see %v event\", watch.Deleted) }) }) func checkPodListQuantity(f *framework.Framework, label string, quantity int) func() (bool, error) {"} {"_id":"q-en-kubernetes-aa1efbc4d608095a5d3e17c08d7eaa0fee6303f65b6f340062852405c1e167e9","text":"watch \"k8s.io/apimachinery/pkg/watch\" clientset \"k8s.io/client-go/kubernetes\" watchtools \"k8s.io/client-go/tools/watch\" \"k8s.io/client-go/util/retry\" cloudprovider \"k8s.io/cloud-provider\" \"k8s.io/kubernetes/test/e2e/framework\" e2edeployment \"k8s.io/kubernetes/test/e2e/framework/deployment\""} {"_id":"q-en-kubernetes-aa33b876bce8e9df08322f22c218e14eae27c5b882b225019681ed40e1df7cbd","text":"utilruntime.Must(events.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion)) utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion)) }"} {"_id":"q-en-kubernetes-aadfb1e412524753acefc9059dd4650eb6f63baf6a7dc4c62908d2a77048a20b","text":"ginkgo.AfterEach(func() { // print out additional info if tests failed if ginkgo.CurrentGinkgoTestDescription().Failed { // list existing priorities // List existing PriorityClasses. priorityList, err := cs.SchedulingV1().PriorityClasses().List(context.TODO(), metav1.ListOptions{}) if err != nil { framework.Logf(\"Unable to list priorities: %v\", err) framework.Logf(\"Unable to list PriorityClasses: %v\", err) } else { framework.Logf(\"List existing priorities:\") framework.Logf(\"List existing PriorityClasses:\") for _, p := range priorityList.Items { framework.Logf(\"%v/%v created at %v\", p.Name, p.Value, p.CreationTimestamp) }"} {"_id":"q-en-kubernetes-ab17cd52c2d223798804c4a8f57d33a8581223ad1d63f58e185af963967a5a7b","text":"\"flag\" \"fmt\" \"log\" \"math/rand\" \"net/http\" \"os\" \"time\""} {"_id":"q-en-kubernetes-ab40d2d534a6f14a70b2f712bbb4a2d7b6f8dea3e9b3ec0d3b52fb569b4c23ca","text":" /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( \"io\" \"io/ioutil\" \"log\" \"os\" \"os/signal\" \"path/filepath\" \"strings\" \"github.com/pkg/errors\" ) func main() { if strings.Contains(os.Args[0], \"run_e2e.sh\") || strings.Contains(os.Args[0], \"gorunner\") { log.Print(\"warn: calling test with e2e.test is deprecated and will be removed in 1.25, please rely on container manifest to invoke executable\") } env := envWithDefaults(map[string]string{ resultsDirEnvKey: defaultResultsDir, skipEnvKey: defaultSkip, focusEnvKey: defaultFocus, providerEnvKey: defaultProvider, parallelEnvKey: defaultParallel, ginkgoEnvKey: defaultGinkgoBinary, testBinEnvKey: defaultTestBinary, }) if err := configureAndRunWithEnv(env); err != nil { log.Fatal(err) } } // configureAndRunWithEnv uses the given environment to configure and then start the test run. // It will handle TERM signals gracefully and kill the test process and will // save the logs/results to the location specified via the RESULTS_DIR environment // variable. func configureAndRunWithEnv(env Getenver) error { // Ensure we save results regardless of other errors. This helps any // consumer who may be polling for the results. resultsDir := env.Getenv(resultsDirEnvKey) defer saveResults(resultsDir) // Print the output to stdout and a logfile which will be returned // as part of the results tarball. logFilePath := filepath.Join(resultsDir, logFileName) logFile, err := os.Create(logFilePath) if err != nil { return errors.Wrapf(err, \"failed to create log file %v\", logFilePath) } mw := io.MultiWriter(os.Stdout, logFile) cmd := getCmd(env, mw) log.Printf(\"Running command:n%vn\", cmdInfo(cmd)) err = cmd.Start() if err != nil { return errors.Wrap(err, \"starting command\") } // Handle signals and shutdown process gracefully. go setupSigHandler(cmd.Process.Pid) return errors.Wrap(cmd.Wait(), \"running command\") } // setupSigHandler will kill the process identified by the given PID if it // gets a TERM signal. func setupSigHandler(pid int) { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) // Block until a signal is received. log.Println(\"Now listening for interrupts\") s := <-c log.Printf(\"Got signal: %v. Shutting down test process (PID: %v)n\", s, pid) p, err := os.FindProcess(pid) if err != nil { log.Printf(\"Could not find process %v to shut down.n\", pid) return } if err := p.Signal(s); err != nil { log.Printf(\"Failed to signal test process to terminate: %vn\", err) return } log.Printf(\"Signalled process %v to terminate successfully.n\", pid) } // saveResults will tar the results directory and write the resulting tarball path // into the donefile. func saveResults(resultsDir string) error { log.Printf(\"Saving results at %vn\", resultsDir) err := tarDir(resultsDir, filepath.Join(resultsDir, resultsTarballName)) if err != nil { return errors.Wrapf(err, \"tar directory %v\", resultsDir) } doneFile := filepath.Join(resultsDir, doneFileName) resultsTarball := filepath.Join(resultsDir, resultsTarballName) resultsTarball, err = filepath.Abs(resultsTarball) if err != nil { return errors.Wrapf(err, \"failed to find absolute path for %v\", resultsTarball) } return errors.Wrap( ioutil.WriteFile(doneFile, []byte(resultsTarball), os.FileMode(0777)), \"writing donefile\", ) } "} {"_id":"q-en-kubernetes-ab4cde103e3d3d85c9493d1a03602bb4f689a283596ee80b573542d13c5284a9","text":"By(fmt.Sprintf(\"Restart count of pod %s in namespace %s is now %d\", podDescr.Name, ns, restartCount)) if restartCount > initialRestartCount { By(fmt.Sprintf(\"Restart count of pod %s in namespace %s increased from %d to %d during the test\", podDescr.Name, ns, initialRestartCount, restartCount)) pass = true restarts = true break } } if !pass { Fail(fmt.Sprintf(\"Did not see the restart count of pod %s in namespace %s increase from %d during the test\", podDescr.Name, ns, initialRestartCount)) if restarts != expectRestart { Fail(fmt.Sprintf(\"pod %s in namespace %s - expected restarts: %v, found restarts: %v\", podDescr.Name, ns, expectRestart, restarts)) } }"} {"_id":"q-en-kubernetes-abdd48798a74a1bea50049c4dfaaf9086f476890480292b5b324ee1e3864e112","text":"return device, refCount, nil } // IsNotMountPoint determines if a directory is a mountpoint. // It should return ErrNotExist when the directory does not exist. // This method uses the List() of all mountpoints // It is more extensive than IsLikelyNotMountPoint // and it detects bind mounts in linux func IsNotMountPoint(mounter Interface, file string) (bool, error) { // isNotMountPoint implements Mounter.IsNotMountPoint and is shared by mounter // implementations. func isNotMountPoint(mounter Interface, file string) (bool, error) { // IsLikelyNotMountPoint provides a quick check // to determine whether file IS A mountpoint notMnt, notMntErr := mounter.IsLikelyNotMountPoint(file)"} {"_id":"q-en-kubernetes-abf1c206c1173dde2aec72b54124c79376f4b30c155161c8c50314e6178acbc7","text":"valueFrom: fieldRef: fieldPath: metadata.name command: - /bin/sh - -c - /kubemark --morph=proxy --name=$(NODE_NAME) {{hollow_proxy_params}} --kubeconfig=/kubeconfig/kubeproxy.kubeconfig $(CONTENT_TYPE) --alsologtostderr 1>>/var/log/kubeproxy-$(NODE_NAME).log 2>&1 command: [ \"/kubemark\", \"--morph=proxy\", \"--name=$(NODE_NAME)\", \"--kubeconfig=/kubeconfig/kubeproxy.kubeconfig\", \"$(CONTENT_TYPE)\", \"--log-file=/var/log/kubeproxy-$(NODE_NAME).log\", \"--logtostderr=false\", {{hollow_proxy_params}} ] volumeMounts: - name: kubeconfig-volume mountPath: /kubeconfig"} {"_id":"q-en-kubernetes-ac2918ff7c83107e9aeb82fbc6b17fa5ba14778fbe47e46f124ce8a35d7c6d86","text":"// Enable usage of Provision of PVCs from snapshots in other namespaces CrossNamespaceVolumeDataSource featuregate.Feature = \"CrossNamespaceVolumeDataSource\" // owner: @thockin // deprecated: v1.29 // // Enables Service.status.ingress.loadBanace to be set on // services of types other than LoadBalancer. AllowServiceLBStatusOnNonLB featuregate.Feature = \"AllowServiceLBStatusOnNonLB\" // owner: @bswartz // alpha: v1.18 // beta: v1.24"} {"_id":"q-en-kubernetes-ac4ebae47c7d23ffd624e9bcd37bc9a75f2ed0b7bccb921aebd67463713a4559","text":"podClient.WaitForSuccess(podName, framework.PodStartTimeout) return podName } It(\"should run the container as unprivileged when false [LinuxOnly] [NodeConformance]\", func() { // This test is marked LinuxOnly since it runs a Linux-specific command, and Windows does not support Windows escalation. /* Release : v1.15 Testname: Security Context, privileged=false. Description: Create a container to run in unprivileged mode by setting pod's SecurityContext Privileged option as false. Pod MUST be in Succeeded phase. [LinuxOnly]: This test is marked as LinuxOnly since it runs a Linux-specific command. */ framework.ConformanceIt(\"should run the container as unprivileged when false [LinuxOnly] [NodeConformance]\", func() { podName := createAndWaitUserPod(false) logs, err := framework.GetPodLogs(f.ClientSet, f.Namespace.Name, podName, podName) if err != nil {"} {"_id":"q-en-kubernetes-ac515c8075ba4ac849872fa6ab849ed2db3efebe3f7055bf346fb299919c9d83","text":"// EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional FieldRef *ObjectFieldSelector `json:\"fieldRef,omitempty\" protobuf:\"bytes,1,opt,name=fieldRef\"`"} {"_id":"q-en-kubernetes-ac58116a840399ad3abbbd179cd36efaaf1d1efd1b3f2ca941eba766eb066deb","text":"out.Filter = (*config.PluginSet)(unsafe.Pointer(in.Filter)) out.PostFilter = (*config.PluginSet)(unsafe.Pointer(in.PostFilter)) out.Score = (*config.PluginSet)(unsafe.Pointer(in.Score)) out.NormalizeScore = (*config.PluginSet)(unsafe.Pointer(in.NormalizeScore)) out.Reserve = (*config.PluginSet)(unsafe.Pointer(in.Reserve)) out.Permit = (*config.PluginSet)(unsafe.Pointer(in.Permit)) out.PreBind = (*config.PluginSet)(unsafe.Pointer(in.PreBind))"} {"_id":"q-en-kubernetes-ac58de09aeb1517c34a337428ccefa0e0c3ce7872bd3cbb562323271dca9baef","text":" # Hunting flaky tests in Kubernetes Sometimes unit tests are flaky. This means that due to (usually) race conditions, they will occasionally fail, even though most of the time they pass. We have a goal of 99.9% flake free tests. This means that there is only one flake in one thousand runs of a test. Running a test 1000 times on your own machine can be tedious and time consuming. Fortunately, there is a better way to achieve this using Kubernetes. _Note: these instructions are mildly hacky for now, as we get run once semantics and logging they will get better_ There is a testing image ```brendanburns/flake``` up on the docker hub. We will use this image to test our fix. Create a replication controller with the following config: ```yaml id: flakeController desiredState: replicas: 24 replicaSelector: name: flake podTemplate: desiredState: manifest: version: v1beta1 id: \"\" volumes: [] containers: - name: flake image: brendanburns/flake env: - name: TEST_PACKAGE value: pkg/tools - name: REPO_SPEC value: https://github.com/GoogleCloudPlatform/kubernetes restartpolicy: {} labels: name: flake labels: name: flake ``` ```./cluster/kubecfg.sh -c controller.yaml create replicaControllers``` This will spin up 100 instances of the test. They will run to completion, then exit, the kubelet will restart them, eventually you will have sufficient runs for your purposes, and you can stop the replication controller: ```sh ./cluster/kubecfg.sh stop flakeController ./cluster/kubecfg.sh rm flakeController ``` Now examine the machines with ```docker ps -a``` and look for tasks that exited with non-zero exit codes (ignore those that exited -1, since that's what happens when you stop the replica controller) Happy flake hunting! "} {"_id":"q-en-kubernetes-ac9ecd0a688bd43cc7c285d992e68ac15e796f0208726c9db9bf271d58d017ef","text":" Resource Quota ======================================== This example demonstrates how resource quota and limits can be applied to a Kubernetes namespace. This example assumes you have a functional Kubernetes setup. Step 1: Create a namespace ----------------------------------------- This example will work in a custom namespace to demonstrate the concepts involved. Let's create a new namespace called quota-example: ```shell $ cluster/kubectl.sh create -f namespace.yaml $ cluster/kubectl.sh get namespaces NAME LABELS STATUS default Active quota-example Active ``` Step 2: Apply a quota to the namespace ----------------------------------------- By default, a pod will run with unbounded CPU and memory limits. This means that any pod in the system will be able to consume as much CPU and memory on the node that executes the pod. Users may want to restrict how much of the cluster resources a given namespace may consume across all of its pods in order to manage cluster usage. To do this, a user applies a quota to a namespace. A quota lets the user set hard limits on the total amount of node resources (cpu, memory) and API resources (pods, services, etc.) that a namespace may consume. Let's create a simple quota in our namespace: ```shell $ cluster/kubectl.sh create -f quota.yaml --namespace=quota-example ``` Once your quota is applied to a namespace, the system will restrict any creation of content in the namespace until the quota usage has been calculated. This should happen quickly. You can describe your current quota usage to see what resources are being consumed in your namespace. ``` $ cluster/kubectl.sh describe quota quota --namespace=quota-example Name: quota Resource Used Hard -------- ---- ---- cpu 0m 20 memory 0m 1Gi persistentvolumeclaims 0m 10 pods 0m 10 replicationcontrollers 0m 20 resourcequotas 1 1 secrets 1 10 services 0m 5 ``` Step 3: Applying default resource limits ----------------------------------------- Pod authors rarely specify resource limits for their pods. Since we applied a quota to our project, let's see what happens when an end-user creates a pod that has unbounded cpu and memory by creating an nginx container. To demonstrate, lets create a replication controller that runs nginx: ```shell $ cluster/kubectl.sh run nginx --image=nginx --replicas=1 --namespace=quota-example CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS nginx nginx nginx run=nginx 1 ``` Now let's look at the pods that were created. ```shell $ cluster/kubectl.sh get pods --namespace=quota-example POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE ``` What happened? I have no pods! Let's describe the replication controller to get a view of what is happening. ```shell cluster/kubectl.sh describe rc nginx --namespace=quota-example Name: nginx Image(s): nginx Selector: run=nginx Labels: run=nginx Replicas: 0 current / 1 desired Pods Status: 0 Running / 0 Waiting / 0 Succeeded / 0 Failed Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Mon, 01 Jun 2015 22:49:31 -0400 Mon, 01 Jun 2015 22:52:22 -0400 7 {replication-controller } failedCreate Error creating: Pod \"nginx-\" is forbidden: Limited to 1Gi memory, but pod has no specified memory limit ``` The Kubernetes API server is rejecting the replication controllers requests to create a pod because our pods do not specify any memory usage. So let's set some default limits for the amount of cpu and memory a pod can consume: ```shell $ cluster/kubectl.sh create -f limits.yaml --namespace=quota-example limitranges/limits $ cluster/kubectl.sh describe limits limits --namespace=quota-example Name: limits Type Resource Min Max Default ---- -------- --- --- --- Container cpu - - 100m Container memory - - 512Mi ``` Now any time a pod is created in this namespace, if it has not specified any resource limits, the default amount of cpu and memory per container will be applied as part of admission control. Now that we have applied default limits for our namespace, our replication controller should be able to create its pods. ```shell $ cluster/kubectl.sh get pods --namespace=quota-example POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE nginx-t40zm 10.0.0.2 10.245.1.3/10.245.1.3 run=nginx Running 2 minutes nginx nginx Running 2 minutes ``` And if we print out our quota usage in the namespace: ```shell cluster/kubectl.sh describe quota quota --namespace=quota-example Name: quota Resource Used Hard -------- ---- ---- cpu 100m 20 memory 536870912 1Gi persistentvolumeclaims 0m 10 pods 1 10 replicationcontrollers 1 20 resourcequotas 1 1 secrets 1 10 services 0m 5 ``` You can now see the pod that was created is consuming explicit amounts of resources, and the usage is being tracked by the Kubernetes system properly. Summary ---------------------------- Actions that consume node resources for cpu and memory can be subject to hard quota limits defined by the namespace quota. Any action that consumes those resources can be tweaked, or can pick up namespace level defaults to meet your end goal. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/resourcequota/README.md?pixel)]() "} {"_id":"q-en-kubernetes-acc1f878c217fd7adba18c1872a95d2aaaeca7c8a9c04e096e4b38334ea94aba","text":"package validation import ( \"fmt\" \"net\" \"k8s.io/apimachinery/pkg/util/validation/field\" \"k8s.io/kubernetes/federation/apis/federation\" \"k8s.io/kubernetes/pkg/api/validation\""} {"_id":"q-en-kubernetes-acc4196190eea24ea44133d74f1897487191bf3099e4a941a823dfe8a63b45f2","text":"# Use skopeo to find these values: https://github.com/containers/skopeo # # Example # Manifest: skopeo inspect docker://gcr.io/k8s-staging-build-image/debian-base:buster-v1.3.0 # Arches: skopeo inspect --raw docker://gcr.io/k8s-staging-build-image/debian-base:buster-v1.3.0 # Manifest: skopeo inspect docker://gcr.io/k8s-staging-build-image/debian-base:buster-v1.4.0 # Arches: skopeo inspect --raw docker://gcr.io/k8s-staging-build-image/debian-base:buster-v1.4.0 _DEBIAN_BASE_DIGEST = { \"manifest\": \"sha256:d66137c7c362d1026dca670d1ff4c25e5b0770e8ace87ac3d008d52e4b0db338\", \"amd64\": \"sha256:a5ab028d9a730b78af9abb15b5db9b2e6f82448ab269d6f3a07d1834c571ccc6\", \"arm\": \"sha256:94e611363760607366ca1fed9375105b6c5fc922ab1249869b708690ca13733c\", \"arm64\": \"sha256:83512c52d44587271cd0f355c0a9a7e6c2412ddc66b8a8eb98f994277297a72f\", \"ppc64le\": \"sha256:9c8284b2797b114ebe8f3f1b2b5817a9c7f07f3f82513c49a30e6191a1acc1fc\", \"s390x\": \"sha256:d617637dd4df0bc1cfa524fae3b4892cfe57f7fec9402ad8dfa28e38e82ec688\", \"manifest\": \"sha256:36652ef8e4dd6715de02e9b68e5c122ed8ee06c75f83f5c574b97301e794c3fb\", \"amd64\": \"sha256:afff10fcd513483e492807f8d934bdf0be4a237997f55e0f1f8e34c04a6cb213\", \"arm\": \"sha256:27e6e66ea3c4c4ca6dbfc8c949f0c4c870f038f4500fd267c242422a244f233c\", \"arm64\": \"sha256:4333a5edc9ce6d6660c76104749c2e50e6158e57c8e5956f732991bb032a8ce1\", \"ppc64le\": \"sha256:01a0ba2645883ea8d985460c2913070a90a098056cc6d188122942678923ddb7\", \"s390x\": \"sha256:610526b047d4b528d9e14b4f15347aa4e37af0c47e1307a2f7aebf8745c8a323\", } # Use skopeo to find these values: https://github.com/containers/skopeo # # Example # Manifest: skopeo inspect docker://gcr.io/k8s-staging-build-image/debian-iptables:buster-v1.4.0 # Arches: skopeo inspect --raw docker://gcr.io/k8s-staging-build-image/debian-iptables:buster-v1.4.0 # Manifest: skopeo inspect docker://gcr.io/k8s-staging-build-image/debian-iptables:buster-v1.5.0 # Arches: skopeo inspect --raw docker://gcr.io/k8s-staging-build-image/debian-iptables:buster-v1.5.0 _DEBIAN_IPTABLES_DIGEST = { \"manifest\": \"sha256:87f97cf2b62eb107871ee810f204ccde41affb70b29883aa898e93df85dea0f0\", \"amd64\": \"sha256:da837f39cf3af78adb796c0caa9733449ae99e51cf624590c328e4c9951ace7a\", \"arm\": \"sha256:bb6677337a4dbc3e578a3e87642d99be740dea391dc5e8987f04211c5e23abcd\", \"arm64\": \"sha256:6ad4717d69db2cc47bc2efc91cebb96ba736be1de49e62e0deffdbaf0fa2318c\", \"ppc64le\": \"sha256:168ccfeb861239536826a26da24ab5f68bb5349d7439424b7008b01e8f6534fc\", \"s390x\": \"sha256:5a88d4f4c29bac5b5c93195059b928f7346be11d0f0f7f6da0e14c0bfdbd1362\", \"manifest\": \"sha256:abe8cef9e116f2d5ec1175c386e33841ff3386779138b425af876384b0fd7ccb\", \"amd64\": \"sha256:b4b8b1e0d4617011dd03f20b804cc2e50bf48bafc36b1c8c7bd23fd44bfd641e\", \"arm\": \"sha256:09f79b3a00268705a8f8462f1528fed536e204905359f21e9965f08dd306c60a\", \"arm64\": \"sha256:b4fa11965f34a9f668c424b401c0af22e88f600d22c899699bdb0bd1e6953ad6\", \"ppc64le\": \"sha256:0ea0be4dec281b506f6ceef4cb3594cabea8d80e2dc0d93c7eb09d46259dd837\", \"s390x\": \"sha256:50ef25fba428b6002ef0a9dea7ceae5045430dc1035d50498a478eefccba17f5\", } # Use skopeo to find these values: https://github.com/containers/skopeo"} {"_id":"q-en-kubernetes-ad36e5a41968266b5d487d1b5190950091462c03fc5c10c9979416c596cba087","text":"defaultVersion := cmdutil.OutputVersion(cmd, clientConfig.Version) results := editResults{} for { obj, err := resource.AsVersionedObject(infos, false, defaultVersion) objs, err := resource.AsVersionedObjects(infos, defaultVersion) if err != nil { return preservedFile(err, results.file, out) } // if input object is a list, traverse and edit each item one at a time for _, obj := range objs { // TODO: add an annotating YAML printer that can print inline comments on each field, // including descriptions or validation errors // generate the file to edit buf := &bytes.Buffer{} if err := results.header.writeTo(buf); err != nil { return preservedFile(err, results.file, out) } if err := printer.PrintObj(obj, buf); err != nil { return preservedFile(err, results.file, out) } original := buf.Bytes() // TODO: add an annotating YAML printer that can print inline comments on each field, // including descriptions or validation errors // generate the file to edit buf := &bytes.Buffer{} if err := results.header.writeTo(buf); err != nil { return preservedFile(err, results.file, out) } if err := printer.PrintObj(obj, buf); err != nil { return preservedFile(err, results.file, out) } original := buf.Bytes() // launch the editor edit := editor.NewDefaultEditor() edited, file, err := edit.LaunchTempFile(\"kubectl-edit-\", ext, buf) if err != nil { return preservedFile(err, results.file, out) } // launch the editor edit := editor.NewDefaultEditor() edited, file, err := edit.LaunchTempFile(\"kubectl-edit-\", ext, buf) if err != nil { return preservedFile(err, results.file, out) } // cleanup any file from the previous pass if len(results.file) > 0 { os.Remove(results.file) } // cleanup any file from the previous pass if len(results.file) > 0 { os.Remove(results.file) } glog.V(4).Infof(\"User edited:n%s\", string(edited)) fmt.Printf(\"User edited:n%s\", string(edited)) lines, err := hasLines(bytes.NewBuffer(edited)) if err != nil { return preservedFile(err, file, out) } if bytes.Equal(original, edited) { if len(results.edit) > 0 { preservedFile(nil, file, out) } else { os.Remove(file) glog.V(4).Infof(\"User edited:n%s\", string(edited)) lines, err := hasLines(bytes.NewBuffer(edited)) if err != nil { return preservedFile(err, file, out) } fmt.Fprintln(out, \"Edit cancelled, no changes made.\") return nil } if !lines { if len(results.edit) > 0 { preservedFile(nil, file, out) } else { os.Remove(file) // Compare content without comments if bytes.Equal(stripComments(original), stripComments(edited)) { if len(results.edit) > 0 { preservedFile(nil, file, out) } else { os.Remove(file) } fmt.Fprintln(out, \"Edit cancelled, no changes made.\") continue } if !lines { if len(results.edit) > 0 { preservedFile(nil, file, out) } else { os.Remove(file) } fmt.Fprintln(out, \"Edit cancelled, saved file was empty.\") continue } fmt.Fprintln(out, \"Edit cancelled, saved file was empty.\") return nil } results = editResults{ file: file, } results = editResults{ file: file, } // parse the edited file updates, err := rmap.InfoForData(edited, \"edited-file\") if err != nil { return preservedFile(err, file, out) } // parse the edited file updates, err := rmap.InfoForData(edited, \"edited-file\") if err != nil { return fmt.Errorf(\"The edited file had a syntax error: %v\", err) } // annotate the edited object for kubectl apply if err := kubectl.UpdateApplyAnnotation(updates); err != nil { return preservedFile(err, file, out) } // annotate the edited object for kubectl apply if err := kubectl.UpdateApplyAnnotation(updates); err != nil { return preservedFile(err, file, out) } visitor := resource.NewFlattenListVisitor(updates, rmap) visitor := resource.NewFlattenListVisitor(updates, rmap) // need to make sure the original namespace wasn't changed while editing if err = visitor.Visit(resource.RequireNamespace(cmdNamespace)); err != nil { return preservedFile(err, file, out) } // need to make sure the original namespace wasn't changed while editing if err = visitor.Visit(resource.RequireNamespace(cmdNamespace)); err != nil { return preservedFile(err, file, out) } // use strategic merge to create a patch originalJS, err := yaml.ToJSON(original) if err != nil { return preservedFile(err, file, out) } editedJS, err := yaml.ToJSON(edited) if err != nil { return preservedFile(err, file, out) } patch, err := strategicpatch.CreateStrategicMergePatch(originalJS, editedJS, obj) // TODO: change all jsonmerge to strategicpatch // for checking preconditions preconditions := []jsonmerge.PreconditionFunc{} if err != nil { glog.V(4).Infof(\"Unable to calculate diff, no merge is possible: %v\", err) return preservedFile(err, file, out) } else { preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged(\"apiVersion\")) preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged(\"kind\")) preconditions = append(preconditions, jsonmerge.RequireMetadataKeyUnchanged(\"name\")) results.version = defaultVersion } // use strategic merge to create a patch originalJS, err := yaml.ToJSON(original) if err != nil { return preservedFile(err, file, out) } editedJS, err := yaml.ToJSON(edited) if err != nil { return preservedFile(err, file, out) } patch, err := strategicpatch.CreateStrategicMergePatch(originalJS, editedJS, obj) // TODO: change all jsonmerge to strategicpatch // for checking preconditions preconditions := []jsonmerge.PreconditionFunc{} if err != nil { glog.V(4).Infof(\"Unable to calculate diff, no merge is possible: %v\", err) return preservedFile(err, file, out) } else { preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged(\"apiVersion\")) preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged(\"kind\")) preconditions = append(preconditions, jsonmerge.RequireMetadataKeyUnchanged(\"name\")) results.version = defaultVersion } if hold, msg := jsonmerge.TestPreconditionsHold(patch, preconditions); !hold { fmt.Fprintf(out, \"error: %s\", msg) return preservedFile(nil, file, out) } if hold, msg := jsonmerge.TestPreconditionsHold(patch, preconditions); !hold { fmt.Fprintf(out, \"error: %s\", msg) return preservedFile(nil, file, out) } err = visitor.Visit(func(info *resource.Info, err error) error { patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) if err != nil { fmt.Fprintln(out, results.addError(err, info)) err = visitor.Visit(func(info *resource.Info, err error) error { patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) if err != nil { fmt.Fprintln(out, results.addError(err, info)) return nil } info.Refresh(patched, true) cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, \"edited\") return nil }) if err != nil { return preservedFile(err, file, out) } info.Refresh(patched, true) cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, \"edited\") return nil }) if err != nil { return preservedFile(err, file, out) } if results.retryable > 0 { fmt.Fprintf(out, \"You can run `kubectl replace -f %s` to try this update again.n\", file) return errExit } if results.conflict > 0 { fmt.Fprintf(out, \"You must update your local resource version and run `kubectl replace -f %s` to overwrite the remote changes.n\", file) return errExit if results.retryable > 0 { fmt.Fprintf(out, \"You can run `kubectl replace -f %s` to try this update again.n\", file) return errExit } if results.conflict > 0 { fmt.Fprintf(out, \"You must update your local resource version and run `kubectl replace -f %s` to overwrite the remote changes.n\", file) return errExit } if len(results.edit) == 0 { if results.notfound == 0 { os.Remove(file) } else { fmt.Fprintf(out, \"The edits you made on deleted resources have been saved to %qn\", file) } } } if len(results.edit) == 0 { if results.notfound == 0 { os.Remove(file) } else { fmt.Fprintf(out, \"The edits you made on deleted resources have been saved to %qn\", file) } return nil }"} {"_id":"q-en-kubernetes-ad37c38d08e42ab61110b1b4d3870be9b90fe2526bdbdd29f964ad6463465a40","text":"return err } if ipCorrect && portsCorrect { return nil return r.epAdapter.EnsureEndpointSliceFromEndpoints(metav1.NamespaceDefault, e) } if !ipCorrect { // We *always* add our own IP address."} {"_id":"q-en-kubernetes-ad5cc60efa71774aff040a9930b30ad60d3fd4deef1f09301e2c65cb13ece7b7","text":"if rOpts != nil { hc.Resources = dockercontainer.Resources{ Memory: rOpts.GetMemoryLimitInBytes(), MemorySwap: -1, MemorySwap: dockertools.DefaultMemorySwap(), CPUShares: rOpts.GetCpuShares(), CPUQuota: rOpts.GetCpuQuota(), CPUPeriod: rOpts.GetCpuPeriod(),"} {"_id":"q-en-kubernetes-ada0426ef87cb8986ec8fe69856ef5b044833ae25d8616646d20048e1de93261","text":"import ( \"context\" \"crypto/tls\" \"encoding/json\" \"flag\" \"fmt\""} {"_id":"q-en-kubernetes-ae1fe1130ae67618d7e606d8657e31c25d135d03d932e27325a80b7858907cc8","text":"} func runStaticPodTest(c *client.Client, configFilePath string) { manifest := `version: v1beta2 id: static-pod var testCases = []struct { desc string fileContents string }{ { desc: \"static-pod-from-manifest\", fileContents: `version: v1beta2 id: static-pod-from-manifest containers: - name: static-container image: kubernetes/pause` manifestFile, err := ioutil.TempFile(configFilePath, \"\") defer os.Remove(manifestFile.Name()) ioutil.WriteFile(manifestFile.Name(), []byte(manifest), 0600) // Wait for the mirror pod to be created. podName := \"static-pod-localhost\" namespace := kubelet.NamespaceDefault if err := wait.Poll(time.Second, time.Minute*2, podRunning(c, namespace, podName)); err != nil { if pods, err := c.Pods(namespace).List(labels.Everything()); err == nil { for _, pod := range pods.Items { glog.Infof(\"pod found: %s/%s\", namespace, pod.Name) } } glog.Fatalf(\"FAILED: mirror pod has not been created or is not running: %v\", err) } // Delete the mirror pod, and wait for it to be recreated. c.Pods(namespace).Delete(podName) if err = wait.Poll(time.Second, time.Second*30, podRunning(c, namespace, podName)); err != nil { glog.Fatalf(\"FAILED: mirror pod has not been re-created or is not running: %v\", err) } // Remove the manifest file, and wait for the mirror pod to be deleted. os.Remove(manifestFile.Name()) if err = wait.Poll(time.Second, time.Second*30, podNotFound(c, namespace, podName)); err != nil { glog.Fatalf(\"FAILED: mirror pod has not been deleted: %v\", err) - name: static-container image: kubernetes/pause`, }, { desc: \"static-pod-from-spec\", fileContents: `{ \"kind\": \"Pod\", \"apiVersion\": \"v1beta3\", \"metadata\": { \"name\": \"static-pod-from-spec\" }, \"spec\": { \"containers\": [{ \"name\": \"static-container\", \"image\": \"kubernetes/pause\" }] } }`, }, } for _, testCase := range testCases { func() { desc := testCase.desc manifestFile, err := ioutil.TempFile(configFilePath, \"\") defer os.Remove(manifestFile.Name()) ioutil.WriteFile(manifestFile.Name(), []byte(testCase.fileContents), 0600) // Wait for the mirror pod to be created. podName := fmt.Sprintf(\"%s-localhost\", desc) namespace := kubelet.NamespaceDefault if err := wait.Poll(time.Second, time.Minute*2, podRunning(c, namespace, podName)); err != nil { if pods, err := c.Pods(namespace).List(labels.Everything()); err == nil { for _, pod := range pods.Items { glog.Infof(\"pod found: %s/%s\", namespace, pod.Name) } } glog.Fatalf(\"%s FAILED: mirror pod has not been created or is not running: %v\", desc, err) } // Delete the mirror pod, and wait for it to be recreated. c.Pods(namespace).Delete(podName) if err = wait.Poll(time.Second, time.Second*30, podRunning(c, namespace, podName)); err != nil { glog.Fatalf(\"%s FAILED: mirror pod has not been re-created or is not running: %v\", desc, err) } // Remove the manifest file, and wait for the mirror pod to be deleted. os.Remove(manifestFile.Name()) if err = wait.Poll(time.Second, time.Second*30, podNotFound(c, namespace, podName)); err != nil { glog.Fatalf(\"%s FAILED: mirror pod has not been deleted: %v\", desc, err) } }() } } func runReplicationControllerTest(c *client.Client) {"} {"_id":"q-en-kubernetes-ae35ac61df8b4a51ddd8638b02563d3eb4b915fb8692d8f91641b90c9fb968a7","text":"func (o *ResourcesOptions) Validate() error { var err error if len(o.Limits) == 0 && len(o.Requests) == 0 { return fmt.Errorf(\"you must specify an update to requests or limits (in the form of --requests/--limits)\") return fmt.Errorf(\"you must specify an update to requests or limits or (in the form of --requests/--limits)\") } o.ResourceRequirements, err = kubectl.HandleResourceRequirements(map[string]string{\"limits\": o.Limits, \"requests\": o.Requests})"} {"_id":"q-en-kubernetes-aec1e1cf3a1ce5bc7d6d21c2e4720b1caab8fdb00bb364f84704f860fd3fded1","text":"}) } } func TestGetExcludedChecks(t *testing.T) { type args struct { r *http.Request } tests := []struct { name string r *http.Request want sets.String }{ {\"Should have no excluded health checks\", createGetRequestWithUrl(\"/healthz?verbose=true\"), sets.NewString(), }, {\"Should extract out the ping health check\", createGetRequestWithUrl(\"/healthz?exclude=ping\"), sets.NewString(\"ping\"), }, {\"Should extract out ping and log health check\", createGetRequestWithUrl(\"/healthz?exclude=ping&exclude=log\"), sets.NewString(\"ping\", \"log\"), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got := getExcludedChecks(tt.r); !reflect.DeepEqual(got, tt.want) { t.Errorf(\"getExcludedChecks() = %v, want %v\", got, tt.want) } }) } } func createGetRequestWithUrl(rawUrlString string) *http.Request { url, _ := url.Parse(rawUrlString) return &http.Request{ Method: http.MethodGet, Proto: \"HTTP/1.1\", URL: url, } } "} {"_id":"q-en-kubernetes-aed8c9b033062fc2f6ec18e306ca56caf114dd687fa01ed814ab4c1fa847a696","text":"* [kubectl](kubectl.md)\t - kubectl controls the Kubernetes cluster manager ###### Auto generated by spf13/cobra on 5-Apr-2016 ###### Auto generated by spf13/cobra on 3-Jun-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]()"} {"_id":"q-en-kubernetes-af01767c5412f46657ddb2037870634c72880837b2f8b92e4eb3083de1ae0946","text":"result.User = os.Getenv(\"USER\") } if bastion := os.Getenv(\"KUBE_SSH_BASTION\"); len(bastion) > 0 { if bastion := os.Getenv(sshBastionEnvKey); len(bastion) > 0 { stdout, stderr, code, err := runSSHCommandViaBastion(cmd, result.User, bastion, host, signer) result.Stdout = stdout result.Stderr = stderr"} {"_id":"q-en-kubernetes-af3b62fd3d98e7596533a817bb4d172662e9f3b64841679a414460a8bfe15ef5","text":"}) matchExpectations := ptrMatchAllFields(gstruct.Fields{ \"Node\": gstruct.MatchAllFields(gstruct.Fields{ \"NodeName\": Equal(framework.TestContext.NodeName), \"StartTime\": recent(maxStartAge), \"SystemContainers\": gstruct.MatchElements(summaryObjectID, gstruct.IgnoreExtras, gstruct.Elements{ \"kubelet\": sysContExpectations, \"runtime\": sysContExpectations, }), \"NodeName\": Equal(framework.TestContext.NodeName), \"StartTime\": recent(maxStartAge), \"SystemContainers\": gstruct.MatchAllElements(summaryObjectID, systemContainers), \"CPU\": ptrMatchAllFields(gstruct.Fields{ \"Time\": recent(maxStatsAge), \"UsageNanoCores\": bounded(100E3, 2E9),"} {"_id":"q-en-kubernetes-af4cfab2b32b0c92f8a245912327bde3c68d070cd4d7f585f1cfde5048b071a9","text":"\"errors\" \"testing\" \"k8s.io/api/core/v1\" v1 \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/kubernetes/pkg/volume\" volumetest \"k8s.io/kubernetes/pkg/volume/testing\""} {"_id":"q-en-kubernetes-af532b0662b3fb32cd8400ce4524f4bfbf5ac5caf8455958531f029eddce26bd","text":"\"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library\", \"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library\", \"//staging/src/k8s.io/client-go/tools/record:go_default_library\","} {"_id":"q-en-kubernetes-af6730683f59e2fa9fd479326c29671f1818d3e9b51615ec8493d326a0bb38e2","text":"// Allow users to update labels and capacity oldMinion.Labels = minion.Labels oldMinion.Spec.Capacity = minion.Spec.Capacity // Clear status oldMinion.Status = minion.Status if !reflect.DeepEqual(oldMinion, minion) { glog.V(4).Infof(\"Update failed validation %#v vs %#v\", oldMinion, minion)"} {"_id":"q-en-kubernetes-af834d5c180ecc69b93c544a7c56c86afc3fe516611b0febb2047c576abd15a4","text":"// EnvVarSource represents a source for the value of an EnvVar. // Only one of its fields may be set. type EnvVarSource struct { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // metadata.uid, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional FieldRef *ObjectFieldSelector"} {"_id":"q-en-kubernetes-af9ef1c826fc273fe35b122a506870595c92531ee8f1d699fc9d868c426fd27d","text":"{% if grains['os_family'] == 'RedHat' -%} {% set daemon_args = \"\" -%} {% endif -%} {% if grains.etcd_servers is defined -%} {% set etcd_servers = \"-etcd_servers=http://\" + grains.etcd_servers + \":4001\" -%} {% if grains.api_servers is defined -%} {% set api_servers = \"-master=http://\" + grains.api_servers + \":7080\" -%} {% else -%} {% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%} {% set etcd_servers = \"-etcd_servers=http://\" + ips[0][0] + \":4001\" -%} {% set api_servers = \"-master=http://\" + ips[0][0] + \":7080\" -%} {% endif -%} DAEMON_ARGS=\"{{daemon_args}} {{etcd_servers}}\" DAEMON_ARGS=\"{{daemon_args}} {{api_servers}}\" "} {"_id":"q-en-kubernetes-afb8259b72328e33b04ceb5df41ec289c627dc4f135cbc191e848845e9f32bfd","text":"func (s *gcepdSource) createVolume(f *framework.Framework) volInfo { var err error framework.Logf(\"Creating GCE PD volume\") s.diskName, err = framework.CreatePDWithRetry() framework.ExpectNoError(err, \"Error creating PD\") framework.Logf(\"Creating GCE PD volume via dynamic provisioning\") testCase := storageClassTest{ name: \"subpath\", claimSize: \"2G\", } pvc := newClaim(testCase, f.Namespace.Name, \"subpath\") s.pvc, err = framework.CreatePVC(f.ClientSet, f.Namespace.Name, pvc) framework.ExpectNoError(err, \"Error creating PVC\") return volInfo{ source: &v1.VolumeSource{ GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{PDName: s.diskName}, PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ ClaimName: s.pvc.Name, }, }, } } func (s *gcepdSource) cleanupVolume(f *framework.Framework) { if s.diskName != \"\" { err := framework.DeletePDWithRetry(s.diskName) framework.ExpectNoError(err, \"Error deleting PD\") if s.pvc != nil { err := f.ClientSet.CoreV1().PersistentVolumeClaims(f.Namespace.Name).Delete(s.pvc.Name, nil) framework.ExpectNoError(err, \"Error deleting PVC\") } }"} {"_id":"q-en-kubernetes-afe9e55b9140f7bce692ea94048c746508ae4e52f48ab998bbc16e2edbcc1b9d","text":"return fmt.Errorf(\"Error building CNI config: %v\", err) } glog.V(3).Infof(\"Calling cni plugins to add container to network with cni runtime: %+v\", rt) res, err := plugin.cniConfig.AddNetwork(plugin.netConfig, rt) if err != nil { return fmt.Errorf(\"Error adding container to network: %v\", err)"} {"_id":"q-en-kubernetes-b0019dfcb90c48519e909538343989684d0d3cd8f5416434641f66d3f8251d2c","text":"utilruntime.HandleError(fmt.Errorf(\"unable to handle object in %T: %T\", sched, obj)) return } klog.V(3).Infof(\"delete event for unscheduled pod %s/%s\", pod.Namespace, pod.Name) if err := sched.SchedulingQueue.Delete(pod); err != nil { utilruntime.HandleError(fmt.Errorf(\"unable to dequeue %T: %v\", obj, err)) }"} {"_id":"q-en-kubernetes-b0378c3ee5a6d0e86d46aa11bd7abab7974794443c33dad3946451bc1c9ad526","text":"export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2 fi # For disabling elasticsearch ruby client sniffering feature. # Because, on k8s, sniffering feature sometimes causes failed to flush buffers error # due to between service name and ip address glitch. # And this should be needed for downstream helm chart configurations # for sniffer_class_name parameter. SIMPLE_SNIFFER=$( gem contents fluent-plugin-elasticsearch | grep elasticsearch_simple_sniffer.rb ) if [ -n \"$SIMPLE_SNIFFER\" ] && [ -f \"$SIMPLE_SNIFFER\" ] ; then FLUENTD_ARGS=\"$FLUENTD_ARGS -r $SIMPLE_SNIFFER\" fi # Use exec to get the signal # A non-quoted string and add the comment to prevent shellcheck failures on this line. # See https://github.com/koalaman/shellcheck/wiki/SC2086"} {"_id":"q-en-kubernetes-b058834257fdfff2d31afba364b13ea3f1336bf2c682cca4431de5a882589d08","text":"\"k8s.io/apimachinery/pkg/runtime/schema\" runtimeserializer \"k8s.io/apimachinery/pkg/runtime/serializer\" utilruntime \"k8s.io/apimachinery/pkg/util/runtime\" \"k8s.io/apimachinery/pkg/util/sets\" discoveryendpoint \"k8s.io/apiserver/pkg/endpoints/discovery/aggregated\" genericfeatures \"k8s.io/apiserver/pkg/features\" utilfeature \"k8s.io/apiserver/pkg/util/feature\""} {"_id":"q-en-kubernetes-b060e774fc054b60240f2008827502a879ebd37112dccdeec191d258e9b216dd","text":"}) It(\"should provide DNS for the cluster\", func() { if testContext.Provider == \"vagrant\" { if providerIs(\"vagrant\") { By(\"Skipping test which is broken for vagrant (See https://github.com/GoogleCloudPlatform/kubernetes/issues/3580)\") return }"} {"_id":"q-en-kubernetes-b0784699441e0d831712725d3c3c37600524519ed561f3ee7acbbb6ebabdf1e1","text":"}}, }, }, \"long-port-name\": { expectedErrors: 0, endpointSlice: &discovery.EndpointSlice{ ObjectMeta: standardMeta, AddressType: addressTypePtr(discovery.AddressTypeIP), Ports: []discovery.EndpointPort{{ Name: utilpointer.StringPtr(strings.Repeat(\"a\", 63)), Protocol: protocolPtr(api.ProtocolTCP), }}, Endpoints: []discovery.Endpoint{{ Addresses: generateIPAddresses(1), }}, }, }, \"empty-ports-and-endpoints\": { expectedErrors: 0, endpointSlice: &discovery.EndpointSlice{"} {"_id":"q-en-kubernetes-b07e5ca3940ab5bb2ddab3cc773f24bc154e7bcd3673df915d8e6214a2d41179","text":"type makeLocalPodWith func(config *localTestConfig, volume *localTestVolume, nodeName string) *v1.Pod func testPodWithNodeName(config *localTestConfig, testVolType localVolumeType, ep *eventPatterns, nodeName string, makeLocalPodFunc makeLocalPodWith, bindingMode storagev1.VolumeBindingMode) { func testPodWithNodeConflict(config *localTestConfig, testVolType localVolumeType, nodeName string, makeLocalPodFunc makeLocalPodWith, bindingMode storagev1.VolumeBindingMode) { By(fmt.Sprintf(\"local-volume-type: %s\", testVolType)) testVols := setupLocalVolumesPVCsPVs(config, testVolType, config.node0, 1, bindingMode) testVol := testVols[0]"} {"_id":"q-en-kubernetes-b092eba58396030e9812aeb324b8d52c682598419e72b129b5678681a728a629","text":"for _, epSvcPair := range connectionMap { if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && svcInfo.GetProtocol() == v1.ProtocolUDP { endpointIP := utilproxy.IPPart(epSvcPair.Endpoint) err := conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIPString(), endpointIP, v1.ProtocolUDP) nodePort := svcInfo.GetNodePort() var err error if nodePort != 0 { err = conntrack.ClearEntriesForPortNAT(proxier.exec, endpointIP, nodePort, v1.ProtocolUDP) } else { err = conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIPString(), endpointIP, v1.ProtocolUDP) } if err != nil { klog.Errorf(\"Failed to delete %s endpoint connections, error: %v\", epSvcPair.ServicePortName.String(), err) }"} {"_id":"q-en-kubernetes-b095a0afff45990e8f234ec587e225bf110f1384a5819421d701ff0cf760260e","text":"AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error // DetachDiskByName detaches a vhd from host. The vhd can be identified by diskName or diskURI. DetachDiskByName(diskName, diskURI string, nodeName types.NodeName) error // GetDiskLun finds the lun on the host that the vhd is attached to, given a vhd's diskName and diskURI. GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) // GetNextDiskLun searches all vhd attachment on the host and find unused lun. Return -1 if all luns are used. GetNextDiskLun(nodeName types.NodeName) (int32, error) // DisksAreAttached checks if a list of volumes are attached to the node with the specified NodeName. DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) // GetDataDisks gets a list of data disks attached to the node. GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) }"} {"_id":"q-en-kubernetes-b0c8f979e4d60c5e47e00efaa3ec09e72784c345754abece910d3a4f69b56888","text":"} var clientBuilder controller.ControllerClientBuilder if s.UseServiceAccountCredentials { if len(s.ServiceAccountKeyFile) > 0 { if len(s.ServiceAccountKeyFile) == 0 { // It's possible another controller process is creating the tokens for us. // If one isn't, we'll timeout and exit when our client builder is unable to create the tokens. glog.Warningf(\"--use-service-account-credentials was specified without providing a --service-account-private-key-file\")"} {"_id":"q-en-kubernetes-b14c79c69d6b75679a30291cd1bc78be989e200ace076e3df42bd4f0ade82723","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package storage import ( \"context\" \"fmt\" \"os/exec\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/uuid\" \"k8s.io/kubernetes/test/e2e/framework\" e2eoutput \"k8s.io/kubernetes/test/e2e/framework/pod/output\" e2eskipper \"k8s.io/kubernetes/test/e2e/framework/skipper\" \"k8s.io/kubernetes/test/e2e/storage/utils\" admissionapi \"k8s.io/pod-security-admission/api\" \"github.com/onsi/ginkgo/v2\" ) var _ = utils.SIGDescribe(\"GKE local SSD [Feature:GKELocalSSD]\", func() { f := framework.NewDefaultFramework(\"localssd\") f.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged ginkgo.BeforeEach(func() { e2eskipper.SkipUnlessProviderIs(\"gke\") }) ginkgo.It(\"should write and read from node local SSD [Feature:GKELocalSSD]\", func(ctx context.Context) { framework.Logf(\"Start local SSD test\") createNodePoolWithLocalSsds(\"np-ssd\") doTestWriteAndReadToLocalSsd(ctx, f) }) }) func createNodePoolWithLocalSsds(nodePoolName string) { framework.Logf(\"Create node pool: %s with local SSDs in cluster: %s \", nodePoolName, framework.TestContext.CloudConfig.Cluster) out, err := exec.Command(\"gcloud\", \"alpha\", \"container\", \"node-pools\", \"create\", nodePoolName, fmt.Sprintf(\"--cluster=%s\", framework.TestContext.CloudConfig.Cluster), \"--local-ssd-count=1\").CombinedOutput() if err != nil { framework.Failf(\"Failed to create node pool %s: Err: %vn%v\", nodePoolName, err, string(out)) } framework.Logf(\"Successfully created node pool %s:n%v\", nodePoolName, string(out)) } func doTestWriteAndReadToLocalSsd(ctx context.Context, f *framework.Framework) { var pod = testPodWithSsd(\"echo 'hello world' > /mnt/disks/ssd0/data && sleep 1 && cat /mnt/disks/ssd0/data\") var msg string var out = []string{\"hello world\"} e2eoutput.TestContainerOutput(ctx, f, msg, pod, 0, out) } func testPodWithSsd(command string) *v1.Pod { containerName := \"test-container\" volumeName := \"test-ssd-volume\" path := \"/mnt/disks/ssd0\" podName := \"pod-\" + string(uuid.NewUUID()) image := \"ubuntu:14.04\" return &v1.Pod{ TypeMeta: metav1.TypeMeta{ Kind: \"Pod\", APIVersion: \"v1\", }, ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ Containers: []v1.Container{ { Name: containerName, Image: image, Command: []string{\"/bin/sh\"}, Args: []string{\"-c\", command}, VolumeMounts: []v1.VolumeMount{ { Name: volumeName, MountPath: path, }, }, }, }, RestartPolicy: v1.RestartPolicyNever, Volumes: []v1.Volume{ { Name: volumeName, VolumeSource: v1.VolumeSource{ HostPath: &v1.HostPathVolumeSource{ Path: path, }, }, }, }, NodeSelector: map[string]string{\"cloud.google.com/gke-local-ssd\": \"true\"}, }, } } "} {"_id":"q-en-kubernetes-b1726454ab0174d38ae79e711cae6773df9788078fb5823bf4c48e15ccae8e42","text":"// Start the reconciler to fill ASW. stopChan, stoppedChan := make(chan struct{}), make(chan struct{}) go func() { defer close(stoppedChan) reconciler.Run(stopChan) close(stoppedChan) }() waitForMount(t, fakePlugin, volumeName, asw) // Stop the reconciler."} {"_id":"q-en-kubernetes-b1d10e4053e9733a53f106d8bd0015f9cd9c27f4b5dee34a4564fd3bca9aa48c","text":"t.Errorf(\"Expected %v, got %v\", e, a) } } func TestCacheParallelNoDeadlocksNoDoubleCalls(t *testing.T) { // Make 50 random keys keys := []string{} fuzz.New().NilChance(0).NumElements(50, 50).Fuzz(&keys) // Data structure for tracking when each key is accessed. type callTrack struct { sync.Mutex accessTimes []time.Time } calls := map[string]*callTrack{} for _, k := range keys { calls[k] = &callTrack{} } // This is called to fill the cache in the case of a cache miss // or cache entry expiration. We record the time. ff := func(key string) T { ct := calls[key] ct.Lock() ct.accessTimes = append(ct.accessTimes, time.Now()) ct.Unlock() // make sure that there is time for multiple requests to come in // for the same key before this returns. time.Sleep(time.Millisecond) return key } cacheDur := 10 * time.Millisecond c := NewTimeCache(RealClock{}, cacheDur, ff) // Spawn a bunch of goroutines, each of which sequentially requests // 500 random keys from the cache. runtime.GOMAXPROCS(16) var wg sync.WaitGroup for i := 0; i < 500; i++ { wg.Add(1) go func(seed int64) { r := rand.New(rand.NewSource(seed)) for i := 0; i < 500; i++ { c.Get(keys[r.Intn(len(keys))]) } wg.Done() }(rand.Int63()) } wg.Wait() // Since the cache should hold things for 10ms, no calls for a given key // should be more closely spaced than that. for k, ct := range calls { if len(ct.accessTimes) < 2 { continue } cur := ct.accessTimes[0] for i := 1; i < len(ct.accessTimes); i++ { next := ct.accessTimes[i] if next.Sub(cur) < cacheDur { t.Errorf(\"%v was called at %v and %v\", k, cur, next) } cur = next } } } "} {"_id":"q-en-kubernetes-b1d8c8b86a03b578fab8704f22e72e5e1e8db20798883cb5cb70578830bf6913","text":"} } func TestWithMaxWaitRateLimiter(t *testing.T) { limiter := NewWithMaxWaitRateLimiter(DefaultControllerRateLimiter(), 500*time.Second) for i := 0; i < 100; i++ { if e, a := 5*time.Millisecond, limiter.When(i); e != a { t.Errorf(\"expected %v, got %v\", e, a) } } for i := 100; i < 5100; i++ { if e, a := 500*time.Second, limiter.When(i); e < a { t.Errorf(\"expected %v, got %v\", e, a) } } for i := 5100; i < 5200; i++ { if e, a := 500*time.Second, limiter.When(i); e != a { t.Errorf(\"expected %v, got %v\", e, a) } } } "} {"_id":"q-en-kubernetes-b1db02b61e8d89817b1d7abae9a21785cabcf8f9963e922bbde26ac5d8a09bde","text":"inferredHost = host } // Make a copy to avoid polluting the provided config tlsConfigCopy, _ := utilnet.TLSClientConfig(transport) tlsConfigCopy := utilnet.CloneTLSConfig(tlsConfig) tlsConfigCopy.ServerName = inferredHost tlsConfig = tlsConfigCopy }"} {"_id":"q-en-kubernetes-b1fae174b76ce4c683dae9b8792f2f4ce5bb1a2a1ace8eb83b0ed8c441bbcff9","text":"migrated := getMigratedStatusBySpec(volumeToDetach.VolumeSpec) if err != nil { // On failure, add volume back to ReportAsAttached list actualStateOfWorld.AddVolumeToReportAsAttached( logger, volumeToDetach.VolumeName, volumeToDetach.NodeName) // On failure, mark the volume as uncertain. Attach() must succeed before adding the volume back // to node status as attached. uncertainError := actualStateOfWorld.MarkVolumeAsUncertain( logger, volumeToDetach.VolumeName, volumeToDetach.VolumeSpec, volumeToDetach.NodeName) if uncertainError != nil { klog.Errorf(\"DetachVolume.MarkVolumeAsUncertain failed to add the volume %q to actual state after detach error: %s\", volumeToDetach.VolumeName, uncertainError) } eventErr, detailedErr := volumeToDetach.GenerateError(\"DetachVolume.Detach failed\", err) return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) }"} {"_id":"q-en-kubernetes-b20f43741353c50ba0c5b2b83a9eec2fa46ec04a3384f71fa66fe80c303d7ba8","text":"// ResourceConfiguration stores per resource configuration. type ResourceConfiguration struct { // resources is a list of kubernetes resources which have to be encrypted. // resources is a list of kubernetes resources which have to be encrypted. The resource names are derived from `resource` or `resource.group` of the group/version/resource. // eg: pandas.awesome.bears.example is a custom resource with 'group': awesome.bears.example, 'resource': pandas) Resources []string `json:\"resources\"` // providers is a list of transformers to be used for reading and writing the resources to disk. // eg: aesgcm, aescbc, secretbox, identity."} {"_id":"q-en-kubernetes-b2315483f73b0271ce6d3f1306f8e334311d13cd1df55181577229a07cabc644","text":"return err } // Record some output. outputSetLock.Lock() defer outputSetLock.Unlock() outputSet.Insert(key) // Report this deletion. deletionCounter <- key } return nil },"} {"_id":"q-en-kubernetes-b23fb8e446770c9ff72af150b463ac2dd265bed967c42413e5c8276a66b8f835","text":"unversioned.GroupResource{Group: \"\", Resource: \"endpoints\"}: \"services/endpoints\", unversioned.GroupResource{Group: \"\", Resource: \"nodes\"}: \"minions\", unversioned.GroupResource{Group: \"\", Resource: \"services\"}: \"services/specs\", unversioned.GroupResource{Group: \"extensions\", Resource: \"ingresses\"}: \"ingress\", } func (s *DefaultStorageFactory) ResourcePrefix(groupResource unversioned.GroupResource) string {"} {"_id":"q-en-kubernetes-b27bc9bb4470d84252cbd63b1b8133f462885f9732d3b581e6ee6438f5d428c1","text":"annotations: scheduler.alpha.kubernetes.io/critical-pod: '' spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: k8s-app operator: In values: [\"kube-dns\"] topologyKey: kubernetes.io/hostname tolerations: - key: \"CriticalAddonsOnly\" operator: \"Exists\""} {"_id":"q-en-kubernetes-b2a9e96d731c1c79fdd004eef5a54d2434a980fec2273b6b4b5a919937d4c751","text":"tags = [\"automanaged\"], visibility = [\"//visibility:public\"], ) go_test( name = \"go_default_test\", srcs = [\"scheme_test.go\"], importpath = \"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig/scheme\", library = \":go_default_library\", deps = [ \"//pkg/kubelet/apis/kubeletconfig/fuzzer:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library\", ], ) "} {"_id":"q-en-kubernetes-b2aa580a992ed71d17921fe616a9cedfb55b0dc8ecc3646aa5b640a32a69023b","text":") { if nodeInfo == nil || nodeInfo.Node() == nil { // This may happen during tests. metrics.EquivalenceCacheWrites.WithLabelValues(\"discarded_bad_node\").Inc() return } // Skip update if NodeInfo is stale. if !cache.IsUpToDate(nodeInfo) { metrics.EquivalenceCacheWrites.WithLabelValues(\"discarded_stale\").Inc() return }"} {"_id":"q-en-kubernetes-b3623bb1a96a19a770aec1e9c0c28d2a2aee765ef67e8fbe8395456d9d313847","text":"output_message=$(! kubectl get pods a 2>&1 \"${kube_flags[@]:?}\") kube::test::if_has_string \"${output_message}\" 'pods \"a\" not found' kubectl delete pods a kubectl delete pods b # apply a kubectl apply --namespace nsb -l prune-group=true -f hack/testdata/prune/a.yaml \"${kube_flags[@]:?}\" # apply b with namespace kubectl apply --namespace nsb --prune -l prune-group=true -f hack/testdata/prune/b.yaml \"${kube_flags[@]:?}\" # check right pod exists kube::test::get_object_assert 'pods b' \"{{${id_field:?}}}\" 'b' # check wrong pod doesn't exist output_message=$(! kubectl get pods a 2>&1 \"${kube_flags[@]:?}\") kube::test::if_has_string \"${output_message}\" 'pods \"a\" not found' # cleanup kubectl delete pods b"} {"_id":"q-en-kubernetes-b376c06b9b296bfd188d3d242bc0887e853af09a942b8b870df0c42d35d24c1d","text":"// clusters: // cow-cluster: // LocationOfOrigin: \"\" // certificate-authority-data: REDACTED // certificate-authority-data: DATA+OMITTED // server: http://cow.org:8080 // contexts: // federal-context:"} {"_id":"q-en-kubernetes-b37b926d267c280c40a208460e9f1482071423626869c880937eed848e16137e","text":"ginkgo.By(\"Creating a ResourceQuota\") quotaName := \"test-quota\" resourceQuota := newTestResourceQuota(quotaName) resourceQuota.Spec.Hard[v1.ResourceConfigMaps] = resource.MustParse(hardConfigMaps) _, err = createResourceQuota(f.ClientSet, f.Namespace.Name, resourceQuota) framework.ExpectNoError(err)"} {"_id":"q-en-kubernetes-b3819bbd8850f7c5f7d60734e07be169894e99ed2db1f12b3650c7d5f906d1d5","text":"} }) ginkgo.It(\"should respect internalTrafficPolicy=Local Pod to Pod (hostNetwork: true) [Feature:ServiceInternalTrafficPolicy]\", func() { ginkgo.It(\"should respect internalTrafficPolicy=Local Pod and Node, to Pod (hostNetwork: true) [Feature:ServiceInternalTrafficPolicy]\", func() { // windows kube-proxy does not support this feature yet // TODO: remove this skip when windows-based proxies implement internalTrafficPolicy e2eskipper.SkipIfNodeOSDistroIs(\"windows\")"} {"_id":"q-en-kubernetes-b39288e2e61adc4ac931f5dff5e732805cd0d6a0fef83dd11ee54f67e970223a","text":"} /* Release : v1.12 Testname: Security Context: readOnlyRootFilesystem=true. Description: when a container has configured readOnlyRootFilesystem to true, write operations are not allowed. This test is marked LinuxOnly since Windows does not support creating containers with read-only access. Release : v1.15 Testname: Security Context, readOnlyRootFilesystem=true. Description: Container is configured to run with readOnlyRootFilesystem to true which will force containers to run with a read only root file system. Write operation MUST NOT be allowed and Pod MUST be in Failed state. At this moment we are not considering this test for Conformance due to use of SecurityContext. [LinuxOnly]: This test is marked as LinuxOnly since Windows does not support creating containers with read-only access. */ It(\"should run the container with readonly rootfs when readOnlyRootFilesystem=true [LinuxOnly] [NodeConformance]\", func() { createAndWaitUserPod(true) }) /* Release : v1.12 Testname: Security Context: readOnlyRootFilesystem=false. Description: when a container has configured readOnlyRootFilesystem to false, write operations are allowed. Release : v1.15 Testname: Security Context, readOnlyRootFilesystem=false. Description: Container is configured to run with readOnlyRootFilesystem to false. Write operation MUST be allowed and Pod MUST be in Succeeded state. */ It(\"should run the container with writable rootfs when readOnlyRootFilesystem=false [NodeConformance]\", func() { framework.ConformanceIt(\"should run the container with writable rootfs when readOnlyRootFilesystem=false [NodeConformance]\", func() { createAndWaitUserPod(false) }) })"} {"_id":"q-en-kubernetes-b39d7f59b3947c4dee51e21c73f2337f0a2ea3f83e104e8f85b802d4348be0af","text":"} func (zones Zones) List() ([]dnsprovider.Zone, error) { var zoneList []dnsprovider.Zone response, err := zones.impl.List(zones.project()).Do() if err != nil { if apiErr, ok := err.(*googleapi.Error); ok && apiErr.Code == 404 { return zoneList, nil } return nil, err } managedZones := response.ManagedZones() zoneList := make([]dnsprovider.Zone, len(managedZones)) zoneList = make([]dnsprovider.Zone, len(managedZones)) for i, zone := range managedZones { zoneList[i] = &Zone{zone, &zones} }"} {"_id":"q-en-kubernetes-b3a4b4f777e2fe7b742285fe9ebd148d0af4b8ce91a8ab550b9c42dfa9ae6c19","text":"kubectl create secret docker-registry test-secret --docker-username=test-user --docker-password=test-password --docker-email='test-user@test.com' --namespace=test-secrets # Post-condition: secret exists and has expected values kube::test::get_object_assert 'secret/test-secret --namespace=test-secrets' \"{{$id_field}}\" 'test-secret' kube::test::get_object_assert 'secret/test-secret --namespace=test-secrets' \"{{$secret_type}}\" 'kubernetes.io/dockercfg' [[ \"$(kubectl get secret/test-secret --namespace=test-secrets -o yaml \"${kube_flags[@]}\" | grep '.dockercfg:')\" ]] kube::test::get_object_assert 'secret/test-secret --namespace=test-secrets' \"{{$secret_type}}\" 'kubernetes.io/dockerconfigjson' [[ \"$(kubectl get secret/test-secret --namespace=test-secrets -o yaml \"${kube_flags[@]}\" | grep '.dockerconfigjson:')\" ]] # Clean-up kubectl delete secret test-secret --namespace=test-secrets"} {"_id":"q-en-kubernetes-b3deb8737701dac7c97f1110aed23842bd83a63edb4fb439497425313bc89a6e","text":" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\" \"WARNING\"

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version. Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). -- # Generic Configuration Object ## Abstract The `ConfigMap` API resource stores data used for the configuration of applications deployed on Kubernetes. The main focus of this resource is to: * Provide dynamic distribution of configuration data to deployed applications. * Encapsulate configuration information and simplify `Kubernetes` deployments. * Create a flexible configuration model for `Kubernetes`. ## Motivation A `Secret`-like API resource is needed to store configuration data that pods can consume. Goals of this design: 1. Describe a `ConfigMap` API resource 2. Describe the semantics of consuming `ConfigMap` as environment variables 3. Describe the semantics of consuming `ConfigMap` as files in a volume ## Use Cases 1. As a user, I want to be able to consume configuration data as environment variables 2. As a user, I want to be able to consume configuration data as files in a volume 3. As a user, I want my view of configuration data in files to be eventually consistent with changes to the data ### Consuming `ConfigMap` as Environment Variables Many programs read their configuration from environment variables. `ConfigMap` should be possible to consume in environment variables. The rough series of events for consuming `ConfigMap` this way is: 1. A `ConfigMap` object is created 2. A pod that consumes the configuration data via environment variables is created 3. The pod is scheduled onto a node 4. The kubelet retrieves the `ConfigMap` resource(s) referenced by the pod and starts the container processes with the appropriate data in environment variables ### Consuming `ConfigMap` in Volumes Many programs read their configuration from configuration files. `ConfigMap` should be possible to consume in a volume. The rough series of events for consuming `ConfigMap` this way is: 1. A `ConfigMap` object is created 2. A new pod using the `ConfigMap` via the volume plugin is created 3. The pod is scheduled onto a node 4. The Kubelet creates an instance of the volume plugin and calls its `Setup()` method 5. The volume plugin retrieves the `ConfigMap` resource(s) referenced by the pod and projects the appropriate data into the volume ### Consuming `ConfigMap` Updates Any long-running system has configuration that is mutated over time. Changes made to configuration data must be made visible to pods consuming data in volumes so that they can respond to those changes. The `resourceVersion` of the `ConfigMap` object will be updated by the API server every time the object is modified. After an update, modifications will be made visible to the consumer container: 1. A `ConfigMap` object is created 2. A new pod using the `ConfigMap` via the volume plugin is created 3. The pod is scheduled onto a node 4. During the sync loop, the Kubelet creates an instance of the volume plugin and calls its `Setup()` method 5. The volume plugin retrieves the `ConfigMap` resource(s) referenced by the pod and projects the appropriate data into the volume 6. The `ConfigMap` referenced by the pod is updated 7. During the next iteration of the `syncLoop`, the Kubelet creates an instance of the volume plugin and calls its `Setup()` method 8. The volume plugin projects the updated data into the volume atomically It is the consuming pod's responsibility to make use of the updated data once it is made visible. Because environment variables cannot be updated without restarting a container, configuration data consumed in environment variables will not be updated. ### Advantages * Easy to consume in pods; consumer-agnostic * Configuration data is persistent and versioned * Consumers of configuration data in volumes can respond to changes in the data ## Proposed Design ### API Resource The `ConfigMap` resource will be added to the main API: ```go package api // ConfigMap holds configuration data for pods to consume. type ConfigMap struct { TypeMeta `json:\",inline\"` ObjectMeta `json:\"metadata,omitempty\"` // Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN or leading // dot followed by valid DNS_SUBDOMAIN. Data map[string]string `json:\"data,omitempty\"` } type ConfigMapList struct { TypeMeta `json:\",inline\"` ListMeta `json:\"metadata,omitempty\"` Items []ConfigMap `json:\"items\"` } ``` A `Registry` implementation for `ConfigMap` will be added to `pkg/registry/configmap`. ### Environment Variables The `EnvVarSource` will be extended with a new selector for `ConfigMap`: ```go package api // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // other fields omitted // Specifies a ConfigMap key ConfigMap *ConfigMapSelector `json:\"configMap,omitempty\"` } // ConfigMapSelector selects a key of a ConfigMap. type ConfigMapSelector struct { // The name of the ConfigMap to select a key from. ConfigMapName string `json:\"configMapName\"` // The key of the ConfigMap to select. Key string `json:\"key\"` } ``` ### Volume Source A new `ConfigMapVolumeSource` type of volume source containing the `ConfigMap` object will be added to the `VolumeSource` struct in the API: ```go package api type VolumeSource struct { // other fields omitted ConfigMap *ConfigMapVolumeSource `json:\"configMap,omitempty\"` } // Represents a volume that holds configuration data. type ConfigMapVolumeSource struct { LocalObjectReference `json:\",inline\"` // A list of keys to project into the volume. // If unspecified, each key-value pair in the Data field of the // referenced ConfigMap will be projected into the volume as a file whose name // is the key and content is the value. // If specified, the listed keys will be project into the specified paths, and // unlisted keys will not be present. Items []KeyToPath `json:\"items,omitempty\"` } // Represents a mapping of a key to a relative path. type KeyToPath struct { // The name of the key to select Key string `json:\"key\"` // The relative path name of the file to be created. // Must not be absolute or contain the '..' path. Must be utf-8 encoded. // The first item of the relative path must not start with '..' Path string `json:\"path\"` } ``` **Note:** The update logic used in the downward API volume plug-in will be extracted and re-used in the volume plug-in for `ConfigMap`. ### Changes to Secret We will update the Secret volume plugin to have a similar API to the new ConfigMap volume plugin. The secret volume plugin will also begin updating secret content in the volume when secrets change. ## Examples #### Consuming `ConfigMap` as Environment Variables ```yaml apiVersion: v1 kind: ConfigMap metadata: name: etcd-env-config data: number-of-members: 1 initial-cluster-state: new initial-cluster-token: DUMMY_ETCD_INITIAL_CLUSTER_TOKEN discovery-token: DUMMY_ETCD_DISCOVERY_TOKEN discovery-url: http://etcd-discovery:2379 etcdctl-peers: http://etcd:2379 ``` This pod consumes the `ConfigMap` as environment variables: ```yaml apiVersion: v1 kind: Pod metadata: name: config-env-example spec: containers: - name: etcd image: openshift/etcd-20-centos7 ports: - containerPort: 2379 protocol: TCP - containerPort: 2380 protocol: TCP env: - name: ETCD_NUM_MEMBERS valueFrom: configMap: configMapName: etcd-env-config key: number-of-members - name: ETCD_INITIAL_CLUSTER_STATE valueFrom: configMap: configMapName: etcd-env-config key: initial-cluster-state - name: ETCD_DISCOVERY_TOKEN valueFrom: configMap: configMapName: etcd-env-config key: discovery-token - name: ETCD_DISCOVERY_URL valueFrom: configMap: configMapName: etcd-env-config key: discovery-url - name: ETCDCTL_PEERS valueFrom: configMap: configMapName: etcd-env-config key: etcdctl-peers ``` #### Consuming `ConfigMap` as Volumes `redis-volume-config` is intended to be used as a volume containing a config file: ```yaml apiVersion: extensions/v1beta1 kind: ConfigMap metadata: name: redis-volume-config data: redis.conf: \"pidfile /var/run/redis.pidnport6379ntcp-backlog 511n databases 1ntimeout 0n\" ``` The following pod consumes the `redis-volume-config` in a volume: ```yaml apiVersion: v1 kind: Pod metadata: name: config-volume-example spec: containers: - name: redis image: kubernetes/redis command: \"redis-server /mnt/config-map/etc/redis.conf\" ports: - containerPort: 6379 volumeMounts: - name: config-map-volume mountPath: /mnt/config-map volumes: - name: config-map-volume configMap: name: redis-volume-config items: - path: \"etc/redis.conf\" key: redis.conf ``` ## Future Improvements In the future, we may add the ability to specify an init-container that can watch the volume contents for updates and respond to changes when they occur. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/design/configmap.md?pixel)]()
"} {"_id":"q-en-kubernetes-b3e0989c22fd7b6ccabce082f989f2c02ef4ecfa2523df8b13aecd09bbe30fd2","text":"}) }) Describe(\"[Skipped][Example]Liveness\", func() { It(\"liveness pods should be automatically restarted\", func() { mkpath := func(file string) string { return filepath.Join(testContext.RepoRoot, \"docs\", \"user-guide\", \"liveness\", file) } execYaml := mkpath(\"exec-liveness.yaml\") httpYaml := mkpath(\"http-liveness.yaml\") nsFlag := fmt.Sprintf(\"--namespace=%v\", ns) runKubectl(\"create\", \"-f\", execYaml, nsFlag) runKubectl(\"create\", \"-f\", httpYaml, nsFlag) checkRestart := func(podName string, timeout time.Duration) { err := waitForPodRunningInNamespace(c, podName, ns) Expect(err).NotTo(HaveOccurred()) for t := time.Now(); time.Since(t) < timeout; time.Sleep(poll) { pod, err := c.Pods(ns).Get(podName) expectNoError(err, fmt.Sprintf(\"getting pod %s\", podName)) restartCount := api.GetExistingContainerStatus(pod.Status.ContainerStatuses, \"liveness\").RestartCount Logf(\"Pod: %s restart count:%d\", podName, restartCount) if restartCount > 0 { return } } Failf(\"Pod %s was not restarted\", podName) } By(\"Check restarts\") checkRestart(\"liveness-exec\", time.Minute) checkRestart(\"liveness-http\", time.Minute) }) }) }) func makeHttpRequestToService(c *client.Client, ns, service, path string) (string, error) {"} {"_id":"q-en-kubernetes-b404923405e57657c259e765730a86215e884eef0194ef6fe0a4d8be20313979","text":"t.Errorf(\"Expect command executed %d times, but got %d\", svcCount, fexec.CommandCalls) } } func TestClearUDPConntrackForPortNAT(t *testing.T) { fcmd := fakeexec.FakeCmd{ CombinedOutputScript: []fakeexec.FakeCombinedOutputAction{ func() ([]byte, error) { return []byte(\"1 flow entries have been deleted\"), nil }, func() ([]byte, error) { return []byte(\"\"), fmt.Errorf(\"conntrack v1.4.2 (conntrack-tools): 0 flow entries have been deleted\") }, func() ([]byte, error) { return []byte(\"1 flow entries have been deleted\"), nil }, }, } fexec := fakeexec.FakeExec{ CommandScript: []fakeexec.FakeCommandAction{ func(cmd string, args ...string) exec.Cmd { return fakeexec.InitFakeCmd(&fcmd, cmd, args...) }, func(cmd string, args ...string) exec.Cmd { return fakeexec.InitFakeCmd(&fcmd, cmd, args...) }, func(cmd string, args ...string) exec.Cmd { return fakeexec.InitFakeCmd(&fcmd, cmd, args...) }, }, LookPathFunc: func(cmd string) (string, error) { return cmd, nil }, } testCases := []struct { name string port int dest string }{ { name: \"IPv4 success\", port: 30211, dest: \"1.2.3.4\", }, } svcCount := 0 for i, tc := range testCases { err := ClearEntriesForPortNAT(&fexec, tc.dest, tc.port, v1.ProtocolUDP) if err != nil { t.Errorf(\"%s test case: unexpected error: %v\", tc.name, err) } expectCommand := fmt.Sprintf(\"conntrack -D -p udp --dport %d --dst-nat %s\", tc.port, tc.dest) + familyParamStr(utilnet.IsIPv6String(tc.dest)) execCommand := strings.Join(fcmd.CombinedOutputLog[i], \" \") if expectCommand != execCommand { t.Errorf(\"%s test case: Expect command: %s, but executed %s\", tc.name, expectCommand, execCommand) } svcCount++ } if svcCount != fexec.CommandCalls { t.Errorf(\"Expect command executed %d times, but got %d\", svcCount, fexec.CommandCalls) } } "} {"_id":"q-en-kubernetes-b47795c0ab3f44c72016f8b2f55103796171d6d1da611c35c00d395c7a95701e","text":"g.updateRelistTime(timestamp) pods := kubecontainer.Pods(podList) // update running pod and container count updateRunningPodAndContainerMetrics(pods) g.podRecords.setCurrent(pods) // Compare the old and the current pods, and generate events."} {"_id":"q-en-kubernetes-b477ec8df38ddd66d2e9bccb2d408ed511523b905c7b4c4285582d8be34d9c4d","text":"return } if curPod.DeletionTimestamp != nil { // when a pod is deleted gracefully its deletion timestamp is first modified to reflect a grace period, // and after such time has passed, the kubelet actually deletes it from the store. We receive an update // for modification of the deletion timestamp and expect an ds to create more replicas asap, not wait // until the kubelet actually deletes the pod. dsc.deletePod(curPod) return } curControllerRef := metav1.GetControllerOf(curPod) oldControllerRef := metav1.GetControllerOf(oldPod) controllerRefChanged := !reflect.DeepEqual(curControllerRef, oldControllerRef)"} {"_id":"q-en-kubernetes-b48a27ff52afc6aab4d6cc11b8d52521a495ca28733a090042ad1dfc0672d2ce","text":"pm.mutex.Lock() defer pm.mutex.Unlock() if spec == nil { return nil, fmt.Errorf(\"Could not find plugin because volume spec is nil\") } matches := []string{} for k, v := range pm.plugins { if v.CanSupport(spec) {"} {"_id":"q-en-kubernetes-b4988f89391ff6df9f05f30353e3c10e002bfa50253ac5ede2a35236d81ceb50","text":"i := rand.Intn(x.NumField()) fuzzer.Fuzz(x.Field(i).Addr().Interface()) errs := validateNestedValueValidation(vv, false, false, nil) errs := validateNestedValueValidation(vv, false, false, fieldLevel, nil) if len(errs) == 0 && !reflect.DeepEqual(vv.ForbiddenGenerics, Generic{}) { t.Errorf(\"expected ForbiddenGenerics validation errors for: %#v\", vv) }"} {"_id":"q-en-kubernetes-b4b37cb100cdb4cc4bf472a77537b6d8ce750f1794915c33985116027acd3296","text":"nm.registeredNodesLock.RLock() node := nm.registeredNodes[convertToString(nodeName)] nm.registeredNodesLock.RUnlock() if node == nil { return v1.Node{}, vclib.ErrNoVMFound if node != nil { klog.V(4).Infof(\"Node %s found in vSphere cloud provider cache\", nodeName) return *node, nil } if nm.nodeLister != nil { klog.V(4).Infof(\"Node %s missing in vSphere cloud provider cache, trying node informer\") node, err := nm.nodeLister.Get(convertToString(nodeName)) if err != nil { if !errors.IsNotFound(err) { return v1.Node{}, err } // Fall through with IsNotFound error and try to get the node from the API server } else { node := node.DeepCopy() nm.addNode(node) klog.V(4).Infof(\"Node %s found in vSphere cloud provider node informer\", nodeName) return *node, nil } } return *node, nil if nm.nodeGetter != nil { klog.V(4).Infof(\"Node %s missing in vSphere cloud provider caches, trying the API server\") node, err := nm.nodeGetter.Nodes().Get(context.TODO(), convertToString(nodeName), metav1.GetOptions{}) if err != nil { if !errors.IsNotFound(err) { return v1.Node{}, err } // Fall through with IsNotFound error to keep the code consistent with the above } else { nm.addNode(node) klog.V(4).Infof(\"Node %s found in the API server\", nodeName) return *node, nil } } klog.V(4).Infof(\"Node %s not found in vSphere cloud provider\", nodeName) return v1.Node{}, vclib.ErrNoVMFound } func (nm *NodeManager) getNodes() map[string]*v1.Node {"} {"_id":"q-en-kubernetes-b4c3ff8eb671ad7afdecf19fd4932e054eeaa5188105c916c973916ed82efc25","text":"package util import ( \"math/rand\" \"runtime\" \"sync\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-b4c873b5a9fce33ac41de07a9f77af381be3be424ea6cdcd41839286fe32a391","text":"dirMode = \"dir_mode\" gid = \"gid\" vers = \"vers\" defaultFileMode = \"0755\" defaultDirMode = \"0755\" defaultFileMode = \"0777\" defaultDirMode = \"0777\" defaultVers = \"3.0\" )"} {"_id":"q-en-kubernetes-b4e3512cb79b947656cba5e5237a5e90c520421e044aad820ba60ef6d5b80799","text":"return \"\", err } pc := d.Core().Pods(namespace) mountPods, err := getMountPods(pc, pvc.Name) if err != nil { return \"\", err } events, _ := d.Core().Events(namespace).Search(legacyscheme.Scheme, pvc) return describePersistentVolumeClaim(pvc, events) return describePersistentVolumeClaim(pvc, events, mountPods) } func getMountPods(c coreclient.PodInterface, pvcName string) ([]api.Pod, error) { nsPods, err := c.List(metav1.ListOptions{}) if err != nil { return []api.Pod{}, err } var pods []api.Pod for _, pod := range nsPods.Items { pvcs := getPvcs(pod.Spec.Volumes) for _, pvc := range pvcs { if pvc.PersistentVolumeClaim.ClaimName == pvcName { pods = append(pods, pod) } } } return pods, nil } func describePersistentVolumeClaim(pvc *api.PersistentVolumeClaim, events *api.EventList) (string, error) { func getPvcs(volumes []api.Volume) []api.Volume { var pvcs []api.Volume for _, volume := range volumes { if volume.VolumeSource.PersistentVolumeClaim != nil { pvcs = append(pvcs, volume) } } return pvcs } func describePersistentVolumeClaim(pvc *api.PersistentVolumeClaim, events *api.EventList, mountPods []api.Pod) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, \"Name:t%sn\", pvc.Name)"} {"_id":"q-en-kubernetes-b50d7789d2d038980826a3ed2825714d157b6879e64a74aa3a718a81b4c09672","text":" This file is autogenerated, but we've stopped checking such files into the repository to reduce the need for rebases. Please run hack/generate-docs.sh to populate this file. "} {"_id":"q-en-kubernetes-b51a6f6ad150d42c3ad2c2aac15dafd3233c0e6c88413c75cde1e341a9077c5d","text":"// prior to final deletion, we must ensure that finalizers is empty if len(namespace.Spec.Finalizers) != 0 { err = fmt.Errorf(\"Unable to delete namespace %v because finalizers is not empty %v\", namespace.Name, namespace.Spec.Finalizers) err = fmt.Errorf(\"Namespace %v termination is in progress, waiting for %v\", namespace.Name, namespace.Spec.Finalizers) return nil, err } return r.Etcd.Delete(ctx, name, nil) }"} {"_id":"q-en-kubernetes-b523346162c6261eba71ca156b6922bc66525fd693841794037c38fb91113385","text":"return plugin.getFakeVolume(&plugin.Detachers), nil } func (plugin *FakeVolumePlugin) GetDetachers() (Detachers []*FakeVolume) { plugin.RLock() defer plugin.RUnlock() return plugin.Detachers } func (plugin *FakeVolumePlugin) GetNewDetacherCallCount() int { plugin.RLock() defer plugin.RUnlock()"} {"_id":"q-en-kubernetes-b52b961f16b926b2983d16c6f6bb09df973754943ab612903195c190fedcd54a","text":"} if test.expectFailure { err = waitForResizingCondition(pvc, m.cs, csiResizingConditionWait) gomega.Expect(err).To(gomega.HaveOccurred(), \"unexpected resizing condition on PVC\") framework.ExpectError(err, \"unexpected resizing condition on PVC\") return }"} {"_id":"q-en-kubernetes-b568f14d52771e039418054ee41d52cffa2695f05ea7fbbe0a29e218e25bb50a","text":"// TODO: we should consider merge this struct with GroupVersion in unversioned.go type APIVersion struct { // Name of this version (e.g. 'v1'). // +optional Name string `json:\"name,omitempty\"` }"} {"_id":"q-en-kubernetes-b570092a18aaa77995c5e00a3b378ede62e7670ff7e3777eb0cd1d8536d5df79","text":"if err != nil { t.Fatalf(err.Error()) } mounts, volPath, subPath, err := test.prepare(base) if err != nil { os.RemoveAll(base)"} {"_id":"q-en-kubernetes-b57431ae15296f6ae90fe79a2e1f95582f5dc923bcecdded1507f95e21766ca6","text":"readinessProbe := &v1.Probe{ Handler: execHandler([]string{\"/bin/cat\", \"/tmp/health\"}), InitialDelaySeconds: 0, PeriodSeconds: 60, // PeriodSeconds is set to a large value to make sure that the first execution of readiness probe // will happen before the first period passed. PeriodSeconds: 600, } startupProbe := &v1.Probe{ Handler: execHandler([]string{\"/bin/cat\", \"/tmp/startup\"}),"} {"_id":"q-en-kubernetes-b589a3169e02c1097257359b4f95fd09f5319a70b544edb41b1960eae6fb1150","text":"It(\"should lookup the Schema by its GroupVersionKind\", func() { schema = resources.LookupResource(gvk) Expect(schema).ToNot(BeNil()) }) var deployment *proto.Kind It(\"should be a Kind\", func() { deployment = schema.(*proto.Kind) Expect(deployment).ToNot(BeNil()) Expect(schema.(*proto.Kind)).ToNot(BeNil()) }) })"} {"_id":"q-en-kubernetes-b5ab3943fc6c32d5b7b62be21a7b7bdabd34f6dfc6111ede94eded25c53f8712","text":"// scan /var/lib/kubelet/pods//volume-subpaths///* fullContainerDirPath := filepath.Join(subPathDir, containerDir.Name()) err = filepath.Walk(fullContainerDirPath, func(path string, info os.FileInfo, _ error) error { // The original traversal method here was ReadDir, which was not so robust to handle some error such as \"stale NFS file handle\", // so it was replaced with filepath.Walk in a later patch, which can pass through error and handled by the callback WalkFunc. // After go 1.16, WalkDir was introduced, it's more effective than Walk because the callback WalkDirFunc is called before // reading a directory, making it save some time when a container's subPath contains lots of dirs. // See https://github.com/kubernetes/kubernetes/pull/71804 and https://github.com/kubernetes/kubernetes/issues/107667 for more details. err = filepath.WalkDir(fullContainerDirPath, func(path string, info os.DirEntry, _ error) error { if path == fullContainerDirPath { // Skip top level directory return nil"} {"_id":"q-en-kubernetes-b5b8ebe493cbf1754a46685c191cc65ad51e107012876da1fe410ea29ec1e2ca","text":"// compute the context. Mutation is not allowed. ValidatedPSPAnnotation is used as a hint to gain same speed-up. allowedPod, pspName, validationErrs, err := p.computeSecurityContext(ctx, a, pod, false, pod.ObjectMeta.Annotations[psputil.ValidatedPSPAnnotation]) if err != nil { return admission.NewForbidden(a, err) return admission.NewForbidden(a, fmt.Errorf(\"PodSecurityPolicy: %w\", err)) } if apiequality.Semantic.DeepEqual(pod, allowedPod) { key := auditKeyPrefix + \"/\" + \"validate-policy\""} {"_id":"q-en-kubernetes-b5d71dc301c1e0e5044a4a2acc16931ae86d90d51a9c6ee5b117566298773cae","text":"// owner: @derekwaynecarr // alpha: v1.20 // beta: v1.22 // // Enables kubelet support to size memory backed volumes SizeMemoryBackedVolumes featuregate.Feature = \"SizeMemoryBackedVolumes\""} {"_id":"q-en-kubernetes-b5e3187f3db0947ca19d7333766de3ad10657cbd296b36bc3e424933ece7ff35","text":"\"net/url\" \"reflect\" \"strings\" \"sync/atomic\" \"testing\" \"golang.org/x/net/websocket\""} {"_id":"q-en-kubernetes-b5f51ef5158cdfdf3d9e09e230a1b51ced03375d10bcc6b5bd82cf0282526f3e","text":"if !ignoreChangesAndAdditions { // Add any remaining items found only in modified for ; modifiedIndex < len(modifiedSorted); modifiedIndex++ { patch = append(patch, modified[modifiedIndex]) patch = append(patch, modifiedSorted[modifiedIndex]) } }"} {"_id":"q-en-kubernetes-b60bc5190c11a1b0aaa08e97a45cb529b9f5ea2fdaca2a0378b7d7ac3fc4b44e","text":"} } } func TestGetWindowsPath(t *testing.T) { tests := []struct { path string expectedPath string }{ { path: `/var/lib/kubelet/pods/146f8428-83e7-11e7-8dd4-000d3a31dac4/volumes/kubernetes.io~disk`, expectedPath: `c:varlibkubeletpods146f8428-83e7-11e7-8dd4-000d3a31dac4volumeskubernetes.io~disk`, }, { path: `var/lib/kubelet/pods/146f8428-83e7-11e7-8dd4-000d3a31dac4volumeskubernetes.io~disk`, expectedPath: `c:varlibkubeletpods146f8428-83e7-11e7-8dd4-000d3a31dac4volumeskubernetes.io~disk`, }, { path: `/`, expectedPath: `c:`, }, { path: ``, expectedPath: ``, }, } for _, test := range tests { result := GetWindowsPath(test.path) if result != test.expectedPath { t.Errorf(\"GetWindowsPath(%v) returned (%v), want (%v)\", test.path, result, test.expectedPath) } } } "} {"_id":"q-en-kubernetes-b6103aaaff8f2d0ea06cf4ebc28778ab577d0295c58b78c91cb9f32343952d8f","text":"c = f.ClientSet ns = f.Namespace.Name systemPods, err := e2epod.GetPodsInNamespace(c, ns, map[string]string{}) framework.ExpectEqual(err, nil) framework.ExpectNoError(err) systemPodsNo = int32(len(systemPods)) if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, \",\") >= 0 { framework.Failf(\"Test dose not support cluster setup with more than one MIG: %s\", framework.TestContext.CloudConfig.NodeInstanceGroup)"} {"_id":"q-en-kubernetes-b6506f96f2736040398e881898bf127720fa27c5948db94312ae73b087dda7a6","text":"podResources, err := getNodeDevices() var resourcesForOurPod *kubeletpodresourcesv1alpha1.PodResources framework.Logf(\"pod resources %v\", podResources) gomega.Expect(err).To(gomega.BeNil()) framework.ExpectNoError(err) framework.ExpectEqual(len(podResources.PodResources), 2) for _, res := range podResources.GetPodResources() { if res.Name == pod1.Name {"} {"_id":"q-en-kubernetes-b66fa12fd85eca477b99c426659b99a57817f0d8385bd93fc6b781568669f206","text":"return nil, scoreStatus.AsError() } if klog.V(10).Enabled() { for plugin, nodeScoreList := range scoresMap { for _, nodeScore := range nodeScoreList { klog.InfoS(\"Plugin scored node for pod\", \"pod\", klog.KObj(pod), \"plugin\", plugin, \"node\", nodeScore.Name, \"score\", nodeScore.Score) } } } // Summarize all scores. result := make(framework.NodeScoreList, 0, len(nodes)) for i := range nodes { result = append(result, framework.NodeScore{Name: nodes[i].Name, Score: 0}) for j := range scoresMap {"} {"_id":"q-en-kubernetes-b673eb1d3d8e084cea9a49aaba0f3560f26929320ad24528bd15a1b743b8997d","text":"kl.statusManager.SetPodStatus(pod, v1.PodStatus{ Phase: v1.PodFailed, Reason: reason, Message: \"Pod \" + message}) Message: \"Pod was rejected: \" + message}) } // canAdmitPod determines if a pod can be admitted, and gives a reason if it"} {"_id":"q-en-kubernetes-b682b6c64dc3cd9b142f0903977ac194155edad5146b2d244a323aea6faa8f59","text":"} apiResource := unversioned.APIResource{Name: gvr.Resource, Namespaced: true} err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(nil, &v1.ListOptions{}) // namespace controller does not want the garbage collector to insert the orphan finalizer since it calls // resource deletions generically. it will ensure all resources in the namespace are purged prior to releasing // namespace itself. orphanDependents := false err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&v1.DeleteOptions{OrphanDependents: &orphanDependents}, &v1.ListOptions{}) if err == nil { return true, nil"} {"_id":"q-en-kubernetes-b6905192256b8c478f5c39410c75f93e02fe1b746feac6d75db7896787306db6","text":"\"fmt\" \"os\" \"path\" \"strings\" \"github.com/golang/glog\" \"k8s.io/kubernetes/pkg/api/resource\""} {"_id":"q-en-kubernetes-b6a116e9974f300b9a01ccda3277d7a3e9c1ecbbc3ba68f060ff0b57b226e316","text":"import ( dockertypes \"github.com/docker/engine-api/types\" dockercontainer \"github.com/docker/engine-api/types/container\" \"k8s.io/kubernetes/pkg/api/v1\" ) // These two functions are OS specific (for now at least) func updateHostConfig(config *dockercontainer.HostConfig) { // no-op, there is a windows implementation that is different. } func DefaultMemorySwap() int64 { return -1 } func getContainerIP(container *dockertypes.ContainerJSON) string { result := \"\" if container.NetworkSettings != nil {"} {"_id":"q-en-kubernetes-b6c11e1973260c6dbb785cff750d65221e758c441f6056d42030c965a64ad8e7","text":"\"strconv\" \"time\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" \"k8s.io/apimachinery/pkg/fields\" \"github.com/onsi/ginkgo\""} {"_id":"q-en-kubernetes-b6e4fc7f49cfbd3f6fbd8a67c3f54ea8dcd2e43e7f81282d028ceb0530dace13","text":"- --container=heapster - --poll-period=300000 - --estimator=exponential - image: gcr.io/google_containers/addon-resizer:1.5 - image: gcr.io/google_containers/addon-resizer:1.6 name: eventer-nanny resources: limits:"} {"_id":"q-en-kubernetes-b72aab5d6e69fcf782ac94a078ea88cb7b9550454b65417bf1e51ba3c9787ac9","text":"return err } count := 0 err = r.Visit(func(info *resource.Info, err error) error { singular := false infos, err := r.IntoSingular(&singular).Infos() if err != nil { return err } if len(infos) == 0 { return fmt.Errorf(\"no objects passed to convert\") } objects, err := resource.AsVersionedObject(infos, !singular, o.outputVersion, o.encoder) if err != nil { return err } if meta.IsListType(objects) { _, items, err := cmdutil.FilterResourceList(objects, nil, nil) if err != nil { return err } infos := []*resource.Info{info} objects, err := resource.AsVersionedObject(infos, false, o.outputVersion, o.encoder) filteredObj, err := cmdutil.ObjectListToVersionedObject(items, o.outputVersion) if err != nil { return err } count++ return o.printer.PrintObj(objects, o.out) }) if err != nil { return err return o.printer.PrintObj(filteredObj, o.out) } if count == 0 { return fmt.Errorf(\"no objects passed to convert\") } return nil return o.printer.PrintObj(objects, o.out) }"} {"_id":"q-en-kubernetes-b74956458e46d4ebfbf6fb2aa4284224e299b042bbf1864b773f3c4c32160a0e","text":"parameters[k] = v.(string) } } if snapshotProvider, ok := snapshotClass.Object[\"driver\"]; ok { snapshotter = snapshotProvider.(string) } case d.SnapshotClass.FromFile != \"\": snapshotClass, err := loadSnapshotClass(d.SnapshotClass.FromFile) framework.ExpectNoError(err, \"load snapshot class from %s\", d.SnapshotClass.FromFile)"} {"_id":"q-en-kubernetes-b7b432e4801e554c9b8b8d53e7f73c78a721804b44e4e0b7c3c1fc6d8f634ccf","text":"There are a few things to note in this description. First is that we are running the ```kubernetes/cassandra``` image. This is a standard Cassandra installation on top of Debian. However it also adds a custom [```SeedProvider```](https://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/locator/SeedProvider.java) to Cassandra. In Cassandra, a ```SeedProvider``` bootstraps the gossip protocol that Cassandra uses to find other nodes. The ```KubernetesSeedProvider``` discovers the Kubernetes API Server using the built in Kubernetes discovery service, and then uses the Kubernetes API to find new nodes (more on this later) You may also note that we are setting some Cassandra parameters (```MAX_HEAP_SIZE``` and ```HEAP_NEWSIZE```). We also tell Kubernetes that the container exposes both the ```CQL``` and ```Thrift``` API ports. Finally, we tell the cluster manager that we need 0.5 cpu (0.5 core). You may also note that we are setting some Cassandra parameters (```MAX_HEAP_SIZE``` and ```HEAP_NEWSIZE```) and adding information about the [namespace](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/namespaces.md). We also tell Kubernetes that the container exposes both the ```CQL``` and ```Thrift``` API ports. Finally, we tell the cluster manager that we need 0.5 cpu (0.5 core). Given this configuration, we can create the pod from a file specification as follows"} {"_id":"q-en-kubernetes-b7c2fbd72a2b14f0fbdbef31b5b02f5824b9c21c869cd2b50d565e1497f15103","text":"manager.podStoreSynced = alwaysReady syncAndValidateDaemonSets(t, manager, ds, podControl, 1, 0) } func TestDSManagerInit(t *testing.T) { // Insert a stable daemon set and make sure we don't create an extra pod // for the one node which already has a daemon after a simulated restart. ds := newDaemonSet(\"test\") ds.Status = extensions.DaemonSetStatus{ CurrentNumberScheduled: 1, NumberMisscheduled: 0, DesiredNumberScheduled: 1, } nodeName := \"only-node\" podList := &api.PodList{ Items: []api.Pod{ *newPod(\"podname\", nodeName, simpleDaemonSetLabel), }} response := runtime.EncodeOrDie(testapi.Default.Codec(), podList) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: response, } testServer := httptest.NewServer(&fakeHandler) // TODO: Uncomment when fix #19254 // defer testServer.Close() client := client.NewOrDie(&client.Config{Host: testServer.URL, GroupVersion: testapi.Default.GroupVersion()}) manager := NewDaemonSetsController(client, controller.NoResyncPeriodFunc) manager.dsStore.Add(ds) manager.nodeStore.Add(newNode(nodeName, nil)) manager.podStoreSynced = alwaysReady controller.SyncAllPodsWithStore(manager.kubeClient, manager.podStore.Store) fakePodControl := &controller.FakePodControl{} manager.podControl = fakePodControl manager.syncHandler(getKey(ds, t)) validateSyncDaemonSets(t, fakePodControl, 0, 0) } "} {"_id":"q-en-kubernetes-b7c500c8f86990f336d9d472bf27d7ebdbf87af5f9c0794497578b9683924604","text":"return fmt.Errorf(\"waiting for apiserver timed out\") } // WaitForApiserverRestarted waits until apiserver's restart count increased. func WaitForApiserverRestarted(c clientset.Interface, initialRestartCount int32) error { // waitForApiserverRestarted waits until apiserver's restart count increased. func waitForApiserverRestarted(c clientset.Interface, initialRestartCount int32) error { for start := time.Now(); time.Since(start) < time.Minute; time.Sleep(5 * time.Second) { restartCount, err := GetApiserverRestartCount(c) restartCount, err := getApiserverRestartCount(c) if err != nil { Logf(\"Failed to get apiserver's restart count: %v\", err) continue"} {"_id":"q-en-kubernetes-b7ce2b1e3c129c5b498240f795fa5ead88c9d9d9554e24fc992cd075c1c227d0","text":"var policy Policy switch topologyPolicyName { case PolicyNone: policy = NewNonePolicy() case PolicyBestEffort: policy = NewBestEffortPolicy(numaInfo, opts)"} {"_id":"q-en-kubernetes-b801831883f01477a39d432c9e77dc4213e98ee0bdf60355e9f382018e89fd93","text":"# Base images - name: \"k8s.gcr.io/debian-base: dependents\" version: buster-v1.3.0 version: buster-v1.4.0 refPaths: - path: build/workspace.bzl match: tag ="} {"_id":"q-en-kubernetes-b81bced438d9a9b8897df90c7354980d62902682f34ae288dfe79d43e4934de9","text":"- name: ssl-certs mountPath: /etc/ssl/certs readOnly: true - image: gcr.io/google_containers/addon-resizer:1.5 - image: gcr.io/google_containers/addon-resizer:1.6 name: heapster-nanny resources: limits:"} {"_id":"q-en-kubernetes-b8508bf359afa28573de7209833ccec56b3bfd900bdc661f55178bfefe90a0ff","text":"} // returns the item and true if it is found and not expired, otherwise nil and false. // If this returns false, it has locked c.inFlightLock and it is caller's responsibility // to unlock that. func (c *timeCache) get(key string) (T, bool) { c.lock.RLock() defer c.lock.RUnlock() data, ok := c.cache[key] now := c.clock.Now() if !ok || now.Sub(data.lastUpdate) > c.ttl { // We must lock this while we hold c.lock-- otherwise, a writer could // write to c.cache and remove the channel from c.inFlight before we // manage to read c.inFlight. c.inFlightLock.Lock() return nil, false } return data.item, true } // c.inFlightLock MUST be locked before calling this. fillOrWait will unlock it. func (c *timeCache) fillOrWait(key string) chan T { c.inFlightLock.Lock() defer c.inFlightLock.Unlock() // Already a call in progress?"} {"_id":"q-en-kubernetes-b863cb4de38156d11e1735bbdbd2cf82b2bcb9387113d3c231bd00485a6b2add","text":"if err != nil { t.Fatalf(err.Error()) } test.prepare(base) pathToCreate := filepath.Join(base, test.path) fd, err := doSafeOpen(pathToCreate, base)"} {"_id":"q-en-kubernetes-b870041984b30c33b192a75cf635e2d777c278f2b72059ece9e3b30ec400762c","text":"\"type\": \"boolean\" }, \"storageCapacity\": { \"description\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field is immutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"description\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field was immutable in Kubernetes <= 1.22 and now is mutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"type\": \"boolean\" }, \"tokenRequests\": {"} {"_id":"q-en-kubernetes-b8a3e8f47efb1353ec1db1a72c427784eba8041fe39cd38d747bf595df803583","text":"Metrics: usage, Available: availableResources[m.Name], }) delete(availableResources, m.Name) } // print lines for nodes of which the metrics is unreachable. for nodeName := range availableResources { printMissingMetricsNodeLine(w, nodeName) } return nil }"} {"_id":"q-en-kubernetes-b8b221586c9a339b4cded0642f070bdefd3a9123aa9480cebaaa29f6b7733789","text":"} } if klog.V(4).Enabled() { logPluginScores(nodes, scoresMap, pod) } if len(g.extenders) != 0 && nodes != nil { var mu sync.Mutex var wg sync.WaitGroup"} {"_id":"q-en-kubernetes-b8dfc69b62043ac7d79a130bc124681d20624e6a649d81f9ffbdb9bcc58ce602","text":"// Not local instance, get addresses from Azure ARM API. if !isLocalInstance { return addressGetter(name) if az.vmSet != nil { return addressGetter(name) } // vmSet == nil indicates credentials are not provided. return nil, fmt.Errorf(\"no credentials provided for Azure cloud provider\") } if len(metadata.Network.Interface) == 0 {"} {"_id":"q-en-kubernetes-b932ff944551eb66946dfdae4b1a2af0b7de5f8905865f2c84185dfa324aa897","text":"} } func TestPriorityQueue_MoveAllToActiveOrBackoffQueueWithOutQueueingHint(t *testing.T) { c := testingclock.NewFakeClock(time.Now()) logger, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() m := makeEmptyQueueingHintMapPerProfile() defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SchedulerQueueingHints, false)() m[\"\"][NodeAdd] = []*QueueingHintFunction{ { PluginName: \"fooPlugin\", QueueingHintFn: queueHintReturnQueue, }, } q := NewTestQueue(ctx, newDefaultQueueSort(), WithClock(c), WithQueueingHintMapPerProfile(m)) // To simulate the pod is failed in scheduling in the real world, Pop() the pod from activeQ before AddUnschedulableIfNotPresent()s below. if err := q.Add(logger, medPriorityPodInfo.Pod); err != nil { t.Errorf(\"add failed: %v\", err) } err := q.AddUnschedulableIfNotPresent(logger, q.newQueuedPodInfo(unschedulablePodInfo.Pod, \"fooPlugin\"), q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } err = q.AddUnschedulableIfNotPresent(logger, q.newQueuedPodInfo(highPriorityPodInfo.Pod, \"fooPlugin\"), q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } // Construct a Pod, but don't associate its scheduler failure to any plugin hpp1 := clonePod(highPriorityPodInfo.Pod, \"hpp1\") // This Pod will go to backoffQ because no failure plugin is associated with it. err = q.AddUnschedulableIfNotPresent(logger, q.newQueuedPodInfo(hpp1), q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } // Construct another Pod, and associate its scheduler failure to plugin \"barPlugin\". hpp2 := clonePod(highPriorityPodInfo.Pod, \"hpp2\") // This Pod will go to the unschedulable Pod pool. err = q.AddUnschedulableIfNotPresent(logger, q.newQueuedPodInfo(hpp2, \"barPlugin\"), q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } // This NodeAdd event moves unschedulablePodInfo and highPriorityPodInfo to the backoffQ, // because of the queueing hint function registered for NodeAdd/fooPlugin. q.MoveAllToActiveOrBackoffQueue(logger, NodeAdd, nil, nil, nil) if q.activeQ.Len() != 1 { t.Errorf(\"Expected 1 item to be in activeQ, but got: %v\", q.activeQ.Len()) } // Pop out the medPriorityPodInfo in activeQ. if p, err := q.Pop(logger); err != nil || p.Pod != medPriorityPodInfo.Pod { t.Errorf(\"Expected: %v after Pop, but got: %v\", medPriorityPodInfo.Pod, p.Pod.Name) } // hpp2 won't be moved. if q.podBackoffQ.Len() != 3 { t.Fatalf(\"Expected 3 items to be in podBackoffQ, but got: %v\", q.podBackoffQ.Len()) } // pop out the pods in the backoffQ. // This doesn't make them in-flight pods. for q.podBackoffQ.Len() != 0 { _, err = q.podBackoffQ.Pop() if err != nil { t.Errorf(\"pop failed: %v\", err) } } q.schedulingCycle++ unschedulableQueuedPodInfo := q.newQueuedPodInfo(unschedulablePodInfo.Pod, \"fooPlugin\") highPriorityQueuedPodInfo := q.newQueuedPodInfo(highPriorityPodInfo.Pod, \"fooPlugin\") hpp1QueuedPodInfo := q.newQueuedPodInfo(hpp1) err = q.AddUnschedulableIfNotPresent(logger, unschedulableQueuedPodInfo, q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } err = q.AddUnschedulableIfNotPresent(logger, highPriorityQueuedPodInfo, q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } err = q.AddUnschedulableIfNotPresent(logger, hpp1QueuedPodInfo, q.SchedulingCycle()) if err != nil { t.Fatalf(\"unexpected error from AddUnschedulableIfNotPresent: %v\", err) } if err = q.Add(logger, medPriorityPodInfo.Pod); err != nil { t.Errorf(\"add failed: %v\", err) } // hpp1 will go to backoffQ because no failure plugin is associated with it. // All plugins other than hpp1 are enqueued to the unschedulable Pod pool. for _, pod := range []*v1.Pod{unschedulablePodInfo.Pod, highPriorityPodInfo.Pod, hpp2} { if q.unschedulablePods.get(pod) == nil { t.Errorf(\"Expected %v in the unschedulablePods\", pod.Name) } } if _, ok, _ := q.podBackoffQ.Get(hpp1QueuedPodInfo); !ok { t.Errorf(\"Expected %v in the podBackoffQ\", hpp1.Name) } // Move clock by podInitialBackoffDuration, so that pods in the unschedulablePods would pass the backing off, // and the pods will be moved into activeQ. c.Step(q.podInitialBackoffDuration) q.flushBackoffQCompleted(logger) // flush the completed backoffQ to move hpp1 to activeQ. q.MoveAllToActiveOrBackoffQueue(logger, NodeAdd, nil, nil, nil) if q.activeQ.Len() != 4 { t.Errorf(\"Expected 4 items to be in activeQ, but got: %v\", q.activeQ.Len()) } if q.podBackoffQ.Len() != 0 { t.Errorf(\"Expected 0 item to be in podBackoffQ, but got: %v\", q.podBackoffQ.Len()) } if len(q.unschedulablePods.podInfoMap) != 1 { // hpp2 won't be moved regardless of its backoff timer. t.Errorf(\"Expected 1 item to be in unschedulablePods, but got: %v\", len(q.unschedulablePods.podInfoMap)) } } func clonePod(pod *v1.Pod, newName string) *v1.Pod { pod = pod.DeepCopy() pod.Name = newName"} {"_id":"q-en-kubernetes-b9432ce3b6c9d0765b254d53f3437344d14ceacfd802207b94f90cdb3881f8c1","text":"*out = new(PluginSet) (*in).DeepCopyInto(*out) } if in.NormalizeScore != nil { in, out := &in.NormalizeScore, &out.NormalizeScore *out = new(PluginSet) (*in).DeepCopyInto(*out) } if in.Reserve != nil { in, out := &in.Reserve, &out.Reserve *out = new(PluginSet)"} {"_id":"q-en-kubernetes-b950db1188ea1ea0ad61fef05a3b191d87f0cddae5477103b91ea19c98a03e65","text":"return utilfile.FileExists(kubeletpath) } func (mounter *NsenterMounter) EvalHostSymlinks(pathname string) (string, error) { return mounter.ne.EvalSymlinks(pathname, true) } func (mounter *NsenterMounter) CleanSubPaths(podDir string, volumeName string) error { return doCleanSubPaths(mounter, podDir, volumeName) }"} {"_id":"q-en-kubernetes-b951a364599acb518308610e72812a19d9fe1076cb73e31fc457379aa5a8978d","text":"// Max amount of time to wait for the container runtime to come up. maxWaitForContainerRuntime = 30 * time.Second // Max amount of time to wait for node list/watch to initially sync maxWaitForAPIServerSync = 10 * time.Second // nodeStatusUpdateRetry specifies how many times kubelet retries when posting node status failed. nodeStatusUpdateRetry = 5"} {"_id":"q-en-kubernetes-b95cd2aa93dfa63928719fbcce3767ad951e5c681db6ea632836c4cbf22e627e","text":"return true, nil } // nextRotationDeadline returns a value for the threshold at which the // current certificate should be rotated, 80%+/-10% of the expiration of the // certificate. func (m *manager) nextRotationDeadline() time.Time { // forceRotation is not protected by locks if m.forceRotation { m.forceRotation = false return time.Now() } m.certAccessLock.RLock() defer m.certAccessLock.RUnlock() // Check that the current certificate on disk satisfies the requests from the // current template. // // Note that extra items in the certificate's SAN or orgs that don't exist in // the template will not trigger a renewal. // // Requires certAccessLock to be locked. func (m *manager) certSatisfiesTemplateLocked() bool { if m.cert == nil { return time.Now() return false } // Ensure the currently held certificate satisfies the requested subject CN and SANs if template := m.getTemplate(); template != nil { if template.Subject.CommonName != m.cert.Leaf.Subject.CommonName { glog.V(2).Infof(\"Current certificate CN (%s) does not match requested CN (%s), rotating now\", m.cert.Leaf.Subject.CommonName, template.Subject.CommonName) return time.Now() glog.V(2).Infof(\"Current certificate CN (%s) does not match requested CN (%s)\", m.cert.Leaf.Subject.CommonName, template.Subject.CommonName) return false } currentDNSNames := sets.NewString(m.cert.Leaf.DNSNames...) desiredDNSNames := sets.NewString(template.DNSNames...) missingDNSNames := desiredDNSNames.Difference(currentDNSNames) if len(missingDNSNames) > 0 { glog.V(2).Infof(\"Current certificate is missing requested DNS names %v, rotating now\", missingDNSNames.List()) return time.Now() glog.V(2).Infof(\"Current certificate is missing requested DNS names %v\", missingDNSNames.List()) return false } currentIPs := sets.NewString()"} {"_id":"q-en-kubernetes-b95e5bf5be104c99fb48819005d34a9717d1abf73e4aa919b6c4af0232220bf4","text":"Expect(events.Items[1].Message).Should(Equal(fmt.Sprintf(\"Scaled down rc %s to 0\", rcName))) } func testRecreateDeployment(f *Framework) { ns := f.Namespace.Name c := f.Client // Create nginx pods. deploymentPodLabels := map[string]string{\"name\": \"sample-pod-3\"} rcPodLabels := map[string]string{ \"name\": \"sample-pod-3\", \"pod\": \"nginx\", } rcName := \"nginx-controller\" replicas := 3 _, err := c.ReplicationControllers(ns).Create(newRC(rcName, replicas, rcPodLabels, \"nginx\", \"nginx\")) Expect(err).NotTo(HaveOccurred()) defer func() { Logf(\"deleting replication controller %s\", rcName) Expect(c.ReplicationControllers(ns).Delete(rcName)).NotTo(HaveOccurred()) }() // Verify that the required pods have come up. err = verifyPods(c, ns, \"sample-pod-3\", false, 3) if err != nil { Logf(\"error in waiting for pods to come up: %s\", err) Expect(err).NotTo(HaveOccurred()) } // Create a deployment to delete nginx pods and instead bring up redis pods. deploymentName := \"redis-deployment-3\" Logf(\"Creating deployment %s\", deploymentName) _, err = c.Deployments(ns).Create(newDeployment(deploymentName, replicas, deploymentPodLabels, \"redis\", \"redis\", extensions.RecreateDeploymentStrategyType)) Expect(err).NotTo(HaveOccurred()) defer func() { deployment, err := c.Deployments(ns).Get(deploymentName) Expect(err).NotTo(HaveOccurred()) Logf(\"deleting deployment %s\", deploymentName) Expect(c.Deployments(ns).Delete(deploymentName, nil)).NotTo(HaveOccurred()) // TODO: remove this once we can delete rcs with deployment newRC, err := deploymentutil.GetNewRC(*deployment, c) Expect(err).NotTo(HaveOccurred()) Expect(c.ReplicationControllers(ns).Delete(newRC.Name)).NotTo(HaveOccurred()) }() err = waitForDeploymentStatus(c, ns, deploymentName, replicas, 0, replicas, 0) Expect(err).NotTo(HaveOccurred()) // Verify that the pods were scaled up and down as expected. We use events to verify that. deployment, err := c.Deployments(ns).Get(deploymentName) Expect(err).NotTo(HaveOccurred()) waitForEvents(c, ns, deployment, 2) events, err := c.Events(ns).Search(deployment) if err != nil { Logf(\"error in listing events: %s\", err) Expect(err).NotTo(HaveOccurred()) } // There should be 2 events, one to scale up the new RC and then to scale down the old RC. Expect(len(events.Items)).Should(Equal(2)) newRC, err := deploymentutil.GetNewRC(*deployment, c) Expect(err).NotTo(HaveOccurred()) Expect(newRC).NotTo(Equal(nil)) Expect(events.Items[0].Message).Should(Equal(fmt.Sprintf(\"Scaled down rc %s to 0\", rcName))) Expect(events.Items[1].Message).Should(Equal(fmt.Sprintf(\"Scaled up rc %s to 3\", newRC.Name))) } // testRolloverDeployment tests that deployment supports rollover. // i.e. we can change desired state and kick off rolling update, then change desired state again before it finishes. func testRolloverDeployment(f *Framework) {"} {"_id":"q-en-kubernetes-b9aa3f8bab58a1189b150b599c6e4079ddf843d4512317473c7d911999f3308c","text":"Create-Directories Download-HelperScripts Install-LoggingAgent Configure-LoggingAgent Restart-LoggingAgent # Even if Stackdriver is already installed, the function will still [re]start the service. if (IsLoggingEnabled $kube_env) { Install-LoggingAgent Configure-LoggingAgent Restart-LoggingAgent } Create-DockerRegistryKey Configure-Dockerd"} {"_id":"q-en-kubernetes-b9bc27f0e1538f3438ef92d7392e28b1226db965a63130be5a3e1a32d8474198","text":"BeforeEach(func() { podClient = f.PodClient() }) // TODO: Fix Flaky issue #68066 and then re-add this back into Conformance Suite /* Release : v1.9 Release : v1.15 Testname: Pods, delete grace period Description: Create a pod, make sure it is running, create a watch to observe Pod creation. Create a 'kubectl local proxy', capture the port the proxy is listening. Using the http client send a ‘delete’ with gracePeriodSeconds=30. Pod SHOULD get deleted within 30 seconds. Description: Create a pod, make sure it is running. Create a 'kubectl local proxy', capture the port the proxy is listening. Using the http client send a ‘delete’ with gracePeriodSeconds=30. Pod SHOULD get deleted within 30 seconds. */ It(\"should be submitted and removed [Flaky]\", func() { framework.ConformanceIt(\"should be submitted and removed\", func() { By(\"creating the pod\") name := \"pod-submit-remove-\" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond())"} {"_id":"q-en-kubernetes-b9f9d7f0712875f8da480f7f26fc20b8ce77107e88e7a1780b081a4fe0299945","text":"// be made to pass by removing pods, or you change an existing predicate so that // it can never be made to pass by removing pods, you need to add the predicate // failure error in nodesWherePreemptionMightHelp() in scheduler/core/generic_scheduler.go ErrDiskConflict = newPredicateFailureError(\"NoDiskConflict\") ErrVolumeZoneConflict = newPredicateFailureError(\"NoVolumeZoneConflict\") ErrNodeSelectorNotMatch = newPredicateFailureError(\"MatchNodeSelector\") ErrPodAffinityNotMatch = newPredicateFailureError(\"MatchInterPodAffinity\") ErrPodAffinityRulesNotMatch = newPredicateFailureError(\"PodAffinityRulesNotMatch\") ErrPodAntiAffinityRulesNotMatch = newPredicateFailureError(\"PodAntiAffinityRulesNotMatch\") ErrExistingPodsAntiAffinityRulesNotMatch = newPredicateFailureError(\"ExistingPodsAntiAffinityRulesNotMatch\") ErrTaintsTolerationsNotMatch = newPredicateFailureError(\"PodToleratesNodeTaints\") ErrPodNotMatchHostName = newPredicateFailureError(\"HostName\") ErrPodNotFitsHostPorts = newPredicateFailureError(\"PodFitsHostPorts\") ErrNodeLabelPresenceViolated = newPredicateFailureError(\"CheckNodeLabelPresence\") ErrServiceAffinityViolated = newPredicateFailureError(\"CheckServiceAffinity\") ErrMaxVolumeCountExceeded = newPredicateFailureError(\"MaxVolumeCount\") ErrNodeUnderMemoryPressure = newPredicateFailureError(\"NodeUnderMemoryPressure\") ErrNodeUnderDiskPressure = newPredicateFailureError(\"NodeUnderDiskPressure\") ErrNodeOutOfDisk = newPredicateFailureError(\"NodeOutOfDisk\") ErrNodeNotReady = newPredicateFailureError(\"NodeNotReady\") ErrNodeNetworkUnavailable = newPredicateFailureError(\"NodeNetworkUnavailable\") ErrNodeUnschedulable = newPredicateFailureError(\"NodeUnschedulable\") ErrNodeUnknownCondition = newPredicateFailureError(\"NodeUnknownCondition\") ErrVolumeNodeConflict = newPredicateFailureError(\"VolumeNodeAffinityConflict\") ErrVolumeBindConflict = newPredicateFailureError(\"VolumeBindingNoMatch\") ErrDiskConflict = newPredicateFailureError(\"NoDiskConflict\", \"node(s) had no available disk\") ErrVolumeZoneConflict = newPredicateFailureError(\"NoVolumeZoneConflict\", \"node(s) had no available volume zone\") ErrNodeSelectorNotMatch = newPredicateFailureError(\"MatchNodeSelector\", \"node(s) didn't match node selector\") ErrPodAffinityNotMatch = newPredicateFailureError(\"MatchInterPodAffinity\", \"node(s) didn't match pod affinity/anti-affinity\") ErrPodAffinityRulesNotMatch = newPredicateFailureError(\"PodAffinityRulesNotMatch\", \"node(s) didn't match pod affinity rules\") ErrPodAntiAffinityRulesNotMatch = newPredicateFailureError(\"PodAntiAffinityRulesNotMatch\", \"node(s) didn't match pod anti-affinity rules\") ErrExistingPodsAntiAffinityRulesNotMatch = newPredicateFailureError(\"ExistingPodsAntiAffinityRulesNotMatch\", \"node(s) didn't satisfy existing pods anti-affinity rules\") ErrTaintsTolerationsNotMatch = newPredicateFailureError(\"PodToleratesNodeTaints\", \"node(s) had taints that the pod didn't tolerate\") ErrPodNotMatchHostName = newPredicateFailureError(\"HostName\", \"node(s) didn't match the requested hostname\") ErrPodNotFitsHostPorts = newPredicateFailureError(\"PodFitsHostPorts\", \"node(s) didn't have free ports for the requested pod ports\") ErrNodeLabelPresenceViolated = newPredicateFailureError(\"CheckNodeLabelPresence\", \"node(s) didn't have the requested labels\") ErrServiceAffinityViolated = newPredicateFailureError(\"CheckServiceAffinity\", \"node(s) didn't match service affinity\") ErrMaxVolumeCountExceeded = newPredicateFailureError(\"MaxVolumeCount\", \"node(s) exceed max volume count\") ErrNodeUnderMemoryPressure = newPredicateFailureError(\"NodeUnderMemoryPressure\", \"node(s) had memory pressure\") ErrNodeUnderDiskPressure = newPredicateFailureError(\"NodeUnderDiskPressure\", \"node(s) had disk pressure\") ErrNodeOutOfDisk = newPredicateFailureError(\"NodeOutOfDisk\", \"node(s) were out of disk space\") ErrNodeNotReady = newPredicateFailureError(\"NodeNotReady\", \"node(s) were not ready\") ErrNodeNetworkUnavailable = newPredicateFailureError(\"NodeNetworkUnavailable\", \"node(s) had unavailable network\") ErrNodeUnschedulable = newPredicateFailureError(\"NodeUnschedulable\", \"node(s) were unschedulable\") ErrNodeUnknownCondition = newPredicateFailureError(\"NodeUnknownCondition\", \"node(s) had unknown conditions\") ErrVolumeNodeConflict = newPredicateFailureError(\"VolumeNodeAffinityConflict\", \"node(s) had volume node affinity conflict\") ErrVolumeBindConflict = newPredicateFailureError(\"VolumeBindingNoMatch\", \"node(s) didn't find available persistent volumes to bind\") // ErrFakePredicate is used for test only. The fake predicates returning false also returns error // as ErrFakePredicate. ErrFakePredicate = newPredicateFailureError(\"FakePredicateError\") ErrFakePredicate = newPredicateFailureError(\"FakePredicateError\", \"Nodes failed the fake predicate\") ) // InsufficientResourceError is an error type that indicates what kind of resource limit is"} {"_id":"q-en-kubernetes-ba3cc71293425b2866de7c94da9fba90610d9a91dd8bc211f96463bdc9e1497c","text":"// ValidateCSINodeDrivers tests that the specified CSINodeDrivers have valid data. func validateCSINodeDrivers(drivers []storage.CSINodeDriver, fldPath *field.Path, validationOpts CSINodeValidationOptions) field.ErrorList { allErrs := field.ErrorList{} driverNamesInSpecs := make(sets.String) driverNamesInSpecs := sets.New[string]() for i, driver := range drivers { idxPath := fldPath.Index(i) allErrs = append(allErrs, validateCSINodeDriver(driver, driverNamesInSpecs, idxPath, validationOpts)...)"} {"_id":"q-en-kubernetes-ba767ac21fd089e7575dff088c09c108566a651f3d84cd52a921a99d67c1a972","text":"} func (a genericAccessor) SetAnnotations(annotations map[string]string) { if a.annotations == nil { emptyAnnotations := make(map[string]string) a.annotations = &emptyAnnotations } *a.annotations = annotations }"} {"_id":"q-en-kubernetes-ba9204ab3e9225584a90bce27ad6b567525823815c98b4cc1de77ef59a9b8cb3","text":"maxBackOffTolerance = time.Duration(1.3 * float64(kubelet.MaxContainerBackOff)) podRetryPeriod = 1 * time.Second podRetryTimeout = 1 * time.Minute podReadyTimeout = 1 * time.Minute ) // testHostIP tests that a pod gets a host IP"} {"_id":"q-en-kubernetes-ba92e4b8b15b20b97c97c76d64e276165332e7f618223e533ff6e8ad52fcd33e","text":"scheme := runtime.NewScheme() scheme.AddKnownTypes(cmResource.GroupVersion(), &v1.ConfigMap{}) codecs := serializer.NewCodecFactory(scheme) o := NewFieldManagedObjectTracker(scheme, codecs.UniversalDecoder(), fakeTypeConverter) o := NewFieldManagedObjectTracker(scheme, codecs.UniversalDecoder(), configMapTypeConverter(scheme)) reaction := ObjectReaction(o) patch := []byte(`{\"apiVersion\": \"v1\", \"kind\": \"ConfigMap\", \"metadata\": {\"name\": \"cm-1\"}, \"data\": {\"k\": \"v\"}}`)"} {"_id":"q-en-kubernetes-bab496a4f0fb5a261d011439e8e8216a28f98c5d9843362f3a2532a012b1d150","text":"newDevicePath := \"\" err = wait.Poll(1*time.Second, timeout, func() (bool, error) { err = wait.PollImmediate(1*time.Second, timeout, func() (bool, error) { if newDevicePath, err = findDiskByLun(int(lun), io, exec); err != nil { return false, fmt.Errorf(\"azureDisk - WaitForAttach ticker failed node (%s) disk (%s) lun(%v) err(%s)\", nodeName, diskName, lun, err) }"} {"_id":"q-en-kubernetes-babaf9254e0269814d1ea1b1eb97de10827b9e9acd7e6a4c851f885953482ae2","text":"} } // OpenAPIv3 type/maxLength/maxItems/MaxProperties/required/wrong type field validation failures are viewed as blocking err for CEL validation // OpenAPIv3 type/maxLength/maxItems/MaxProperties/required/enum violation/wrong type field validation failures are viewed as blocking err for CEL validation func hasBlockingErr(errs field.ErrorList) (bool, *field.Error) { for _, err := range errs { if err.Type == field.ErrorTypeRequired || err.Type == field.ErrorTypeTooLong || err.Type == field.ErrorTypeTooMany || err.Type == field.ErrorTypeTypeInvalid { if err.Type == field.ErrorTypeNotSupported || err.Type == field.ErrorTypeRequired || err.Type == field.ErrorTypeTooLong || err.Type == field.ErrorTypeTooMany || err.Type == field.ErrorTypeTypeInvalid { return true, field.Invalid(nil, nil, \"some validation rules were not checked because the object was invalid; correct the existing errors to complete validation\") } }"} {"_id":"q-en-kubernetes-bac0346b41bc1d6d88c4f5ec6d3b234ff335e006e21c72e1241c91306fe6d20f","text":"// Removes SCSI controller which is latest attached to VM. func cleanUpController(newSCSIController types.BaseVirtualDevice, vmDevices object.VirtualDeviceList, vm *object.VirtualMachine, ctx context.Context) error { if newSCSIController == nil || vmDevices == nil || vm == nil { return nil } ctls := vmDevices.SelectByType(newSCSIController) if len(ctls) < 1 { return ErrNoDevicesFound"} {"_id":"q-en-kubernetes-bac1f2053e4bc66fe7f0eb87b2d6956c86949b138a6ab565df8bbebf5b3facdf","text":"// rest.Config generated by the resolver. type AuthenticationInfoResolverWrapper func(AuthenticationInfoResolver) AuthenticationInfoResolver // AuthenticationInfoResolver builds rest.Config base on the server name. // AuthenticationInfoResolver builds rest.Config base on the server or service // name and service namespace. type AuthenticationInfoResolver interface { // ClientConfigFor builds rest.Config based on the server. ClientConfigFor(server string) (*rest.Config, error) // ClientConfigForService builds rest.Config based on the serviceName and // serviceNamespace. ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) } // AuthenticationInfoResolverFunc implements AuthenticationInfoResolver. type AuthenticationInfoResolverFunc func(server string) (*rest.Config, error) // AuthenticationInfoResolverDelegator implements AuthenticationInfoResolver. type AuthenticationInfoResolverDelegator struct { ClientConfigForFunc func(server string) (*rest.Config, error) ClientConfigForServiceFunc func(serviceName, serviceNamespace string) (*rest.Config, error) } func (a *AuthenticationInfoResolverDelegator) ClientConfigFor(server string) (*rest.Config, error) { return a.ClientConfigForFunc(server) } //ClientConfigFor implements AuthenticationInfoResolver. func (a AuthenticationInfoResolverFunc) ClientConfigFor(server string) (*rest.Config, error) { return a(server) func (a *AuthenticationInfoResolverDelegator) ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) { return a.ClientConfigForServiceFunc(serviceName, serviceNamespace) } type defaultAuthenticationInfoResolver struct {"} {"_id":"q-en-kubernetes-bae299292a8d1028634f493254b57b95a530033ff622225687915cd483f5f4f5","text":"v1 \"k8s.io/api/core/v1\" policy \"k8s.io/api/policy/v1beta1\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" \"k8s.io/apimachinery/pkg/api/resource\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime\""} {"_id":"q-en-kubernetes-baee15794231afc7d2103e63f203132c627b0299e605f76a22ae9987bf9492b6","text":"\"type\": \"string\" }, \"ports\": { \"description\": \"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.\", \"description\": \"List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.\", \"items\": { \"$ref\": \"#/definitions/io.k8s.api.core.v1.ContainerPort\" },"} {"_id":"q-en-kubernetes-bb3448a2f8231e96978bd32caa3dfe4cef5816826281a0af9bc6816a74da177e","text":"AUTOSCALER_MIN_NODES=\"${KUBE_AUTOSCALER_MIN_NODES:-1}\" AUTOSCALER_MAX_NODES=\"${KUBE_AUTOSCALER_MAX_NODES:-${NUM_MINIONS}}\" TARGET_NODE_UTILIZATION=\"${KUBE_TARGET_NODE_UTILIZATION:-0.7}\" ENABLE_CLUSTER_MONITORING=googleinfluxdb fi # Optional: Enable deployment experimental feature, not ready for production use."} {"_id":"q-en-kubernetes-bb579085541433eea7607bbcec3b281daab625fb4d62f21af3cca072a610211f","text":"ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_PORT=${ETCD_PORT:-4001} ETCD_PREFIX=${ETCD_PREFIX:-randomPrefix} API_PORT=${API_PORT:-8080} API_HOST=${API_HOST:-127.0.0.1} KUBE_API_VERSIONS=\"\""} {"_id":"q-en-kubernetes-bb8513dd489146c5eef8a1f9213317b92e6113176274ae0bf52a55e9ed5d4c2d","text":"} // performPlatformSpecificContainerCleanup is responsible for doing any platform-specific cleanup // after either: // * the container creation has failed // * the container has been successfully started // * the container has been removed // whichever happens first. // Any errors it returns are simply logged, but do not prevent the container from being started or // removed. // after either the container creation has failed or the container has been removed. func (ds *dockerService) performPlatformSpecificContainerCleanup(cleanupInfo *containerCleanupInfo) (errors []error) { if err := removeGMSARegistryValue(cleanupInfo); err != nil { errors = append(errors, err)"} {"_id":"q-en-kubernetes-bbcf0942c9157828edace412baa2be6fe46820020e2daf36a43a3e9368548eee","text":"DefaultDummyDevice = \"kube-ipvs0\" connReuseMinSupportedKernelVersion = \"4.1\" // https://github.com/torvalds/linux/commit/35dfb013149f74c2be1ff9c78f14e6a3cd1539d1 connReuseFixedKernelVersion = \"5.9\" ) // iptablesJumpChain is tables of iptables chains that ipvs proxier used to install iptables or cleanup iptables."} {"_id":"q-en-kubernetes-bbd8cb150cf000f93af2cb1d30f843b55174d1adbdd850d35819aa46d1236c09","text":"VolumeSubpath: {Default: true, PreRelease: featuregate.GA}, ConfigurableFSGroupPolicy: {Default: false, PreRelease: featuregate.Alpha}, BalanceAttachedNodeVolumes: {Default: false, PreRelease: featuregate.Alpha}, VolumeSubpathEnvExpansion: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19, CSIBlockVolume: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 CSIInlineVolume: {Default: true, PreRelease: featuregate.Beta}, RuntimeClass: {Default: true, PreRelease: featuregate.Beta},"} {"_id":"q-en-kubernetes-bbea40c79339bb9188526744854378dbb35fb06288fe2dc2b69b6b560d481c98","text":"tc.opts..., ) // Errors if len(tc.wantErr) != 0 { if err == nil || !strings.Contains(err.Error(), tc.wantErr) { t.Errorf(\"got error %q, want %q\", err, tc.wantErr)"} {"_id":"q-en-kubernetes-bc732cdeb30ce388e843781a18a6a48f4dc2378e84ab02cfa6e4aa9b2f76803d","text":" /* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package scheme import ( \"testing\" \"k8s.io/apimachinery/pkg/api/testing/roundtrip\" \"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig/fuzzer\" ) func TestRoundTripTypes(t *testing.T) { scheme, _, err := NewSchemeAndCodecs() if err != nil { t.Fatalf(\"unexpected error: %v\", err) } roundtrip.RoundTripTestForScheme(t, scheme, fuzzer.Funcs) } "} {"_id":"q-en-kubernetes-bc9a06301412860818b2d565b5039699b2ca04e7c35208978e5ff9398d8b9889","text":"type NodeServer interface { // NodePrepareResources prepares several ResourceClaims // for use on the node. If an error is returned, the // response is ignored. Failures for individidual claims // response is ignored. Failures for individual claims // can be reported inside NodePrepareResourcesResponse. NodePrepareResources(context.Context, *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) // NodeUnprepareResources is the opposite of NodePrepareResources."} {"_id":"q-en-kubernetes-bca57e841fe2002a80ea867abf6e2b58d8e2c3abeefe32adaf34f24c55ff543d","text":"Interval_Sec 2 # Channels Setup,Windows PowerShell Channels application,system,security Tag winevent.raw Tag winevt.raw DB /var/run/google-fluentbit/pos-files/winlog.db # Json Log Example:"} {"_id":"q-en-kubernetes-bcc8c237ffc25b741e296c3b035552cef5b7866cd8f358559edd68eabcf83678","text":"pod := config.endpointPods[0] config.getPodClient().Delete(pod.Name, nil) config.endpointPods = config.endpointPods[1:] time.Sleep(5 * time.Second) // wait for kube-proxy to catch up with the pod being deleted. // wait for pod being deleted. err := waitForPodToDisappear(config.f.Client, config.f.Namespace.Name, pod.Name, labels.Everything(), time.Second, util.ForeverTestTimeout) if err != nil { Failf(\"Failed to delete %s pod: %v\", pod.Name, err) } // wait for endpoint being removed. err = waitForServiceEndpointsNum(config.f.Client, config.f.Namespace.Name, nodePortServiceName, len(config.endpointPods), time.Second, util.ForeverTestTimeout) if err != nil { Failf(\"Failed to remove endpoint from service: %s\", nodePortServiceName) } // wait for kube-proxy to catch up with the pod being deleted. time.Sleep(5 * time.Second) } func (config *KubeProxyTestConfig) createPod(pod *api.Pod) *api.Pod {"} {"_id":"q-en-kubernetes-bcd6fec134cba1f25fb33bf784b5923bd54ebbc813dd25e0f6401358fe42e601","text":"package e2e_node import ( \"fmt\" \"time\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/uuid\" \"k8s.io/kubernetes/pkg/api/v1\" \"k8s.io/kubernetes/test/e2e/framework\""} {"_id":"q-en-kubernetes-bcd7ef3c287995690cde4ec53867261adfdc5bba31b363d08e3d8c163b1e290b","text":"\"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/api/resource\" \"k8s.io/kubernetes/pkg/apis/extensions\" \"k8s.io/kubernetes/pkg/util/codeinspector\" \"k8s.io/kubernetes/plugin/pkg/scheduler\" \"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm\" priorityutil \"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/util\""} {"_id":"q-en-kubernetes-bcdb2e68eac318f38438a9380cb2178a005791a119362cee82292e240214dfcb","text":"psps, err := kubeClient.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), metav1.ListOptions{}) if err != nil { Logf(\"Error listing PodSecurityPolicies; assuming PodSecurityPolicy is disabled: %v\", err) isPSPEnabled = false } else if psps == nil || len(psps.Items) == 0 { return } if psps == nil || len(psps.Items) == 0 { Logf(\"No PodSecurityPolicies found; assuming PodSecurityPolicy is disabled.\") isPSPEnabled = false } else { Logf(\"Found PodSecurityPolicies; assuming PodSecurityPolicy is enabled.\") isPSPEnabled = true return } Logf(\"Found PodSecurityPolicies; testing pod creation to see if PodSecurityPolicy is enabled\") testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{GenerateName: \"psp-test-pod-\"}, Spec: v1.PodSpec{Containers: []v1.Container{{Name: \"test\", Image: imageutils.GetPauseImageName()}}}, } dryRunPod, err := kubeClient.CoreV1().Pods(\"kube-system\").Create(context.TODO(), testPod, metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}}) if err != nil { if strings.Contains(err.Error(), \"PodSecurityPolicy\") { Logf(\"PodSecurityPolicy error creating dryrun pod; assuming PodSecurityPolicy is enabled: %v\", err) isPSPEnabled = true } else { Logf(\"Error creating dryrun pod; assuming PodSecurityPolicy is disabled: %v\", err) } return } pspAnnotation, pspAnnotationExists := dryRunPod.Annotations[\"kubernetes.io/psp\"] if !pspAnnotationExists { Logf(\"No PSP annotation exists on dry run pod; assuming PodSecurityPolicy is disabled\") return } Logf(\"PSP annotation exists on dry run pod: %q; assuming PodSecurityPolicy is enabled\", pspAnnotation) isPSPEnabled = true }) return isPSPEnabled }"} {"_id":"q-en-kubernetes-bce596787532dba5eb2ffddc4fe088e7d2060d755d6fa13691ec764b762c15da","text":"} } func TestDiscoveryContentTypeVersion(t *testing.T) { tests := []struct { contentType string isV2Beta1 bool }{ { contentType: \"application/json; g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList\", isV2Beta1: true, }, { // content-type parameters are not in correct order, but comparison ignores order. contentType: \"application/json; v=v2beta1;as=APIGroupDiscoveryList;g=apidiscovery.k8s.io\", isV2Beta1: true, }, { // content-type parameters are not in correct order, but comparison ignores order. contentType: \"application/json; as=APIGroupDiscoveryList;g=apidiscovery.k8s.io;v=v2beta1\", isV2Beta1: true, }, { // Ignores extra parameter \"charset=utf-8\" contentType: \"application/json; g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList;charset=utf-8\", isV2Beta1: true, }, { contentType: \"application/json\", isV2Beta1: false, }, { contentType: \"application/json; charset=UTF-8\", isV2Beta1: false, }, { contentType: \"text/json\", isV2Beta1: false, }, { contentType: \"text/html\", isV2Beta1: false, }, { contentType: \"\", isV2Beta1: false, }, } for _, test := range tests { isV2Beta1 := isV2Beta1ContentType(test.contentType) assert.Equal(t, test.isV2Beta1, isV2Beta1) } } func TestUseLegacyDiscovery(t *testing.T) { // Default client sends aggregated discovery accept format (first) as well as legacy format. server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {"} {"_id":"q-en-kubernetes-bd2f92b6278201843732cf4a9df0684949232e825c6ca7f9dc3e547fa998fdde","text":"package main import ( \"fmt\" \"math/rand\" \"os\" \"time\""} {"_id":"q-en-kubernetes-bd53e66842fb9f0051aad196ae3200c4ebdf53ad5385cf363d168966eb761295","text":"// our target metric should be updated by now if err := wait.PollUntilContextTimeout(ctx, 10*time.Second, 2*time.Minute, true, func(_ context.Context) (bool, error) { metrics, err := metricsGrabber.GrabFromKubeProxy(ctx, nodeName) framework.ExpectNoError(err) if err != nil { return false, fmt.Errorf(\"failed to fetch metrics: %w\", err) } targetMetricAfter, err := metrics.GetCounterMetricValue(metricName) framework.ExpectNoError(err) if err != nil { return false, fmt.Errorf(\"failed to fetch metric: %w\", err) } return targetMetricAfter > targetMetricBefore, nil }); err != nil { framework.Failf(\"expected %s metric to be updated after accessing endpoints via localhost nodeports\", metricName) if wait.Interrupted(err) { framework.Failf(\"expected %s metric to be updated after accessing endpoints via localhost nodeports\", metricName) } framework.ExpectNoError(err) } }) })"} {"_id":"q-en-kubernetes-bd5a0b06201c0496c7216fba6c2af63ce440a2d5e2db9cde2c9c21dff44c510a","text":"NodeDiskPressure NodeConditionType = \"DiskPressure\" // NodeNetworkUnavailable means that network for the node is not correctly configured. NodeNetworkUnavailable NodeConditionType = \"NetworkUnavailable\" // NodeInodePressure means the kubelet is under pressure due to insufficient available inodes. NodeInodePressure NodeConditionType = \"InodePressure\" ) // NodeCondition contains condition information for a node."} {"_id":"q-en-kubernetes-bd618854930423f5eb3bdfd852f79a000e1aee31463454c563b59e995725403d","text":"go_test( name = \"go_default_test\", srcs = [ \"codec_test.go\", \"conversion_test.go\", \"converter_test.go\", \"embedded_test.go\","} {"_id":"q-en-kubernetes-bd800e9dbac04f642ec9a725edf97dc4a428703422a42289ea3af211a5986c5b","text":"fi proxy_mem_per_node=50 proxy_mem=$((100 * 1024 + proxy_mem_per_node*NUM_NODES)) hollow_kubelet_params=$(eval \"for param in ${HOLLOW_KUBELET_TEST_ARGS:-}; do echo -n \"$param\",; done\") hollow_kubelet_params=${hollow_kubelet_params%?} hollow_proxy_params=$(eval \"for param in ${HOLLOW_PROXY_TEST_ARGS:-}; do echo -n \"$param\",; done\") hollow_proxy_params=${hollow_proxy_params%?} sed -i'' -e \"s/{{HOLLOW_PROXY_CPU}}/${proxy_cpu}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{HOLLOW_PROXY_MEM}}/${proxy_mem}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s'{{kubemark_image_registry}}'${KUBEMARK_IMAGE_REGISTRY}${KUBE_NAMESPACE}'g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{kubemark_image_tag}}/${KUBEMARK_IMAGE_TAG}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{master_ip}}/${MASTER_IP}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{hollow_kubelet_params}}/${HOLLOW_KUBELET_TEST_ARGS:-}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{hollow_proxy_params}}/${HOLLOW_PROXY_TEST_ARGS:-}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{hollow_kubelet_params}}/${hollow_kubelet_params}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s/{{hollow_proxy_params}}/${hollow_proxy_params}/g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s'{{kubemark_mig_config}}'${KUBEMARK_MIG_CONFIG:-}'g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" \"${KUBECTL}\" create -f \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" --namespace=\"kubemark\""} {"_id":"q-en-kubernetes-bd80475127377067f4148587ea88f824ff33aca6062560ee5bfdff8df1149066","text":"var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Switch on content-type server responded with: aggregated or unaggregated. switch responseContentType { case AcceptV1: switch { case isV2Beta1ContentType(responseContentType): var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) default: // Default is unaggregated discovery v1. var v metav1.APIVersions err = json.Unmarshal(body, &v) if err != nil {"} {"_id":"q-en-kubernetes-bd8c5ad17499247548776c55cf33cef77d1c9e197027f87c0e3ff6a606d0f4da","text":"} } func TestInClusterClientConfigPrecedence(t *testing.T) { tt := []struct { overrides *ConfigOverrides }{ { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ Server: \"https://host-from-overrides.com\", }, }, }, { overrides: &ConfigOverrides{ AuthInfo: clientcmdapi.AuthInfo{ Token: \"https://host-from-overrides.com\", }, }, }, { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ CertificateAuthority: \"/path/to/ca-from-overrides.crt\", }, }, }, { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ Server: \"https://host-from-overrides.com\", }, AuthInfo: clientcmdapi.AuthInfo{ Token: \"https://host-from-overrides.com\", }, }, }, { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ Server: \"https://host-from-overrides.com\", CertificateAuthority: \"/path/to/ca-from-overrides.crt\", }, }, }, { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ CertificateAuthority: \"/path/to/ca-from-overrides.crt\", }, AuthInfo: clientcmdapi.AuthInfo{ Token: \"https://host-from-overrides.com\", }, }, }, { overrides: &ConfigOverrides{ ClusterInfo: clientcmdapi.Cluster{ Server: \"https://host-from-overrides.com\", CertificateAuthority: \"/path/to/ca-from-overrides.crt\", }, AuthInfo: clientcmdapi.AuthInfo{ Token: \"https://host-from-overrides.com\", }, }, }, { overrides: &ConfigOverrides{}, }, } for _, tc := range tt { expectedServer := \"https://host-from-cluster.com\" expectedToken := \"token-from-cluster\" expectedCAFile := \"/path/to/ca-from-cluster.crt\" icc := &inClusterClientConfig{ inClusterConfigProvider: func() (*restclient.Config, error) { return &restclient.Config{ Host: expectedServer, BearerToken: expectedToken, TLSClientConfig: restclient.TLSClientConfig{ CAFile: expectedCAFile, }, }, nil }, overrides: tc.overrides, } clientConfig, err := icc.ClientConfig() if err != nil { t.Fatalf(\"Unxpected error: %v\", err) } if overridenServer := tc.overrides.ClusterInfo.Server; len(overridenServer) > 0 { expectedServer = overridenServer } if overridenToken := tc.overrides.AuthInfo.Token; len(overridenToken) > 0 { expectedToken = overridenToken } if overridenCAFile := tc.overrides.ClusterInfo.CertificateAuthority; len(overridenCAFile) > 0 { expectedCAFile = overridenCAFile } if clientConfig.Host != expectedServer { t.Errorf(\"Expected server %v, got %v\", expectedServer, clientConfig.Host) } if clientConfig.BearerToken != expectedToken { t.Errorf(\"Expected token %v, got %v\", expectedToken, clientConfig.BearerToken) } if clientConfig.TLSClientConfig.CAFile != expectedCAFile { t.Errorf(\"Expected Certificate Authority %v, got %v\", expectedCAFile, clientConfig.TLSClientConfig.CAFile) } } } func matchBoolArg(expected, got bool, t *testing.T) { if expected != got { t.Errorf(\"Expected %v, got %v\", expected, got)"} {"_id":"q-en-kubernetes-bd9a42d5417deaf4d05e5f75c501f17b739322592c115fdee4192f024545642a","text":"// The name of this port. All ports in an EndpointSlice must have a unique // name. If the EndpointSlice is dervied from a Kubernetes service, this // corresponds to the Service.ports[].name. // Name must either be an empty string or pass IANA_SVC_NAME validation: // * must be no more than 15 characters long // * may contain only [-a-z0-9] // * must contain at least one letter [a-z] // * it must not start or end with a hyphen, nor contain adjacent hyphens // Name must either be an empty string or pass DNS_LABEL validation: // * must be no more than 63 characters long. // * must consist of lower case alphanumeric characters or '-'. // * must start and end with an alphanumeric character. Name *string // The IP protocol for this port. // Must be UDP, TCP, or SCTP."} {"_id":"q-en-kubernetes-bdff48675cc6223bc8c66f8593c0515939335916e561cd38d65615a0de5d96bf","text":"docs/man/man1/kubectl-alpha-diff.1 docs/man/man1/kubectl-alpha.1 docs/man/man1/kubectl-annotate.1 docs/man/man1/kubectl-api-resources.1 docs/man/man1/kubectl-api-versions.1 docs/man/man1/kubectl-apply-edit-last-applied.1 docs/man/man1/kubectl-apply-set-last-applied.1"} {"_id":"q-en-kubernetes-be0f99e060e7b78cc0f4d55369474e8b1ce48f0caa95848431c1f2e6a912c273","text":"maxStorageAccounts = 100 // max # is 200 (250 with special request). this allows 100 for everything else including stand alone disks maxDisksPerStorageAccounts = 60 storageAccountUtilizationBeforeGrowing = 0.5 // Disk Caching is not supported for disks 4 TiB and larger // https://docs.microsoft.com/en-us/azure/virtual-machines/premium-storage-performance#disk-caching diskCachingLimit = 4096 // GiB maxLUN = 64 // max number of LUNs per VM errLeaseFailed = \"AcquireDiskLeaseFailed\""} {"_id":"q-en-kubernetes-be39fa1afb4eddcfa9728edc5859e03bb99d3b7f192c13cc02308c0f713990a3","text":"// list all pods to include the pods that don't match the rs`s selector // anymore but has the stale controller ref. // TODO: Do the List and Filter in a single pass, or use an index. pods, err := rsc.podLister.Pods(rs.Namespace).List(labels.Everything()) allPods, err := rsc.podLister.Pods(rs.Namespace).List(labels.Everything()) if err != nil { return err } // Ignore inactive pods. var filteredPods []*v1.Pod for _, pod := range pods { for _, pod := range allPods { if controller.IsPodActive(pod) { filteredPods = append(filteredPods, pod) }"} {"_id":"q-en-kubernetes-be44fa41717b150de78312925771cd94e0fc8ee065f03960afa06dc045c37a51","text":"statuses[container.Name] = status } // Copy the slice before sorting it containerStatusesCopy := make([]*kubecontainer.Status, len(podStatus.ContainerStatuses)) copy(containerStatusesCopy, podStatus.ContainerStatuses) // Make the latest container status comes first. sort.Sort(sort.Reverse(kubecontainer.SortContainerStatusesByCreationTime(podStatus.ContainerStatuses))) sort.Sort(sort.Reverse(kubecontainer.SortContainerStatusesByCreationTime(containerStatusesCopy))) // Set container statuses according to the statuses seen in pod status containerSeen := map[string]int{} for _, cStatus := range podStatus.ContainerStatuses { for _, cStatus := range containerStatusesCopy { cName := cStatus.Name if _, ok := statuses[cName]; !ok { // This would also ignore the infra container."} {"_id":"q-en-kubernetes-be5fdb913ced9c353e4bfeb78cb3844524accd322efbadd7e8f03d20fd7401d2","text":"\"k8s.io/apimachinery/pkg/util/diff\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/kubernetes/federation/apis/federation\" \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/api/testapi\" \"k8s.io/kubernetes/pkg/apis/apps\""} {"_id":"q-en-kubernetes-be7ab46098e079765ea484fe46d26f283dd6300c8d4a86a9845ffc0552bac88f","text":"}, } if strings.Contains(err.Error(), \"0/3 nodes are available\") { if strings.Contains(err.Error(), \"2 NodeUnderDiskPressure\") && strings.Contains(err.Error(), \"1 NodeUnderMemoryPressure\") { if strings.Contains(err.Error(), \"2 node(s) had disk pressure\") && strings.Contains(err.Error(), \"1 node(s) had memory pressure\") { return } }"} {"_id":"q-en-kubernetes-be84fd8fc2a9e5af55c3799779d26697a431854f7ee69d65f64d1413ef0878a6","text":"} } if utilfeature.DefaultFeatureGate.Enabled(features.HonorPVReclaimPolicy) { if metav1.HasAnnotation(volume.ObjectMeta, storagehelpers.AnnMigratedTo) { // CSI migration scenario - do not depend on in-tree plugin return nil, nil } if volume.Spec.CSI != nil { // CSI volume source scenario - external provisioner is requested return nil, nil } } // The plugin that provisioned the volume was not found or the volume // was not dynamically provisioned. Try to find a plugin by spec. spec := vol.NewSpecFromPersistentVolume(volume, false)"} {"_id":"q-en-kubernetes-bed9b6d45ae7ae677fce674fee9883dd43cc15342cec6c556f34832fa6a4e270","text":"} func (s *containerScope) Admit(pod *v1.Pod) lifecycle.PodAdmitResult { // Exception - Policy : none if s.policy.Name() == PolicyNone { return s.admitPolicyNone(pod) } for _, container := range append(pod.Spec.InitContainers, pod.Spec.Containers...) { bestHint, admit := s.calculateAffinity(pod, &container) klog.InfoS(\"Best TopologyHint\", \"bestHint\", bestHint, \"pod\", klog.KObj(pod), \"containerName\", container.Name)"} {"_id":"q-en-kubernetes-bef27bef5c19cde72d5a3fb04023d8a16b2c68eb91d6f8f4b4b7eeaffab2c5a2","text":"Name: \"foo\"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, }, }, false}, {api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"bar\"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating,"} {"_id":"q-en-kubernetes-bff351294a9b81dd663fed0e8659254d8c2faa847c139e4daf1cb8d432aac742","text":"Rule: admissionv1beta1.Rule{APIGroups: []string{\"\"}, APIVersions: []string{\"v1\"}, Resources: []string{\"pods\"}}, }}, ObjectSelector: webhook.objectSelector, NamespaceSelector: &metav1.LabelSelector{MatchLabels: nsLabels}, FailurePolicy: &fail, ReinvocationPolicy: webhook.policy, AdmissionReviewVersions: []string{\"v1beta1\"}, }) } // Register a marker checking webhook with each set of webhook configurations markerEndpoint := webhookServer.URL + \"/marker\" webhooks = append(webhooks, admissionv1beta1.MutatingWebhook{ Name: \"admission.integration.test.marker\", ClientConfig: admissionv1beta1.WebhookClientConfig{ URL: &markerEndpoint, CABundle: localhostCert, }, Rules: []admissionv1beta1.RuleWithOperations{{ Operations: []admissionv1beta1.OperationType{admissionv1beta1.OperationAll}, Rule: admissionv1beta1.Rule{APIGroups: []string{\"\"}, APIVersions: []string{\"v1\"}, Resources: []string{\"pods\"}}, }}, NamespaceSelector: &metav1.LabelSelector{MatchLabels: markerNsLabels}, ObjectSelector: &metav1.LabelSelector{MatchLabels: map[string]string{\"marker\": \"true\"}}, AdmissionReviewVersions: []string{\"v1beta1\"}, }) cfg, err := client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Create(&admissionv1beta1.MutatingWebhookConfiguration{ ObjectMeta: metav1.ObjectMeta{Name: fmt.Sprintf(\"admission.integration.test-%d\", i)},"} {"_id":"q-en-kubernetes-bffbd31fa74e52843a590a775cf27eae12acf496c973dd78ab34bc7aa3c02e45","text":"} func (az *Cloud) isCurrentInstance(name types.NodeName, metadataVMName string) (bool, error) { var err error nodeName := mapNodeNameToVMName(name) // VMSS vmName is not same with hostname, use hostname instead. if az.VMType == vmTypeVMSS { // VMSS vmName is not same with hostname, construct the node name \"{computer-name-prefix}{base-36-instance-id}\". // Refer https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-instance-ids#scale-set-vm-computer-name. if ssName, instanceID, err := extractVmssVMName(metadataVMName); err == nil { instance, err := strconv.ParseInt(instanceID, 10, 64) if err != nil { return false, fmt.Errorf(\"failed to parse VMSS instanceID %q: %v\", instanceID, err) } metadataVMName = fmt.Sprintf(\"%s%06s\", ssName, strconv.FormatInt(instance, 36)) metadataVMName, err = os.Hostname() if err != nil { return false, err } // Use name from env variable \"NODE_NAME\" if it is set. nodeNameEnv := os.Getenv(nodeNameEnvironmentName) if nodeNameEnv != \"\" { metadataVMName = nodeNameEnv } }"} {"_id":"q-en-kubernetes-c012b6ae7a29c7990a78a95fbc530c1691bdda7fff9051a124af84308e2593ea","text":"Expect(lineCount).To(Equal(expectedLineCount), \"Line count of the written file should be %d.\", expectedLineCount) // Verify the pod is scheduled in the other zone. By(\"verifying the pod is scheduled in a different zone.\") var otherZone string if cloudZones[0] == podZone { otherZone = cloudZones[1] } else { otherZone = cloudZones[0] } func addTaint(c clientset.Interface, ns string, nodes []v1.Node, podZone string) (removeTaint func()) { reversePatches := make(map[string][]byte) for _, node := range nodes { oldData, err := json.Marshal(node) Expect(err).NotTo(HaveOccurred()) node.Spec.Taints = append(node.Spec.Taints, v1.Taint{ Key: taintKeyPrefix + ns, Value: podZone, Effect: v1.TaintEffectNoSchedule, }) newData, err := json.Marshal(node) Expect(err).NotTo(HaveOccurred()) patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.Node{}) Expect(err).NotTo(HaveOccurred()) reversePatchBytes, err := strategicpatch.CreateTwoWayMergePatch(newData, oldData, v1.Node{}) Expect(err).NotTo(HaveOccurred()) reversePatches[node.Name] = reversePatchBytes _, err = c.CoreV1().Nodes().Patch(node.Name, types.StrategicMergePatchType, patchBytes) Expect(err).ToNot(HaveOccurred()) } nodeName = pod.Spec.NodeName node, err = c.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{}) Expect(err).ToNot(HaveOccurred()) newPodZone := node.Labels[apis.LabelZoneFailureDomain] Expect(newPodZone).To(Equal(otherZone), \"The pod should be scheduled in zone %s after all nodes in zone %s have been deleted\", otherZone, podZone) return func() { for nodeName, reversePatch := range reversePatches { _, err := c.CoreV1().Nodes().Patch(nodeName, types.StrategicMergePatchType, reversePatch) Expect(err).ToNot(HaveOccurred()) } } } func testRegionalDelayedBinding(c clientset.Interface, ns string) {"} {"_id":"q-en-kubernetes-c02c321cff997cfce6880aa80faca4c285f424e4cf6be75c1e47c80a2ecd0809","text":"ginkgo.BeforeEach(func() { c = f.ClientSet ns = f.Namespace.Name dc = f.DynamicClient }) ginkgo.It(\"deployment reaping should cascade to its replica sets and pods\", func() {"} {"_id":"q-en-kubernetes-c05c2cc70c2ef67ecd42837076a58c41d08e71b002757478fd6a9f5509ecae0d","text":"func (i *Instances) NodeAddresses(name string) ([]api.NodeAddress, error) { glog.V(4).Infof(\"NodeAddresses(%v) called\", name) srv, err := getServerByName(i.compute, name) addrs, err := getAddressesByName(i.compute, name) if err != nil { return nil, err } addrs := []api.NodeAddress{} for _, addr := range findAddrs(srv.Addresses[\"private\"]) { addrs = append(addrs, api.NodeAddress{ Type: api.NodeInternalIP, Address: addr, }) } for _, addr := range findAddrs(srv.Addresses[\"public\"]) { addrs = append(addrs, api.NodeAddress{ Type: api.NodeExternalIP, Address: addr, }) } // AccessIPs are usually duplicates of \"public\" addresses. api.AddToNodeAddresses(&addrs, api.NodeAddress{ Type: api.NodeExternalIP, Address: srv.AccessIPv6, }, api.NodeAddress{ Type: api.NodeExternalIP, Address: srv.AccessIPv4, }, ) glog.V(4).Infof(\"NodeAddresses(%v) => %v\", name, addrs) return addrs, nil }"} {"_id":"q-en-kubernetes-c0726c618b535f4afbd300883406c99fa4035bef41037c3ce284f72502ebe571","text":"\"fmt\" \"net/http\" \"net/http/httptest\" \"net/url\" \"reflect\" \"testing\" \"k8s.io/apimachinery/pkg/util/sets\" ) func TestInstallHandler(t *testing.T) {"} {"_id":"q-en-kubernetes-c09089e830f2f32bf327ee16aa05637d6aa7b38af703f48f085c99a2ca9bbaa9","text":"# Get the compute zone zone=${ZONE:-\"$(gcloud info --format='value(config.properties.compute.zone.value)')\"} zone=${zone// /} if [[ ${zone} == \"\" ]]; then echo \"Could not find gcloud compute/zone when running: `gcloud info --format='value(config.properties.compute.zone.value)'`\" exit 1"} {"_id":"q-en-kubernetes-c0b0d4d975911efa63929fe4c7683a8f0c03ef042aed94893f6ed409eb5557bc","text":"Searches: []string{testHostDomain}, }, nil } // getResolvConf returns the hostResolvConf string, which will be used to get the Host's DNS configuration. func getResolvConf(t *testing.T) (string, func()) { return hostResolvConf, func() {} } "} {"_id":"q-en-kubernetes-c116c8d305937ccd42ccab4c68f9d21f584b5a8ae2e842308ac72638b49b66ff","text":"} if h.nodeCacheCapable && result.NodeNames != nil { nodeResult = make([]*v1.Node, 0, len(*result.NodeNames)) for i := range *result.NodeNames { nodeResult = append(nodeResult, nodeNameToInfo[(*result.NodeNames)[i]].Node()) nodeResult = make([]*v1.Node, len(*result.NodeNames)) for i, nodeName := range *result.NodeNames { if node, ok := nodeNameToInfo[nodeName]; ok { nodeResult[i] = node.Node() } else { return nil, nil, fmt.Errorf( \"extender %q claims a filtered node %q which is not found in nodeNameToInfo map\", h.extenderURL, nodeName) } } } else if result.Nodes != nil { nodeResult = make([]*v1.Node, 0, len(result.Nodes.Items)) nodeResult = make([]*v1.Node, len(result.Nodes.Items)) for i := range result.Nodes.Items { nodeResult = append(nodeResult, &result.Nodes.Items[i]) nodeResult[i] = &result.Nodes.Items[i] } }"} {"_id":"q-en-kubernetes-c1205207799d17bc661e971e60f98018e7555d69b0104f03d2dc2543b614db08","text":"return nil } policyGroupVersion, err := CheckEvictionSupport(d.Client) if err != nil { return err } // TODO(justinsb): unnecessary? getPodFn := func(namespace, name string) (*corev1.Pod, error) { return d.Client.CoreV1().Pods(namespace).Get(name, metav1.GetOptions{}) } if len(policyGroupVersion) > 0 { return d.evictPods(pods, policyGroupVersion, getPodFn) if !d.DisableEviction { policyGroupVersion, err := CheckEvictionSupport(d.Client) if err != nil { return err } if len(policyGroupVersion) > 0 { return d.evictPods(pods, policyGroupVersion, getPodFn) } } return d.deletePods(pods, getPodFn)"} {"_id":"q-en-kubernetes-c13232b721d5a00d4842dba6f03d3befbe6640a1731399210fa6e2e2b33f22f1","text":"// shouldRetryHTTPRequest determines if the request is retriable. func shouldRetryHTTPRequest(resp *http.Response, err error) bool { if resp != nil { // HTTP 412 (StatusPreconditionFailed) means etag mismatch, hence we shouldn't retry. if resp.StatusCode == http.StatusPreconditionFailed { // HTTP 412 (StatusPreconditionFailed) means etag mismatch // HTTP 400 (BadRequest) means the request cannot be accepted, hence we shouldn't retry. if resp.StatusCode == http.StatusPreconditionFailed || resp.StatusCode == http.StatusBadRequest { return false }"} {"_id":"q-en-kubernetes-c15c75dd8f36dbd2cb26bd6c94ca63fdfe045c75918bb14e3cb55abb7c9453b2","text":"return expected.ret } func (testcase *testcase) DiskIsAttached(diskName string, nodeName types.NodeName) (bool, error) { func (testcase *testcase) DiskIsAttached(diskName string, nodeName types.NodeName) (bool, string, error) { expected := &testcase.diskIsAttached if expected.diskName == \"\" && expected.nodeName == \"\" { // testcase.diskIsAttached looks uninitialized, test did not expect to // call DiskIsAttached testcase.t.Errorf(\"Unexpected DiskIsAttached call!\") return false, errors.New(\"Unexpected DiskIsAttached call!\") return false, diskName, errors.New(\"Unexpected DiskIsAttached call!\") } if expected.diskName != diskName { testcase.t.Errorf(\"Unexpected DiskIsAttached call: expected diskName %s, got %s\", expected.diskName, diskName) return false, errors.New(\"Unexpected DiskIsAttached call: wrong diskName\") return false, diskName, errors.New(\"Unexpected DiskIsAttached call: wrong diskName\") } if expected.nodeName != nodeName { testcase.t.Errorf(\"Unexpected DiskIsAttached call: expected nodeName %s, got %s\", expected.nodeName, nodeName) return false, errors.New(\"Unexpected DiskIsAttached call: wrong nodeName\") return false, diskName, errors.New(\"Unexpected DiskIsAttached call: wrong nodeName\") } klog.V(4).Infof(\"DiskIsAttached call: %s, %s, returning %v, %v\", diskName, nodeName, expected.isAttached, expected.ret) return expected.isAttached, expected.ret return expected.isAttached, diskName, expected.ret } func (testcase *testcase) DisksAreAttached(nodeVolumes map[types.NodeName][]string) (map[types.NodeName]map[string]bool, error) {"} {"_id":"q-en-kubernetes-c16e8e475e6ed7fd6e9c52903fbb6a7f7f29d813f98884d8bbb0ff604883a92f","text":"package dns import ( \"fmt\" \"os\" runtimeapi \"k8s.io/cri-api/pkg/apis/runtime/v1\" \"k8s.io/klog/v2\" ) func getHostDNSConfig(resolverConfig string) (*runtimeapi.DNSConfig, error) { var hostDNS, hostSearch, hostOptions []string // Get host DNS settings if resolverConfig != \"\" { f, err := os.Open(resolverConfig) if err != nil { klog.ErrorS(err, \"Could not open resolv conf file.\") return nil, err } defer f.Close() hostDNS, hostSearch, hostOptions, err = parseResolvConf(f) if err != nil { err := fmt.Errorf(\"Encountered error while parsing resolv conf file. Error: %w\", err) klog.ErrorS(err, \"Could not parse resolv conf file.\") return nil, err } } return &runtimeapi.DNSConfig{ Servers: hostDNS, Searches: hostSearch, Options: hostOptions, }, nil } // Read the DNS configuration from a resolv.conf file. var getHostDNSConfig = getDNSConfig "} {"_id":"q-en-kubernetes-c180881393106c8818750519172046c1d42d6d80ef5ac3b434e11dc0e7378008","text":"return nil } // Ensures that the load balancer associated with the given service is deleted, // doing the deletion if necessary. Should always be retried upon failure. func (s *ServiceController) ensureLBDeleted(service *api.Service) error { // This is only needed because not all delete load balancer implementations // are currently idempotent to the LB not existing. if _, exists, err := s.balancer.GetTCPLoadBalancer(s.loadBalancerName(service), s.zone.Region); err != nil { return err } else if !exists { return nil } if err := s.balancer.DeleteTCPLoadBalancer(s.loadBalancerName(service), s.zone.Region); err != nil { return err } return nil } // ListKeys implements the interface required by DeltaFIFO to list the keys we // already know about. func (s *serviceCache) ListKeys() []string {"} {"_id":"q-en-kubernetes-c1b7ebd49f91823a41fecc362bf2a3545a39e0104929a3c133b4d587e781137c","text":"start_kube_controller_manager start_kube_scheduler start_kube_addons start_cluster_autoscaler } 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB} end script"} {"_id":"q-en-kubernetes-c1c37109b81771a5e484fd7b96e869d332dedd430cb41ea000a4d518cc8ad2a3","text":"// to the node. This list can be used to determine volumes that are either in-use // or have a mount/unmount operation pending. GetAttachedVolumes() []AttachedVolume // SyncReconstructedVolume check the volume.outerVolumeSpecName in asw and // the one populated from dsw , if they do not match, update this field from the value from dsw. SyncReconstructedVolume(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName, outerVolumeSpecName string) } // MountedVolume represents a volume that has successfully been mounted to a pod."} {"_id":"q-en-kubernetes-c21499970c2e87db850d248524f9b7b2e291ed10ff86e96f6d39dda4aa340ce4","text":"} }) It(\"should provision storage with non-default reclaim policy Retain\", func() { framework.SkipUnlessProviderIs(\"gce\", \"gke\") test := testsuites.StorageClassTest{ Name: \"HDD PD on GCE/GKE\", CloudProviders: []string{\"gce\", \"gke\"}, Provisioner: \"kubernetes.io/gce-pd\", Parameters: map[string]string{ \"type\": \"pd-standard\", }, ClaimSize: \"1Gi\", ExpectedSize: \"1Gi\", PvCheck: func(volume *v1.PersistentVolume) error { return checkGCEPD(volume, \"pd-standard\") }, } class := newStorageClass(test, ns, \"reclaimpolicy\") retain := v1.PersistentVolumeReclaimRetain class.ReclaimPolicy = &retain claim := newClaim(test, ns, \"reclaimpolicy\") claim.Spec.StorageClassName = &class.Name pv := testsuites.TestDynamicProvisioning(test, c, claim, class) By(fmt.Sprintf(\"waiting for the provisioned PV %q to enter phase %s\", pv.Name, v1.VolumeReleased)) framework.ExpectNoError(framework.WaitForPersistentVolumePhase(v1.VolumeReleased, c, pv.Name, 1*time.Second, 30*time.Second)) By(fmt.Sprintf(\"deleting the storage asset backing the PV %q\", pv.Name)) framework.ExpectNoError(framework.DeletePDWithRetry(pv.Spec.GCEPersistentDisk.PDName)) By(fmt.Sprintf(\"deleting the PV %q\", pv.Name)) framework.ExpectNoError(framework.DeletePersistentVolume(c, pv.Name), \"Failed to delete PV \", pv.Name) framework.ExpectNoError(framework.WaitForPersistentVolumeDeleted(c, pv.Name, 1*time.Second, 30*time.Second)) }) It(\"should not provision a volume in an unmanaged GCE zone.\", func() { framework.SkipUnlessProviderIs(\"gce\", \"gke\") var suffix string = \"unmananged\""} {"_id":"q-en-kubernetes-c25610b7503458d6b99b3fe26dc1c64d544038ba8ce3768c0663c098c74b7bea","text":"\"description\": \"EndpointPort is a tuple that describes a single port.\", \"properties\": { \"appProtocol\": { \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"description\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"type\": \"string\" }, \"name\": {"} {"_id":"q-en-kubernetes-c2623818a8c52843adaae0f533a35ac7dcf7fc8553058242a8d8473fe42d85a2","text":"return i.doCmd(s, nil, ipvsCmdDelService) } // Flush deletes all existing services in the passed // handle. func (i *Handle) Flush() error { _, err := i.doCmdWithoutAttr(ipvsCmdFlush) return err } // NewDestination creates a new real server in the passed ipvs // service which should already be existing in the passed handle. func (i *Handle) NewDestination(s *Service, d *Destination) error {"} {"_id":"q-en-kubernetes-c291a2d41f9c74b4b110635dfb37a5b4c67585af2dfe6bbe39f5fa3e92b39985","text":" apiVersion: v1 kind: Service metadata: name: elasticsearch-discovery labels: component: elasticsearch role: master spec: selector: component: elasticsearch role: master ports: - name: transport port: 9300 protocol: TCP "} {"_id":"q-en-kubernetes-c2e5443cc153491b85828902364ffced6909f99376bd0f9fd8cdb8dfe13a1fed","text":"}{ \"backoffLimit 0 should have 1 pod active\": { 1, 1, 0, true, []int32{0}, true, []int32{0}, v1.PodRunning, 1, 0, 0, nil, \"\", }, \"backoffLimit 1 with restartCount 0 should have 1 pod active\": { 1, 1, 1, true, []int32{0}, true, []int32{0}, v1.PodRunning, 1, 0, 0, nil, \"\", }, \"backoffLimit 1 with restartCount 1 should have 0 pod active\": { \"backoffLimit 1 with restartCount 1 and podRunning should have 0 pod active\": { 1, 1, 1, true, []int32{1}, true, []int32{1}, v1.PodRunning, 0, 0, 1, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"too many job failures - single pod\": { \"backoffLimit 1 with restartCount 1 and podPending should have 0 pod active\": { 1, 1, 1, true, []int32{1}, v1.PodPending, 0, 0, 1, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"too many job failures with podRunning - single pod\": { 1, 5, 2, true, []int32{2}, true, []int32{2}, v1.PodRunning, 0, 0, 1, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"too many job failures - multiple pods\": { \"too many job failures with podPending - single pod\": { 1, 5, 2, true, []int32{2}, v1.PodPending, 0, 0, 1, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"too many job failures with podRunning - multiple pods\": { 2, 5, 2, true, []int32{1, 1}, v1.PodRunning, 0, 0, 2, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"too many job failures with podPending - multiple pods\": { 2, 5, 2, true, []int32{1, 1}, true, []int32{1, 1}, v1.PodPending, 0, 0, 2, &jobConditionFailed, \"BackoffLimitExceeded\", }, \"not enough failures\": { 2, 5, 3, true, []int32{1, 1}, true, []int32{1, 1}, v1.PodRunning, 2, 0, 0, nil, \"\", }, }"} {"_id":"q-en-kubernetes-c30c65cd32a470f0d962328756672c8c816f8506ad13f51b30de3e97b16e38f8","text":"import ( \"fmt\" \"os/exec\" \"reflect\" \"testing\" \"k8s.io/kubernetes/pkg/api\" \"k8s.io/kubernetes/pkg/api/resource\" \"k8s.io/kubernetes/pkg/util/codeinspector\" \"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm\" \"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache\" )"} {"_id":"q-en-kubernetes-c344af00490ae519ccd492bdb21d93599190b242dd0cff0c34c4819eb2153983","text":"\"fmt\" \"net\" \"path/filepath\" \"strings\" \"sync\" \"testing\" \"time\" authenticationv1 \"k8s.io/api/authentication/v1\" v1 \"k8s.io/api/core/v1\" storagev1 \"k8s.io/api/storage/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/client-go/informers\" clientset \"k8s.io/client-go/kubernetes\""} {"_id":"q-en-kubernetes-c34f11093b7c998605521e1a8ed4ea9cd204a28c20a06edee5df5bdeb92d9293","text":"// It must return (\"\", cloudprovider.InstanceNotFound) if the instance does // not exist or is no longer running. func (ss *scaleSet) GetInstanceIDByNodeName(name string) (string, error) { _, _, vm, err := ss.getVmssVM(name) managedByAS, err := ss.isNodeManagedByAvailabilitySet(name) if err != nil { if err == ErrorNotVmssInstance { glog.V(4).Infof(\"GetInstanceIDByNodeName: node %q is managed by availability set\", name) // Retry with standard type because nodes are not managed by vmss. return ss.availabilitySet.GetInstanceIDByNodeName(name) } glog.Errorf(\"Failed to check isNodeManagedByAvailabilitySet: %v\", err) return \"\", err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetInstanceIDByNodeName(name) } _, _, vm, err := ss.getVmssVM(name) if err != nil { return \"\", err }"} {"_id":"q-en-kubernetes-c3be7299c05eef6b667287d1018676222ff29060d0795250627a26330de752bd","text":"t.Errorf(\"Expect node port type service, got none\") } } func TestLoadBalanceSourceRanges(t *testing.T) { ipt := iptablestest.NewFake() ipvs := ipvstest.NewFake() ipset := ipsettest.NewFake(testIPSetVersion) fp := NewFakeProxier(ipt, ipvs, ipset, nil) svcIP := \"10.20.30.41\" svcPort := 80 svcLBIP := \"1.2.3.4\" svcLBSource := \"10.0.0.0/8\" svcPortName := proxy.ServicePortName{ NamespacedName: makeNSN(\"ns1\", \"svc1\"), Port: \"p80\", } epIP := \"10.180.0.1\" makeServiceMap(fp, makeTestService(svcPortName.Namespace, svcPortName.Name, func(svc *api.Service) { svc.Spec.Type = \"LoadBalancer\" svc.Spec.ClusterIP = svcIP svc.Spec.Ports = []api.ServicePort{{ Name: svcPortName.Port, Port: int32(svcPort), Protocol: api.ProtocolTCP, }} svc.Status.LoadBalancer.Ingress = []api.LoadBalancerIngress{{ IP: svcLBIP, }} svc.Spec.LoadBalancerSourceRanges = []string{ svcLBSource, } }), ) makeEndpointsMap(fp, makeTestEndpoints(svcPortName.Namespace, svcPortName.Name, func(ept *api.Endpoints) { ept.Subsets = []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{ IP: epIP, NodeName: strPtr(testHostname), }}, Ports: []api.EndpointPort{{ Name: svcPortName.Port, Port: int32(svcPort), }}, }} }), ) fp.syncProxyRules() // Check ipvs service and destinations services, err := ipvs.GetVirtualServers() if err != nil { t.Errorf(\"Failed to get ipvs services, err: %v\", err) } found := false for _, svc := range services { fmt.Printf(\"address: %s:%d, %s\", svc.Address.String(), svc.Port, svc.Protocol) if svc.Address.Equal(net.ParseIP(svcLBIP)) && svc.Port == uint16(svcPort) && svc.Protocol == string(api.ProtocolTCP) { destinations, _ := ipvs.GetRealServers(svc) if len(destinations) != 1 { t.Errorf(\"Unexpected %d destinations, expect 0 destinations\", len(destinations)) } for _, ep := range destinations { if ep.Address.String() == epIP && ep.Port == uint16(svcPort) { found = true } } } } if !found { t.Errorf(\"Did not got expected loadbalance service\") } // Check ipset entry expectIPSet := map[string]*utilipset.Entry{ KubeLoadBalancerSet: { IP: svcLBIP, Port: svcPort, Protocol: strings.ToLower(string(api.ProtocolTCP)), SetType: utilipset.HashIPPort, }, KubeLoadBalancerMasqSet: { IP: svcLBIP, Port: svcPort, Protocol: strings.ToLower(string(api.ProtocolTCP)), SetType: utilipset.HashIPPort, }, KubeLoadBalancerSourceCIDRSet: { IP: svcLBIP, Port: svcPort, Protocol: strings.ToLower(string(api.ProtocolTCP)), Net: svcLBSource, SetType: utilipset.HashIPPortNet, }, } for set, entry := range expectIPSet { ents, err := ipset.ListEntries(set) if err != nil || len(ents) != 1 { t.Errorf(\"Check ipset entries failed for ipset: %q\", set) continue } if ents[0] != entry.String() { t.Errorf(\"Check ipset entries failed for ipset: %q\", set) } } // Check iptables chain and rules kubeSvcRules := ipt.GetRules(string(kubeServicesChain)) kubeFWRules := ipt.GetRules(string(KubeFireWallChain)) if !hasJump(kubeSvcRules, string(KubeMarkMasqChain), KubeLoadBalancerMasqSet) { t.Errorf(\"Didn't find jump from chain %v match set %v to MASQUERADE\", kubeServicesChain, KubeLoadBalancerMasqSet) } if !hasJump(kubeSvcRules, string(KubeFireWallChain), KubeLoadBalancerSet) { t.Errorf(\"Didn't find jump from chain %v match set %v to %v\", kubeServicesChain, KubeLoadBalancerSet, KubeFireWallChain) } if !hasJump(kubeFWRules, \"ACCEPT\", KubeLoadBalancerSourceCIDRSet) { t.Errorf(\"Didn't find jump from chain %v match set %v to ACCEPT\", kubeServicesChain, KubeLoadBalancerSourceCIDRSet) } } func TestOnlyLocalLoadBalancing(t *testing.T) { ipt := iptablestest.NewFake()"} {"_id":"q-en-kubernetes-c413563426f07ed4ff02087c4f962aaf75416bdb1e1788a61e6aba68cd6f2ac8","text":"// Sleep 1s to verify no detach are triggered after second pod is added in the future. time.Sleep(1000 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeReportedAsAttachedToNode(t, logger, generatedVolumeName, nodeName1, true, asw, volumeAttachedCheckTimeout) // verifyVolumeNoStatusUpdateNeeded(t, logger, generatedVolumeName, nodeName1, asw) // Add a third pod which tries to attach the volume to a different node."} {"_id":"q-en-kubernetes-c47338a0cb245d83d442f85bc265ba828aaf33a909e1f7a5bbe26d8f333fcea0","text":"return nil } _, err = p.client.Namespaces().Create(namespace) if err != nil { if err != nil && !errors.IsAlreadyExists(err) { return err } return nil"} {"_id":"q-en-kubernetes-c4a285f08456603d4776f0fb54e41a42c114ff1372e6a564f1594975dfd4c60b","text":"OOMScoreAdj: config.OOMScoreAdj, ConfigSyncPeriod: config.ConfigSyncPeriod.Duration, HealthzServer: healthzServer, UseEndpointSlices: utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice), }, nil }"} {"_id":"q-en-kubernetes-c4ee65ba71d8111c058b02b081870d2d9f24698bf3db8bfad0f5488941a6d324","text":"allErrs = append(allErrs, field.Invalid(fldPath.Child(\"deletionTimestamp\"), newMeta.DeletionTimestamp, \"field is immutable; may only be changed via deletion\")) } // Finalizers cannot be added if the object is already being deleted. if oldMeta.DeletionTimestamp != nil { allErrs = append(allErrs, ValidateNoNewFinalizers(newMeta.Finalizers, oldMeta.Finalizers, fldPath.Child(\"finalizers\"))...) } // Reject updates that don't specify a resource version if len(newMeta.ResourceVersion) == 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child(\"resourceVersion\"), newMeta.ResourceVersion, \"must be specified for an update\"))"} {"_id":"q-en-kubernetes-c4ef45834a2c6dba2f582cf76ecd14bee6c4b7d47028df41dfe47bcb24bddb83","text":"\"time\" \"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute\" \"github.com/golang/glog\" \"k8s.io/apimachinery/pkg/types\" kwait \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/kubernetes/pkg/cloudprovider\" ) const ("} {"_id":"q-en-kubernetes-c4fa0150e009b1be3023a777dbc65f42ccda353899fb6cbe330f57d67bbb51ad","text":"\"k8s.io/kubernetes/pkg/client/record\" client \"k8s.io/kubernetes/pkg/client/unversioned\" \"k8s.io/kubernetes/pkg/controller/framework\" \"k8s.io/kubernetes/pkg/fields\" \"k8s.io/kubernetes/pkg/labels\" \"k8s.io/kubernetes/pkg/runtime\" )"} {"_id":"q-en-kubernetes-c51297712c0807bb72e38e8f57099e155c77ba182d0b00ddc1daa05c319e177b","text":"// Synced returns true if the view is synced (for the first time) func (f *federatedInformerImpl) ClustersSynced() bool { f.Lock() defer f.Unlock() return f.clusterInformer.controller.HasSynced() }"} {"_id":"q-en-kubernetes-c536fa102185c6c0d5a817a3d62b25ffc4f256546ce879da9277c1e451ac8f45","text":"framework.Failf(\"failed dialing endpoint, %v\", err) } ginkgo.By(\"pod-Service(hostNetwork): udp\") ginkgo.By(fmt.Sprintf(\"dialing(udp) %v --> %v:%v (config.clusterIP)\", config.TestContainerPod.Name, config.ClusterIP, e2enetwork.ClusterUDPPort)) err = config.DialFromTestContainer(\"udp\", config.ClusterIP, e2enetwork.ClusterUDPPort, config.MaxTries, 0, config.EndpointHostnames()) if err != nil { framework.Failf(\"failed dialing endpoint, %v\", err) } ginkgo.By(fmt.Sprintf(\"dialing(udp) %v --> %v:%v (nodeIP)\", config.TestContainerPod.Name, config.NodeIP, config.NodeUDPPort)) err = config.DialFromTestContainer(\"udp\", config.NodeIP, config.NodeUDPPort, config.MaxTries, 0, config.EndpointHostnames()) if err != nil { framework.Failf(\"failed dialing endpoint, %v\", err) } ginkgo.By(\"node-Service(hostNetwork): http\") ginkgo.By(fmt.Sprintf(\"dialing(http) %v (node) --> %v:%v (config.clusterIP)\", config.NodeIP, config.ClusterIP, e2enetwork.ClusterHTTPPort))"} {"_id":"q-en-kubernetes-c567b9d136a8327766c88135dee362882b4830a33ab1926794ab35399cb6bc39","text":"framework.ExpectNoError(err) }) // TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed. ginkgo.It(\"should be able to change the type and ports of a service [Slow] [DisabledForLargeClusters]\", func() { ginkgo.It(\"should be able to change the type and ports of a service [Slow]\", func() { // requires cloud load-balancer support e2eskipper.SkipUnlessProviderIs(\"gce\", \"gke\", \"aws\")"} {"_id":"q-en-kubernetes-c58896b042f4e8904f287db80ceec6c0a1dabba41113fabbdcaf56821cf3730d","text":"w := newLogWriter(stdoutBuf, stderrBuf, &LogOptions{timestamp: test.timestamp, bytes: int64(test.bytes)}) for i := 0; i < test.stdoutLines; i++ { msg.stream = runtimeapi.Stdout if err := w.write(msg); err != nil { if err := w.write(msg, true); err != nil { assert.EqualError(t, err, errMaximumWrite.Error()) } } for i := 0; i < test.stderrLines; i++ { msg.stream = runtimeapi.Stderr if err := w.write(msg); err != nil { if err := w.write(msg, true); err != nil { assert.EqualError(t, err, errMaximumWrite.Error()) } }"} {"_id":"q-en-kubernetes-c599dc0bdc0253a94b8c12a6f39298a187dc04b119737f91c2994d8bcab9a57c","text":"} // exampleCert was generated from crypto/tls/generate_cert.go with the following command: // go run generate_cert.go --rsa-bits 512 --host example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h // go run generate_cert.go --rsa-bits 1024 --host example.com --ca --start-date \"Jan 1 00:00:00 1970\" --duration=1000000h var exampleCert = []byte(`-----BEGIN CERTIFICATE----- MIIBdzCCASGgAwIBAgIRAOVTAdPnfbS5V85mfS90TfIwDQYJKoZIhvcNAQELBQAw EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC QQCoVSqeu8TBvF+70T7Jm4340YQNhds6IxjRoifenYodAO1dnKGrcbF266DJGunh nIjQH7B12tduhl0fLK4Ezf7/AgMBAAGjUDBOMA4GA1UdDwEB/wQEAwICpDATBgNV HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MBYGA1UdEQQPMA2CC2V4 YW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA0EAk1kVa5uZ/AzwYDVcS9bpM/czwjjV xq3VeSCfmNa2uNjbFvodmCRwZOHUvipAMGCUCV6j5vMrJ8eMj8tCQ36W9A== MIIB+zCCAWSgAwIBAgIQK+TtYrwiS4SZU43mEj44eDANBgkqhkiG9w0BAQsFADAS MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB iQKBgQDGrjJJBajkyWUEMVwVadkNI54cKV7snXFV6ZRE2jPQUpY0/6a2RKqjGekB +SKxN+ALY/WiPBkYCQVg7Bc1hFneHfR8T3oXlKpOv9VWMeKLH3vLmAKnrZHgBgZ3 jVcXupQlVLobRzABzfOFhhzMcs89vzbMDcxw+tRK84XYB+MNbwIDAQABo1AwTjAO BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw AwEB/zAWBgNVHREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOBgQCJ uqAiZIaaz5W2dbIUHnWJ3M47fuou8G2c4JzxPRfKxPGrOpBGZyk/I8v/MBZ50zdG ZCoFO0keiVr0q2fyMgKwcWNN4cwfRBgQWmk6SHJJR/jWHjnvnRDqhfPHzcqYqd90 MtpcamlkHhSG616mBaUujb+EdjlrxCwiPTv/U+z7Ug== -----END CERTIFICATE-----`) var exampleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- MIIBOgIBAAJBAKhVKp67xMG8X7vRPsmbjfjRhA2F2zojGNGiJ96dih0A7V2coatx sXbroMka6eGciNAfsHXa126GXR8srgTN/v8CAwEAAQJASdzdD7vKsUwMIejGCUb1 fAnLTPfAY3lFCa+CmR89nE22dAoRDv+5RbnBsZ58BazPNJHrsVPRlfXB3OQmSQr0 SQIhANoJhs+xOJE/i8nJv0uAbzKyiD1YkvRkta0GpUOULyAVAiEAxaQus3E/SuqD P7y5NeJnE7X6XkyC35zrsJRkz7orE8MCIHdDjsI8pjyNDeGqwUCDWE/a6DrmIDwe emHSqMN2YvChAiEAnxLCM9NWaenOsaIoP+J1rDuvw+4499nJKVqGuVrSCRkCIEqK 4KSchPMc3x8M/uhw9oWTtKFmjA/PPh0FsWCdKrEy MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMauMkkFqOTJZQQx XBVp2Q0jnhwpXuydcVXplETaM9BSljT/prZEqqMZ6QH5IrE34Atj9aI8GRgJBWDs FzWEWd4d9HxPeheUqk6/1VYx4osfe8uYAqetkeAGBneNVxe6lCVUuhtHMAHN84WG HMxyzz2/NswNzHD61ErzhdgH4w1vAgMBAAECgYEAgv0GGi6pE23UM9d3JocKmycI bvi3pLiIqGO/ZUWXM5m/fmGuwCy1c6L5hFuFC+ISzG+y2qtUwAvyh9wf0SDZPfVK X+egWPJksBCPqphvPsxzolHNoi5FEvUhxXyDedkB3XuP2U3hniwEVtIA/rf1lHLt qMDEa/y4K1GT8QI0Y8ECQQDNl5Zu38BaroOLMpm7XBySlYVp8hs2q4TCnayxufAw wKZJpcTKTCiaZAqF00ZDu2YZ3m3dkDiYB6v3x2HIADVtAkEA92TIYjBy5Bx7+K2S X1YW+7P90UImxXGbPQeoODmghUD+/MfnBQyKM7AS7G2jO81hwzGfFiKk7AqF/nM5 lx1wywJANjoTfa8ax1Bcdeyky9xh1PAHPoiTUPowjDyWflIy3kkSEz7cBxfLZd2Z QO8XC2p0ZcJbbCNMKh1r6HD4g446iQJBANOMKdHUzhoDxXrTqcu+SS75Lf0HzTGf QPkCGDXkCUCJYMH1irYFkBQ85yGnayMTMBsCzp/WBiMVqJj6HO/8q9sCQQCxtTUn rOjiKXcyl2aNL7bGLfWtexl+MT2Z/PrjYcN5XbK4wmy2TFUAA1BCyHhv1/1jUDzf Ibw/Lq9YIiqVrg6T -----END RSA PRIVATE KEY-----`)"} {"_id":"q-en-kubernetes-c5becb4a628bc8a8988a94eb54391969e8980c9d2cc05a96248814c739bc4e8e","text":"\"../examples/walkthrough\": { \"pod1\": &api.Pod{}, \"pod2\": &api.Pod{}, \"pod-with-http-healthcheck\": &api.Pod{}, \"service\": &api.Service{}, \"replication-controller\": &api.ReplicationController{}, }, }"} {"_id":"q-en-kubernetes-c600d9fd70b092dabbbc961a584ea664a57e8d6c62722b7c34de560cf309775e","text":"var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ CrossNamespaceVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha}, AllowServiceLBStatusOnNonLB: {Default: false, PreRelease: featuregate.Deprecated}, // remove after 1.29 AnyVolumeDataSource: {Default: true, PreRelease: featuregate.Beta}, // on by default in 1.24 APISelfSubjectReview: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // GA in 1.28; remove in 1.30"} {"_id":"q-en-kubernetes-c648b23903ce707995ea3d5ea4a4a3fc5bce4d4224d02cb8723c6d3fc9cee7cb","text":"v1 \"k8s.io/api/core/v1\" rbacv1 \"k8s.io/api/rbac/v1\" storagev1 \"k8s.io/api/storage/v1\" storagev1beta1 \"k8s.io/api/storage/v1beta1\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/runtime/schema\""} {"_id":"q-en-kubernetes-c67474229eaa1b2ec4d736207b8b64b32537ef48361320c867a54fdabb3e4073","text":"{% set params = \"--master=127.0.0.1:8080\" + \" \" + cluster_name + \" \" + cluster_cidr + \" \" + allocate_node_cidrs + \" \" + service_cluster_ip_range + \" \" + terminated_pod_gc + \" \" + enable_garbage_collector + \" \" + cloud_provider + \" \" + cloud_config + \" \" + service_account_key + \" \" + log_level + \" \" + root_ca_file -%} {% set params = params + \" \" + feature_gates -%} {% if pillar.get('enable_hostpath_provisioner', '').lower() == 'true' -%} {% set params = params + \" --enable-hostpath-provisioner\" %} {% endif -%} # test_args has to be kept at the end, so they'll overwrite any prior configuration {% if pillar['controller_manager_test_args'] is defined -%}"} {"_id":"q-en-kubernetes-c6905e530fa0a37237645627eb68081d94672d025a59076ae0821ddc019af1dd","text":"{Name: \"Name\", Type: \"string\", Format: \"name\", Description: metav1.ObjectMeta{}.SwaggerDoc()[\"name\"]}, {Name: \"Status\", Type: \"string\", Description: \"Status of the cluster\"}, {Name: \"Age\", Type: \"string\", Description: metav1.ObjectMeta{}.SwaggerDoc()[\"creationTimestamp\"]}, {Name: \"Labels\", Type: \"string\", Description: \"The labels of the cluster\"}, } h.TableHandler(clusterColumnDefinitions, printCluster) h.TableHandler(clusterColumnDefinitions, printClusterList)"} {"_id":"q-en-kubernetes-c6f231759f3fc86df2ad63249385eceb08b3af01fe64f69e9f24435cd670dadf","text":"\"redis-sentinel-service\": &api.Service{}, }, \"../examples/resourcequota\": { \"resource-quota\": &api.ResourceQuota{}, \"namespace\": &api.Namespace{}, \"limits\": &api.LimitRange{}, \"quota\": &api.ResourceQuota{}, }, \"../examples/rethinkdb\": { \"admin-pod\": &api.Pod{},"} {"_id":"q-en-kubernetes-c70b3ad9a6d280a9ba782d5fab6e732aac03a47154bbc5bac17b1745ff3893ab","text":"kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.limits.cpu}}:{{end}}\" \"300m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.requests.cpu}}:{{end}}\" \"300m:\" # Set limits on a local file without talking to the server kubectl set resources -f hack/testdata/deployment-multicontainer.yaml -c=perl --limits=cpu=500m --requests=cpu=500m --dry-run -o yaml \"${kube_flags[@]}\" kubectl set resources deployment nginx-deployment -c=perl --limits=cpu=500m --requests=cpu=500m --dry-run -o yaml \"${kube_flags[@]}\" ! kubectl set resources deployment nginx-deployment -c=perl --limits=cpu=500m --requests=cpu=500m --local -o yaml \"${kube_flags[@]}\" kubectl set resources deployment -f hack/testdata/deployment-multicontainer.yaml -c=perl --limits=cpu=300m --requests=cpu=300m --dry-run -o yaml \"${kube_flags[@]}\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 0).resources.limits.cpu}}:{{end}}\" \"200m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.limits.cpu}}:{{end}}\" \"300m:\" kube::test::get_object_assert deployment \"{{range.items}}{{(index .spec.template.spec.containers 1).resources.requests.cpu}}:{{end}}\" \"300m:\""} {"_id":"q-en-kubernetes-c786f4739180b8bb4276049674047f8bd6dd64394d06fe49bdfcb0fe44279fdb","text":"// define volume limit to be 2 for this test var err error init(testParameters{nodeSelectorKey: \"node-attach-limit-csi\", attachLimit: 2}) nodeSelectorKey := fmt.Sprintf(\"attach-limit-csi-%s\", f.Namespace.Name) init(testParameters{nodeSelectorKey: nodeSelectorKey, attachLimit: 2}) defer cleanup() nodeName := m.config.ClientNodeName attachKey := v1.ResourceName(volumeutil.GetCSIAttachLimitKey(m.provisioner))"} {"_id":"q-en-kubernetes-c7a502b0bf51f34c5a159f62f908a6ad01ea81edb51e954b0f3be17719a34111","text":"// buildELBSecurityGroupList returns list of SecurityGroups which should be // attached to ELB created by a service. List always consist of at least // 1 member which is an SG created for this service or a SG from the Global config. Extra groups can be // specified via annotation func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, loadBalancerName, annotation string) ([]string, error) { // 1 member which is an SG created for this service or a SG from the Global config. // Extra groups can be specified via annotation, as can extra tags for any // new groups. func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, loadBalancerName string, annotations map[string]string) ([]string, error) { var err error var securityGroupID string"} {"_id":"q-en-kubernetes-c7b7a6e7c6b3f5de76fb3009c11c9872f590b66bfe77cb9c47b0acaefde7011f","text":"var _ = SIGDescribe(\"PriorityPidEvictionOrdering [Slow] [Serial] [Disruptive][NodeFeature:Eviction]\", func() { f := framework.NewDefaultFramework(\"pidpressure-eviction-test\") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged pressureTimeout := 2 * time.Minute pressureTimeout := 3 * time.Minute expectedNodeCondition := v1.NodePIDPressure expectedStarvedResource := noStarvedResource"} {"_id":"q-en-kubernetes-c7ccaa31d695544c9015ddf65e1995c9de3505d8de9fbde80f056d63b87a7b7d","text":"command: - /usr/local/bin/kube-proxy - --kubeconfig=/var/lib/kube-proxy/kubeconfig.conf {{ .ExtraParams }} {{ .ClusterCIDR }} securityContext: privileged: true"} {"_id":"q-en-kubernetes-c81c374869d045c8ff2635a39e5233c6991f896417eb8208c402ce8b2af70aa5","text":"allErrs = append(allErrs, field.Forbidden(fldPath.Child(\"x-kubernetes-int-or-string\"), \"must be false to be structural\")) } // forbid reasoning about metadata because it can lead to metadata restriction we don't want if _, found := v.Properties[\"metadata\"]; found { allErrs = append(allErrs, field.Forbidden(fldPath.Child(\"properties\").Key(\"metadata\"), \"must not be specified in a nested context\")) } return allErrs }"} {"_id":"q-en-kubernetes-c84ff1f427bbe272798f5148f9cdb98f5d98cb246f3b109929ac032c50dce983","text":"} return false, nil, nil } mockMetadataClient := metadatafake.NewSimpleMetadataClient(scheme.Scheme) mockMetadataClient := metadatafake.NewSimpleMetadataClient(metadatafake.NewTestScheme()) mockMetadataClient.PrependReactor(\"delete-collection\", \"flakes\", ns1FlakesNotFound) mockMetadataClient.PrependReactor(\"list\", \"flakes\", ns1FlakesNotFound)"} {"_id":"q-en-kubernetes-c8850c190a8f9e4787d4601da45155b531d750920bb5df1fd8aedafd3ede8b35","text":"// This call is idempotent, and must not return an error if the sandbox has // already been removed. func (f *RemoteRuntime) RemovePodSandbox(ctx context.Context, req *kubeapi.RemovePodSandboxRequest) (*kubeapi.RemovePodSandboxResponse, error) { err := f.RuntimeService.RemovePodSandbox(req.PodSandboxId) err := f.RuntimeService.StopPodSandbox(req.PodSandboxId) if err != nil { return nil, err }"} {"_id":"q-en-kubernetes-c89a4bdeaebe80d3865795cbb0b0bc4b7c0ebee71376f0692e3efde1370b29d6","text":"function config-ip-firewall { echo \"Configuring IP firewall rules\" # The GCI image has host firewall which drop most inbound/forwarded packets. # We need to add rules to accept all TCP/UDP packets. # We need to add rules to accept all TCP/UDP/ICMP packets. if iptables -L INPUT | grep \"Chain INPUT (policy DROP)\" > /dev/null; then echo \"Add rules to accept all inbound TCP/UDP packets\" echo \"Add rules to accept all inbound TCP/UDP/ICMP packets\" iptables -A INPUT -w -p TCP -j ACCEPT iptables -A INPUT -w -p UDP -j ACCEPT iptables -A INPUT -w -p ICMP -j ACCEPT fi if iptables -L FORWARD | grep \"Chain FORWARD (policy DROP)\" > /dev/null; then echo \"Add rules to accept all forwarded TCP/UDP packets\" echo \"Add rules to accept all forwarded TCP/UDP/ICMP packets\" iptables -A FORWARD -w -p TCP -j ACCEPT iptables -A FORWARD -w -p UDP -j ACCEPT iptables -A FORWARD -w -p ICMP -j ACCEPT fi }"} {"_id":"q-en-kubernetes-c8bcc7042b38357d7109a141bb451b4a21562314f08d0d74c22a791455b5500c","text":"return result, nil } // logPluginScores adds summarized plugin score logging. The goal of this block is to show the highest scoring plugins on // each node, and the average score for those plugins across all nodes. func logPluginScores(nodes []*v1.Node, scoresMap framework.PluginToNodeScores, pod *v1.Pod) { totalPluginScores := make(map[string]int64) for j := range scoresMap { for i := range nodes { totalPluginScores[j] += scoresMap[j][i].Score } } // Build a map of Nodes->PluginScores on that node nodeToPluginScores := make(framework.PluginToNodeScores, len(nodes)) for _, node := range nodes { nodeToPluginScores[node.Name] = make(framework.NodeScoreList, len(scoresMap)) } // Convert the scoresMap (which contains Plugins->NodeScores) to the Nodes->PluginScores map for plugin, nodeScoreList := range scoresMap { for _, nodeScore := range nodeScoreList { klog.V(10).InfoS(\"Plugin scored node for pod\", \"pod\", klog.KObj(pod), \"plugin\", plugin, \"node\", nodeScore.Name, \"score\", nodeScore.Score) nodeToPluginScores[nodeScore.Name] = append(nodeToPluginScores[nodeScore.Name], framework.NodeScore{Name: plugin, Score: nodeScore.Score}) } } for node, scores := range nodeToPluginScores { // Get the top 3 scoring plugins for each node sort.Slice(scores, func(i, j int) bool { return scores[i].Score > scores[j].Score }) var topScores []pluginScores for _, score := range scores { pluginScore := pluginScores{ Plugin: score.Name, Score: score.Score, AverageNodeScore: float64(totalPluginScores[score.Name]) / float64(len(nodes)), } topScores = append(topScores, pluginScore) if len(topScores) == 3 { break } } klog.InfoS(\"Top 3 plugins for pod on node\", \"pod\", klog.KObj(pod), \"node\", node, \"scores\", topScores, ) } } // NewGenericScheduler creates a genericScheduler object. func NewGenericScheduler( cache internalcache.Cache,"} {"_id":"q-en-kubernetes-c900ec7ec60d5756cd08c9e3b96eb625dc6fffe4b21258558baae5d8b1d5a196","text":"// Returns true if and only if changes were made // If the security group no longer exists, will return (false, nil) func (c *Cloud) removeSecurityGroupIngress(securityGroupID string, removePermissions []*ec2.IpPermission) (bool, error) { // We do not want to make changes to the Global defined SG if securityGroupID == c.cfg.Global.ElbSecurityGroup { return false, nil } group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warningf(\"Error retrieving security group: %q\", err)"} {"_id":"q-en-kubernetes-c91e4137c7d9737305af34484f9a0c277d1a4dea6ec1cb13eb22c1ce0b04f932","text":"// pod stats api summarizes ephemeral storage usage (container, emptyDir, host[etc-hosts, logs]) podEphemeralStorageTotalUsage := &resource.Quantity{} if podStats.EphemeralStorage != nil { if podStats.EphemeralStorage != nil && podStats.EphemeralStorage.UsedBytes != nil { podEphemeralStorageTotalUsage = resource.NewQuantity(int64(*podStats.EphemeralStorage.UsedBytes), resource.BinarySI) } podEphemeralStorageLimit := podLimits[v1.ResourceEphemeralStorage]"} {"_id":"q-en-kubernetes-c92efd831dfc8f1c1ca1b3e7d2129fb1cb25d227f6a631a6cb882fa8a1ab01b5","text":"if err != nil { klog.Warningf(\"error looking for nvme volume %q: %v\", volumeID, err) } else if nvmePath != \"\" { if partition != \"\" { nvmePath = nvmePath + nvmeDiskPartitionSuffix + partition } devicePaths = append(devicePaths, nvmePath) } }"} {"_id":"q-en-kubernetes-c94ce83b6046290c5e3ee283fb853db18cf054c0a3dc060fd24afeee55f9a5f1","text":"// back to the caller. in.Spec.InitContainers = values // Call defaulters explicitly until annotations are removed for i := range in.Spec.InitContainers { c := &in.Spec.InitContainers[i] SetDefaults_Container(c) tmpPod := &Pod{ Spec: PodSpec{ HostNetwork: in.Spec.HostNetwork, InitContainers: values, }, } SetObjectDefaults_Pod(tmpPod) in.Spec.InitContainers = tmpPod.Spec.InitContainers } // If there is a beta annotation, copy to alpha key. // See commit log for PR #31026 for why we do this."} {"_id":"q-en-kubernetes-c9667454a72dbef147eaf74d68005f5c9c6db06ba9b7460f165ea628a3bdcdbc","text":"t.Errorf(\"%s: expect no error when applying json patch, but got %v\", test.name, err) continue } if err.Error() != test.expectedError { if !strings.Contains(err.Error(), test.expectedError) { t.Errorf(\"%s: expected error %v, but got %v\", test.name, test.expectedError, err) } if test.expectedErrorType != apierrors.ReasonForError(err) {"} {"_id":"q-en-kubernetes-c9a3a6102eaf8d4fc4590a2a542a0fa31e35266c9f246998ef356e9ab2336868","text":"discoveryv1beta1 \"k8s.io/api/discovery/v1beta1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/sets\""} {"_id":"q-en-kubernetes-c9b8a9bb7894344fd43fc924f928fa06bf8a29410686aec28f9020eef9dd3ec1","text":"return nil, \"\", \"\", err } testSocketFile := filepath.Join(volpath, \"mount_test.sock\") _, err := net.Listen(\"unix\", testSocketFile) return mounts, volpath, testSocketFile, err socketFile, socketCreateError := createSocketFile(volpath) return mounts, volpath, socketFile, socketCreateError }, expectError: false, },"} {"_id":"q-en-kubernetes-c9ceae74e17328601fb1e6020be8b0556b408a2e12695c8692377b7e1d328f05","text":"const ( gcePDDetachTimeout = 10 * time.Minute gcePDDetachPollTime = 10 * time.Second nodeStatusTimeout = 5 * time.Minute nodeStatusTimeout = 10 * time.Minute nodeStatusPollTime = 1 * time.Second maxReadRetry = 3 )"} {"_id":"q-en-kubernetes-c9dd7224c4794a6ffa480be98594fc8517bb6706ce23796fdcd343e92c883581","text":"Description: The discovery.k8s.io API group MUST exist in the /apis discovery document. The discovery.k8s.io/v1 API group/version MUST exist in the /apis/discovery.k8s.io discovery document. The endpointslices resource MUST exist in the /apis/discovery.k8s.io/v1 discovery document. API Server should create self referential Endpoints and EndpointSlices named \"kubernetes\" in the default namespace. The cluster MUST have a service named \"kubernetes\" on the default namespace referencing the API servers. The \"kubernetes.default\" service MUST have Endpoints and EndpointSlices pointing to each API server instance. */ framework.ConformanceIt(\"should have Endpoints and EndpointSlices pointing to API Server\", func() { namespace := \"default\" name := \"kubernetes\" // verify \"kubernetes.default\" service exist _, err := cs.CoreV1().Services(namespace).Get(context.TODO(), name, metav1.GetOptions{}) framework.ExpectNoError(err, \"error obtaining API server \"kubernetes\" Service resource on \"default\" namespace\") // verify Endpoints for the API servers exist endpoints, err := cs.CoreV1().Endpoints(namespace).Get(context.TODO(), name, metav1.GetOptions{}) framework.ExpectNoError(err, \"error creating Endpoints resource\") if len(endpoints.Subsets) != 1 { framework.Failf(\"Expected 1 subset in endpoints, got %d: %#v\", len(endpoints.Subsets), endpoints.Subsets) framework.ExpectNoError(err, \"error obtaining API server \"kubernetes\" Endpoint resource on \"default\" namespace\") if len(endpoints.Subsets) == 0 { framework.Failf(\"Expected at least 1 subset in endpoints, got %d: %#v\", len(endpoints.Subsets), endpoints.Subsets) } endpointSubset := endpoints.Subsets[0] endpointSlice, err := cs.DiscoveryV1().EndpointSlices(namespace).Get(context.TODO(), name, metav1.GetOptions{}) framework.ExpectNoError(err, \"error creating EndpointSlice resource\") if len(endpointSlice.Ports) != len(endpointSubset.Ports) { framework.Failf(\"Expected EndpointSlice to have %d ports, got %d: %#v\", len(endpointSubset.Ports), len(endpointSlice.Ports), endpointSlice.Ports) // verify EndpointSlices for the API servers exist endpointSliceList, err := cs.DiscoveryV1().EndpointSlices(namespace).List(context.TODO(), metav1.ListOptions{ LabelSelector: \"kubernetes.io/service-name=\" + name, }) framework.ExpectNoError(err, \"error obtaining API server \"kubernetes\" EndpointSlice resource on \"default\" namespace\") if len(endpointSliceList.Items) == 0 { framework.Failf(\"Expected at least 1 EndpointSlice, got %d: %#v\", len(endpoints.Subsets), endpoints.Subsets) } numExpectedEndpoints := len(endpointSubset.Addresses) + len(endpointSubset.NotReadyAddresses) if len(endpointSlice.Endpoints) != numExpectedEndpoints { framework.Failf(\"Expected EndpointSlice to have %d endpoints, got %d: %#v\", numExpectedEndpoints, len(endpointSlice.Endpoints), endpointSlice.Endpoints) if !endpointSlicesEqual(endpoints, endpointSliceList) { framework.Failf(\"Expected EndpointSlice to have same addresses and port as Endpoints, got %#v: %#v\", endpoints, endpointSliceList) } })"} {"_id":"q-en-kubernetes-ca780b05e3fc995d864f6e55316ac94c61169f24652712d028547a316a3a9729","text":"\"Only the previous minor version is meaningful, other values will not be allowed. \"+ \"The format is ., e.g.: '1.16'. \"+ \"The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, \"+ \"rather than being surprised when they are permanently removed in the release after that.\") \"rather than being surprised when they are permanently removed in the release after that.\"+ \"This parameter is ignored if a config file is specified by --config.\") fs.StringSliceVar(&o.config.IPVS.ExcludeCIDRs, \"ipvs-exclude-cidrs\", o.config.IPVS.ExcludeCIDRs, \"A comma-separated list of CIDR's which the ipvs proxier should not touch when cleaning up IPVS rules.\") fs.StringSliceVar(&o.config.NodePortAddresses, \"nodeport-addresses\", o.config.NodePortAddresses, \"A string slice of values which specify the addresses to use for NodePorts. Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32). The default empty string slice ([]) means to use all local addresses.\") \"A string slice of values which specify the addresses to use for NodePorts. Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32). The default empty string slice ([]) means to use all local addresses. This parameter is ignored if a config file is specified by --config.\") fs.BoolVar(&o.CleanupAndExit, \"cleanup\", o.CleanupAndExit, \"If true cleanup iptables and ipvs rules and exit.\") fs.Var(&utilflag.IPVar{Val: &o.config.BindAddress}, \"bind-address\", \"The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces)\") fs.Var(&utilflag.IPPortVar{Val: &o.config.HealthzBindAddress}, \"healthz-bind-address\", \"The IP address with port for the health check server to serve on (set to '0.0.0.0:10256' for all IPv4 interfaces and '[::]:10256' for all IPv6 interfaces). Set empty to disable.\") fs.Var(&utilflag.IPPortVar{Val: &o.config.MetricsBindAddress}, \"metrics-bind-address\", \"The IP address with port for the metrics server to serve on (set to '0.0.0.0:10249' for all IPv4 interfaces and '[::]:10249' for all IPv6 interfaces). Set empty to disable.\") fs.Var(&utilflag.IPVar{Val: &o.config.BindAddress}, \"bind-address\", \"The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces). This parameter is ignored if a config file is specified by --config.\") fs.Var(&utilflag.IPPortVar{Val: &o.config.HealthzBindAddress}, \"healthz-bind-address\", \"The IP address with port for the health check server to serve on (set to '0.0.0.0:10256' for all IPv4 interfaces and '[::]:10256' for all IPv6 interfaces). Set empty to disable. This parameter is ignored if a config file is specified by --config.\") fs.Var(&utilflag.IPPortVar{Val: &o.config.MetricsBindAddress}, \"metrics-bind-address\", \"The IP address with port for the metrics server to serve on (set to '0.0.0.0:10249' for all IPv4 interfaces and '[::]:10249' for all IPv6 interfaces). Set empty to disable. This parameter is ignored if a config file is specified by --config.\") fs.BoolVar(&o.config.BindAddressHardFail, \"bind-address-hard-fail\", o.config.BindAddressHardFail, \"If true kube-proxy will treat failure to bind to a port as fatal and exit\") fs.Var(utilflag.PortRangeVar{Val: &o.config.PortRange}, \"proxy-port-range\", \"Range of host ports (beginPort-endPort, single port or beginPort+offset, inclusive) that may be consumed in order to proxy service traffic. If (unspecified, 0, or 0-0) then ports will be randomly chosen.\") fs.Var(&o.config.Mode, \"proxy-mode\", \"Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' or 'kernelspace' (windows). If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.\") fs.Var(&o.config.Mode, \"proxy-mode\", \"Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' or 'kernelspace' (windows). If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.\"+ \"This parameter is ignored if a config file is specified by --config.\") fs.Var(cliflag.NewMapStringBool(&o.config.FeatureGates), \"feature-gates\", \"A set of key=value pairs that describe feature gates for alpha/experimental features. \"+ \"Options are:n\"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), \"n\")) \"Options are:n\"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), \"n\")+ \"This parameter is ignored if a config file is specified by --config.\") fs.Int32Var(&o.healthzPort, \"healthz-port\", o.healthzPort, \"The port to bind the health check server. Use 0 to disable.\") fs.MarkDeprecated(\"healthz-port\", \"This flag is deprecated and will be removed in a future release. Please use --healthz-bind-address instead.\") fs.Int32Var(&o.metricsPort, \"metrics-port\", o.metricsPort, \"The port to bind the metrics server. Use 0 to disable.\") fs.MarkDeprecated(\"metrics-port\", \"This flag is deprecated and will be removed in a future release. Please use --metrics-bind-address instead.\") fs.Int32Var(o.config.OOMScoreAdj, \"oom-score-adj\", utilpointer.Int32PtrDerefOr(o.config.OOMScoreAdj, int32(qos.KubeProxyOOMScoreAdj)), \"The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]\") fs.Int32Var(o.config.OOMScoreAdj, \"oom-score-adj\", utilpointer.Int32PtrDerefOr(o.config.OOMScoreAdj, int32(qos.KubeProxyOOMScoreAdj)), \"The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]. This parameter is ignored if a config file is specified by --config.\") fs.Int32Var(o.config.IPTables.MasqueradeBit, \"iptables-masquerade-bit\", utilpointer.Int32PtrDerefOr(o.config.IPTables.MasqueradeBit, 14), \"If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31].\") fs.Int32Var(o.config.Conntrack.MaxPerCore, \"conntrack-max-per-core\", *o.config.Conntrack.MaxPerCore, \"Maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore conntrack-min).\")"} {"_id":"q-en-kubernetes-ca9cd6f8dcc200789627ae32e69fe25813de38a4c0fabcb383d5eb602e0d3667","text":"addrPath := connectionPath + \"/address\" addr, err := io.ReadFile(addrPath) if err != nil { return nil, err klog.Infof(\"Failed to process connection %s, assuming this connection is unavailable: %s\", dirName, err) continue } portPath := connectionPath + \"/port\" port, err := io.ReadFile(portPath) if err != nil { return nil, err klog.Infof(\"Failed to process connection %s, assuming this connection is unavailable: %s\", dirName, err) continue } persistentAddrPath := connectionPath + \"/persistent_address\" persistentAddr, err := io.ReadFile(persistentAddrPath) if err != nil { return nil, err klog.Infof(\"Failed to process connection %s, assuming this connection is unavailable: %s\", dirName, err) continue } persistentPortPath := connectionPath + \"/persistent_port\" persistentPort, err := io.ReadFile(persistentPortPath) if err != nil { return nil, err klog.Infof(\"Failed to process connection %s, assuming this connection is unavailable: %s\", dirName, err) continue } // Add entries to the map for both the current and persistent portals"} {"_id":"q-en-kubernetes-cab4995ba49be3ebdc7186ca81362cfa9a86da77e12a189c9ac7b6d4dd101a5f","text":"var errRequeue = errors.New(\"requeue\") // errPeriodic is a special error instance that functions can return // to request silent instance that functions can return // to request silent retrying at a fixed rate. var errPeriodic = errors.New(\"periodic\")"} {"_id":"q-en-kubernetes-cac3c28f6cbb33dafd0c9bbf1725f3f14e2ab454c004854c9ef666c6cbc84381","text":"} } } func TestRCManagerInit(t *testing.T) { // Insert a stable rc into the replication manager's store and make sure // it syncs pods with the apiserver before making any decisions. rc := newReplicationController(2) response := runtime.EncodeOrDie(testapi.Default.Codec(), newPodList(nil, 2, api.PodRunning, rc)) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: response, } testServer := httptest.NewServer(&fakeHandler) // TODO: Uncomment when fix #19254 // defer testServer.Close() client := client.NewOrDie(&client.Config{Host: testServer.URL, GroupVersion: testapi.Default.GroupVersion()}) manager := NewReplicationManager(client, controller.NoResyncPeriodFunc, BurstReplicas) manager.rcStore.Store.Add(rc) manager.podStoreSynced = alwaysReady controller.SyncAllPodsWithStore(manager.kubeClient, manager.podStore.Store) fakePodControl := &controller.FakePodControl{} manager.podControl = fakePodControl manager.syncReplicationController(getKey(rc, t)) validateSyncReplication(t, fakePodControl, 0, 0) } "} {"_id":"q-en-kubernetes-cb0107493533f820b34c539192006535d74417fa6f51a81419bf6e5cbe3d2296","text":"}, }, { // a role for the csi external attacher ObjectMeta: metav1.ObjectMeta{Name: \"system:csi-external-attacher\"}, Rules: []rbacv1.PolicyRule{ rbacv1helpers.NewRule(\"get\", \"list\", \"watch\", \"update\", \"patch\").Groups(legacyGroup).Resources(\"persistentvolumes\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\").Groups(legacyGroup).Resources(\"nodes\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\", \"update\", \"patch\").Groups(storageGroup).Resources(\"volumeattachments\").RuleOrDie(), rbacv1helpers.NewRule(\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\").Groups(legacyGroup).Resources(\"events\").RuleOrDie(), }, }, { // a role making the csrapprover controller approve a node client CSR ObjectMeta: metav1.ObjectMeta{Name: \"system:certificates.k8s.io:certificatesigningrequests:nodeclient\"}, Rules: []rbacv1.PolicyRule{"} {"_id":"q-en-kubernetes-cb183c75f8c38c68f2ff0d6ab232af47ba25026fe72534604fd08f8982c4c0a1","text":"nodeName := \"test-node\" testCases := []struct { name string volID string attachID string shouldFail bool reactor func(action core.Action) (handled bool, ret runtime.Object, err error) name string volID string attachID string shouldFail bool watcherError bool reactor func(action core.Action) (handled bool, ret runtime.Object, err error) }{ {name: \"normal test\", volID: \"vol-001\", attachID: getAttachmentName(\"vol-001\", testDriver, nodeName)}, {name: \"normal test 2\", volID: \"vol-002\", attachID: getAttachmentName(\"vol-002\", testDriver, nodeName)},"} {"_id":"q-en-kubernetes-cb1e4d41c8e153f43b0bbb51f565a1239479cf5ea165697224905218aceba052","text":"\"k8s.io/apiserver/pkg/server/routes\" componentbaseconfig \"k8s.io/component-base/config\" \"k8s.io/component-base/metrics/legacyregistry\" _ \"k8s.io/component-base/metrics/prometheus/workqueue\" // for workqueue metric registration \"k8s.io/kubernetes/pkg/api/legacyscheme\" \"k8s.io/kubernetes/pkg/util/configz\" )"} {"_id":"q-en-kubernetes-cb22100477d116432cf0109326cab5d7ffd6a82508963d8abd46b3c7c169da26","text":"\"hash/fnv\" \"sync\" \"k8s.io/kubernetes/pkg/scheduler/metrics\" \"k8s.io/api/core/v1\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/kubernetes/pkg/scheduler/algorithm\""} {"_id":"q-en-kubernetes-cb2956ffc73cb334307b63f6c2e1bf334ffd109f3867880e7593575e44cfcd5d","text":"// Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets. // The third returned value is the new replica set, and it may be nil if it doesn't exist yet. func GetAllReplicaSets(deployment *extensions.Deployment, c clientset.Interface) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, *extensions.ReplicaSet, error) { rsList, err := ListReplicaSets(deployment, rsListFromClient(c)) rsList, err := ListReplicaSets(deployment, RsListFromClient(c)) if err != nil { return nil, nil, nil, err }"} {"_id":"q-en-kubernetes-cb321b88dfe98c12df0cc32606e4c9bae44c292331ce7d80f670ad86579eeb2b","text":"} serviceAccount := strings.TrimSpace(stdout) framework.Logf(\"current service account: %q\", serviceAccount) stat, err := framework.RunKubectl(namespace, \"create\", \"clusterrolebinding\", ClusterAdminBinding, \"--clusterrole=cluster-admin\", \"--user=\"+serviceAccount) stat, err := framework.RunKubectl(\"\", \"create\", \"clusterrolebinding\", ClusterAdminBinding, \"--clusterrole=cluster-admin\", \"--user=\"+serviceAccount) framework.Logf(stat) return err }"} {"_id":"q-en-kubernetes-cb587eb71b08fdf3c04dd1339074e019337bb8d9c2ff042cb4631abcddb39e70","text":"\"fmt\" \"net\" \"reflect\" \"strings\" \"testing\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\""} {"_id":"q-en-kubernetes-cb880f561db8c0b3063b48f053c87a9d27456ac8c6e320fe0cc2ab60cee27cba","text":"cm := controller.NewPodControllerRefManager(rm.podControl, rc, labels.Set(rc.Spec.Selector).AsSelectorPreValidated(), controllerKind) // NOTE: filteredPods are pointing to objects from cache - if you need to // modify them, you need to copy it first. filteredPods, err = cm.ClaimPods(pods) filteredPods, err = cm.ClaimPods(filteredPods) if err != nil { return err }"} {"_id":"q-en-kubernetes-cbe78618be6ec2c33f5b26b248d64e467ee220044799eef2352440a64d88206c","text":"fakeMirrorClient *fakeMirrorClient } const testKubeletHostname = \"testnode\" const testKubeletHostname = \"127.0.0.1\" func newTestKubelet(t *testing.T) *TestKubelet { fakeDocker := &dockertools.FakeDockerClient{Errors: make(map[string]error), RemovedImages: util.StringSet{}}"} {"_id":"q-en-kubernetes-cbeea931d2252d59b869316cedbde275334bcd102c7f6f5320b50dc08118394b","text":"package dns import ( \"testing\" runtimeapi \"k8s.io/cri-api/pkg/apis/runtime/v1\" )"} {"_id":"q-en-kubernetes-cc32e821a17b8e08dfaee2e725409cbd0aded17b4e2f4c8b2f8f034abeb464fa","text":"By(fmt.Sprintf(\"Trying to get logs from node %s pod %s container %s: %v\", podStatus.Spec.NodeName, podStatus.Name, containerName, err)) var logs []byte var logs string start := time.Now() // Sometimes the actual containers take a second to get started, try to get logs for 60s for time.Now().Sub(start) < (60 * time.Second) { err = nil logs, err = c.Get(). Resource(\"pods\"). Namespace(ns). Name(pod.Name). SubResource(\"log\"). Param(\"container\", containerName). Do(). Raw() if err == nil && strings.Contains(string(logs), \"Internal Error\") { err = fmt.Errorf(\"Fetched log contains \"Internal Error\": %q.\", string(logs)) } logs, err = getPodLogs(c, ns, pod.Name, containerName) if err != nil { By(fmt.Sprintf(\"Warning: Failed to get logs from node %q pod %q container %q. %v\", podStatus.Spec.NodeName, podStatus.Name, containerName, err))"} {"_id":"q-en-kubernetes-cc4be4cede4e90166f5c941827d3cfe63cd91865eabab532d8bc8f29bd519bab","text":"import ( \"io/ioutil\" \"os\" \"path/filepath\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-cc60fde0a1a3f337829334d8589aa1254deac82502c1464a4c539a70112a0038","text":"return err } // Delete this object. source.Delete(newest.Object.(runtime.Object)) } else { // Update our downstream store."} {"_id":"q-en-kubernetes-cc64360c3556d3a7f5df77a0af286ca29d00ce16da2740700234614b8cb69244","text":"} } nodeNameToPodList = podListForEachNode(cs) for _, node := range nodes { ginkgo.By(\"Compute Cpu, Mem Fraction after create balanced pods.\") computeCPUMemFraction(cs, node, requestedResource) computeCPUMemFraction(node, requestedResource, nodeNameToPodList[node.Name]) } return cleanUp, nil } func computeCPUMemFraction(cs clientset.Interface, node v1.Node, resource *v1.ResourceRequirements) (float64, float64, int64, int64) { framework.Logf(\"ComputeCPUMemFraction for node: %v\", node.Name) totalRequestedCPUResource := resource.Requests.Cpu().MilliValue() totalRequestedMemResource := resource.Requests.Memory().Value() allpods, err := cs.CoreV1().Pods(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{}) func podListForEachNode(cs clientset.Interface) map[string][]*v1.Pod { nodeNameToPodList := make(map[string][]*v1.Pod) allPods, err := cs.CoreV1().Pods(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{}) if err != nil { framework.Failf(\"Expect error of invalid, got : %v\", err) } for _, pod := range allpods.Items { if pod.Spec.NodeName == node.Name { framework.Logf(\"Pod for on the node: %v, Cpu: %v, Mem: %v\", pod.Name, getNonZeroRequests(&pod).MilliCPU, getNonZeroRequests(&pod).Memory) // Ignore best effort pods while computing fractions as they won't be taken in account by scheduler. if v1qos.GetPodQOS(&pod) == v1.PodQOSBestEffort { continue } totalRequestedCPUResource += getNonZeroRequests(&pod).MilliCPU totalRequestedMemResource += getNonZeroRequests(&pod).Memory for _, pod := range allPods.Items { nodeName := pod.Spec.NodeName nodeNameToPodList[nodeName] = append(nodeNameToPodList[nodeName], &pod) } return nodeNameToPodList } func computeCPUMemFraction(node v1.Node, resource *v1.ResourceRequirements, pods []*v1.Pod) (float64, float64, int64, int64) { framework.Logf(\"ComputeCPUMemFraction for node: %v\", node.Name) totalRequestedCPUResource := resource.Requests.Cpu().MilliValue() totalRequestedMemResource := resource.Requests.Memory().Value() for _, pod := range pods { framework.Logf(\"Pod for on the node: %v, Cpu: %v, Mem: %v\", pod.Name, getNonZeroRequests(pod).MilliCPU, getNonZeroRequests(pod).Memory) // Ignore best effort pods while computing fractions as they won't be taken in account by scheduler. if v1qos.GetPodQOS(pod) == v1.PodQOSBestEffort { continue } totalRequestedCPUResource += getNonZeroRequests(pod).MilliCPU totalRequestedMemResource += getNonZeroRequests(pod).Memory } cpuAllocatable, found := node.Status.Allocatable[v1.ResourceCPU] framework.ExpectEqual(found, true) cpuAllocatableMil := cpuAllocatable.MilliValue()"} {"_id":"q-en-kubernetes-cc67331c163b51bd73abebea8b3ff1df1bf8d9307eaed34e60a2907351061bff","text":"DeleteFunc: c.deleteAPIService, }) serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: c.addService, UpdateFunc: c.updateService, DeleteFunc: c.deleteService, }) c.syncFn = c.sync return c"} {"_id":"q-en-kubernetes-ccc51afb6b9d3bb0f1eb43adbdaca72e7c526728c8a1e8ec7271a8f895c6b991","text":"\"attachRequired\": \"attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.nnThis field is immutable.\", \"podInfoOnMount\": \"If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volumen defined by a CSIVolumeSource, otherwise \"false\"nn\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.nnThis field is immutable.\", \"volumeLifecycleModes\": \"volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.nnThis field is immutable.\", \"storageCapacity\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field is immutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"storageCapacity\": \"If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.nnThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.nnAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.nnThis field was immutable in Kubernetes <= 1.22 and now is mutable.nnThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.\", \"fsGroupPolicy\": \"Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.nnThis field is immutable.nnDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.\", \"tokenRequests\": \"TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {n \"\": {n \"token\": ,n \"expirationTimestamp\": ,n },n ...n}nnNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\", \"requiresRepublish\": \"RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.nnNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\","} {"_id":"q-en-kubernetes-cd467bafcd03f4d0183e8bffe6e60485d9b33442475031506ee5488a4227993e","text":"DisableAcceleratorUsageMetrics: {Default: true, PreRelease: featuregate.Beta}, HPAContainerMetrics: {Default: false, PreRelease: featuregate.Alpha}, RootCAConfigMap: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.22 SizeMemoryBackedVolumes: {Default: false, PreRelease: featuregate.Alpha}, SizeMemoryBackedVolumes: {Default: true, PreRelease: featuregate.Beta}, ExecProbeTimeout: {Default: true, PreRelease: featuregate.GA}, // lock to default and remove after v1.22 based on KEP #1972 update KubeletCredentialProviders: {Default: false, PreRelease: featuregate.Alpha}, GracefulNodeShutdown: {Default: true, PreRelease: featuregate.Beta},"} {"_id":"q-en-kubernetes-cd5f4ea04143295809ee4a94557d60b03c77c49db74cd16889211e9271140d31","text":"return nil } // handleDockercfgContent serializes a dockercfg json file func handleDockercfgContent(username, password, email, server string) ([]byte, error) { // handleDockerCfgJsonContent serializes a ~/.docker/config.json file func handleDockerCfgJsonContent(username, password, email, server string) ([]byte, error) { dockercfgAuth := credentialprovider.DockerConfigEntry{ Username: username, Password: password, Email: email, } dockerCfg := credentialprovider.DockerConfigJson{ dockerCfgJson := credentialprovider.DockerConfigJson{ Auths: map[string]credentialprovider.DockerConfigEntry{server: dockercfgAuth}, } return json.Marshal(dockerCfg) return json.Marshal(dockerCfgJson) }"} {"_id":"q-en-kubernetes-cd76be3aca74daf649b2cfc0ef1b8bf5cae4f9013e5e9b302a58fcb57793e067","text":"// } } } func TestRateLimitedRoundTripper(t *testing.T) { handler := utiltesting.FakeHandler{StatusCode: 200} server := httptest.NewServer(&handler) defer server.Close() method := \"GET\" path := \"/foo/bar\" req, err := http.NewRequest(method, server.URL+path, nil) if err != nil { t.Errorf(\"unexpected error: %v\", err) } // TODO(zmerlynn): Validate the rate limiter is actually getting called. client := http.Client{ Transport: &rateLimitedRoundTripper{ rt: http.DefaultTransport, limiter: flowcontrol.NewFakeAlwaysRateLimiter(), }, } _, err = client.Do(req) if err != nil { t.Errorf(\"unexpected error: %v\", err) } handler.ValidateRequest(t, path, method, nil) } "} {"_id":"q-en-kubernetes-cd89f0c3c1705a9c77c2eee2a5e8c932be0c6271ec8502e7e4dccd2bfd5f96e8","text":"# TODO(pjh): move the logging agent code below into a separate # module; it was put here temporarily to avoid disrupting the file layout in # the K8s release machinery. $LOGGINGAGENT_VERSION = '1.7.3' $LOGGINGAGENT_VERSION = '1.7.5' $LOGGINGAGENT_ROOT = 'C:fluent-bit' $LOGGINGAGENT_SERVICE = 'fluent-bit' $LOGGINGAGENT_CMDLINE = '*fluent-bit.exe*'"} {"_id":"q-en-kubernetes-cdd5ebf4388579fd3da35be0c817ea6f4a57ef2f43623fcf8401ec9431a48146","text":"\"//pkg/api:go_default_library\", \"//pkg/api/v1/ref:go_default_library\", \"//pkg/kubelet/apis/cri/v1alpha1/runtime:go_default_library\", \"//pkg/kubelet/events:go_default_library\", \"//pkg/kubelet/util/format:go_default_library\", \"//pkg/kubelet/util/ioutils:go_default_library\", \"//pkg/util/hash:go_default_library\","} {"_id":"q-en-kubernetes-ce079371cc1bcdb0d025fd7bf82884b6d86022a1e76e270cb17074b99dcca73f","text":"return err } // Unmount the device from the device mount point. klog.V(4).Infof(\"rbd: unmouting device mountpoint %s\", deviceMountPath) if err = detacher.mounter.Unmount(deviceMountPath); err != nil { notMnt, err := detacher.mounter.IsLikelyNotMountPoint(deviceMountPath) if err != nil { return err } klog.V(3).Infof(\"rbd: successfully umount device mountpath %s\", deviceMountPath) if !notMnt { klog.V(4).Infof(\"rbd: unmouting device mountpoint %s\", deviceMountPath) if err = detacher.mounter.Unmount(deviceMountPath); err != nil { return err } klog.V(3).Infof(\"rbd: successfully umount device mountpath %s\", deviceMountPath) } klog.V(4).Infof(\"rbd: detaching device %s\", devicePath) err = detacher.manager.DetachDisk(detacher.plugin, deviceMountPath, devicePath) if err != nil { return err // Get devicePath from deviceMountPath if devicePath is empty if devicePath == \"\" { rbdImageInfo, err := getRbdImageInfo(deviceMountPath) if err != nil { return err } found := false devicePath, found = getRbdDevFromImageAndPool(rbdImageInfo.pool, rbdImageInfo.name) if !found { klog.Warningf(\"rbd: can't found devicePath for %v. Device is already unmounted, Image %v, Pool %v\", deviceMountPath, rbdImageInfo.pool, rbdImageInfo.name) } } if devicePath != \"\" { klog.V(4).Infof(\"rbd: detaching device %s\", devicePath) err = detacher.manager.DetachDisk(detacher.plugin, deviceMountPath, devicePath) if err != nil { return err } klog.V(3).Infof(\"rbd: successfully detach device %s\", devicePath) } klog.V(3).Infof(\"rbd: successfully detach device %s\", devicePath) err = os.Remove(deviceMountPath) if err != nil { return err"} {"_id":"q-en-kubernetes-ce608da03909ad5e7b0eadd7f153298d4513a8b232d46dbe29ae722a789bbe74","text":"nsFlag := fmt.Sprintf(\"--namespace=%v\", ns) ginkgo.By(\"executing a command with run and attach with stdin\") runOutput := framework.NewKubectlCommand(nsFlag, \"run\", \"run-test\", \"--image=\"+busyboxImage, \"--restart=OnFailure\", \"--attach=true\", \"--stdin\", \"--\", \"sh\", \"-c\", \"cat && echo 'stdin closed'\"). WithStdinData(\"abcd1234\"). // We wait for a non-empty line so we know kubectl has attached runOutput := framework.NewKubectlCommand(nsFlag, \"run\", \"run-test\", \"--image=\"+busyboxImage, \"--restart=OnFailure\", \"--attach=true\", \"--stdin\", \"--\", \"sh\", \"-c\", \"while [ -z \"$s\" ]; do read s; sleep 1; done; echo read:$s && cat && echo 'stdin closed'\"). WithStdinData(\"valuenabcd1234\"). ExecOrDie() g := func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) } runTestPod, _, err := polymorphichelpers.GetFirstPod(f.ClientSet.CoreV1(), ns, \"run=run-test\", 1*time.Minute, g) gomega.Expect(err).To(gomega.BeNil()) // NOTE: we cannot guarantee our output showed up in the container logs before stdin was closed, so we have // to loop test. err = wait.PollImmediate(time.Second, time.Minute, func() (bool, error) { if !e2epod.CheckPodsRunningReady(c, ns, []string{runTestPod.Name}, 1*time.Second) { e2elog.Failf(\"Pod %q of Job %q should still be running\", runTestPod.Name, \"run-test\") } logOutput := framework.RunKubectlOrDie(nsFlag, \"logs\", runTestPod.Name) gomega.Expect(runOutput).To(gomega.ContainSubstring(\"abcd1234\")) gomega.Expect(runOutput).To(gomega.ContainSubstring(\"stdin closed\")) return strings.Contains(logOutput, \"abcd1234\"), nil }) gomega.Expect(err).To(gomega.BeNil()) gomega.Expect(runOutput).To(gomega.ContainSubstring(\"read:value\")) gomega.Expect(runOutput).To(gomega.ContainSubstring(\"abcd1234\")) gomega.Expect(runOutput).To(gomega.ContainSubstring(\"stdin closed\")) gomega.Expect(c.BatchV1().Jobs(ns).Delete(\"run-test\", nil)).To(gomega.BeNil())"} {"_id":"q-en-kubernetes-ce7815c25aecc858b2c573436b442f3d348254f662cf26e6fb31e3ecc8181799","text":"CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters network.PublicIPAddress) (resp *http.Response, err error) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (resp *http.Response, err error) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err error) List(ctx context.Context, resourceGroupName string) (result []network.PublicIPAddress, err error) }"} {"_id":"q-en-kubernetes-cea1df46b662b4c5b405fd066b723885003ec7400b1930a4aa2f94def3dd9e23","text":"} } } func TestPrintPod(t *testing.T) { tests := []struct { pod api.Pod"} {"_id":"q-en-kubernetes-cef00164a645c31ceb4a0a11f092360b8f5f96b99da667d85b92fe8d4eae344d","text":"} }) ginkgo.It(\"should manage the lifecycle of a ResourceQuota\", func() { /* Release: v1.25 Testname: ResourceQuota, manage lifecycle of a ResourceQuota Description: Attempt to create a ResourceQuota for CPU and Memory quota limits. Creation MUST be successful. Attempt to list all namespaces with a label selector which MUST succeed. One list MUST be found. The ResourceQuota when patched MUST succeed. Given the patching of the ResourceQuota, the fields MUST equal the new values. It MUST succeed at deleting a collection of ResourceQuota via a label selector. */ framework.ConformanceIt(\"should manage the lifecycle of a ResourceQuota\", func() { client := f.ClientSet ns := f.Namespace.Name"} {"_id":"q-en-kubernetes-cf170160f1ffa82522d54ce57611bf262888546d8f81eb34ccbc54f5b549e597","text":"ds.network = network.NewPluginManager(plug) klog.Infof(\"Docker cri networking managed by %v\", plug.Name()) // NOTE: cgroup driver is only detectable in docker 1.11+ cgroupDriver := defaultCgroupDriver dockerInfo, err := ds.client.Info() klog.Infof(\"Docker Info: %+v\", dockerInfo) if err != nil { klog.Errorf(\"Failed to execute Info() call to the Docker client: %v\", err) klog.Warningf(\"Falling back to use the default driver: %q\", cgroupDriver) } else if len(dockerInfo.CgroupDriver) == 0 { klog.Warningf(\"No cgroup driver is set in Docker\") klog.Warningf(\"Falling back to use the default driver: %q\", cgroupDriver) } else { cgroupDriver = dockerInfo.CgroupDriver } if len(kubeCgroupDriver) != 0 && kubeCgroupDriver != cgroupDriver { return nil, fmt.Errorf(\"misconfiguration: kubelet cgroup driver: %q is different from docker cgroup driver: %q\", kubeCgroupDriver, cgroupDriver) // skipping cgroup driver checks for Windows if runtime.GOOS == \"linux\" { // NOTE: cgroup driver is only detectable in docker 1.11+ cgroupDriver := defaultCgroupDriver dockerInfo, err := ds.client.Info() klog.Infof(\"Docker Info: %+v\", dockerInfo) if err != nil { klog.Errorf(\"Failed to execute Info() call to the Docker client: %v\", err) klog.Warningf(\"Falling back to use the default driver: %q\", cgroupDriver) } else if len(dockerInfo.CgroupDriver) == 0 { klog.Warningf(\"No cgroup driver is set in Docker\") klog.Warningf(\"Falling back to use the default driver: %q\", cgroupDriver) } else { cgroupDriver = dockerInfo.CgroupDriver } if len(kubeCgroupDriver) != 0 && kubeCgroupDriver != cgroupDriver { return nil, fmt.Errorf(\"misconfiguration: kubelet cgroup driver: %q is different from docker cgroup driver: %q\", kubeCgroupDriver, cgroupDriver) } klog.Infof(\"Setting cgroupDriver to %s\", cgroupDriver) ds.cgroupDriver = cgroupDriver } klog.Infof(\"Setting cgroupDriver to %s\", cgroupDriver) ds.cgroupDriver = cgroupDriver ds.versionCache = cache.NewObjectCache( func() (interface{}, error) { return ds.getDockerVersion()"} {"_id":"q-en-kubernetes-cf2ba9a1038c82b0b72a2ac59a6f288d78e28e5a1c8c5462d890dee115dbe1ec","text":"} func TestValidateDisabledSubpathExpr(t *testing.T) { // Enable feature VolumeSubpathEnvExpansion defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeSubpathEnvExpansion, true)() volumes := []core.Volume{ {Name: \"abc\", VolumeSource: core.VolumeSource{PersistentVolumeClaim: &core.PersistentVolumeClaimVolumeSource{ClaimName: \"testclaim1\"}}},"} {"_id":"q-en-kubernetes-cf34c44b2a628985bf7af758aa9e3be694d7554cfa9c226d9905942c98586370","text":"return false } bucketID := nextTime.Unix() t.lock.Lock() defer t.lock.Unlock() if bucketID < t.startBucketID { bucketID = t.startBucketID }"} {"_id":"q-en-kubernetes-cf45942809c6b5a607fe39e6c3a9dcb3626b03ad2c9b9ca17d92596426d6f432","text":"} func (d *CachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Object) error { if err := os.MkdirAll(filepath.Dir(filename), 0755); err != nil { if err := os.MkdirAll(filepath.Dir(filename), 0750); err != nil { return err }"} {"_id":"q-en-kubernetes-cf46d539e11a5c819473fefbc11923df9e90dbeb0d6519e7a811d876303eaccf","text":"} service, err := e.serviceLister.Services(namespace).Get(name) if err != nil { // Delete the corresponding endpoint, as the service has been deleted. // TODO: Please note that this will delete an endpoint when a // service is deleted. However, if we're down at the time when // the service is deleted, we will miss that deletion, so this // doesn't completely solve the problem. See #6877. err = e.client.CoreV1().Endpoints(namespace).Delete(name, nil) if err != nil && !errors.IsNotFound(err) { return err } // Service has been deleted. So no need to do any more operations. return nil }"} {"_id":"q-en-kubernetes-cf74aa9c332e7889764cbf869b623d42f0f24b383520253935d08b825337f05d","text":"kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient kubeClient.ReactFn = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}}, {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}}, }}).ReactFn machineInfo := &cadvisorApi.MachineInfo{ MachineID: \"123\","} {"_id":"q-en-kubernetes-cf78c739c70319e0436d8889f654fc28c5da1c1bd04fb9d7dccb5df0da71ab10","text":"storageframework.BlockVolModeDynamicPV, storageframework.Ext4DynamicPV, storageframework.XfsDynamicPV, storageframework.NtfsDynamicPV, } return InitCustomMultiVolumeTestSuite(patterns) }"} {"_id":"q-en-kubernetes-cf81d017bed6dcf92187b7ceba105fca9a092d0914574c3e4dc4c25c3fa69b59","text":"for k, tc := range testcases { tcName := k path := \"/apis/\" + tc.APIService.Spec.Group + \"/\" + tc.APIService.Spec.Version + \"/foo\" called := false timesCalled := int32(0) func() { // Cleanup after each test case. backendHandler := http.NewServeMux() backendHandler.Handle(path, websocket.Handler(func(ws *websocket.Conn) { atomic.AddInt32(×Called, 1) defer ws.Close() body := make([]byte, 5) ws.Read(body) ws.Write([]byte(\"hello \" + string(body))) called = true })) backendServer := httptest.NewUnstartedServer(backendHandler)"} {"_id":"q-en-kubernetes-cfa7e54684e5748eb63527da8392cc92a830a99a6ea12398a9df325a04c6dccc","text":"obj.MakeIPTablesUtilChains = boolVar(true) } if obj.IPTablesMasqueradeBit == nil { temp := int32(defaultIPTablesMasqueradeBit) temp := int32(DefaultIPTablesMasqueradeBit) obj.IPTablesMasqueradeBit = &temp } if obj.IPTablesDropBit == nil { temp := int32(defaultIPTablesDropBit) temp := int32(DefaultIPTablesDropBit) obj.IPTablesDropBit = &temp } if obj.CgroupsPerQOS == nil {"} {"_id":"q-en-kubernetes-cfb4f850ce7ba5dd6f722dfe239f46333d1562a83c188fc0f362bfe09e2fcdc0","text":"// This ensures the given VM's Primary NIC's Primary IP Configuration is // participating in the specified LoadBalancer Backend Pool. func (az *Cloud) ensureHostInPool(serviceName string, nodeName types.NodeName, backendPoolID string) error { var machine compute.VirtualMachine vmName := mapNodeNameToVMName(nodeName) az.operationPollRateLimiter.Accept() machine, err := az.VirtualMachinesClient.Get(az.ResourceGroup, vmName, \"\") if err != nil { return err if az.CloudProviderBackoff { glog.V(2).Infof(\"ensureHostInPool(%s, %s, %s) backing off\", serviceName, nodeName, backendPoolID) machine, err = az.VirtualMachineClientGetWithRetry(az.ResourceGroup, vmName, \"\") if err != nil { glog.V(2).Infof(\"ensureHostInPool(%s, %s, %s) abort backoff\", serviceName, nodeName, backendPoolID) return err } } else { return err } } primaryNicID, err := getPrimaryInterfaceID(machine)"} {"_id":"q-en-kubernetes-d02406f639b9a6c0ddfef46d29198ec4261c71639a3ea48bbcbea07b087d3dd7","text":"// GetPrimaryInterface gets machine primary network interface by node name and vmSet. func (ss *scaleSet) GetPrimaryInterface(nodeName, vmSetName string) (network.Interface, error) { ssName, instanceID, vm, err := ss.getVmssVM(nodeName) managedByAS, err := ss.isNodeManagedByAvailabilitySet(nodeName) if err != nil { if err == ErrorNotVmssInstance { glog.V(4).Infof(\"GetPrimaryInterface: node %q is managed by availability set\", nodeName) // Retry with standard type because nodes are not managed by vmss. return ss.availabilitySet.GetPrimaryInterface(nodeName, \"\") } glog.Errorf(\"Failed to check isNodeManagedByAvailabilitySet: %v\", err) return network.Interface{}, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetPrimaryInterface(nodeName, \"\") } glog.Errorf(\"error: ss.GetPrimaryInterface(%s), ss.getCachedVirtualMachine(%s), err=%v\", nodeName, nodeName, err) ssName, instanceID, vm, err := ss.getVmssVM(nodeName) if err != nil { glog.Errorf(\"error: ss.GetPrimaryInterface(%s), ss.getVmssVM(%s), err=%v\", nodeName, nodeName, err) return network.Interface{}, err }"} {"_id":"q-en-kubernetes-d024d7c729b69e5c6d76e0df8e4dd791b6c27d3bab099222ec7b7e8beda5c126","text":"AppArmor: {Default: true, PreRelease: utilfeature.Beta}, DynamicKubeletConfig: {Default: false, PreRelease: utilfeature.Alpha}, KubeletConfigFile: {Default: false, PreRelease: utilfeature.Alpha}, DynamicVolumeProvisioning: {Default: true, PreRelease: utilfeature.Alpha}, ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: utilfeature.Beta}, ExperimentalCriticalPodAnnotation: {Default: false, PreRelease: utilfeature.Alpha}, Accelerators: {Default: false, PreRelease: utilfeature.Alpha},"} {"_id":"q-en-kubernetes-d0e09438f698f1a4749d05e612627fdf21e77acc3710af797da9fd15effa81b6","text":"tags = [\"automanaged\"], visibility = [\"//visibility:public\"], ) go_test( name = \"go_default_test\", srcs = [\"testutil_test.go\"], embed = [\":go_default_library\"], deps = [\"//staging/src/k8s.io/component-base/metrics:go_default_library\"], ) "} {"_id":"q-en-kubernetes-d0e5e9706d6988d35166e81f1bbec04c952b90b977d8d1497da63508ece84c72","text":"return GatherAndCompare(registry, expected, metricNames...) } // NewFakeKubeRegistry creates a fake `KubeRegistry` that takes the input version as `build in version`. // It should only be used in testing scenario especially for the deprecated metrics. // The input version format should be `major.minor.patch`, e.g. '1.18.0'. func NewFakeKubeRegistry(ver string) metrics.KubeRegistry { backup := metrics.BuildVersion defer func() { metrics.BuildVersion = backup }() metrics.BuildVersion = func() apimachineryversion.Info { return apimachineryversion.Info{ GitVersion: fmt.Sprintf(\"v%s-alpha+1.12345\", ver), } } return metrics.NewKubeRegistry() } "} {"_id":"q-en-kubernetes-d153a2548db4732d19bfb6c5a16fedb982ebdb5cc36a4035dc0c227ad6d4e599","text":"containers, _ := selectContainers(spec.Containers, o.ContainerSelector) if len(containers) != 0 { for i := range containers { if len(o.Limits) != 0 && len(containers[i].Resources.Limits) == 0 { containers[i].Resources.Limits = make(api.ResourceList) } for key, value := range o.ResourceRequirements.Limits { containers[i].Resources.Limits[key] = value } if len(o.Requests) != 0 && len(containers[i].Resources.Requests) == 0 { containers[i].Resources.Requests = make(api.ResourceList) } for key, value := range o.ResourceRequirements.Requests { containers[i].Resources.Requests[key] = value } containers[i].Resources = o.ResourceRequirements transformed = true } } else {"} {"_id":"q-en-kubernetes-d20d3c4c7e590cfd60ac1f75c4b53673cd9bbca32e3294e6fb83435e05856d3b","text":"# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE # INSTRUCTIONS AT https://kubernetes.io/security/ cjcullen joelsmith liggitt philips cheftako deads2k lavalamp sttts tallclair "} {"_id":"q-en-kubernetes-d23f797cc7123e7970e949643b11654b86ac75c755afb78e3e8b91604dbb899c","text":"} defer CleanupDescriptors(gcmService, projectID) err = CreateAdapter(f.Namespace.Name, adapterDeployment) err = CreateAdapter(adapterDeployment) if err != nil { framework.Failf(\"Failed to set up: %s\", err) } defer CleanupAdapter(f.Namespace.Name, adapterDeployment) defer CleanupAdapter(adapterDeployment) _, err = kubeClient.RbacV1().ClusterRoleBindings().Create(context.TODO(), HPAPermissions, metav1.CreateOptions{}) if err != nil {"} {"_id":"q-en-kubernetes-d2540c90ee1ede6826ea9093c8ecd7c68a3ef6e8c46653d6191ae3a0bb462081","text":"BackendAddressPool: &network.SubResource{ ID: to.StringPtr(lbBackendPoolID), }, LoadDistribution: loadDistribution, FrontendPort: to.Int32Ptr(port.Port), BackendPort: to.Int32Ptr(port.Port), EnableFloatingIP: to.BoolPtr(true), LoadDistribution: loadDistribution, FrontendPort: to.Int32Ptr(port.Port), BackendPort: to.Int32Ptr(port.Port), EnableFloatingIP: to.BoolPtr(true), DisableOutboundSnat: to.BoolPtr(az.disableLoadBalancerOutboundSNAT()), }, } if protocol == v1.ProtocolTCP {"} {"_id":"q-en-kubernetes-d28d5d9a47a497a7f3ead66897b00acd53fc6f6d82bd20b9b60626e2c179785e","text":"assert.Equal(c.groupCalls, 2) } func TestNewCachedDiscoveryClient_PathPerm(t *testing.T) { assert := assert.New(t) d, err := ioutil.TempDir(\"\", \"\") assert.NoError(err) os.RemoveAll(d) defer os.RemoveAll(d) c := fakeDiscoveryClient{} cdc := newCachedDiscoveryClient(&c, d, 1*time.Nanosecond) cdc.ServerGroups() err = filepath.Walk(d, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.IsDir() { assert.Equal(os.FileMode(0750), info.Mode().Perm()) } else { assert.Equal(os.FileMode(0660), info.Mode().Perm()) } return nil }) assert.NoError(err) } type fakeDiscoveryClient struct { groupCalls int resourceCalls int"} {"_id":"q-en-kubernetes-d2f8dd8ba4d882d7774c610701aac28e324f9d0e781561c2bc7ae6641b496548","text":"// Wraps syscall.Mount() func (mounter *DiskMounter) Mount(source string, target string, fstype string, flags uintptr, data string) error { glog.V(5).Infof(\"Mounting %s %s %s %d %s\", source, target, fstype, flags, data) return syscall.Mount(source, target, fstype, flags, data) }"} {"_id":"q-en-kubernetes-d3292c1563bd973ca1bb0530f19c4f4e000c0d91ca9a584ceeba2e93c6a5cbd7","text":"### END TEST DEFINITION CUSTOMIZATION ### ####################################################### # Step 1: Start a server which supports both the old and new api versions, # but KUBE_OLD_API_VERSION is the latest (storage) version."} {"_id":"q-en-kubernetes-d3461dc3d03693e4493dec71ee936adcaf0b7125f81523c315a09746ec904275","text":"\"image_id_test.go\", \"kubelet_test.go\", \"lifecycle_hook_test.go\", \"log_path_test.go\", \"memory_eviction_test.go\", \"mirror_pod_test.go\", \"resource_usage_test.go\","} {"_id":"q-en-kubernetes-d3465f406e96fbfada82171a2bcf7839370149372cfe622372c248a304953b8b","text":"assert.Equal(t, result, test.expectSocket, \"Unexpected result from IsUnixDomainSocket: %v for %s\", result, test.label) } } func TestGetAddressAndDialer(t *testing.T) { tests := []struct { endpoint string expectError bool expectedAddr string }{ { endpoint: \"unix:///tmp/s1.sock\", expectError: false, expectedAddr: \"/tmp/s1.sock\", }, { endpoint: \"unix:///tmp/f6.sock\", expectError: false, expectedAddr: \"/tmp/f6.sock\", }, { endpoint: \"tcp://localhost:9090\", expectError: true, }, { // The misspelling is intentional to make it error endpoint: \"htta://free-test.com\", expectError: true, }, { endpoint: \"https://www.youtube.com/\", expectError: true, }, { endpoint: \"http://www.baidu.com/\", expectError: true, }, } for _, test := range tests { // just test addr and err addr, _, err := GetAddressAndDialer(test.endpoint) if test.expectError { assert.NotNil(t, err, \"expected error during parsing %s\", test.endpoint) continue } assert.Nil(t, err, \"expected no error during parsing %s\", test.endpoint) assert.Equal(t, test.expectedAddr, addr) } } "} {"_id":"q-en-kubernetes-d35fa71ee8824da4b40155b19d1ccd789d268fb5501f57faebeb2059c716bfd1","text":"readonly KUBE_NODE_BINARIES=(\"${KUBE_NODE_TARGETS[@]##*/}\") readonly KUBE_NODE_BINARIES_WIN=(\"${KUBE_NODE_BINARIES[@]/%/.exe}\") if [[ \"${KUBE_FASTBUILD:-}\" == \"true\" ]]; then if [[ -n \"${KUBE_BUILD_PLATFORMS:-}\" ]]; then readonly KUBE_SERVER_PLATFORMS=(${KUBE_BUILD_PLATFORMS}) readonly KUBE_NODE_PLATFORMS=(${KUBE_BUILD_PLATFORMS}) readonly KUBE_TEST_PLATFORMS=(${KUBE_BUILD_PLATFORMS}) readonly KUBE_CLIENT_PLATFORMS=(${KUBE_BUILD_PLATFORMS}) elif [[ \"${KUBE_FASTBUILD:-}\" == \"true\" ]]; then readonly KUBE_SERVER_PLATFORMS=(linux/amd64) readonly KUBE_NODE_PLATFORMS=(linux/amd64) if [[ \"${KUBE_BUILDER_OS:-}\" == \"darwin\"* ]]; then"} {"_id":"q-en-kubernetes-d371708c06cbf2ac5892e2a11700274abbb6230edc33a0b1b60d8acda252924d","text":"# limitations under the License. ARG BASEIMAGE ARG RUNNERIMAGE FROM ${BASEIMAGE} FROM ${BASEIMAGE} as debbase FROM ${RUNNERIMAGE} # This is a dependency for `kubectl diff` tests COPY --from=debbase /usr/bin/diff /usr/local/bin/ COPY cluster /kubernetes/cluster COPY ginkgo /usr/local/bin/ COPY e2e.test /usr/local/bin/ COPY kubectl /usr/local/bin/ COPY run_e2e.sh /run_e2e.sh COPY gorunner /usr/local/bin/kubeconformance # Legacy executables -- deprecated COPY gorunner /run_e2e.sh COPY gorunner /gorunner COPY cluster /kubernetes/cluster WORKDIR /usr/local/bin ENV E2E_FOCUS=\"[Conformance]\" ENV E2E_SKIP=\"\""} {"_id":"q-en-kubernetes-d3c70e7835fe24910d3e29a6e11d0143e570329afb925cc171856ae54e449cc3","text":"return nil } // We don't want to upgrade (add an IP) or downgrade (remove an IP) // following a cluster downgrade/upgrade to/from dual-stackness // a PreferDualStack service following principle of least surprise // That means: PreferDualStack service will only be upgraded // if: // - changes type to RequireDualStack // - manually adding or removing ClusterIP (secondary) // - manually adding or removing IPFamily (secondary) if isMatchingPreferDualStackClusterIPFields(oldService, service) { return nil // nothing more to do. } // two families or two IPs with SingleStack if service.Spec.IPFamilyPolicy != nil { el := make(field.ErrorList, 0)"} {"_id":"q-en-kubernetes-d3c7c5eb62a7b703293c6e2548d7cea3b0d0bdad1eecc4f03cfd8d88afce0734","text":"pod.Spec.NodeName = nodeName pod.ObjectMeta.SelfLink = getSelfLink(pod.Name, pod.Namespace) if pod.Annotations == nil { pod.Annotations = make(map[string]string) } // The generated UID is the hash of the file. pod.Annotations[kubetypes.ConfigHashAnnotationKey] = string(pod.UID) return nil }"} {"_id":"q-en-kubernetes-d3d9386ef2f63de773be7dca356594a69833cb8d67194e67d3837b307a06fdc0","text":"// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images // +optional ImagePullPolicy PullPolicy `json:\"imagePullPolicy,omitempty\" protobuf:\"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy\"` // Security options the pod should run with. // SecurityContext defines the security options the container should be run with. // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ // +optional SecurityContext *SecurityContext `json:\"securityContext,omitempty\" protobuf:\"bytes,15,opt,name=securityContext\"`"} {"_id":"q-en-kubernetes-d3d9848d5871553e919357479e48398bd164a28c33413140b22de2ecf83ceb27","text":"if err != nil { t.Fatalf(\"socks5Server: proxy_test: Listen: %v\", err) } defer func() { close(closed) l.Close() }() defer l.Close() go func(shoulderror bool) { conn, err := l.Accept()"} {"_id":"q-en-kubernetes-d3faf38d5f3ab04e6f628920a913d39ccf50d90a025315fb9c3f27593639d713","text":"if c.SecureServing != nil && !c.SecureServing.DisableHTTP2 && c.GoawayChance > 0 { handler = genericfilters.WithProbabilisticGoaway(handler, c.GoawayChance) } handler = genericapifilters.WithWarningRecorder(handler) handler = genericapifilters.WithCacheControl(handler) handler = genericfilters.WithHSTS(handler, c.HSTSDirectives) if c.ShutdownSendRetryAfter {"} {"_id":"q-en-kubernetes-d40eb1efbd8fe64409ed3f4082b12df74a35795ac9caab6819b9ba0e4b108af6","text":"start-kube-controller-manager start-kube-scheduler start-kube-addons start-cluster-autoscaler else start-kube-proxy # Kube-registry-proxy."} {"_id":"q-en-kubernetes-d4d95c0898f1430d6f7d743001f27cd4cf9150f03ad3b125cc6649a21faa9c9f","text":"if \"${need_download}\"; then if [[ $(which gsutil) ]] && [[ \"$kubernetes_tar_url\" =~ ^https://storage.googleapis.com/.* ]]; then gsutil cp \"${kubernetes_tar_url//'https://storage.googleapis.com/'/'gs://'}\" \"${file}\" gsutil cp \"${kubernetes_tar_url//'https://storage.googleapis.com/'/gs://}\" \"${file}\" elif [[ $(which curl) ]]; then # if the url belongs to GCS API we should use oauth2_token in the headers curl_headers=\"\""} {"_id":"q-en-kubernetes-d51e47aeee2ac8ee87f089abc0b1fd7e2f8ec986f718aad863d2f362c55c3d51","text":"func (az *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error { isInternal := requiresInternalLoadBalancer(service) serviceName := getServiceName(service) klog.V(5).Infof(\"delete(%s): START clusterName=%q\", serviceName, clusterName) klog.V(5).Infof(\"Delete service (%s): START clusterName=%q\", serviceName, clusterName) ignoreErrors := func(err error) error { if ignoreStatusNotFoundFromError(err) == nil { klog.V(5).Infof(\"EnsureLoadBalancerDeleted: ignoring StatusNotFound error because the resource doesn't exist (%v)\", err) return nil } if ignoreStatusForbiddenFromError(err) == nil { klog.V(5).Infof(\"EnsureLoadBalancerDeleted: ignoring StatusForbidden error (%v). This may be caused by wrong configuration via service annotations\", err) return nil } return err } serviceIPToCleanup, err := az.findServiceIPAddress(ctx, clusterName, service, isInternal) if err != nil { if ignoreErrors(err) != nil { return err } klog.V(2).Infof(\"EnsureLoadBalancerDeleted: reconciling security group for service %q with IP %q, wantLb = false\", serviceName, serviceIPToCleanup) if _, err := az.reconcileSecurityGroup(clusterName, service, &serviceIPToCleanup, false /* wantLb */); err != nil { return err if ignoreErrors(err) != nil { return err } } if _, err := az.reconcileLoadBalancer(clusterName, service, nil, false /* wantLb */); err != nil { return err if ignoreErrors(err) != nil { return err } } if _, err := az.reconcilePublicIP(clusterName, service, nil, false /* wantLb */); err != nil { return err if ignoreErrors(err) != nil { return err } } klog.V(2).Infof(\"delete(%s): FINISH\", serviceName) klog.V(2).Infof(\"Delete service (%s): FINISH\", serviceName) return nil }"} {"_id":"q-en-kubernetes-d532992cbb641fc9ae4afe8a51d9c63b8268cb86d5dc0d68b4300936edd01fb7","text":" /* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package fuzzer import ( \"time\" \"github.com/google/gofuzz\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" runtimeserializer \"k8s.io/apimachinery/pkg/runtime/serializer\" \"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig\" \"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig/v1alpha1\" \"k8s.io/kubernetes/pkg/kubelet/qos\" kubetypes \"k8s.io/kubernetes/pkg/kubelet/types\" \"k8s.io/kubernetes/pkg/master/ports\" ) // Funcs returns the fuzzer functions for the kubeletconfig apis. func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { return []interface{}{ // provide non-empty values for fields with defaults, so the defaulter doesn't change values during round-trip func(obj *kubeletconfig.KubeletConfiguration, c fuzz.Continue) { c.FuzzNoCustom(obj) obj.ConfigTrialDuration = &metav1.Duration{Duration: 10 * time.Minute} obj.Authentication.Anonymous.Enabled = true obj.Authentication.Webhook.Enabled = false obj.Authentication.Webhook.CacheTTL = metav1.Duration{Duration: 2 * time.Minute} obj.Authorization.Mode = kubeletconfig.KubeletAuthorizationModeAlwaysAllow obj.Authorization.Webhook.CacheAuthorizedTTL = metav1.Duration{Duration: 5 * time.Minute} obj.Authorization.Webhook.CacheUnauthorizedTTL = metav1.Duration{Duration: 30 * time.Second} obj.Address = \"0.0.0.0\" obj.CAdvisorPort = 4194 obj.VolumeStatsAggPeriod = metav1.Duration{Duration: time.Minute} obj.RuntimeRequestTimeout = metav1.Duration{Duration: 2 * time.Minute} obj.CPUCFSQuota = true obj.EventBurst = 10 obj.EventRecordQPS = 5 obj.EnableControllerAttachDetach = true obj.EnableDebuggingHandlers = true obj.EnableServer = true obj.FileCheckFrequency = metav1.Duration{Duration: 20 * time.Second} obj.HealthzBindAddress = \"127.0.0.1\" obj.HealthzPort = 10248 obj.HostNetworkSources = []string{kubetypes.AllSource} obj.HostPIDSources = []string{kubetypes.AllSource} obj.HostIPCSources = []string{kubetypes.AllSource} obj.HTTPCheckFrequency = metav1.Duration{Duration: 20 * time.Second} obj.ImageMinimumGCAge = metav1.Duration{Duration: 2 * time.Minute} obj.ImageGCHighThresholdPercent = 85 obj.ImageGCLowThresholdPercent = 80 obj.MaxOpenFiles = 1000000 obj.MaxPods = 110 obj.NodeStatusUpdateFrequency = metav1.Duration{Duration: 10 * time.Second} obj.CPUManagerPolicy = \"none\" obj.CPUManagerReconcilePeriod = obj.NodeStatusUpdateFrequency obj.OOMScoreAdj = int32(qos.KubeletOOMScoreAdj) obj.Port = ports.KubeletPort obj.ReadOnlyPort = ports.KubeletReadOnlyPort obj.RegistryBurst = 10 obj.RegistryPullQPS = 5 obj.ResolverConfig = kubetypes.ResolvConfDefault obj.SerializeImagePulls = true obj.StreamingConnectionIdleTimeout = metav1.Duration{Duration: 4 * time.Hour} obj.SyncFrequency = metav1.Duration{Duration: 1 * time.Minute} obj.ContentType = \"application/vnd.kubernetes.protobuf\" obj.KubeAPIQPS = 5 obj.KubeAPIBurst = 10 obj.HairpinMode = v1alpha1.PromiscuousBridge obj.EvictionHard = map[string]string{ \"memory.available\": \"100Mi\", \"nodefs.available\": \"10%\", \"nodefs.inodesFree\": \"5%\", \"imagefs.available\": \"15%\", } obj.EvictionPressureTransitionPeriod = metav1.Duration{Duration: 5 * time.Minute} obj.MakeIPTablesUtilChains = true obj.IPTablesMasqueradeBit = v1alpha1.DefaultIPTablesMasqueradeBit obj.IPTablesDropBit = v1alpha1.DefaultIPTablesDropBit obj.CgroupsPerQOS = true obj.CgroupDriver = \"cgroupfs\" obj.EnforceNodeAllocatable = v1alpha1.DefaultNodeAllocatableEnforcement obj.ManifestURLHeader = make(map[string][]string) }, } } "} {"_id":"q-en-kubernetes-d5460dc0a276da91c6b109d458f11f09bd75050a4e995d3c29e5db1577475490","text":"// We check for double because it needs to support at least the cri-o minimum // plus whatever delta between node usages (which could be up to or at least crioMinMemLimit) func nodesAreTooUtilized(cs clientset.Interface, nodeList *v1.NodeList) bool { nodeNameToPodList := podListForEachNode(cs) for _, node := range nodeList.Items { _, memFraction, _, memAllocatable := computeCPUMemFraction(cs, node, podRequestedResource) _, memFraction, _, memAllocatable := computeCPUMemFraction(node, podRequestedResource, nodeNameToPodList[node.Name]) if float64(memAllocatable)-(memFraction*float64(memAllocatable)) < float64(2*crioMinMemLimit) { return true }"} {"_id":"q-en-kubernetes-d54e45b33e50654beab707bb8621c9e6d9f5916cb231ef5b6b5dc350f80e51be","text":"} func TestCreate(t *testing.T) { simpleStorage := &SimpleRESTStorage{} wait := sync.WaitGroup{} wait.Add(1) simpleStorage := &SimpleRESTStorage{ injectedFunction: func(obj runtime.Object) (returnObj runtime.Object, err error) { wait.Wait() return &Simple{}, nil }, } handler := Handle(map[string]RESTStorage{ \"foo\": simpleStorage, }, codec, \"/prefix/version\", selfLinker)"} {"_id":"q-en-kubernetes-d58307d6d3f62eee4ec3902f33c9a26cfb7c897fa80d719b3190af58b52c7e62","text":"// records an event using ref, event msg. log to glog using prefix, msg, logFn func (m *imageManager) logIt(ref *v1.ObjectReference, eventtype, event, prefix, msg string, logFn func(args ...interface{})) { if ref != nil { m.recorder.Event(events.ToObjectReference(ref), eventtype, event, msg) m.recorder.Event(ref, eventtype, event, msg) } else { logFn(fmt.Sprint(prefix, \" \", msg)) }"} {"_id":"q-en-kubernetes-d598b75e9fc7534ebc4abb5cf12a97fd6d2fca3ea6306699d49ab9ee93e9375b","text":"if _, ok = t.objects[gvr][namespacedName]; ok { if replaceExisting { for _, w := range t.getWatches(gvr, ns) { w.Modify(obj) // To avoid the object from being accidentally modified by watcher w.Modify(obj.DeepCopyObject()) } t.objects[gvr][namespacedName] = obj return nil"} {"_id":"q-en-kubernetes-d59c3657f546d25f9ec3a5fbc423eaf632a0a0178b7ac7b311fe403031b8d701","text":"serviceAccountName: fluentd-gcp-scaler containers: - name: fluentd-gcp-scaler image: gcr.io/google-containers/fluentd-gcp-scaler:0.1 image: gcr.io/google-containers/fluentd-gcp-scaler:0.2 command: - /scaler.sh - --ds-name=fluentd-gcp-v3.0.0"} {"_id":"q-en-kubernetes-d5b996990ab915bf399dfd3aec7f2b777370c3e322f92ecca5a411bb2c1ba2fb","text":"func RunEdit(f *cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args []string, options *EditOptions) error { var printer kubectl.ResourcePrinter var ext string var addHeader bool switch format := cmdutil.GetFlagString(cmd, \"output\"); format { case \"json\": printer = &kubectl.JSONPrinter{} ext = \".json\" addHeader = false case \"yaml\": printer = &kubectl.YAMLPrinter{} ext = \".yaml\" addHeader = true default: return cmdutil.UsageError(cmd, \"The flag 'output' must be one of yaml|json\") }"} {"_id":"q-en-kubernetes-d5c5378f24fb46bd45f685f67eaff4fbed9650af9553afa78f5caa2dd351db0c","text":"dns_replicas: '$(echo \"$DNS_REPLICAS\" | sed -e \"s/'/''/g\")' dns_server: '$(echo \"$DNS_SERVER_IP\" | sed -e \"s/'/''/g\")' dns_domain: '$(echo \"$DNS_DOMAIN\" | sed -e \"s/'/''/g\")' instance_prefix: '$(echo \"$INSTANCE_PREFIX\" | sed -e \"s/'/''/g\")' EOF # Configure the salt-master"} {"_id":"q-en-kubernetes-d5d533fc778301049964f4ae9752b2bb6703e554d7614fc3e24d43e266658e28","text":"\"k8s.io/kubernetes/pkg/controlplane\" \"k8s.io/kubernetes/pkg/features\" \"k8s.io/kubernetes/test/integration/framework\" \"k8s.io/utils/ptr\" ) const ("} {"_id":"q-en-kubernetes-d5e11b6d776ba27758d557bf5a385539226d58ceb1166bfd256d021409372d6a","text":"// If \"only_cpu_and_memory\" GET param is true then only cpu and memory is returned in response. func (h *handler) handleSummary(request *restful.Request, response *restful.Response) { onlyCPUAndMemory := false request.Request.ParseForm() err := request.Request.ParseForm() if err != nil { handleError(response, \"/stats/summary\", errors.Wrapf(err, \"parse form failed\")) return } if onlyCluAndMemoryParam, found := request.Request.Form[\"only_cpu_and_memory\"]; found && len(onlyCluAndMemoryParam) == 1 && onlyCluAndMemoryParam[0] == \"true\" { onlyCPUAndMemory = true } var summary *statsapi.Summary var err error if onlyCPUAndMemory { summary, err = h.summaryProvider.GetCPUAndMemoryStats() } else {"} {"_id":"q-en-kubernetes-d62fe7207ea5c3cfe4b418d2ff45e09670447f8ae92dbda5af0eae6fc9e7e6da","text":" apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: echomap"} {"_id":"q-en-kubernetes-d64887a7ca095941c7d7f13b66a7628c6961c50e0dfc0628a57152cc5c0eeb44","text":"import ( \"context\" \"errors\" \"fmt\" \"io/ioutil\" \"net/http\""} {"_id":"q-en-kubernetes-d655ba88b93bc1d650e3e651e10e0193b765d4303a01c40d75fe8ffd0a88300b","text":"return true } } for _, c := range pod.Spec.InitContainers { if c.Name == containerName { return true } } return false }"} {"_id":"q-en-kubernetes-d67eb2c8061aec2396ea60df5989b444a242c6b0bc7dbf0635397675d841adb4","text":"\"github.com/Azure/go-autorest/autorest/to\" \"github.com/stretchr/testify/assert\" \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" ) func TestFindProbe(t *testing.T) {"} {"_id":"q-en-kubernetes-d69110f4e78f061a397baf38e81382a0d75906406ab53c89d7a4e5b28e404ec4","text":"}, nil } func (c *configFactory) getNextPod() *v1.Pod { pod, err := c.podQueue.Pop() if err == nil { klog.V(4).Infof(\"About to try and schedule pod %v/%v\", pod.Namespace, pod.Name) return pod } klog.Errorf(\"Error while retrieving next pod from scheduling queue: %v\", err) return nil } // assignedPod selects pods that are assigned (scheduled and running). func assignedPod(pod *v1.Pod) bool { return len(pod.Spec.NodeName) != 0"} {"_id":"q-en-kubernetes-d6963d0e1453ddcd554230e7f1287c9eb640f8000ea3f99e9aca8dd227cf3075","text":"CGROUP_ROOT=${CGROUP_ROOT:-\"\"} # name of the cgroup driver, i.e. cgroupfs or systemd CGROUP_DRIVER=${CGROUP_DRIVER:-\"\"} # owner of client certs, default to current user if not specified USER=${USER:-$(whoami)} # enables testing eviction scenarios locally. EVICTION_HARD=${EVICTION_HARD:-\"memory.available<100Mi\"}"} {"_id":"q-en-kubernetes-d6d3d8f8d081bf27aee9dc66b37e130ca3079e086e204de6ae07d97006e3beb8","text":"return nil, err } return newRuntimeVersion(typedVersion.Version) return newRuntimeVersion(typedVersion.RuntimeVersion) } // APIVersion returns the cached API version information of the container"} {"_id":"q-en-kubernetes-d6e352b13842b5df128e3b27c9b4d955b60634437d81caadc4683b0487255b0f","text":"// use kubeletServer to construct the default KubeletDeps kubeletDeps, err := app.UnsecuredDependencies(kubeletServer) if err != nil { die(err) } // add the kubelet config controller to kubeletDeps kubeletDeps.KubeletConfigController = kubeletConfigController"} {"_id":"q-en-kubernetes-d74dc590ea21d50cddd0907c06edcc753f64f733913efa949cb1729a10029737","text":"obj.CgroupDriver = \"cgroupfs\" } if obj.EnforceNodeAllocatable == nil { obj.EnforceNodeAllocatable = defaultNodeAllocatableEnforcement obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement } }"} {"_id":"q-en-kubernetes-d7510cc8968ea9338e33b5821c9e064913bc2a177cc951d0e83065f977f4b883","text":"package testutil import ( \"fmt\" \"io\" \"github.com/prometheus/client_golang/prometheus/testutil\" apimachineryversion \"k8s.io/apimachinery/pkg/version\" \"k8s.io/component-base/metrics\" )"} {"_id":"q-en-kubernetes-d75db80d926acf95c179839fb998106ab2e416852d194f096bb68a624512fe9d","text":"// alpha: v1.4 ExternalTrafficLocalOnly utilfeature.Feature = \"AllowExtTrafficLocalEndpoints\" // owner: @saad-ali // alpha: v1.3 DynamicVolumeProvisioning utilfeature.Feature = \"DynamicVolumeProvisioning\" // owner: @mtaufen // alpha: v1.4 DynamicKubeletConfig utilfeature.Feature = \"DynamicKubeletConfig\""} {"_id":"q-en-kubernetes-d76bd83d1ada350f58905f83f5af40df6159c71d92a0ef6b4f5140d0a1cc266a","text":"// For each groupversion served by our resourcemanager, create an APIService // object connected to our fake APIServer var groupVersions []metav1.GroupVersion for _, versionInfo := range basicTestGroup.Versions { groupVersion := metav1.GroupVersion{ Group: basicTestGroup.Name,"} {"_id":"q-en-kubernetes-d79222846c839f0972518666cdf1e2bb8c2efd0fef1215783d0e8054e2937936","text":"fi done errors_expect_error=() for file in \"${all_e2e_files[@]}\" do if grep \"Expect(.*).To(.*HaveOccurred()\" \"${file}\" > /dev/null then errors_expect_error+=( \"${file}\" ) fi done if [ ${#errors_expect_no_error[@]} -ne 0 ]; then { echo \"Errors:\""} {"_id":"q-en-kubernetes-d7d29938a2b35b8a721331322db29686973334ac33584ed7b65cbe2dbc60f559","text":"func (p *PriorityQueue) MoveAllToActiveQueue() { p.lock.Lock() defer p.lock.Unlock() // There is a chance of errors when adding pods to other queues, // we make a temporary slice to store the pods, // since the probability is low, we set its len to 0 addErrorPods := make([]*framework.PodInfo, 0) for _, pInfo := range p.unschedulableQ.podInfoMap { pod := pInfo.Pod if p.isPodBackingOff(pod) { if err := p.podBackoffQ.Add(pInfo); err != nil { klog.Errorf(\"Error adding pod %v to the backoff queue: %v\", pod.Name, err) addErrorPods = append(addErrorPods, pInfo) } } else { if err := p.activeQ.Add(pInfo); err != nil { klog.Errorf(\"Error adding pod %v to the scheduling queue: %v\", pod.Name, err) addErrorPods = append(addErrorPods, pInfo) } } } p.unschedulableQ.clear() // Adding pods that we could not move to Active queue or Backoff queue back to the Unschedulable queue for _, podInfo := range addErrorPods { p.unschedulableQ.addOrUpdate(podInfo) } p.moveRequestCycle = p.schedulingCycle p.cond.Broadcast() }"} {"_id":"q-en-kubernetes-d81d826c0b568967ac299f979b8aa864f36a8e5b8b2ba77ec450b070b17d9b2d","text":"if len(q.nominatedPods.nominatedPods) != 1 { t.Errorf(\"Expected nomindatePods to have one element: %v\", q.nominatedPods) } if q.unschedulableQ.get(&unschedulablePod) != &unschedulablePod { if getUnschedulablePod(q, &unschedulablePod) != &unschedulablePod { t.Errorf(\"Pod %v was not found in the unschedulableQ.\", unschedulablePod.Name) } }"} {"_id":"q-en-kubernetes-d82190b9d74ce6e83f0d3151b17f124972df97b0832eeca831773cc529e4e389","text":"// GetCustomResourceListerCollectionDeleter returns the ListerCollectionDeleter of // the given crd. func (r *crdHandler) GetCustomResourceListerCollectionDeleter(crd *apiextensions.CustomResourceDefinition) (finalizer.ListerCollectionDeleter, error) { info, err := r.getOrCreateServingInfoFor(crd) info, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name) if err != nil { return nil, err } return info.storages[info.storageVersion].CustomResource, nil } func (r *crdHandler) getOrCreateServingInfoFor(crd *apiextensions.CustomResourceDefinition) (*crdInfo, error) { // getOrCreateServingInfoFor gets the CRD serving info for the given CRD UID if the key exists in the storage map. // Otherwise the function fetches the up-to-date CRD using the given CRD name and creates CRD serving info. func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crdInfo, error) { storageMap := r.customStorage.Load().(crdStorageMap) if ret, ok := storageMap[crd.UID]; ok { if ret, ok := storageMap[uid]; ok { return ret, nil } r.customStorageLock.Lock() defer r.customStorageLock.Unlock() // Get the up-to-date CRD when we have the lock, to avoid racing with updateCustomResourceDefinition. // If updateCustomResourceDefinition sees an update and happens later, the storage will be deleted and // we will re-create the updated storage on demand. If updateCustomResourceDefinition happens before, // we make sure that we observe the same up-to-date CRD. crd, err := r.crdLister.Get(name) if err != nil { return nil, err } storageMap = r.customStorage.Load().(crdStorageMap) if ret, ok := storageMap[crd.UID]; ok { return ret, nil"} {"_id":"q-en-kubernetes-d8358d5ecc272313f81361f5bd38ccfd10e6d1bc93dff67270e84845ef6f650f","text":"else echo \"Detecting nodes in the cluster\" detect-node-names &> /dev/null node_names=( \"${NODE_NAMES[@]}\" ) if [[ -n \"${NODE_NAMES:-}\" ]]; then node_names=( \"${NODE_NAMES[@]}\" ) fi fi if [[ \"${#node_names[@]}\" == 0 ]]; then"} {"_id":"q-en-kubernetes-d875ac96ed630eb2f47da899ab78a799b5d8ad7a25df92d9af6780d887b8115f","text":"// 3. While a volume is being unmounted, add it back to the desired state of world t.Logf(\"UnmountDevice called\") generatedVolumeName, err = dsw.AddPodToVolume( podName, pod, volumeSpec, volumeSpec.Name(), \"\" /* volumeGidValue */) podName, pod, volumeSpecCopy, volumeSpec.Name(), \"\" /* volumeGidValue */) dsw.MarkVolumesReportedInUse([]v1.UniqueVolumeName{generatedVolumeName}) return nil }"} {"_id":"q-en-kubernetes-d89426e4d59a52343c0a8d8553b501065ad3fccf139b70da4769bdf0e54bfd16","text":"klog.V(4).Infof(\"GetHostsInZone %v returning: %v\", zoneFailureDomain, hosts) return hosts, nil } func (nm *NodeManager) SetNodeLister(nodeLister corelisters.NodeLister) { nm.nodeLister = nodeLister } func (nm *NodeManager) SetNodeGetter(nodeGetter coreclients.NodesGetter) { nm.nodeGetter = nodeGetter } "} {"_id":"q-en-kubernetes-d8b5b7b988afec59cb144f82f6ded70ab20fcd0503af6cd9b83fc8c6e56348dc","text":"} if !proxier.lbWhiteListCIDRSet.isEmpty() || !proxier.lbWhiteListIPSet.isEmpty() { // link kube-services chain -> kube-fire-wall chain args := []string{\"-m\", \"set\", \"--match-set\", proxier.lbIngressSet.Name, \"dst,dst\", \"-j\", string(KubeFireWallChain)} if _, err := proxier.iptables.EnsureRule(utiliptables.Append, utiliptables.TableNAT, kubeServicesChain, args...); err != nil { glog.Errorf(\"Failed to ensure that ipset %s chain %s jumps to %s: %v\", proxier.lbIngressSet.Name, kubeServicesChain, KubeFireWallChain, err) args := []string{ \"-A\", string(kubeServicesChain), \"-m\", \"set\", \"--match-set\", proxier.lbIngressSet.Name, \"dst,dst\", \"-j\", string(KubeFireWallChain), } writeLine(proxier.natRules, args...) if !proxier.lbWhiteListCIDRSet.isEmpty() { args = append(args[:0], \"-A\", string(KubeFireWallChain),"} {"_id":"q-en-kubernetes-d8c8a47f42319517c58f8d3f0acd0568d8385e0f30dbd5592de64822a157c028","text":"command := app.NewProxyCommand() utilflag.InitFlags() // TODO: once we switch everything over to Cobra commands, we can go back to calling // utilflag.InitFlags() (by removing its pflag.Parse() call). For now, we have to set the // normalize func and add the go flag set by hand. pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc) pflag.CommandLine.AddGoFlagSet(goflag.CommandLine) // utilflag.InitFlags() logs.InitLogs() defer logs.FlushLogs()"} {"_id":"q-en-kubernetes-d8cb1f19665fd35c093ff2d6b5e92561d61ddb068316fd33d88f30cddc1835bc","text":"public List getSeeds() { List list = new ArrayList(); String host = getEnvOrDefault(\"KUBERNETES_API_HOST\",\"https://kubernetes.default.svc.cluster.local\"); //String host = \"https://kubernetes.default.svc.cluster.local\"; String proto = \"https://\"; String host = getEnvOrDefault(\"KUBERNETES_PORT_443_TCP_ADDR\", \"kubernetes.default.svc.cluster.local\"); String port = getEnvOrDefault(\"KUBERNETES_PORT_443_TCP_PORT\", \"443\"); String serviceName = getEnvOrDefault(\"CASSANDRA_SERVICE\", \"cassandra\"); String podNamespace = getEnvOrDefault(\"POD_NAMESPACE\", \"default\"); String path = String.format(\"/api/v1/namespaces/%s/endpoints/\", podNamespace);"} {"_id":"q-en-kubernetes-d903c70391408301b82a28ba5be1e2446764d2f22e53a18ccaf9c3045507ad51","text":"\"//federation/pkg/dnsprovider/providers/aws/route53/stubs:go_default_library\", \"//federation/pkg/dnsprovider/rrstype:go_default_library\", \"//vendor/github.com/aws/aws-sdk-go/aws:go_default_library\", \"//vendor/github.com/aws/aws-sdk-go/aws/awserr:go_default_library\", \"//vendor/github.com/aws/aws-sdk-go/aws/request:go_default_library\", \"//vendor/github.com/aws/aws-sdk-go/aws/session:go_default_library\", \"//vendor/github.com/aws/aws-sdk-go/service/route53:go_default_library\","} {"_id":"q-en-kubernetes-d92b26e3f29fd85ffd8d12f41a60d2ee1b31620042919a31389d9af0405ecbc4","text":"Name: stats.Attributes.Metadata.Name, // The StartTime in the summary API is the container creation time. StartTime: metav1.NewTime(time.Unix(0, container.CreatedAt)), // Work around heapster bug. https://github.com/kubernetes/kubernetes/issues/54962 // TODO(random-liu): Remove this after heapster is updated to newer than 1.5.0-beta.0. CPU: &statsapi.CPUStats{ UsageNanoCores: proto.Uint64(0), }, Memory: &statsapi.MemoryStats{ RSSBytes: proto.Uint64(0), }, Rootfs: &statsapi.FsStats{}, CPU: &statsapi.CPUStats{}, Memory: &statsapi.MemoryStats{}, Rootfs: &statsapi.FsStats{}, // UserDefinedMetrics is not supported by CRI. } if stats.Cpu != nil {"} {"_id":"q-en-kubernetes-d960957fb25b6ed083708366c18bc6011e015213511483bf1612eb244312e04f","text":"// Check that container has restarted ginkgo.By(\"Waiting for container to restart\") restarts := int32(0) err = wait.PollImmediate(10*time.Second, 2*time.Minute, func() (bool, error) { err = wait.PollImmediate(10*time.Second, framework.PodStartTimeout, func() (bool, error) { pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(context.TODO(), pod.Name, metav1.GetOptions{}) if err != nil { return false, err"} {"_id":"q-en-kubernetes-d9840f6b95fc8cc6de4cbc563a6af2483777eb1425e61637d19a25daa52ea419","text":"local params=\"${API_SERVER_TEST_LOG_LEVEL:-\"--v=2\"} ${APISERVER_TEST_ARGS:-} ${CLOUD_CONFIG_OPT}\" params+=\" --address=127.0.0.1\" params+=\" --allow-privileged=true\" params+=\" --authorization-policy-file=/etc/srv/kubernetes/abac-authz-policy.jsonl\" params+=\" --cloud-provider=gce\" params+=\" --client-ca-file=/etc/srv/kubernetes/ca.crt\" params+=\" --etcd-servers=http://127.0.0.1:2379\""} {"_id":"q-en-kubernetes-d9bf03b0ffcd343e6d5abdd60ec147cfc30066333d16956c91537bd4b86ab2fc","text":"go_rules_dependencies() go_register_toolchains( go_version = \"1.8.3\", go_version = \"1.9.1\", ) docker_repositories()"} {"_id":"q-en-kubernetes-d9d90dd0b41d623d0c3da08848cc5033a6ca47f3f77cce5be71d3d54a5d33353","text":"metadataVMName: \"node2\", expected: false, }, { nodeName: \"vmss000001\", metadataVMName: \"vmss_1\", expected: true, }, { nodeName: \"vmss_2\", metadataVMName: \"vmss000000\", expected: false, }, { nodeName: \"vmss123456\", metadataVMName: \"vmss_$123\", expected: false, expectedErrMsg: fmt.Errorf(\"failed to parse VMSS instanceID %q: strconv.ParseInt: parsing %q: invalid syntax\", \"$123\", \"$123\"), }, } for _, test := range testcases {"} {"_id":"q-en-kubernetes-d9e176c98a14210958140c5326610f4506dd57772db50c629a21c5aaad44432b","text":"} redacted := string(redactedBytes) dataOmitted := string(dataOmittedBytes) if len(mutatingConfig.Clusters) != 2 { t.Errorf(\"unexpected clusters: %v\", mutatingConfig.Clusters) } if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { t.Errorf(\"expected %v, got %v\", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) } if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != redacted { t.Errorf(\"expected %v, got %v\", redacted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != dataOmitted { t.Errorf(\"expected %v, got %v\", dataOmitted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) } if len(mutatingConfig.AuthInfos) != 2 {"} {"_id":"q-en-kubernetes-da1e41092a700a5cf24d55f5f1e92f229b49ab40bd2e6696389f99d34df9b107","text":"return fmt.Sprintf(\"%s/%d/%s\", ds.UID, ds.Status.ObservedGeneration, nodeName) } // getPodsWithoutNode returns list of pods assigned to not existing nodes. func getPodsWithoutNode(runningNodesList []*v1.Node, nodeToDaemonPods map[string][]*v1.Pod) []string { // getUnscheduledPodsWithoutNode returns list of unscheduled pods assigned to not existing nodes. // Returned pods can't be deleted by PodGCController so they should be deleted by DaemonSetController. func getUnscheduledPodsWithoutNode(runningNodesList []*v1.Node, nodeToDaemonPods map[string][]*v1.Pod) []string { var results []string isNodeRunning := make(map[string]bool) for _, node := range runningNodesList {"} {"_id":"q-en-kubernetes-da270a0533568f3a1745f6706e91f32c9cbd190f4f788acceddc897c21cf5b8b","text":"\"k8s.io/kubernetes/pkg/api/latest\" \"k8s.io/kubernetes/pkg/api/unversioned\" client \"k8s.io/kubernetes/pkg/client/unversioned\" \"k8s.io/kubernetes/pkg/labels\" \"k8s.io/kubernetes/pkg/util\" \"k8s.io/kubernetes/pkg/util/wait\" )"} {"_id":"q-en-kubernetes-da2970a6da449e89cadc228642b347181e61a20c034d0537dc8e1f52fc895643","text":"Container Runtime Conformance Test container runtime conformance blackbox test when starting a container that exits should report termination message if TerminationMessagePath is set,timothysc,1 DNS horizontal autoscaling kube-dns-autoscaler should scale kube-dns pods in both nonfaulty and faulty scenarios,MrHohn,0 DNS horizontal autoscaling kube-dns-autoscaler should scale kube-dns pods when cluster size changed,MrHohn,0 ContainerLogPath Pod with a container printed log to stdout should print log to correct log path,resouer,0 DNS should provide DNS for ExternalName services,rmmh,1 DNS should provide DNS for pods for Hostname and Subdomain Annotation,mtaufen,1 DNS should provide DNS for services,roberthbailey,1"} {"_id":"q-en-kubernetes-da2b0a9dc02465e7860624cb8bde5e6bc931c37cd9a2a8890c87692399c35d13","text":"sed -i'' -e \"s@{{kubemark_image_registry}}@${KUBEMARK_IMAGE_REGISTRY}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{kubemark_image_tag}}@${KUBEMARK_IMAGE_TAG}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{master_ip}}@${MASTER_IP}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{hollow_kubelet_params}}@${HOLLOW_KUBELET_TEST_ARGS}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{hollow_proxy_params}}@${HOLLOW_PROXY_TEST_ARGS}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{hollow_kubelet_params}}@${hollow_kubelet_params}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{hollow_proxy_params}}@${hollow_proxy_params}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" sed -i'' -e \"s@{{kubemark_mig_config}}@${KUBEMARK_MIG_CONFIG:-}@g\" \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" \"${KUBECTL}\" create -f \"${RESOURCE_DIRECTORY}/hollow-node.yaml\" --namespace=\"kubemark\""} {"_id":"q-en-kubernetes-da53197942f8e1d3aa406e4ec8e05b4e57562dedfc18b94f1c6fee7b996faa74","text":"Containers: []v1.Container{ { Name: \"nfs-provisioner\", Image: \"quay.io/kubernetes_incubator/nfs-provisioner:v2.2.0-k8s1.12\", Image: \"quay.io/kubernetes_incubator/nfs-provisioner:v2.2.2\", SecurityContext: &v1.SecurityContext{ Capabilities: &v1.Capabilities{ Add: []v1.Capability{\"DAC_READ_SEARCH\"},"} {"_id":"q-en-kubernetes-da85d92549f64a4b7db1e845ff889721f57ba8731336d77e62922ca973e26712","text":"} } func TestDeletingPodForRollingUpdatePartition(t *testing.T) { _, ctx := ktesting.NewTestContext(t) closeFn, rm, informers, c := scSetup(ctx, t) defer closeFn() ns := framework.CreateNamespaceOrDie(c, \"test-deleting-pod-for-rolling-update-partition\", t) defer framework.DeleteNamespaceOrDie(c, ns, t) cancel := runControllerAndInformers(rm, informers) defer cancel() labelMap := labelMap() sts := newSTS(\"sts\", ns.Name, 2) sts.Spec.UpdateStrategy = appsv1.StatefulSetUpdateStrategy{ Type: appsv1.RollingUpdateStatefulSetStrategyType, RollingUpdate: func() *appsv1.RollingUpdateStatefulSetStrategy { return &appsv1.RollingUpdateStatefulSetStrategy{ Partition: ptr.To[int32](1), } }(), } stss, _ := createSTSsPods(t, c, []*appsv1.StatefulSet{sts}, []*v1.Pod{}) sts = stss[0] waitSTSStable(t, c, sts) // Verify STS creates 2 pods podClient := c.CoreV1().Pods(ns.Name) pods := getPods(t, podClient, labelMap) if len(pods.Items) != 2 { t.Fatalf(\"len(pods) = %d, want 2\", len(pods.Items)) } // Setting all pods in Running, Ready, and Available setPodsReadyCondition(t, c, &v1.PodList{Items: pods.Items}, v1.ConditionTrue, time.Now()) // 1. Roll out a new image. oldImage := sts.Spec.Template.Spec.Containers[0].Image newImage := \"new-image\" if oldImage == newImage { t.Fatalf(\"bad test setup, statefulSet %s roll out with the same image\", sts.Name) } // Set finalizers for the pod-0 to trigger pod recreation failure while the status UpdateRevision is bumped pod0 := &pods.Items[0] updatePod(t, podClient, pod0.Name, func(pod *v1.Pod) { pod.Finalizers = []string{\"fake.example.com/blockDeletion\"} }) stsClient := c.AppsV1().StatefulSets(ns.Name) _ = updateSTS(t, stsClient, sts.Name, func(sts *appsv1.StatefulSet) { sts.Spec.Template.Spec.Containers[0].Image = newImage }) // Await for the pod-1 to be recreated, while pod-0 remains running if err := wait.PollUntilContextTimeout(ctx, pollInterval, pollTimeout, false, func(ctx context.Context) (bool, error) { ss, err := stsClient.Get(ctx, sts.Name, metav1.GetOptions{}) if err != nil { return false, err } pods := getPods(t, podClient, labelMap) recreatedPods := v1.PodList{} for _, pod := range pods.Items { if pod.Status.Phase == v1.PodPending { recreatedPods.Items = append(recreatedPods.Items, pod) } } setPodsReadyCondition(t, c, &v1.PodList{Items: recreatedPods.Items}, v1.ConditionTrue, time.Now()) return ss.Status.UpdatedReplicas == *ss.Spec.Replicas-*sts.Spec.UpdateStrategy.RollingUpdate.Partition && ss.Status.Replicas == *ss.Spec.Replicas && ss.Status.ReadyReplicas == *ss.Spec.Replicas, nil }); err != nil { t.Fatalf(\"failed to await for pod-1 to be recreated by sts %s: %v\", sts.Name, err) } // Mark pod-0 as terminal and not ready updatePodStatus(t, podClient, pod0.Name, func(pod *v1.Pod) { pod.Status.Phase = v1.PodFailed }) // Make sure pod-0 gets deletion timestamp so that it is recreated if err := c.CoreV1().Pods(ns.Name).Delete(context.TODO(), pod0.Name, metav1.DeleteOptions{}); err != nil { t.Fatalf(\"error deleting pod %s: %v\", pod0.Name, err) } // Await for pod-0 to be not ready if err := wait.PollUntilContextTimeout(ctx, pollInterval, pollTimeout, false, func(ctx context.Context) (bool, error) { ss, err := stsClient.Get(ctx, sts.Name, metav1.GetOptions{}) if err != nil { return false, err } return ss.Status.ReadyReplicas == *ss.Spec.Replicas-1, nil }); err != nil { t.Fatalf(\"failed to await for pod-0 to be not counted as ready in status of sts %s: %v\", sts.Name, err) } // Remove the finalizer to allow recreation updatePod(t, podClient, pod0.Name, func(pod *v1.Pod) { pod.Finalizers = []string{} }) // Await for pod-0 to be recreated and make it running if err := wait.PollUntilContextTimeout(ctx, pollInterval, pollTimeout, false, func(ctx context.Context) (bool, error) { pods := getPods(t, podClient, labelMap) recreatedPods := v1.PodList{} for _, pod := range pods.Items { if pod.Status.Phase == v1.PodPending { recreatedPods.Items = append(recreatedPods.Items, pod) } } setPodsReadyCondition(t, c, &v1.PodList{Items: recreatedPods.Items}, v1.ConditionTrue, time.Now().Add(-120*time.Minute)) return len(recreatedPods.Items) > 0, nil }); err != nil { t.Fatalf(\"failed to await for pod-0 to be recreated by sts %s: %v\", sts.Name, err) } // Await for all stateful set status to record all replicas as ready if err := wait.PollUntilContextTimeout(ctx, pollInterval, pollTimeout, false, func(ctx context.Context) (bool, error) { ss, err := stsClient.Get(ctx, sts.Name, metav1.GetOptions{}) if err != nil { return false, err } return ss.Status.ReadyReplicas == *ss.Spec.Replicas, nil }); err != nil { t.Fatalf(\"failed to verify .Spec.Template.Spec.Containers[0].Image is updated for sts %s: %v\", sts.Name, err) } // Verify 3 pods exist pods = getPods(t, podClient, labelMap) if len(pods.Items) != int(*sts.Spec.Replicas) { t.Fatalf(\"Unexpected number of pods\") } // Verify pod images for i := range pods.Items { if i < int(*sts.Spec.UpdateStrategy.RollingUpdate.Partition) { if pods.Items[i].Spec.Containers[0].Image != oldImage { t.Fatalf(\"Pod %s has image %s not equal to old image %s\", pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, oldImage) } } else { if pods.Items[i].Spec.Containers[0].Image != newImage { t.Fatalf(\"Pod %s has image %s not equal to new image %s\", pods.Items[i].Name, pods.Items[i].Spec.Containers[0].Image, newImage) } } } } func TestStatefulSetStartOrdinal(t *testing.T) { tests := []struct { ordinals *appsv1.StatefulSetOrdinals"} {"_id":"q-en-kubernetes-da94c4cc3bb21d2bc3ad8c1a76a8829b20a25b98d8ed4b9b129df9675ff80592","text":"testReadFile(input.f, input.filePathInSubpath, input.pod, 0) }) It(\"should fail for new directories when readOnly specified in the volumeSource [Slow]\", func() { if input.roVol == nil { framework.Skipf(\"Volume type %v doesn't support readOnly source\", input.volType) } // Format the volume while it's writable formatVolume(input.f, input.formatPod) // Set volume source to read only input.pod.Spec.Volumes[0].VolumeSource = *input.roVol // Pod should fail testPodFailSubpathError(input.f, input.pod, \"\") }) // TODO: add a test case for the same disk with two partitions }"} {"_id":"q-en-kubernetes-dacfbb60b8332c0c62dadb5b538ee9defcdb63b70df5f58e4e2a89910f5f3803","text":"priorityClassName: system-node-critical hostNetwork: true nodeSelector: # TODO(liggitt): switch to node.kubernetes.io/kube-proxy-ds-ready in 1.16 beta.kubernetes.io/kube-proxy-ds-ready: \"true\" node.kubernetes.io/kube-proxy-ds-ready: \"true\" tolerations: - operator: \"Exists\" effect: \"NoExecute\""} {"_id":"q-en-kubernetes-dae7682f0872fbd36e6677538156df35bd514bc78b01ff6015caa6565b38b4d3","text":"create-kube-controller-manager-opts '${NODE_IPS}' create-kube-scheduler-opts create-flanneld-opts '127.0.0.1' '${MASTER_IP}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' FLANNEL_OTHER_NET_CONFIG='${FLANNEL_OTHER_NET_CONFIG}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' ${BASH_DEBUG_FLAGS} cp ~/kube/default/* /etc/default/"} {"_id":"q-en-kubernetes-dafa5b1f678212301837456775a8e4b09e095095055e34f4f0a6e870bc468b0c","text":"return oomScoreAdj } // getCachedVersionInfo gets cached version info of docker runtime. func (dm *DockerManager) getCachedVersionInfo() (kubecontainer.Version, kubecontainer.Version, error) { apiVersion, daemonVersion, err := dm.versionCache.Get(dm.machineInfo.MachineID) if err != nil { glog.Errorf(\"Failed to get cached docker api version %v \", err) } // If we got nil versions, try to update version info. if apiVersion == nil || daemonVersion == nil { dm.versionCache.Update(dm.machineInfo.MachineID) } return apiVersion, daemonVersion, err } // checkDockerAPIVersion checks current docker API version against expected version. // Return: // 1 : newer than expected version // -1: older than expected version // 0 : same version func (dm *DockerManager) checkDockerAPIVersion(expectedVersion string) (int, error) { apiVersion, _, err := dm.getCachedVersionInfo() apiVersion, _, err := dm.getVersionInfo() if err != nil { return 0, err }"} {"_id":"q-en-kubernetes-db1b59401647c7c5da74e952ce4a065115be469cf022f0ac1544563e6683e821","text":" amd64=fedora:28 arm64=arm64v8/fedora:28 ppc64le=ppc64le/fedora:28 amd64=fedora:26 arm64=arm64v8/fedora:26 ppc64le=ppc64le/fedora:26 "} {"_id":"q-en-kubernetes-db9de83127d04f305a4428beba88d40c4a21863e1ba43306042b9c4889c97b98","text":"return err } // GetDiskLun finds the lun on the host that the vhd is attached to, given a vhd's diskName and diskURI func (as *availabilitySet) GetDiskLun(diskName, diskURI string, nodeName types.NodeName) (int32, error) { // GetDataDisks gets a list of data disks attached to the node. func (as *availabilitySet) GetDataDisks(nodeName types.NodeName) ([]compute.DataDisk, error) { vm, err := as.getVirtualMachine(nodeName) if err != nil { return -1, err } disks := *vm.StorageProfile.DataDisks for _, disk := range disks { if disk.Lun != nil && (disk.Name != nil && diskName != \"\" && *disk.Name == diskName) || (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != \"\" && *disk.Vhd.URI == diskURI) || (disk.ManagedDisk != nil && *disk.ManagedDisk.ID == diskURI) { // found the disk glog.V(4).Infof(\"azureDisk - find disk: lun %d name %q uri %q\", *disk.Lun, diskName, diskURI) return *disk.Lun, nil } } return -1, fmt.Errorf(\"Cannot find Lun for disk %s\", diskName) } // GetNextDiskLun searches all vhd attachment on the host and find unused lun // return -1 if all luns are used func (as *availabilitySet) GetNextDiskLun(nodeName types.NodeName) (int32, error) { vm, err := as.getVirtualMachine(nodeName) if err != nil { return -1, err } used := make([]bool, maxLUN) disks := *vm.StorageProfile.DataDisks for _, disk := range disks { if disk.Lun != nil { used[*disk.Lun] = true } } for k, v := range used { if !v { return int32(k), nil } } return -1, fmt.Errorf(\"All Luns are used\") } // DisksAreAttached checks if a list of volumes are attached to the node with the specified NodeName func (as *availabilitySet) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { attached := make(map[string]bool) for _, diskName := range diskNames { attached[diskName] = false } vm, err := as.getVirtualMachine(nodeName) if err == cloudprovider.InstanceNotFound { // if host doesn't exist, no need to detach glog.Warningf(\"azureDisk - Cannot find node %q, DisksAreAttached will assume disks %v are not attached to it.\", nodeName, diskNames) return attached, nil } else if err != nil { return attached, err return nil, err } disks := *vm.StorageProfile.DataDisks for _, disk := range disks { for _, diskName := range diskNames { if disk.Name != nil && diskName != \"\" && *disk.Name == diskName { attached[diskName] = true } } if vm.StorageProfile.DataDisks == nil { return nil, nil } return attached, nil return *vm.StorageProfile.DataDisks, nil }"} {"_id":"q-en-kubernetes-dbc082ab114bdf814f731e9376aaa6593265e824bbad5f9e7de0b6f40b1f025c","text":"client, ns, labels.SelectorFromSet(labels.Set(rc.Spec.Selector))) } } func getPodLogs(c *client.Client, namespace, podName, containerName string) (string, error) { return getPodLogsInternal(c, namespace, podName, containerName, false) } func getPreviousPodLogs(c *client.Client, namespace, podName, containerName string) (string, error) { return getPodLogsInternal(c, namespace, podName, containerName, true) } // utility function for gomega Eventually func getPodLogsInternal(c *client.Client, namespace, podName, containerName string, previous bool) (string, error) { logs, err := c.Get(). Resource(\"pods\"). Namespace(namespace). Name(podName).SubResource(\"log\"). Param(\"container\", containerName). Param(\"previous\", strconv.FormatBool(previous)). Do(). Raw() if err != nil { return \"\", err } if err == nil && strings.Contains(string(logs), \"Internal Error\") { return \"\", fmt.Errorf(\"Fetched log contains \"Internal Error\": %q.\", string(logs)) } return string(logs), err } "} {"_id":"q-en-kubernetes-dbd04dbee5e158e40a7171bd688972b357ded9528bfbfc4373daf47c0c495ad3","text":"t *testing.T, expectedAttachCallCount int, fakePlugin *volumetesting.FakeVolumePlugin) { if len(fakePlugin.Attachers) == 0 && expectedAttachCallCount == 0 { if len(fakePlugin.GetAttachers()) == 0 && expectedAttachCallCount == 0 { return } err := retryWithExponentialBackOff( time.Duration(5*time.Millisecond), func() (bool, error) { for i, attacher := range fakePlugin.Attachers { for i, attacher := range fakePlugin.GetAttachers() { actualCallCount := attacher.GetAttachCallCount() if actualCallCount == expectedAttachCallCount { return true, nil"} {"_id":"q-en-kubernetes-dbe4dfc4c44650bb7cfc5e94bdb838651fc50b1a966363ce44ae72f85b1084ec","text":") const ( probeTimeOut = time.Minute probeTimeOut = 20 * time.Second ) // TODO: this basic interface is duplicated in N places. consolidate?"} {"_id":"q-en-kubernetes-dbe63af62afeaa357339e2516839a12bd7a5f7f16fe419dcd206539efe8a4ceb","text":"rbdImageSizeUnitMiB = 1024 * 1024 ) // A struct contains rbd image info. type rbdImageInfo struct { pool string name string } func getDevFromImageAndPool(pool, image string) (string, bool) { device, found := getRbdDevFromImageAndPool(pool, image) if found {"} {"_id":"q-en-kubernetes-dbfbda2f88574957b82a5dd48e8d2d4f3f3b199a67b78319e88ec659c8539d1c","text":"job.Spec.Template.Spec.RestartPolicy = v1.RestartPolicyOnFailure sharedInformerFactory.Batch().V1().Jobs().Informer().GetIndexer().Add(job) podIndexer := sharedInformerFactory.Core().V1().Pods().Informer().GetIndexer() for i, pod := range newPodList(int32(len(tc.restartCounts)), v1.PodRunning, job) { for i, pod := range newPodList(int32(len(tc.restartCounts)), tc.podPhase, job) { pod.Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: tc.restartCounts[i]}} podIndexer.Add(&pod) }"} {"_id":"q-en-kubernetes-dc1ab924eec63e956eefd33df4f146060150af537a0d38a9db02f2999199bc4f","text":" /* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package service import ( \"bytes\" \"context\" \"encoding/base64\" \"fmt\" \"math/rand\" \"net\" \"os\" \"path/filepath\" \"testing\" \"time\" \"google.golang.org/grpc\" \"google.golang.org/grpc/credentials/insecure\" kmsapi \"k8s.io/kms/apis/v2alpha1\" ) const version = \"v2alpha1\" func TestGRPCService(t *testing.T) { t.Parallel() defaultTimeout := 30 * time.Second ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout) t.Cleanup(cancel) address := filepath.Join(os.TempDir(), \"kmsv2.sock\") plaintext := []byte(\"lorem ipsum dolor sit amet\") r := rand.New(rand.NewSource(time.Now().Unix())) id, err := makeID(r.Read) if err != nil { t.Fatal(err) } kmsService := newBase64Service(id) server := NewGRPCService(address, defaultTimeout, kmsService) go func() { if err := server.ListenAndServe(); err != nil { panic(err) } }() t.Cleanup(server.Shutdown) client := newClient(t, address) t.Run(\"should be able to encrypt and decrypt through unix domain sockets\", func(t *testing.T) { t.Parallel() encRes, err := client.Encrypt(ctx, &kmsapi.EncryptRequest{ Plaintext: plaintext, Uid: id, }) if err != nil { t.Fatal(err) } if bytes.Equal(plaintext, encRes.Ciphertext) { t.Fatal(\"plaintext and ciphertext shouldn't be equal!\") } decRes, err := client.Decrypt(ctx, &kmsapi.DecryptRequest{ Ciphertext: encRes.Ciphertext, KeyId: encRes.KeyId, Annotations: encRes.Annotations, Uid: id, }) if err != nil { t.Fatal(err) } if !bytes.Equal(decRes.Plaintext, plaintext) { t.Errorf(\"want: %q, have: %q\", plaintext, decRes.Plaintext) } }) t.Run(\"should return status data\", func(t *testing.T) { t.Parallel() status, err := client.Status(ctx, &kmsapi.StatusRequest{}) if err != nil { t.Fatal(err) } if status.Healthz != \"ok\" { t.Errorf(\"want: %q, have: %q\", \"ok\", status.Healthz) } if len(status.KeyId) == 0 { t.Errorf(\"want: len(keyID) > 0, have: %d\", len(status.KeyId)) } if status.Version != version { t.Errorf(\"want %q, have: %q\", version, status.Version) } }) } func newClient(t *testing.T, address string) kmsapi.KeyManagementServiceClient { t.Helper() cnn, err := grpc.Dial( address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDialer(func(addr string, t time.Duration) (net.Conn, error) { return net.Dial(\"unix\", addr) }), ) if err != nil { t.Fatal(err) } t.Cleanup(func() { _ = cnn.Close() }) return kmsapi.NewKeyManagementServiceClient(cnn) } type testService struct { decrypt func(ctx context.Context, uid string, req *DecryptRequest) ([]byte, error) encrypt func(ctx context.Context, uid string, data []byte) (*EncryptResponse, error) status func(ctx context.Context) (*StatusResponse, error) } var _ Service = (*testService)(nil) func (s *testService) Decrypt(ctx context.Context, uid string, req *DecryptRequest) ([]byte, error) { return s.decrypt(ctx, uid, req) } func (s *testService) Encrypt(ctx context.Context, uid string, data []byte) (*EncryptResponse, error) { return s.encrypt(ctx, uid, data) } func (s *testService) Status(ctx context.Context) (*StatusResponse, error) { return s.status(ctx) } func makeID(rand func([]byte) (int, error)) (string, error) { b := make([]byte, 10) if _, err := rand(b); err != nil { return \"\", err } return base64.StdEncoding.EncodeToString(b), nil } func newBase64Service(keyID string) *testService { decrypt := func(_ context.Context, _ string, req *DecryptRequest) ([]byte, error) { if req.KeyID != keyID { return nil, fmt.Errorf(\"keyID mismatch. want: %q, have: %q\", keyID, req.KeyID) } return base64.StdEncoding.DecodeString(string(req.Ciphertext)) } encrypt := func(_ context.Context, _ string, data []byte) (*EncryptResponse, error) { return &EncryptResponse{ Ciphertext: []byte(base64.StdEncoding.EncodeToString(data)), KeyID: keyID, }, nil } status := func(_ context.Context) (*StatusResponse, error) { return &StatusResponse{ Version: version, Healthz: \"ok\", KeyID: keyID, }, nil } return &testService{ decrypt: decrypt, encrypt: encrypt, status: status, } } "} {"_id":"q-en-kubernetes-dc70d6005f083f2a6b41c6aa4503f2ed205d90d667bd54ee81cc7aeec98c5032","text":"\"Logs\": BeNil(), \"UserDefinedMetrics\": BeEmpty(), }) systemContainers := gstruct.Elements{ \"kubelet\": sysContExpectations, \"runtime\": sysContExpectations, } // The Kubelet only manages the 'misc' system container if the host is not running systemd. if !systemdutil.IsRunningSystemd() { framework.Logf(\"Host not running systemd; expecting 'misc' system container.\") systemContainers[\"misc\"] = sysContExpectations } // Expectations for pods. podExpectations := gstruct.MatchAllFields(gstruct.Fields{ \"PodRef\": gstruct.Ignore(),"} {"_id":"q-en-kubernetes-dcdd95f6dcd5c34cb54a8efd2df224cd1fc099e4e41352c736c7eabfa466eb5a","text":"// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // EncryptionConfiguration stores the complete configuration for encryption providers. /* EncryptionConfiguration stores the complete configuration for encryption providers. example: kind: EncryptionConfiguration apiVersion: apiserver.config.k8s.io/v1 resources: - resources: - secrets - configmaps - pandas.awesome.bears.example providers: - aescbc: keys: - name: key1 secret: c2VjcmV0IGlzIHNlY3VyZQ== */ type EncryptionConfiguration struct { metav1.TypeMeta // resources is a list containing resources, and their corresponding encryption providers."} {"_id":"q-en-kubernetes-dcddd04fa78b4e83b24595824a6413223ee6c70020bbd4491fd0da797fc81d65","text":"import ( \"fmt\" \"net/http/httptest\" \"testing\" \"k8s.io/kubernetes/pkg/api\""} {"_id":"q-en-kubernetes-dce1fa08f444ae324ae3cd65da1871cc642b323b99ba50bebddf8d23db6d3529","text":"./hack/test-cmd.sh ./hack/test-integration.sh ./hack/test-update-storage-objects.sh"} {"_id":"q-en-kubernetes-dced4a85b86a6d99fde415c82d418f97edd2225575fc6e84584374a82ae503c0","text":"klog.Errorf(\"scheduler cache AddNode failed: %v\", err) } klog.V(3).Infof(\"add event for node %q\", node.Name) sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.NodeAdd) }"} {"_id":"q-en-kubernetes-dceee20e81a639b0bb371ee9334ff07ee751bc2861752d95bf25e211e4e93742","text":"} func (kvh *kubeletVolumeHost) GetPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { return kvh.kubelet.getPodVolumeDir(podUID, pluginName, volumeName) dir := kvh.kubelet.getPodVolumeDir(podUID, pluginName, volumeName) if runtime.GOOS == \"windows\" { dir = volume.GetWindowsPath(dir) } return dir } func (kvh *kubeletVolumeHost) GetPodVolumeDeviceDir(podUID types.UID, pluginName string) string {"} {"_id":"q-en-kubernetes-dd162b9c51d51523549ad21ce4a9649ce70db7556783795df6a52afd80711ac9","text":"// TestTimeout is used for most polling/waiting activities TestTimeout = 60 * time.Second // AffinityTimeout is the maximum time that CheckAffinity is allowed to take; this // needs to be more than long enough for AffinityConfirmCount HTTP requests to // complete in a busy CI cluster, but shouldn't be too long since we will end up // waiting the entire time in the tests where affinity is not expected. AffinityTimeout = 2 * time.Minute // AffinityConfirmCount is the number of needed continuous requests to confirm that // affinity is enabled. AffinityConfirmCount = 15"} {"_id":"q-en-kubernetes-dd888b4d1db7ff4a425b3c9f02a871f70f057633818a00450e00d9176f8f3eaf","text":"return &runtimeapi.UpdateContainerResourcesResponse{}, nil } func (ds *dockerService) performPlatformSpecificContainerForContainer(containerID string) { func (ds *dockerService) performPlatformSpecificContainerForContainer(containerID string) (errors []error) { if cleanupInfo, present := ds.containerCleanupInfos[containerID]; present { ds.performPlatformSpecificContainerCleanupAndLogErrors(containerID, cleanupInfo) delete(ds.containerCleanupInfos, containerID) errors = ds.performPlatformSpecificContainerCleanupAndLogErrors(containerID, cleanupInfo) if len(errors) == 0 { delete(ds.containerCleanupInfos, containerID) } } return } func (ds *dockerService) performPlatformSpecificContainerCleanupAndLogErrors(containerNameOrID string, cleanupInfo *containerCleanupInfo) { func (ds *dockerService) performPlatformSpecificContainerCleanupAndLogErrors(containerNameOrID string, cleanupInfo *containerCleanupInfo) []error { if cleanupInfo == nil { return return nil } for _, err := range ds.performPlatformSpecificContainerCleanup(cleanupInfo) { errors := ds.performPlatformSpecificContainerCleanup(cleanupInfo) for _, err := range errors { klog.Warningf(\"error when cleaning up after container %q: %v\", containerNameOrID, err) } return errors }"} {"_id":"q-en-kubernetes-dd8eced9382bd29d829109773c71911682a7fdad7c6fa8d5156b31f015d5db32","text":"import ( \"fmt\" \"net\" \"runtime\" \"github.com/golang/glog\""} {"_id":"q-en-kubernetes-dd9c4e0febff1cd8dea8e5491a720a3588521526ffa9fd12d4047f9722e82620","text":"# define the IP range used for flannel overlay network, should not conflict with above SERVICE_CLUSTER_IP_RANGE export FLANNEL_NET=${FLANNEL_NET:-172.16.0.0/16} # Optionally add other contents to the Flannel configuration JSON # object normally stored in etcd as /coreos.com/network/config. Use # JSON syntax suitable for insertion into a JSON object constructor # after other field name:value pairs. For example: # FLANNEL_OTHER_NET_CONFIG=', \"SubnetMin\": \"172.16.10.0\", \"SubnetMax\": \"172.16.90.0\"' export FLANNEL_OTHER_NET_CONFIG FLANNEL_OTHER_NET_CONFIG='' # Admission Controllers to invoke prior to persisting objects in cluster export ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota,SecurityContextDeny"} {"_id":"q-en-kubernetes-dddd83cb4a5a2e6c6aa9bb9e35e3ef2d1a50a8d9a998862e704d7ff01377df6c","text":"return nil } // DeleteTCPLoadBalancer is an implementation of TCPLoadBalancer.DeleteTCPLoadBalancer. func (gce *GCECloud) DeleteTCPLoadBalancer(name, region string) error { // EnsureTCPLoadBalancerDeleted is an implementation of TCPLoadBalancer.EnsureTCPLoadBalancerDeleted. func (gce *GCECloud) EnsureTCPLoadBalancerDeleted(name, region string) error { op, err := gce.service.ForwardingRules.Delete(gce.projectID, region, name).Do() if err != nil && isHTTPErrorCode(err, http.StatusNotFound) { glog.Infof(\"Forwarding rule %s already deleted. Continuing to delete target pool.\", name)"} {"_id":"q-en-kubernetes-de2cc5fe883ffb7cd72bcdfb43583341e6508f9c64d6bc4331dfab9eb02f8485","text":"MounterSetUpTests(t, false) }) } func TestMounterSetUpWithFSGroup(t *testing.T) { fakeClient := fakeclient.NewSimpleClientset() plug, tmpDir := newTestPlugin(t, fakeClient, nil) defer os.RemoveAll(tmpDir) testCases := []struct { name string accessModes []api.PersistentVolumeAccessMode readOnly bool fsType string setFsGroup bool fsGroup int64 }{ { name: \"default fstype, with no fsgroup (should not apply fsgroup)\", accessModes: []api.PersistentVolumeAccessMode{ api.ReadWriteOnce, }, readOnly: false, fsType: \"\", }, { name: \"default fstype with fsgroup (should not apply fsgroup)\", accessModes: []api.PersistentVolumeAccessMode{ api.ReadWriteOnce, }, readOnly: false, fsType: \"\", setFsGroup: true, fsGroup: 3000, }, { name: \"fstype, fsgroup, RWM, ROM provided (should not apply fsgroup)\", accessModes: []api.PersistentVolumeAccessMode{ api.ReadWriteMany, api.ReadOnlyMany, }, fsType: \"ext4\", setFsGroup: true, fsGroup: 3000, }, { name: \"fstype, fsgroup, RWO, but readOnly (should not apply fsgroup)\", accessModes: []api.PersistentVolumeAccessMode{ api.ReadWriteOnce, }, readOnly: true, fsType: \"ext4\", setFsGroup: true, fsGroup: 3000, }, { name: \"fstype, fsgroup, RWO provided (should apply fsgroup)\", accessModes: []api.PersistentVolumeAccessMode{ api.ReadWriteOnce, }, fsType: \"ext4\", setFsGroup: true, fsGroup: 3000, }, } for i, tc := range testCases { t.Logf(\"Running test %s\", tc.name) volName := fmt.Sprintf(\"test-vol-%d\", i) pv := makeTestPV(\"test-pv\", 10, testDriver, volName) pv.Spec.AccessModes = tc.accessModes pvName := pv.GetName() spec := volume.NewSpecFromPersistentVolume(pv, tc.readOnly) if tc.fsType != \"\" { spec.PersistentVolume.Spec.CSI.FSType = tc.fsType } mounter, err := plug.NewMounter( spec, &api.Pod{ObjectMeta: meta.ObjectMeta{UID: testPodUID, Namespace: testns}}, volume.VolumeOptions{}, ) if err != nil { t.Fatalf(\"Failed to make a new Mounter: %v\", err) } if mounter == nil { t.Fatal(\"failed to create CSI mounter\") } csiMounter := mounter.(*csiMountMgr) csiMounter.csiClient = setupClient(t, true) attachID := getAttachmentName(csiMounter.volumeID, csiMounter.driverName, string(plug.host.GetNodeName())) attachment := makeTestAttachment(attachID, \"test-node\", pvName) _, err = csiMounter.k8s.StorageV1beta1().VolumeAttachments().Create(attachment) if err != nil { t.Errorf(\"failed to setup VolumeAttachment: %v\", err) continue } // Mounter.SetUp() var fsGroupPtr *int64 if tc.setFsGroup { fsGroup := tc.fsGroup fsGroupPtr = &fsGroup } if err := csiMounter.SetUp(fsGroupPtr); err != nil { t.Fatalf(\"mounter.Setup failed: %v\", err) } //Test the default value of file system type is not overridden if len(csiMounter.spec.PersistentVolume.Spec.CSI.FSType) != len(tc.fsType) { t.Errorf(\"file system type was overridden by type %s\", csiMounter.spec.PersistentVolume.Spec.CSI.FSType) } // ensure call went all the way pubs := csiMounter.csiClient.(*fakeCsiDriverClient).nodeClient.GetNodePublishedVolumes() if pubs[csiMounter.volumeID].Path != csiMounter.GetPath() { t.Error(\"csi server may not have received NodePublishVolume call\") } } } func TestUnmounterTeardown(t *testing.T) { plug, tmpDir := newTestPlugin(t, nil, nil)"} {"_id":"q-en-kubernetes-de59224eef555b9584eb25868db5ea53a7ca7ac8d6b61452810bb9f1faff5388","text":"package events import ( \"k8s.io/api/core/v1\" clientv1 \"k8s.io/api/core/v1\" ) const ( // Container event reason list CreatedContainer = \"Created\""} {"_id":"q-en-kubernetes-de8d6d9c1d9b90b6e993e46abac3f822735c0c750a96d81da55ca35250199752","text":"gomega.Expect(stdout).To(gomega.Equal(mountName), msg) } else { // We *expect* cat to return error here gomega.Expect(err).To(gomega.HaveOccurred(), msg) framework.ExpectError(err, msg) } } }"} {"_id":"q-en-kubernetes-de95e02fcebb2a6f9e6844e7952fec351e08f44a131a5ccbae32acdde974dd0a","text":"package net import ( \"crypto/tls\" \"net\" \"net/http\" \"net/url\" \"os\" \"reflect\" \"testing\" \"k8s.io/kubernetes/pkg/util/sets\" ) func TestCloneTLSConfig(t *testing.T) { expected := sets.NewString( // These fields are copied in CloneTLSConfig \"Rand\", \"Time\", \"Certificates\", \"RootCAs\", \"NextProtos\", \"ServerName\", \"InsecureSkipVerify\", \"CipherSuites\", \"PreferServerCipherSuites\", \"MinVersion\", \"MaxVersion\", \"CurvePreferences\", \"NameToCertificate\", \"GetCertificate\", \"ClientAuth\", \"ClientCAs\", \"ClientSessionCache\", // These fields are not copied \"SessionTicketsDisabled\", \"SessionTicketKey\", // These fields are unexported \"serverInitOnce\", \"mutex\", \"sessionTicketKeys\", ) fields := sets.NewString() structType := reflect.TypeOf(tls.Config{}) for i := 0; i < structType.NumField(); i++ { fields.Insert(structType.Field(i).Name) } if missing := expected.Difference(fields); len(missing) > 0 { t.Errorf(\"Expected fields that were not seen in http.Transport: %v\", missing.List()) } if extra := fields.Difference(expected); len(extra) > 0 { t.Errorf(\"New fields seen in http.Transport: %vnAdd to CopyClientTLSConfig if client-relevant, then add to expected list in TestCopyClientTLSConfig\", extra.List()) } } func TestGetClientIP(t *testing.T) { ipString := \"10.0.0.1\" ip := net.ParseIP(ipString)"} {"_id":"q-en-kubernetes-dec1fce0185987f40a22102d7ff6d94b3eda1b06439c01c723a2973e4fa60f39","text":"vmPowerStateStopped = \"stopped\" vmPowerStateDeallocated = \"deallocated\" vmPowerStateDeallocating = \"deallocating\" // nodeNameEnvironmentName is the environment variable name for getting node name. // It is only used for out-of-tree cloud provider. nodeNameEnvironmentName = \"NODE_NAME\" ) var ("} {"_id":"q-en-kubernetes-df0f949b8b9d33d8a08078d52783944616dcfe7c17190524954a12b662e7880c","text":"\"containers\": [ { \"name\": \"kubernetes-pause\", \"image\": \"gcr.io/google_containers/pause-amd64:3.0\" \"image\": \"gcr.io/google_containers/pause-amd64:3.1\" } ], \"restartPolicy\": \"Never\","} {"_id":"q-en-kubernetes-dfa1f907939ed4f08b1d3a4a0f5678850ca45f6291ee7ef3472b32ac5adbf122","text":"registry = \"k8s.gcr.io/build-image\", repository = \"debian-iptables\", # Ensure the digests above are updated to match a new tag tag = \"buster-v1.4.0\", # ignored, but kept here for documentation tag = \"buster-v1.5.0\", # ignored, but kept here for documentation ) def etcd_tarballs():"} {"_id":"q-en-kubernetes-dfb5ed9bd94e4af8913a5da3540c3da4d0ef45e7d4d72fd019147d1ccffdc9b0","text":"if err != nil { return probe.Unknown, err } if strings.ToLower(string(data)) != defaultHealthyOutput { if !strings.HasPrefix(strings.ToLower(string(data)), defaultHealthyOutput) { return probe.Failure, nil } return probe.Success, nil"} {"_id":"q-en-kubernetes-dfeb672942d9ae23fb77e7cd4a8b1adae09720ec2755a90e6bcad7d06f7724d5","text":"// Otherwise we will return an error. func findSecurityGroupForInstance(instance *ec2.Instance, taggedSecurityGroups map[string]*ec2.SecurityGroup) (*ec2.GroupIdentifier, error) { instanceID := aws.StringValue(instance.InstanceId) var best *ec2.GroupIdentifier var tagged []*ec2.GroupIdentifier var untagged []*ec2.GroupIdentifier for _, group := range instance.SecurityGroups { groupID := aws.StringValue(group.GroupId) if groupID == \"\" { glog.Warningf(\"Ignoring security group without id for instance %q: %v\", instanceID, group) continue } if best == nil { best = group continue _, isTagged := taggedSecurityGroups[groupID] if isTagged { tagged = append(tagged, group) } else { untagged = append(untagged, group) } } _, bestIsTagged := taggedSecurityGroups[*best.GroupId] _, groupIsTagged := taggedSecurityGroups[groupID] if bestIsTagged && !groupIsTagged { // best is still best } else if groupIsTagged && !bestIsTagged { best = group } else { // We create instances with one SG // If users create multiple SGs, they must tag one of them as being k8s owned return nil, fmt.Errorf(\"Multiple security groups found for instance (%s); ensure the k8s security group is tagged\", instanceID) if len(tagged) > 0 { // We create instances with one SG // If users create multiple SGs, they must tag one of them as being k8s owned if len(tagged) != 1 { return nil, fmt.Errorf(\"Multiple tagged security groups found for instance %s; ensure only the k8s security group is tagged\", instanceID) } return tagged[0], nil } if best == nil { glog.Warningf(\"No security group found for instance %q\", instanceID) if len(untagged) > 0 { // For back-compat, we will allow a single untagged SG if len(untagged) != 1 { return nil, fmt.Errorf(\"Multiple untagged security groups found for instance %s; ensure the k8s security group is tagged\", instanceID) } return untagged[0], nil } return best, nil glog.Warningf(\"No security group found for instance %q\", instanceID) return nil, nil } // Return all the security groups that are tagged as being part of our cluster"} {"_id":"q-en-kubernetes-dff085188705c1afb0e99c2fe73ac9ecf92fc2494c676dc1ed7efedb43e99495","text":"} } func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) { containersWithoutPullPolicy, _ := json.Marshal([]map[string]interface{}{ { \"name\": \"install\", \"image\": \"busybox:latest\", }, }) type InitContainerValidator func(got, expected *v1.Container) error containersWithPullPolicy, _ := json.Marshal([]map[string]interface{}{ { \"name\": \"install\", \"imagePullPolicy\": \"IfNotPresent\", }, }) func TestSetDefaultReplicationControllerInitContainers(t *testing.T) { assertEnvFieldRef := func(got, expected *v1.Container) error { if len(got.Env) != len(expected.Env) { return fmt.Errorf(\"different number of env: got <%v>, expected <%v>\", len(got.Env), len(expected.Env)) } for j := range got.Env { ge := &got.Env[j] ee := &expected.Env[j] if ge.Name != ee.Name { return fmt.Errorf(\"different name of env: got <%v>, expected <%v>\", ge.Name, ee.Name) } if ge.ValueFrom.FieldRef.APIVersion != ee.ValueFrom.FieldRef.APIVersion { return fmt.Errorf(\"different api version of FieldRef <%v>: got <%v>, expected <%v>\", ge.Name, ge.ValueFrom.FieldRef.APIVersion, ee.ValueFrom.FieldRef.APIVersion) } } return nil } assertImagePullPolicy := func(got, expected *v1.Container) error { if got.ImagePullPolicy != expected.ImagePullPolicy { return fmt.Errorf(\"different image pull poicy: got <%v>, expected <%v>\", got.ImagePullPolicy, expected.ImagePullPolicy) } return nil } assertContainerPort := func(got, expected *v1.Container) error { if len(got.Ports) != len(expected.Ports) { return fmt.Errorf(\"different number of ports: got <%v>, expected <%v>\", len(got.Ports), len(expected.Ports)) } for i := range got.Ports { gp := &got.Ports[i] ep := &expected.Ports[i] if gp.Name != ep.Name { return fmt.Errorf(\"different name of port: got <%v>, expected <%v>\", gp.Name, ep.Name) } if gp.Protocol != ep.Protocol { return fmt.Errorf(\"different port protocol <%v>: got <%v>, expected <%v>\", gp.Name, gp.Protocol, ep.Protocol) } } return nil } assertResource := func(got, expected *v1.Container) error { if len(got.Resources.Limits) != len(expected.Resources.Limits) { return fmt.Errorf(\"different number of resources.Limits: got <%v>, expected <%v>\", len(got.Resources.Limits), (expected.Resources.Limits)) } for k, v := range got.Resources.Limits { if ev, found := expected.Resources.Limits[v1.ResourceName(k)]; !found { return fmt.Errorf(\"failed to find resource <%v> in expected resources.Limits.\", k) } else { if ev.Value() != v.Value() { return fmt.Errorf(\"different resource.Limits: got <%v>, expected <%v>.\", v.Value(), ev.Value()) } } } if len(got.Resources.Requests) != len(expected.Resources.Requests) { return fmt.Errorf(\"different number of resources.Requests: got <%v>, expected <%v>\", len(got.Resources.Requests), (expected.Resources.Requests)) } for k, v := range got.Resources.Requests { if ev, found := expected.Resources.Requests[v1.ResourceName(k)]; !found { return fmt.Errorf(\"failed to find resource <%v> in expected resources.Requests.\", k) } else { if ev.Value() != v.Value() { return fmt.Errorf(\"different resource.Requests: got <%v>, expected <%v>.\", v.Value(), ev.Value()) } } } return nil } assertProb := func(got, expected *v1.Container) error { // Assert LivenessProbe if got.LivenessProbe.Handler.HTTPGet.Path != expected.LivenessProbe.Handler.HTTPGet.Path || got.LivenessProbe.Handler.HTTPGet.Scheme != expected.LivenessProbe.Handler.HTTPGet.Scheme || got.LivenessProbe.FailureThreshold != expected.LivenessProbe.FailureThreshold || got.LivenessProbe.SuccessThreshold != expected.LivenessProbe.SuccessThreshold || got.LivenessProbe.PeriodSeconds != expected.LivenessProbe.PeriodSeconds || got.LivenessProbe.TimeoutSeconds != expected.LivenessProbe.TimeoutSeconds { return fmt.Errorf(\"different LivenessProbe: got <%v>, expected <%v>\", got.LivenessProbe, expected.LivenessProbe) } // Assert ReadinessProbe if got.ReadinessProbe.Handler.HTTPGet.Path != expected.ReadinessProbe.Handler.HTTPGet.Path || got.ReadinessProbe.Handler.HTTPGet.Scheme != expected.ReadinessProbe.Handler.HTTPGet.Scheme || got.ReadinessProbe.FailureThreshold != expected.ReadinessProbe.FailureThreshold || got.ReadinessProbe.SuccessThreshold != expected.ReadinessProbe.SuccessThreshold || got.ReadinessProbe.PeriodSeconds != expected.ReadinessProbe.PeriodSeconds || got.ReadinessProbe.TimeoutSeconds != expected.ReadinessProbe.TimeoutSeconds { return fmt.Errorf(\"different ReadinessProbe: got <%v>, expected <%v>\", got.ReadinessProbe, expected.ReadinessProbe) } return nil } assertLifeCycle := func(got, expected *v1.Container) error { if got.Lifecycle.PostStart.HTTPGet.Path != expected.Lifecycle.PostStart.HTTPGet.Path || got.Lifecycle.PostStart.HTTPGet.Scheme != expected.Lifecycle.PostStart.HTTPGet.Scheme { return fmt.Errorf(\"different LifeCycle: got <%v>, expected <%v>\", got.Lifecycle, expected.Lifecycle) } return nil } cpu, _ := resource.ParseQuantity(\"100Gi\") mem, _ := resource.ParseQuantity(\"100Mi\") tests := []struct { rc v1.ReplicationController expectPullPolicy v1.PullPolicy name string rc v1.ReplicationController expected []v1.Container validators []InitContainerValidator }{ { name: \"imagePullIPolicy\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"install\", \"image\": \"busybox\" } ]`, }, }, }, }, }, expected: []v1.Container{ { ImagePullPolicy: v1.PullAlways, }, }, validators: []InitContainerValidator{assertImagePullPolicy}, }, { name: \"FieldRef\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"fun\", \"image\": \"alpine\", \"env\": [ { \"name\": \"MY_POD_IP\", \"valueFrom\": { \"fieldRef\": { \"apiVersion\": \"\", \"fieldPath\": \"status.podIP\" } } } ] } ]`, }, }, }, }, }, expected: []v1.Container{ { Env: []v1.EnvVar{ { Name: \"MY_POD_IP\", ValueFrom: &v1.EnvVarSource{ FieldRef: &v1.ObjectFieldSelector{ APIVersion: \"v1\", FieldPath: \"status.podIP\", }, }, }, }, }, }, validators: []InitContainerValidator{assertEnvFieldRef}, }, { name: \"ContainerPort\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": string(containersWithoutPullPolicy), \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"fun\", \"image\": \"alpine\", \"ports\": [ { \"name\": \"default\" } ] } ]`, }, }, }, }, }, expectPullPolicy: v1.PullAlways, expected: []v1.Container{ { Ports: []v1.ContainerPort{ { Name: \"default\", Protocol: v1.ProtocolTCP, }, }, }, }, validators: []InitContainerValidator{assertContainerPort}, }, { name: \"Resources\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": string(containersWithPullPolicy), \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"fun\", \"image\": \"alpine\", \"resources\": { \"limits\": { \"cpu\": \"100Gi\", \"memory\": \"100Mi\" }, \"requests\": { \"cpu\": \"100Gi\", \"memory\": \"100Mi\" } } } ]`, }, }, }, }, }, expectPullPolicy: v1.PullIfNotPresent, expected: []v1.Container{ { Resources: v1.ResourceRequirements{ Limits: v1.ResourceList{ v1.ResourceCPU: cpu, v1.ResourceMemory: mem, }, Requests: v1.ResourceList{ v1.ResourceCPU: cpu, v1.ResourceMemory: mem, }, }, }, }, validators: []InitContainerValidator{assertResource}, }, { name: \"Prob\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"fun\", \"image\": \"alpine\", \"livenessProbe\": { \"httpGet\": { \"host\": \"localhost\" } }, \"readinessProbe\": { \"httpGet\": { \"host\": \"localhost\" } } } ]`, }, }, }, }, }, expected: []v1.Container{ { LivenessProbe: &v1.Probe{ Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/\", Scheme: v1.URISchemeHTTP, }, }, TimeoutSeconds: 1, PeriodSeconds: 10, SuccessThreshold: 1, FailureThreshold: 3, }, ReadinessProbe: &v1.Probe{ Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/\", Scheme: v1.URISchemeHTTP, }, }, TimeoutSeconds: 1, PeriodSeconds: 10, SuccessThreshold: 1, FailureThreshold: 3, }, }, }, validators: []InitContainerValidator{assertProb}, }, { name: \"LifeCycle\", rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ \"pod.beta.kubernetes.io/init-containers\": ` [ { \"name\": \"fun\", \"image\": \"alpine\", \"lifecycle\": { \"postStart\": { \"httpGet\": { \"host\": \"localhost\" } }, \"preStop\": { \"httpGet\": { \"host\": \"localhost\" } } } } ]`, }, }, }, }, }, expected: []v1.Container{ { Lifecycle: &v1.Lifecycle{ PostStart: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/\", Scheme: v1.URISchemeHTTP, }, }, PreStop: &v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: \"/\", Scheme: v1.URISchemeHTTP, }, }, }, }, }, validators: []InitContainerValidator{assertLifeCycle}, }, } assertInitContainers := func(got, expected []v1.Container, validators []InitContainerValidator) error { if len(got) != len(expected) { return fmt.Errorf(\"different number of init container: got <%d>, expected <%d>\", len(got), len(expected)) } for i := range got { g := &got[i] e := &expected[i] for _, validator := range validators { if err := validator(g, e); err != nil { return err } } } return nil } for _, test := range tests { rc := &test.rc obj2 := roundTrip(t, runtime.Object(rc))"} {"_id":"q-en-kubernetes-e02b1e4e60ebe00e237ac9dd2f2e89a5a51ef385942ee5c4146efd1bf44a1772","text":"} if latency := time.Since(now); latency > longThrottleLatency { klog.V(4).Infof(\"Throttling request took %v, request: %s:%s\", latency, r.verb, r.URL().String()) klog.V(3).Infof(\"Throttling request took %v, request: %s:%s\", latency, r.verb, r.URL().String()) } return err"} {"_id":"q-en-kubernetes-e083ff9b7c81d47b633e153a521869aef9052b7bf1cc06458f8a9b3b1d66a70e","text":"hash := hash(nodeUpdate.name()) select { case <-stopCh: tc.nodeUpdateQueue.Done(item) break case tc.nodeUpdateChannels[hash%workers] <- nodeUpdate: } tc.nodeUpdateQueue.Done(item) } }(stopCh)"} {"_id":"q-en-kubernetes-e0acbf75126c8fe7a209e94517af48d42cc612a77a438f777b330aae41bd4685","text":"framework.ExpectNoError(err, \"failed to see %v event\", watch.Deleted) }) ginkgo.It(\"should validate Deployment Status endpoints\", func() { /* Release: v1.22 Testname: Deployment, status sub-resource Description: When a Deployment is created it MUST succeed. Attempt to read, update and patch its status sub-resource; all mutating sub-resource operations MUST be visible to subsequent reads. */ framework.ConformanceIt(\"should validate Deployment Status endpoints\", func() { dClient := c.AppsV1().Deployments(ns) dName := \"test-deployment-\" + utilrand.String(5) labelSelector := \"e2e=testing\""} {"_id":"q-en-kubernetes-e0b4b6fb3a7c14bf2937f9e29dea4ffd67fa6ddfc55779f43e23a44a5bdf4692","text":"cmd.Flags().BoolVar(&options.All, \"all\", false, \"select all resources in the namespace of the specified resource types\") cmd.Flags().StringVarP(&options.Selector, \"selector\", \"l\", \"\", \"Selector (label query) to filter on\") cmd.Flags().StringVarP(&options.ContainerSelector, \"containers\", \"c\", \"*\", \"The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards\") cmd.Flags().BoolVar(&options.Local, \"local\", false, \"If true, set resources will NOT contact api-server but run locally.\") cmdutil.AddDryRunFlag(cmd) cmdutil.AddRecordFlag(cmd) cmd.Flags().StringVar(&options.Limits, \"limits\", options.Limits, \"The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.\")"} {"_id":"q-en-kubernetes-e0dc7608f5078a55b3bb68ef8bab21374a54f78b842b8dbb557cbb8c9ccd4e32","text":") apiserverRequestConcurrencyInUse = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Namespace: namespace, Subsystem: subsystem, Name: \"request_concurrency_in_use\", Help: \"Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem\", DeprecatedVersion: \"1.28.0\", Namespace: namespace, Subsystem: subsystem, Name: \"request_concurrency_in_use\", Help: \"Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem\", // Remove this metric once all suppported releases have the equal current_executing_seats metric DeprecatedVersion: \"1.31.0\", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema},"} {"_id":"q-en-kubernetes-e0ef1abd5747cd48fbfe93043f9fe4c5e075145156d7fc44f40d5d7e97875413","text":"TestDynamicProvisioning(input.testCase, input.cs, input.pvc, input.sc) }) It(\"should provision storage with non-default reclaim policy Retain\", func() { retain := v1.PersistentVolumeReclaimRetain input.sc.ReclaimPolicy = &retain pv := TestDynamicProvisioning(input.testCase, input.cs, input.pvc, input.sc) By(fmt.Sprintf(\"waiting for the provisioned PV %q to enter phase %s\", pv.Name, v1.VolumeReleased)) framework.ExpectNoError(framework.WaitForPersistentVolumePhase(v1.VolumeReleased, input.cs, pv.Name, 1*time.Second, 30*time.Second)) By(fmt.Sprintf(\"deleting the PV %q\", pv.Name)) framework.ExpectNoError(framework.DeletePersistentVolume(input.cs, pv.Name), \"Failed to delete PV \", pv.Name) framework.ExpectNoError(framework.WaitForPersistentVolumeDeleted(input.cs, pv.Name, 1*time.Second, 30*time.Second)) }) It(\"should create and delete block persistent volumes [Feature:BlockVolume]\", func() { if !input.dInfo.IsBlockSupported { framework.Skipf(\"Driver %q does not support BlockVolume - skipping\", input.dInfo.Name)"} {"_id":"q-en-kubernetes-e0f25bd45e17b83b992f9323a3d69785df6b6b718d82c10c1c9578bd0aa010e9","text":"startLocalStreamingServer bool // containerCleanupInfos maps container IDs to the `containerCleanupInfo` structs // needed to clean up after containers have been started or removed. // needed to clean up after containers have been removed. // (see `applyPlatformSpecificDockerConfig` and `performPlatformSpecificContainerCleanup` // methods for more info). containerCleanupInfos map[string]*containerCleanupInfo"} {"_id":"q-en-kubernetes-e11f4d4be3fa640ec2b06f5b93611759fe1c7101baf3a7b56c494e66989af163","text":"serviceName := \"svc-itp\" ns := f.Namespace.Name servicePort := 8000 servicePort := 80 // If the pod can't bind to this port, it will fail to start, and it will fail the test, // because is using hostNetwork. Using a not common port will reduce this possibility. endpointPort := 10180 ginkgo.By(\"creating a TCP service \" + serviceName + \" with type=ClusterIP and internalTrafficPolicy=Local in namespace \" + ns) local := v1.ServiceInternalTrafficPolicyLocal jig := e2eservice.NewTestJig(cs, ns, serviceName) svc, err := jig.CreateTCPService(func(svc *v1.Service) { svc.Spec.Ports = []v1.ServicePort{ {Port: 8000, Name: \"http\", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(8000)}, {Port: 80, Name: \"http\", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(endpointPort)}, } svc.Spec.InternalTrafficPolicy = &local }) framework.ExpectNoError(err) ginkgo.By(\"Creating 1 webserver pod to be part of the TCP service\") webserverPod0 := e2epod.NewAgnhostPod(ns, \"echo-hostname-0\", nil, nil, nil, \"netexec\", \"--http-port\", strconv.Itoa(servicePort)) webserverPod0 := e2epod.NewAgnhostPod(ns, \"echo-hostname-0\", nil, nil, nil, \"netexec\", \"--http-port\", strconv.Itoa(endpointPort)) webserverPod0.Labels = jig.Labels webserverPod0.Spec.HostNetwork = true e2epod.SetNodeSelection(&webserverPod0.Spec, e2epod.NodeSelection{Name: node0.Name})"} {"_id":"q-en-kubernetes-e1202c2edf0c3fda05fe1cf56756b702f1e9a021b6250863ea361e37548644a1","text":"# standalone - Heapster only. Metrics available via Heapster REST API. ENABLE_CLUSTER_MONITORING=\"${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}\" # Historically fluentd was a manifest pod and then was migrated to DaemonSet. # To avoid situation during cluster upgrade when there are two instances # of fluentd running on a node, kubelet need to mark node on which # fluentd is not running as a manifest pod with appropriate label. # TODO(piosz): remove this in 1.8 NODE_LABELS=\"${KUBE_NODE_LABELS:-alpha.kubernetes.io/fluentd-ds-ready=true}\" # Optional: Enable node logging. ENABLE_NODE_LOGGING=\"${KUBE_ENABLE_NODE_LOGGING:-true}\" LOGGING_DESTINATION=\"${KUBE_LOGGING_DESTINATION:-gcp}\" # options: elasticsearch, gcp"} {"_id":"q-en-kubernetes-e12bb2dca3470a4f74da33540d31f960fd05d126fa3d7421c5d87554320cb76c","text":"func setSandboxResources(hc *dockercontainer.HostConfig) { hc.Resources = dockercontainer.Resources{ MemorySwap: -1, MemorySwap: dockertools.DefaultMemorySwap(), CPUShares: defaultSandboxCPUshares, // Use docker's default cpu quota/period. }"} {"_id":"q-en-kubernetes-e136b371e0079de48de6de26778afff56dd84dd7b1fb7223abd1eaab28d4c4ee","text":"Labels: labels, }, Spec: api.PodSpec{ Containers: []api.Container{c}, Containers: []api.Container{c}, TerminationGracePeriodSeconds: &gracePeriod, }, }, },"} {"_id":"q-en-kubernetes-e14162c79bd012c038445a568e735633229a1b99277b34c4941f9b2e313319bf","text":"\"k8s.io/kubernetes/pkg/client/cache\" client \"k8s.io/kubernetes/pkg/client/unversioned\" \"k8s.io/kubernetes/pkg/controller\" \"k8s.io/kubernetes/pkg/runtime\" \"k8s.io/kubernetes/pkg/securitycontext\" utiltesting \"k8s.io/kubernetes/pkg/util/testing\" ) var ("} {"_id":"q-en-kubernetes-e15de90fb32a7686b6bbf9c31d40d116691842b94b478eccc88347d3023393d9","text":"## Requirements 1. Docker, using one of the following configurations: * **macOS** Install Docker for Mac. See installation instructions [here](https://docs.docker.com/docker-for-mac/). * **macOS** Install Docker for Mac. See installation instructions [here](https://docs.docker.com/desktop/install/mac-install/). **Note**: You will want to set the Docker VM to have at least 8GB of initial memory or building will likely fail. (See: [#11852]( http://issue.k8s.io/11852)). * **Linux with local Docker** Install Docker according to the [instructions](https://docs.docker.com/installation/#installation) for your OS. * **Windows with Docker Desktop WSL2 backend** Install Docker according to the [instructions](https://docs.docker.com/docker-for-windows/wsl-tech-preview/). Be sure to store your sources in the local Linux file system, not the Windows remote mount at `/mnt/c`."} {"_id":"q-en-kubernetes-e15e4b32dcb3ee578a2b66ee900482bf1f992f7895fdaa7e3a548bf9fa956b3a","text":"t.objects[gvr][namespacedName] = obj for _, w := range t.getWatches(gvr, ns) { w.Add(obj) // To avoid the object from being accidentally modified by watcher w.Add(obj.DeepCopyObject()) } return nil"} {"_id":"q-en-kubernetes-e1902aacdb50a0724c24a6a065f69ce5ee6a1b63368c1936f0bb07bc6aab9cce","text":") func (c *FakeEvictions) Evict(eviction *policy.Eviction) error { action := core.GetActionImpl{} action.Verb = \"post\" action := core.CreateActionImpl{} action.Verb = \"create\" action.Namespace = c.ns action.Resource = schema.GroupVersionResource{Group: \"\", Version: \"v1\", Resource: \"pods\"} action.Subresource = \"eviction\" action.Name = eviction.Name action.Object = eviction _, err := c.Fake.Invokes(action, eviction) return err }"} {"_id":"q-en-kubernetes-e1a0ab10b595c58a51220f40ba03d52f1012117248a66a867e2715c6edadd131","text":"name = \"all-srcs\", srcs = [ \":package-srcs\", \"//pkg/kubelet/apis/kubeletconfig/fuzzer:all-srcs\", \"//pkg/kubelet/apis/kubeletconfig/scheme:all-srcs\", \"//pkg/kubelet/apis/kubeletconfig/v1alpha1:all-srcs\", \"//pkg/kubelet/apis/kubeletconfig/validation:all-srcs\","} {"_id":"q-en-kubernetes-e1c2fc0a938a0f5439903032c0d63018496b7a719075b13f2fda00b3b5af1114","text":"current-release-pr current-replicas daemonset-lookup-cache-size data-dir default-container-cpu-limit default-container-mem-limit delay-shutdown"} {"_id":"q-en-kubernetes-e1c5c3bb7499cab1f05613b1e1707438d35e7daf32561c481c132dbbe8e83844","text":"\"golang.org/x/net/websocket\" \"encoding/json\" v1 \"k8s.io/api/core/v1\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/runtime\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/uuid\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/apimachinery/pkg/watch\" \"k8s.io/client-go/dynamic\" \"k8s.io/client-go/tools/cache\" watchtools \"k8s.io/client-go/tools/watch\" podutil \"k8s.io/kubernetes/pkg/api/v1/pod\""} {"_id":"q-en-kubernetes-e20cba2df6d84f4c715748d5f7b29310f61c7db8b04f25b06935aed9b4f8ff9b","text":"return selector.PodSelectorMatches } // NodeMatchesNodeSelectorTerms checks if a node's labels satisfy a list of node selector terms, // nodeMatchesNodeSelectorTerms checks if a node's labels satisfy a list of node selector terms, // terms are ORed, and an emtpy a list of terms will match nothing. func NodeMatchesNodeSelectorTerms(node *api.Node, nodeSelectorTerms []api.NodeSelectorTerm) bool { func nodeMatchesNodeSelectorTerms(node *api.Node, nodeSelectorTerms []api.NodeSelectorTerm) bool { for _, req := range nodeSelectorTerms { nodeSelector, err := api.NodeSelectorRequirementsAsSelector(req.MatchExpressions) if err != nil {"} {"_id":"q-en-kubernetes-e21bdc5763b59871a954222e0bdac0c992772aab12ead9263a9ec2d15935431d","text":"if want == \"\" { want = \"\" } if got := fmt.Sprintf(\"%v\", err); got != want { if got := fmt.Sprintf(\"%v\", err); !strings.Contains(got, want) { t.Errorf(\"wrong error for message %q: want=%q, got=%q\", test.message, want, got) } }"} {"_id":"q-en-kubernetes-e29133af86a1c9267681fa5cf17f5773c93fae1b35253a09a06399dacf510341","text":"apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/intstr\" \"k8s.io/apimachinery/pkg/util/uuid\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/kubernetes/test/e2e/framework\" e2epod \"k8s.io/kubernetes/test/e2e/framework/pod\" imageutils \"k8s.io/kubernetes/test/utils/image\" \"github.com/onsi/ginkgo\" \"k8s.io/apimachinery/pkg/types\" ) func extinguish(f *framework.Framework, totalNS int, maxAllowedAfterDel int, maxSeconds int) {"} {"_id":"q-en-kubernetes-e2b8f67c6c6914e7094a331cffc57628b1c018982fe24aca865cb2743d3b3c14","text":"cloud: gce EOF DOCKER_OPTS=\"\" if [[ -n \"${EXTRA_DOCKER_OPTS-}\" ]]; then DOCKER_OPTS=\"${EXTRA_DOCKER_OPTS}\" fi # Decide if enable the cache if [[ \"${ENABLE_DOCKER_REGISTRY_CACHE}\" == \"true\" ]]; then if [[ \"${ENABLE_DOCKER_REGISTRY_CACHE}\" == \"true\" ]]; then REGION=$(echo \"${ZONE}\" | cut -f 1,2 -d -) echo \"Enable docker registry cache at region: \" $REGION DOCKER_OPTS=\"--registry-mirror=\"https://${REGION}.docker-cache.clustermaster.net\"\" DOCKER_OPTS=\"${DOCKER_OPTS} --registry-mirror='https://${REGION}.docker-cache.clustermaster.net'\" fi cat <>/etc/salt/minion.d/grains.conf if [[ -n \"{DOCKER_OPTS}\" ]]; then cat <>/etc/salt/minion.d/grains.conf docker_opts: $DOCKER_OPTS EOF fi"} {"_id":"q-en-kubernetes-e2e629b206b5725045db59a13a56bbb1e07d0387eef65c90c0f5625c5a672282","text":"} func TestValidateNamespaceStatusUpdate(t *testing.T) { now := util.Now() tests := []struct { oldNamespace api.Namespace namespace api.Namespace valid bool }{ {api.Namespace{}, api.Namespace{}, true}, {api.Namespace{}, api.Namespace{ Status: api.NamespaceStatus{ Phase: api.NamespaceActive, }, }, true}, {api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: \"foo\"}, Name: \"foo\", DeletionTimestamp: &now}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, },"} {"_id":"q-en-kubernetes-e31201d0ab97f53e3a1a62eb65ea8d21c9e65a52e1eb60c2972dc7392df13cdb","text":"nodePorts[key] = true } // Check for duplicate TargetPort portsPath = specPath.Child(\"ports\") targetPorts := make(map[api.ServicePort]bool) for i, port := range service.Spec.Ports { if (port.TargetPort.Type == intstr.Int && port.TargetPort.IntVal == 0) || (port.TargetPort.Type == intstr.String && port.TargetPort.StrVal == \"\") { continue } portPath := portsPath.Index(i) key := api.ServicePort{Protocol: port.Protocol, TargetPort: port.TargetPort} _, found := targetPorts[key] if found { allErrs = append(allErrs, field.Duplicate(portPath.Child(\"targetPort\"), port.TargetPort)) } targetPorts[key] = true } // Validate SourceRange field and annotation _, ok := service.Annotations[api.AnnotationLoadBalancerSourceRangesKey] if len(service.Spec.LoadBalancerSourceRanges) > 0 || ok {"} {"_id":"q-en-kubernetes-e37adc53cafd89f74bfb02f5c90d82fadbfcdcad19c3f189c8ae1c8bb0a8ca3d","text":"\"name\": \"The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.\", \"protocol\": \"The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\", \"port\": \"The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", \"appProtocol\": \"The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.\", } func (EndpointPort) SwaggerDoc() map[string]string {"} {"_id":"q-en-kubernetes-e3c9743f3d1f5bce3da58fda910da1704e3862ab0f01a60804752c2a7837a2cf","text":"\"reflect\" \"sort\" \"testing\" \"time\" \"github.com/stretchr/testify/assert\" \"github.com/stretchr/testify/require\""} {"_id":"q-en-kubernetes-e3ea27c28e9ec644df6b6cd8b38006c4fda54723d9cfc34950d68669f8f51680","text":" { \"apiVersion\": \"apidiscovery.k8s.io/v2beta1\", \"items\": [ { \"metadata\": { \"creationTimestamp\": null, \"name\": \"apiregistration.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"api-extensions\" ], \"resource\": \"apiservices\", \"responseKind\": { \"group\": \"\", \"kind\": \"APIService\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"apiservice\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"APIService\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"apps\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"controllerrevisions\", \"responseKind\": { \"group\": \"\", \"kind\": \"ControllerRevision\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"controllerrevision\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"all\" ], \"resource\": \"daemonsets\", \"responseKind\": { \"group\": \"\", \"kind\": \"DaemonSet\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"ds\" ], \"singularResource\": \"daemonset\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"DaemonSet\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"all\" ], \"resource\": \"deployments\", \"responseKind\": { \"group\": \"\", \"kind\": \"Deployment\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"deploy\" ], \"singularResource\": \"deployment\", \"subresources\": [ { \"responseKind\": { \"group\": \"autoscaling\", \"kind\": \"Scale\", \"version\": \"v1\" }, \"subresource\": \"scale\", \"verbs\": [ \"get\", \"patch\", \"update\" ] }, { \"responseKind\": { \"group\": \"\", \"kind\": \"Deployment\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"all\" ], \"resource\": \"replicasets\", \"responseKind\": { \"group\": \"\", \"kind\": \"ReplicaSet\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"rs\" ], \"singularResource\": \"replicaset\", \"subresources\": [ { \"responseKind\": { \"group\": \"autoscaling\", \"kind\": \"Scale\", \"version\": \"v1\" }, \"subresource\": \"scale\", \"verbs\": [ \"get\", \"patch\", \"update\" ] }, { \"responseKind\": { \"group\": \"\", \"kind\": \"ReplicaSet\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"all\" ], \"resource\": \"statefulsets\", \"responseKind\": { \"group\": \"\", \"kind\": \"StatefulSet\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"sts\" ], \"singularResource\": \"statefulset\", \"subresources\": [ { \"responseKind\": { \"group\": \"autoscaling\", \"kind\": \"Scale\", \"version\": \"v1\" }, \"subresource\": \"scale\", \"verbs\": [ \"get\", \"patch\", \"update\" ] }, { \"responseKind\": { \"group\": \"\", \"kind\": \"StatefulSet\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"events.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"events\", \"responseKind\": { \"group\": \"\", \"kind\": \"Event\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"ev\" ], \"singularResource\": \"event\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"authentication.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"selfsubjectreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SelfSubjectReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"selfsubjectreview\", \"verbs\": [ \"create\" ] }, { \"resource\": \"tokenreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"TokenReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"tokenreview\", \"verbs\": [ \"create\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"selfsubjectreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SelfSubjectReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"selfsubjectreview\", \"verbs\": [ \"create\" ] } ], \"version\": \"v1beta1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"selfsubjectreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SelfSubjectReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"selfsubjectreview\", \"verbs\": [ \"create\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"authorization.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"localsubjectaccessreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"LocalSubjectAccessReview\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"localsubjectaccessreview\", \"verbs\": [ \"create\" ] }, { \"resource\": \"selfsubjectaccessreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SelfSubjectAccessReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"selfsubjectaccessreview\", \"verbs\": [ \"create\" ] }, { \"resource\": \"selfsubjectrulesreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SelfSubjectRulesReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"selfsubjectrulesreview\", \"verbs\": [ \"create\" ] }, { \"resource\": \"subjectaccessreviews\", \"responseKind\": { \"group\": \"\", \"kind\": \"SubjectAccessReview\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"subjectaccessreview\", \"verbs\": [ \"create\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"autoscaling\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"all\" ], \"resource\": \"horizontalpodautoscalers\", \"responseKind\": { \"group\": \"\", \"kind\": \"HorizontalPodAutoscaler\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"hpa\" ], \"singularResource\": \"horizontalpodautoscaler\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"HorizontalPodAutoscaler\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v2\" }, { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"all\" ], \"resource\": \"horizontalpodautoscalers\", \"responseKind\": { \"group\": \"\", \"kind\": \"HorizontalPodAutoscaler\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"hpa\" ], \"singularResource\": \"horizontalpodautoscaler\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"HorizontalPodAutoscaler\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"batch\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"all\" ], \"resource\": \"cronjobs\", \"responseKind\": { \"group\": \"\", \"kind\": \"CronJob\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"cj\" ], \"singularResource\": \"cronjob\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"CronJob\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"all\" ], \"resource\": \"jobs\", \"responseKind\": { \"group\": \"\", \"kind\": \"Job\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"job\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"Job\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"certificates.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"certificatesigningrequests\", \"responseKind\": { \"group\": \"\", \"kind\": \"CertificateSigningRequest\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"csr\" ], \"singularResource\": \"certificatesigningrequest\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"CertificateSigningRequest\", \"version\": \"\" }, \"subresource\": \"approval\", \"verbs\": [ \"get\", \"patch\", \"update\" ] }, { \"responseKind\": { \"group\": \"\", \"kind\": \"CertificateSigningRequest\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"clustertrustbundles\", \"responseKind\": { \"group\": \"\", \"kind\": \"ClusterTrustBundle\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"clustertrustbundle\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"networking.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"ingressclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"IngressClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"ingressclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"ingresses\", \"responseKind\": { \"group\": \"\", \"kind\": \"Ingress\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"ing\" ], \"singularResource\": \"ingress\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"Ingress\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"networkpolicies\", \"responseKind\": { \"group\": \"\", \"kind\": \"NetworkPolicy\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"netpol\" ], \"singularResource\": \"networkpolicy\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"ipaddresses\", \"responseKind\": { \"group\": \"\", \"kind\": \"IPAddress\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"ip\" ], \"singularResource\": \"ipaddress\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"servicecidrs\", \"responseKind\": { \"group\": \"\", \"kind\": \"ServiceCIDR\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"servicecidr\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"ServiceCIDR\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1beta1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"policy\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"poddisruptionbudgets\", \"responseKind\": { \"group\": \"\", \"kind\": \"PodDisruptionBudget\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"shortNames\": [ \"pdb\" ], \"singularResource\": \"poddisruptionbudget\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"PodDisruptionBudget\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"rbac.authorization.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"clusterrolebindings\", \"responseKind\": { \"group\": \"\", \"kind\": \"ClusterRoleBinding\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"clusterrolebinding\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"clusterroles\", \"responseKind\": { \"group\": \"\", \"kind\": \"ClusterRole\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"clusterrole\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"rolebindings\", \"responseKind\": { \"group\": \"\", \"kind\": \"RoleBinding\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"rolebinding\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"roles\", \"responseKind\": { \"group\": \"\", \"kind\": \"Role\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"role\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"storage.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"csidrivers\", \"responseKind\": { \"group\": \"\", \"kind\": \"CSIDriver\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"csidriver\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"csinodes\", \"responseKind\": { \"group\": \"\", \"kind\": \"CSINode\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"csinode\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"csistoragecapacities\", \"responseKind\": { \"group\": \"\", \"kind\": \"CSIStorageCapacity\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"csistoragecapacity\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"storageclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"StorageClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"sc\" ], \"singularResource\": \"storageclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"volumeattachments\", \"responseKind\": { \"group\": \"\", \"kind\": \"VolumeAttachment\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"volumeattachment\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"VolumeAttachment\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"volumeattributesclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"VolumeAttributesClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"vac\" ], \"singularResource\": \"volumeattributesclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1beta1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"volumeattributesclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"VolumeAttributesClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"vac\" ], \"singularResource\": \"volumeattributesclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"admissionregistration.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"api-extensions\" ], \"resource\": \"mutatingwebhookconfigurations\", \"responseKind\": { \"group\": \"\", \"kind\": \"MutatingWebhookConfiguration\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"mutatingwebhookconfiguration\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicies\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicy\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicybindings\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicyBinding\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicybinding\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingwebhookconfigurations\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingWebhookConfiguration\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingwebhookconfiguration\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicies\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicy\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicybindings\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicyBinding\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicybinding\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1beta1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicies\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicy\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicy\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"categories\": [ \"api-extensions\" ], \"resource\": \"validatingadmissionpolicybindings\", \"responseKind\": { \"group\": \"\", \"kind\": \"ValidatingAdmissionPolicyBinding\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"validatingadmissionpolicybinding\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"apiextensions.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"categories\": [ \"api-extensions\" ], \"resource\": \"customresourcedefinitions\", \"responseKind\": { \"group\": \"\", \"kind\": \"CustomResourceDefinition\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"crd\", \"crds\" ], \"singularResource\": \"customresourcedefinition\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"CustomResourceDefinition\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"scheduling.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"priorityclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"PriorityClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"shortNames\": [ \"pc\" ], \"singularResource\": \"priorityclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"coordination.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"leases\", \"responseKind\": { \"group\": \"\", \"kind\": \"Lease\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"lease\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"leasecandidates\", \"responseKind\": { \"group\": \"\", \"kind\": \"LeaseCandidate\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"leasecandidate\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"node.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"runtimeclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"RuntimeClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"runtimeclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"discovery.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"endpointslices\", \"responseKind\": { \"group\": \"\", \"kind\": \"EndpointSlice\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"endpointslice\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"flowcontrol.apiserver.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"flowschemas\", \"responseKind\": { \"group\": \"\", \"kind\": \"FlowSchema\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"flowschema\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"FlowSchema\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"prioritylevelconfigurations\", \"responseKind\": { \"group\": \"\", \"kind\": \"PriorityLevelConfiguration\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"prioritylevelconfiguration\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"PriorityLevelConfiguration\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1\" }, { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"flowschemas\", \"responseKind\": { \"group\": \"\", \"kind\": \"FlowSchema\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"flowschema\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"FlowSchema\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"prioritylevelconfigurations\", \"responseKind\": { \"group\": \"\", \"kind\": \"PriorityLevelConfiguration\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"prioritylevelconfiguration\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"PriorityLevelConfiguration\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1beta3\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"internal.apiserver.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"storageversions\", \"responseKind\": { \"group\": \"\", \"kind\": \"StorageVersion\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"storageversion\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"StorageVersion\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"resource.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"deviceclasses\", \"responseKind\": { \"group\": \"\", \"kind\": \"DeviceClass\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"deviceclass\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"podschedulingcontexts\", \"responseKind\": { \"group\": \"\", \"kind\": \"PodSchedulingContext\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"podschedulingcontext\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"PodSchedulingContext\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"resourceclaims\", \"responseKind\": { \"group\": \"\", \"kind\": \"ResourceClaim\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"resourceclaim\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"ResourceClaim\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"resourceclaimtemplates\", \"responseKind\": { \"group\": \"\", \"kind\": \"ResourceClaimTemplate\", \"version\": \"\" }, \"scope\": \"Namespaced\", \"singularResource\": \"resourceclaimtemplate\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] }, { \"resource\": \"resourceslices\", \"responseKind\": { \"group\": \"\", \"kind\": \"ResourceSlice\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"resourceslice\", \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha3\" } ] }, { \"metadata\": { \"creationTimestamp\": null, \"name\": \"storagemigration.k8s.io\" }, \"versions\": [ { \"freshness\": \"Current\", \"resources\": [ { \"resource\": \"storageversionmigrations\", \"responseKind\": { \"group\": \"\", \"kind\": \"StorageVersionMigration\", \"version\": \"\" }, \"scope\": \"Cluster\", \"singularResource\": \"storageversionmigration\", \"subresources\": [ { \"responseKind\": { \"group\": \"\", \"kind\": \"StorageVersionMigration\", \"version\": \"\" }, \"subresource\": \"status\", \"verbs\": [ \"get\", \"patch\", \"update\" ] } ], \"verbs\": [ \"create\", \"delete\", \"deletecollection\", \"get\", \"list\", \"patch\", \"update\", \"watch\" ] } ], \"version\": \"v1alpha1\" } ] } ], \"kind\": \"APIGroupDiscoveryList\", \"metadata\": {} } "} {"_id":"q-en-kubernetes-e408411725f8c8e4c0fe5b2da97503fe84575b975c20347883cfb9d092014000","text":"if !pluginStatus.IsUnschedulable() { // Filter plugins are not supposed to return any status other than // Success or Unschedulable. errStatus := framework.AsStatus(fmt.Errorf(\"running %q filter plugin: %w\", pl.Name(), pluginStatus.AsError())).WithFailedPlugin(pl.Name()) return map[string]*framework.Status{pl.Name(): errStatus} pluginStatus = framework.AsStatus(fmt.Errorf(\"running %q filter plugin: %w\", pl.Name(), pluginStatus.AsError())) } pluginStatus.SetFailedPlugin(pl.Name()) statuses[pl.Name()] = pluginStatus return map[string]*framework.Status{pl.Name(): pluginStatus} } }"} {"_id":"q-en-kubernetes-e412c671f8595c801bb6cba52a2c8d9739ea64487c4bc7c7a5d75db57da4c072","text":"} } func TestDescribePodSecurityPolicy(t *testing.T) { expected := []string{ \"Name:t*mypsp\", \"Allow Privileged:t*false\", \"Default Add Capabilities:t*\", \"Required Drop Capabilities:t*\", \"Allowed Capabilities:t*\", \"Allowed Volume Types:t*\", \"Allow Host Network:t*false\", \"Allow Host Ports:t*\", \"Allow Host PID:t*false\", \"Allow Host IPC:t*false\", \"Read Only Root Filesystem:t*false\", \"SELinux Context Strategy: RunAsAny\", \"User:t*\", \"Role:t*\", \"Type:t*\", \"Level:t*\", \"Run As User Strategy: RunAsAny\", \"FSGroup Strategy: RunAsAny\", \"Supplemental Groups Strategy: RunAsAny\", } fake := fake.NewSimpleClientset(&extensions.PodSecurityPolicy{ ObjectMeta: metav1.ObjectMeta{ Name: \"mypsp\", }, Spec: extensions.PodSecurityPolicySpec{ SELinux: extensions.SELinuxStrategyOptions{ Rule: extensions.SELinuxStrategyRunAsAny, }, RunAsUser: extensions.RunAsUserStrategyOptions{ Rule: extensions.RunAsUserStrategyRunAsAny, }, FSGroup: extensions.FSGroupStrategyOptions{ Rule: extensions.FSGroupStrategyRunAsAny, }, SupplementalGroups: extensions.SupplementalGroupsStrategyOptions{ Rule: extensions.SupplementalGroupsStrategyRunAsAny, }, }, }) c := &describeClient{T: t, Namespace: \"\", Interface: fake} d := PodSecurityPolicyDescriber{c} out, err := d.Describe(\"\", \"mypsp\", printers.DescriberSettings{}) if err != nil { t.Fatalf(\"unexpected error: %v\", err) } for _, item := range expected { if matched, _ := regexp.MatchString(item, out); !matched { t.Errorf(\"Expected to find %q in: %q\", item, out) } } } func TestDescribeResourceQuota(t *testing.T) { fake := fake.NewSimpleClientset(&api.ResourceQuota{ ObjectMeta: metav1.ObjectMeta{"} {"_id":"q-en-kubernetes-e42d941083ad5efe8da95eefc11245db8034d25f41a61b9f2bd33cc8e8a8457e","text":"createdConts.Insert(p[:n-8]) } } // We expect 9: 2 pod infra containers + 2 pods from the replication controller + // 1 pod infra container + 2 pods from the URL + // 1 pod infra container + 1 pod from the service test. // In addition, runStaticPodTest creates 1 pod infra containers + // 1 pod container from the mainfest file // The total number of container created is 11 // We expect 9: 2 pod infra containers + 2 containers from the replication controller + // 1 pod infra container + 2 containers from the URL on first Kubelet + // 1 pod infra container + 2 containers from the URL on second Kubelet + // 1 pod infra container + 1 container from the service test. // In addition, runStaticPodTest creates 2 pod infra containers + // 2 pod containers from the file (1 for manifest and 1 for spec) // The total number of container created is 13 if len(createdConts) != 11 { glog.Fatalf(\"Expected 11 containers; got %vnnlist of created containers:nn%#vnnDocker 1 Created:nn%#vnnDocker 2 Created:nn%#vnn\", len(createdConts), createdConts.List(), fakeDocker1.Created, fakeDocker2.Created) if len(createdConts) != 16 { glog.Fatalf(\"Expected 16 containers; got %vnnlist of created containers:nn%#vnnDocker 1 Created:nn%#vnnDocker 2 Created:nn%#vnn\", len(createdConts), createdConts.List(), fakeDocker1.Created, fakeDocker2.Created) } glog.Infof(\"OK - found created containers: %#v\", createdConts.List()) } // ServeCachedManifestFile serves a file for kubelet to read. func ServeCachedManifestFile() (servingAddress string) { func ServeCachedManifestFile(contents string) (servingAddress string) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == \"/manifest\" { w.Write([]byte(testManifestFile)) w.Write([]byte(contents)) return } glog.Fatalf(\"Got request: %#vn\", r)"} {"_id":"q-en-kubernetes-e43508cc8a8b87bedfc6f8689ea0cd3754674a455376341c3dbd71143f0918a3","text":"command: - /heapster - --source=kubernetes.summary_api:'' - image: gcr.io/google_containers/addon-resizer:1.5 - image: gcr.io/google_containers/addon-resizer:1.6 name: heapster-nanny resources: limits:"} {"_id":"q-en-kubernetes-e461d5a4abae83b4fcba7d918c5928cf9a10e8e3f688542105313c1510c4ced5","text":"testAPIVersion = \"testgroup/testversion\" ) var scheme *runtime.Scheme func init() { scheme = runtime.NewScheme() metav1.AddMetaToScheme(scheme) } func newPartialObjectMetadata(apiVersion, kind, namespace, name string) *metav1.PartialObjectMetadata { return &metav1.PartialObjectMetadata{ TypeMeta: metav1.TypeMeta{"} {"_id":"q-en-kubernetes-e49e0305ea50fc0921cb376627bf54e2b7b34776b10fb41aa282238540388f61","text":" apiVersion: v1 kind: Service metadata: name: elasticsearch labels: component: elasticsearch role: client spec: type: LoadBalancer selector: component: elasticsearch role: client ports: - name: http port: 9200 protocol: TCP "} {"_id":"q-en-kubernetes-e4ceefd4801815ce240b9bd7cf07027b5e156462d0fb2c91a737d0aae7e0440d","text":"// More details here: https://github.com/kubernetes/kubernetes/issues/50986 AutoDetectCloudProvider = \"auto-detect\" defaultIPTablesMasqueradeBit = 14 defaultIPTablesDropBit = 15 DefaultIPTablesMasqueradeBit = 14 DefaultIPTablesDropBit = 15 ) var ( zeroDuration = metav1.Duration{} // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. defaultNodeAllocatableEnforcement = []string{\"pods\"} DefaultNodeAllocatableEnforcement = []string{\"pods\"} ) func addDefaultingFuncs(scheme *kruntime.Scheme) error {"} {"_id":"q-en-kubernetes-e4dd9d3b194b2e8294c1d9d5dd47abdad3f5d1701115386dd3b30918bc6c1da1","text":"ExpectedEtcdPath: \"/registry/configmaps/\" + namespace + \"/cm1\", }, gvr(\"\", \"v1\", \"services\"): { Stub: `{\"metadata\": {\"name\": \"service1\"}, \"spec\": {\"externalName\": \"service1name\", \"ports\": [{\"port\": 10000, \"targetPort\": 11000}], \"selector\": {\"test\": \"data\"}}}`, Stub: `{\"metadata\": {\"name\": \"service1\"}, \"spec\": {\"type\": \"LoadBalancer\", \"ports\": [{\"port\": 10000, \"targetPort\": 11000}], \"selector\": {\"test\": \"data\"}}}`, ExpectedEtcdPath: \"/registry/services/specs/\" + namespace + \"/service1\", }, gvr(\"\", \"v1\", \"podtemplates\"): {"} {"_id":"q-en-kubernetes-e4f92dafde6780422859680195d7f48a0a8249b36e2ae1a41c56632c6746f6f8","text":"defer close(stopCh) manager, informers := testNewReplicaSetControllerFromClient(client, stopCh, BurstReplicas) // A controller with 2 replicas and no pods in the store, 2 creates expected // A controller with 2 replicas and no active pods in the store. // Inactive pods should be ignored. 2 creates expected. labelMap := map[string]string{\"foo\": \"bar\"} rs := newReplicaSet(2, labelMap) informers.Extensions().V1beta1().ReplicaSets().Informer().GetIndexer().Add(rs) failedPod := newPod(\"failed-pod\", rs, v1.PodFailed, nil, true) deletedPod := newPod(\"deleted-pod\", rs, v1.PodRunning, nil, true) deletedPod.DeletionTimestamp = &metav1.Time{Time: time.Now()} informers.Core().V1().Pods().Informer().GetIndexer().Add(failedPod) informers.Core().V1().Pods().Informer().GetIndexer().Add(deletedPod) fakePodControl := controller.FakePodControl{} manager.podControl = &fakePodControl"} {"_id":"q-en-kubernetes-e51279fb7b326d790b1115e55a1cb5a30b042a1e5da2f13b45c14bed83c742aa","text":"// Represents the requirement on the container exit codes. // +optional OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:\"onExitCodes\" protobuf:\"bytes,2,opt,name=onExitCodes\"` OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:\"onExitCodes,omitempty\" protobuf:\"bytes,2,opt,name=onExitCodes\"` // Represents the requirement on the pod conditions. The requirement is represented // as a list of pod condition patterns. The requirement is satisfied if at // least one pattern matches an actual pod condition. At most 20 elements are allowed. // +listType=atomic // +optional OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:\"onPodConditions\" protobuf:\"bytes,3,opt,name=onPodConditions\"` OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:\"onPodConditions,omitempty\" protobuf:\"bytes,3,opt,name=onPodConditions\"` } // PodFailurePolicy describes how failed pods influence the backoffLimit."} {"_id":"q-en-kubernetes-e55536ba0c675c4b6544dca41b2d5c63047f4731d304664766783f3b92cff922","text":"}) ginkgo.It(\"Kubelet's oom-score-adj should be -999\", func() { kubeletPids, err := getPidsForProcess(kubeletProcessName, \"\") gomega.Expect(err).To(gomega.BeNil(), \"failed to get list of kubelet pids\") framework.ExpectNoError(err, \"failed to get list of kubelet pids\") framework.ExpectEqual(len(kubeletPids), 1, \"expected only one kubelet process; found %d\", len(kubeletPids)) gomega.Eventually(func() error { return validateOOMScoreAdjSetting(kubeletPids[0], -999)"} {"_id":"q-en-kubernetes-e5759ab7383f2f594a6312209d6e2e97a9a7cbb599722c575d3386ce53778bad","text":"} sgList := []string{securityGroupID} for _, extraSG := range strings.Split(annotation, \",\") { for _, extraSG := range strings.Split(annotations[ServiceAnnotationLoadBalancerExtraSecurityGroups], \",\") { extraSG = strings.TrimSpace(extraSG) if len(extraSG) > 0 { sgList = append(sgList, extraSG)"} {"_id":"q-en-kubernetes-e581a061fefe3597069f9ad3759dfeb35280f0c253cebbe979b6544768af2e24","text":"expectMetrics(t, expectedMetrics{desiredSlices: 1, actualSlices: 1, desiredEndpoints: 10, addedPerSync: 20, removedPerSync: 10, numCreated: 1, numUpdated: 1, numDeleted: 0}) } // When a Service has a non-nil deletionTimestamp we want to avoid creating any // new EndpointSlices but continue to allow updates and deletes through. This // test uses 3 EndpointSlices, 1 \"to-create\", 1 \"to-update\", and 1 \"to-delete\". // Each test case exercises different combinations of calls to finalize with // those resources. func TestReconcilerFinalizeSvcDeletionTimestamp(t *testing.T) { now := metav1.Now() testCases := []struct { name string deletionTimestamp *metav1.Time attemptCreate bool attemptUpdate bool attemptDelete bool expectCreatedSlice bool expectUpdatedSlice bool expectDeletedSlice bool }{{ name: \"Attempt create and update, nil deletion timestamp\", deletionTimestamp: nil, attemptCreate: true, attemptUpdate: true, expectCreatedSlice: true, expectUpdatedSlice: true, expectDeletedSlice: true, }, { name: \"Attempt create and update, deletion timestamp set\", deletionTimestamp: &now, attemptCreate: true, attemptUpdate: true, expectCreatedSlice: false, expectUpdatedSlice: true, expectDeletedSlice: true, }, { // Slice scheduled for creation is transitioned to update of Slice // scheduled for deletion. name: \"Attempt create, update, and delete, nil deletion timestamp, recycling in action\", deletionTimestamp: nil, attemptCreate: true, attemptUpdate: true, attemptDelete: true, expectCreatedSlice: false, expectUpdatedSlice: true, expectDeletedSlice: true, }, { // Slice scheduled for creation is transitioned to update of Slice // scheduled for deletion. name: \"Attempt create, update, and delete, deletion timestamp set, recycling in action\", deletionTimestamp: &now, attemptCreate: true, attemptUpdate: true, attemptDelete: true, expectCreatedSlice: false, expectUpdatedSlice: true, expectDeletedSlice: true, }, { // Update and delete continue to work when deletionTimestamp is set. name: \"Attempt update delete, deletion timestamp set\", deletionTimestamp: &now, attemptCreate: false, attemptUpdate: true, attemptDelete: true, expectCreatedSlice: false, expectUpdatedSlice: true, expectDeletedSlice: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { client := newClientset() setupMetrics() r := newReconciler(client, []*corev1.Node{{ObjectMeta: metav1.ObjectMeta{Name: \"node-1\"}}}, defaultMaxEndpointsPerSlice) namespace := \"test\" svc, endpointMeta := newServiceAndEndpointMeta(\"foo\", namespace) svc.DeletionTimestamp = tc.deletionTimestamp esToCreate := &discovery.EndpointSlice{ ObjectMeta: metav1.ObjectMeta{Name: \"to-create\"}, AddressType: endpointMeta.AddressType, Ports: endpointMeta.Ports, } // Add EndpointSlice that can be updated. esToUpdate, err := client.DiscoveryV1beta1().EndpointSlices(namespace).Create(context.TODO(), &discovery.EndpointSlice{ ObjectMeta: metav1.ObjectMeta{Name: \"to-update\"}, AddressType: endpointMeta.AddressType, Ports: endpointMeta.Ports, }, metav1.CreateOptions{}) if err != nil { t.Fatalf(\"Expected no error creating EndpointSlice during test setup, got %v\", err) } // Add an endpoint so we can see if this has actually been updated by // finalize func. esToUpdate.Endpoints = []discovery.Endpoint{{Addresses: []string{\"10.2.3.4\"}}} // Add EndpointSlice that can be deleted. esToDelete, err := client.DiscoveryV1beta1().EndpointSlices(namespace).Create(context.TODO(), &discovery.EndpointSlice{ ObjectMeta: metav1.ObjectMeta{Name: \"to-delete\"}, AddressType: endpointMeta.AddressType, Ports: endpointMeta.Ports, }, metav1.CreateOptions{}) if err != nil { t.Fatalf(\"Expected no error creating EndpointSlice during test setup, got %v\", err) } slicesToCreate := []*discovery.EndpointSlice{} if tc.attemptCreate { slicesToCreate = append(slicesToCreate, esToCreate.DeepCopy()) } slicesToUpdate := []*discovery.EndpointSlice{} if tc.attemptUpdate { slicesToUpdate = append(slicesToUpdate, esToUpdate.DeepCopy()) } slicesToDelete := []*discovery.EndpointSlice{} if tc.attemptDelete { slicesToDelete = append(slicesToDelete, esToDelete.DeepCopy()) } err = r.finalize(&svc, slicesToCreate, slicesToUpdate, slicesToDelete, time.Now()) if err != nil { t.Errorf(\"Error calling r.finalize(): %v\", err) } fetchedSlices := fetchEndpointSlices(t, client, namespace) createdSliceFound := false updatedSliceFound := false deletedSliceFound := false for _, epSlice := range fetchedSlices { if epSlice.Name == esToCreate.Name { createdSliceFound = true } if epSlice.Name == esToUpdate.Name { updatedSliceFound = true if tc.attemptUpdate && len(epSlice.Endpoints) != len(esToUpdate.Endpoints) { t.Errorf(\"Expected EndpointSlice to be updated with %d endpoints, got %d endpoints\", len(esToUpdate.Endpoints), len(epSlice.Endpoints)) } } if epSlice.Name == esToDelete.Name { deletedSliceFound = true } } if createdSliceFound != tc.expectCreatedSlice { t.Errorf(\"Expected created EndpointSlice existence to be %t, got %t\", tc.expectCreatedSlice, createdSliceFound) } if updatedSliceFound != tc.expectUpdatedSlice { t.Errorf(\"Expected updated EndpointSlice existence to be %t, got %t\", tc.expectUpdatedSlice, updatedSliceFound) } if deletedSliceFound != tc.expectDeletedSlice { t.Errorf(\"Expected deleted EndpointSlice existence to be %t, got %t\", tc.expectDeletedSlice, deletedSliceFound) } }) } } // Test Helpers func newReconciler(client *fake.Clientset, nodes []*corev1.Node, maxEndpointsPerSlice int32) *reconciler {"} {"_id":"q-en-kubernetes-e5d47aeac2556ece20ef3c81bc7962f620d571a0028c9789313dce7c055789cb","text":"\"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library\","} {"_id":"q-en-kubernetes-e604e12c56b573bcce06c1d802fb7237a747e6d539181d7f187dfaffe69f3b67","text":" apiVersion: v1 kind: ReplicationController metadata: name: es labels: component: elasticsearch spec: replicas: 1 template: metadata: labels: component: elasticsearch spec: serviceAccount: elasticsearch containers: - name: es securityContext: capabilities: add: - IPC_LOCK image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4 env: - name: KUBERNETES_CA_CERTIFICATE_FILE value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: \"CLUSTER_NAME\" value: \"myesdb\" - name: \"DISCOVERY_SERVICE\" value: \"elasticsearch\" - name: NODE_MASTER value: \"true\" - name: NODE_DATA value: \"true\" - name: HTTP_ENABLE value: \"true\" ports: - containerPort: 9200 name: http protocol: TCP - containerPort: 9300 name: transport protocol: TCP volumeMounts: - mountPath: /data name: storage volumes: - name: storage emptyDir: {} "} {"_id":"q-en-kubernetes-e61c0699309787d0c7633477399359b562e72a5f6b8c6f4dd8047cb5b236f3f4","text":"import ( \"context\" \"encoding/json\" \"fmt\" \"math/rand\" \"time\""} {"_id":"q-en-kubernetes-e625a07848ef1959d299676d424f6f14adeca744fd2bcd42cfb66c0ac32cfd93","text":"WithStdinData(\"abcd1234n\"). ExecOrDie() gomega.Expect(runOutput).ToNot(gomega.ContainSubstring(\"stdin closed\")) g = func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) } runTestPod, _, err = polymorphichelpers.GetFirstPod(f.ClientSet.CoreV1(), ns, \"run=run-test-3\", 1*time.Minute, g) g := func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) } runTestPod, _, err := polymorphichelpers.GetFirstPod(f.ClientSet.CoreV1(), ns, \"run=run-test-3\", 1*time.Minute, g) gomega.Expect(err).To(gomega.BeNil()) if !e2epod.CheckPodsRunningReady(c, ns, []string{runTestPod.Name}, time.Minute) { e2elog.Failf(\"Pod %q of Job %q should still be running\", runTestPod.Name, \"run-test-3\")"} {"_id":"q-en-kubernetes-e63c9e24c19eae351637a7d83653de2da58debbc75e3f0a0f81c57bd2637c5d8","text":"valueFrom: fieldRef: fieldPath: metadata.name command: - /bin/sh - -c - /kubemark --morph=kubelet --name=$(NODE_NAME) {{hollow_kubelet_params}} --kubeconfig=/kubeconfig/kubelet.kubeconfig $(CONTENT_TYPE) --alsologtostderr 1>>/var/log/kubelet-$(NODE_NAME).log 2>&1 command: [ \"/kubemark\", \"--morph=kubelet\", \"--name=$(NODE_NAME)\", \"--kubeconfig=/kubeconfig/kubelet.kubeconfig\", \"$(CONTENT_TYPE)\", \"--log-file=/var/log/kubelet-$(NODE_NAME).log\", \"--logtostderr=false\", {{hollow_kubelet_params}} ] volumeMounts: - name: kubeconfig-volume mountPath: /kubeconfig"} {"_id":"q-en-kubernetes-e64aafa9530bcbebf253fdca60651fed7042aa505efb069a9929e8853bff477b","text":"\"//vendor/github.com/onsi/gomega:go_default_library\", \"//vendor/k8s.io/api/core/v1:go_default_library\", \"//vendor/k8s.io/api/settings/v1alpha1:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library\", \"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library\","} {"_id":"q-en-kubernetes-e6520d4ad620e21114badad9e7f42193df1b01a97ba863d91831e30d754c667d","text":"} // apply volume ownership if !c.readOnly && fsGroup != nil { err := volume.SetVolumeOwnership(c, fsGroup) if err != nil { // attempt to rollback mount. glog.Error(log(\"mounter.SetupAt failed to set fsgroup volume ownership for [%s]: %v\", c.volumeID, err)) glog.V(4).Info(log(\"mounter.SetupAt attempting to unpublish volume %s due to previous error\", c.volumeID)) if unpubErr := csi.NodeUnpublishVolume(ctx, c.volumeID, dir); unpubErr != nil { glog.Error(log( \"mounter.SetupAt failed to unpublish volume [%s]: %v (caused by previous NodePublish error: %v)\", c.volumeID, unpubErr, err, )) return fmt.Errorf(\"%v (caused by %v)\", unpubErr, err) } // The following logic is derived from https://github.com/kubernetes/kubernetes/issues/66323 // if fstype is \"\", then skip fsgroup (could be indication of non-block filesystem) // if fstype is provided and pv.AccessMode == ReadWriteOnly, then apply fsgroup if unmountErr := removeMountDir(c.plugin, dir); unmountErr != nil { glog.Error(log( \"mounter.SetupAt failed to clean mount dir [%s]: %v (caused by previous NodePublish error: %v)\", dir, unmountErr, err, )) return fmt.Errorf(\"%v (caused by %v)\", unmountErr, err) } err = c.applyFSGroup(fsType, fsGroup) if err != nil { // attempt to rollback mount. fsGrpErr := fmt.Errorf(\"applyFSGroup failed for vol %s: %v\", c.volumeID, err) if unpubErr := csi.NodeUnpublishVolume(ctx, c.volumeID, dir); unpubErr != nil { glog.Error(log(\"NodeUnpublishVolume failed for [%s]: %v\", c.volumeID, unpubErr)) return fsGrpErr } return err if unmountErr := removeMountDir(c.plugin, dir); unmountErr != nil { glog.Error(log(\"removeMountDir failed for [%s]: %v\", dir, unmountErr)) return fsGrpErr } glog.V(4).Info(log(\"mounter.SetupAt sets fsGroup to [%d] for %s\", *fsGroup, c.volumeID)) return fsGrpErr } glog.V(4).Infof(log(\"mounter.SetUp successfully requested NodePublish [%s]\", dir))"} {"_id":"q-en-kubernetes-e6771feb95a0c95017154cf86225354e47025b538ae262f4a29364626eccfb00","text":"\"//cmd/kube-proxy/app:go_default_library\", \"//pkg/client/metrics/prometheus:go_default_library\", \"//pkg/version/prometheus:go_default_library\", \"//vendor/github.com/spf13/pflag:go_default_library\", \"//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library\", \"//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library\", ],"} {"_id":"q-en-kubernetes-e6d9cf027d64c2c84643af065b5f49d223d35c1d298d4f0c1dd5d77c42937a57","text":"} ip, err := az.getIPForMachine(name) if err != nil { glog.Errorf(\"error: az.NodeAddresses, az.getIPForMachine(%s), err=%v\", name, err) return nil, err if az.CloudProviderBackoff { glog.V(2).Infof(\"NodeAddresses(%s) backing off\", name) ip, err = az.GetIPForMachineWithRetry(name) if err != nil { glog.V(2).Infof(\"NodeAddresses(%s) abort backoff\", name) return nil, err } } else { glog.Errorf(\"error: az.NodeAddresses, az.getIPForMachine(%s), err=%v\", name, err) return nil, err } } return []v1.NodeAddress{"} {"_id":"q-en-kubernetes-e704697ecb7b458d813755a931378e143dd784c3a42a8bb8b2078b143bb0e58a","text":"'${MASTER_IP}' create-flanneld-opts '127.0.0.1' '${MASTER_IP}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' FLANNEL_OTHER_NET_CONFIG='${FLANNEL_OTHER_NET_CONFIG}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' ${BASH_DEBUG_FLAGS} cp ~/kube/default/* /etc/default/ cp ~/kube/init_conf/* /etc/init/"} {"_id":"q-en-kubernetes-e70be627d8d51fa7e0f637efd62c004bfa1d350a20f631f1930efa35e344dcc0","text":"}{ { code: http.StatusBadRequest, expected: true, expected: false, }, { code: http.StatusInternalServerError,"} {"_id":"q-en-kubernetes-e73f0c8898528169c6810b1b9be1fefa5720c6d7929ce64be445f25cecef32fb","text":"func subnet(service *v1.Service) *string { if requiresInternalLoadBalancer(service) { if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found { if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found && strings.TrimSpace(l) != \"\" { return &l } }"} {"_id":"q-en-kubernetes-e76f7e9c7c02f4ed44a7684b377e9790429a2cf1db9b3d0f71f7ae55a06893d6","text":"}, }, }, Required: []string{\"versions\"}, }, }, Dependencies: []string{"} {"_id":"q-en-kubernetes-e777c4a6bf6a39f12928daf74cd488b5b88832f89a3a632852ed29f351849d86","text":"statefulSetTimeout = 10 * time.Minute // statefulPodTimeout is a timeout for stateful pods to change state statefulPodTimeout = 5 * time.Minute testFinalizer = \"example.com/test-finalizer\" ) var httpProbe = &v1.Probe{"} {"_id":"q-en-kubernetes-e7a5b943cb86dbf44f92c75cb3c548373510beda62c5375f3f116c45f03fdf35","text":"expectedErrMsg: fmt.Errorf(\"getError\"), }, { name: \"InstanceMetadataByProviderID should report error if VMSS instanceID is invalid\", metadataName: \"vmss_$123\", providerID: providerID, vmType: vmTypeVMSS, useInstanceMetadata: true, expectedErrMsg: fmt.Errorf(\"failed to parse VMSS instanceID %q: strconv.ParseInt: parsing %q: invalid syntax\", \"$123\", \"$123\"), }, { name: \"InstanceMetadataByProviderID should get metadata from Azure API if cloud.UseInstanceMetadata is false\", metadataName: \"vm1\", providerID: providerID,"} {"_id":"q-en-kubernetes-e7a7689f8e666e1bfd07eca3018d01693bb66e01512f2c4539798dee01350a6f","text":" /* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package plugin import ( \"context\" \"errors\" \"fmt\" \"time\" v1 \"k8s.io/api/core/v1\" resourceapi \"k8s.io/api/resource/v1alpha3\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/fields\" utilversion \"k8s.io/apimachinery/pkg/util/version\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/client-go/kubernetes\" \"k8s.io/klog/v2\" \"k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache\" ) // defaultClientCallTimeout is the default amount of time that a DRA driver has // to respond to any of the gRPC calls. kubelet uses this value by passing nil // to RegisterPlugin. Some tests use a different, usually shorter timeout to // speed up testing. // // This is half of the kubelet retry period (according to // https://github.com/kubernetes/kubernetes/commit/0449cef8fd5217d394c5cd331d852bd50983e6b3). const defaultClientCallTimeout = 45 * time.Second // RegistrationHandler is the handler which is fed to the pluginwatcher API. type RegistrationHandler struct { // backgroundCtx is used for all future activities of the handler. // This is necessary because it implements APIs which don't // provide a context. backgroundCtx context.Context kubeClient kubernetes.Interface getNode func() (*v1.Node, error) } var _ cache.PluginHandler = &RegistrationHandler{} // NewPluginHandler returns new registration handler. // // Must only be called once per process because it manages global state. // If a kubeClient is provided, then it synchronizes ResourceSlices // with the resource information provided by plugins. func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *RegistrationHandler { handler := &RegistrationHandler{ // The context and thus logger should come from the caller. backgroundCtx: klog.NewContext(context.TODO(), klog.LoggerWithName(klog.TODO(), \"DRA registration handler\")), kubeClient: kubeClient, getNode: getNode, } // When kubelet starts up, no DRA driver has registered yet. None of // the drivers are usable until they come back, which might not happen // at all. Therefore it is better to not advertise any local resources // because pods could get stuck on the node waiting for the driver // to start up. // // This has to run in the background. go handler.wipeResourceSlices(\"\") return handler } // wipeResourceSlices deletes ResourceSlices of the node, optionally just for a specific driver. func (h *RegistrationHandler) wipeResourceSlices(driver string) { if h.kubeClient == nil { return } ctx := h.backgroundCtx logger := klog.FromContext(ctx) backoff := wait.Backoff{ Duration: time.Second, Factor: 2, Jitter: 0.2, Cap: 5 * time.Minute, Steps: 100, } // Error logging is done inside the loop. Context cancellation doesn't get logged. _ = wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) { node, err := h.getNode() if apierrors.IsNotFound(err) { return false, nil } if err != nil { logger.Error(err, \"Unexpected error checking for node\") return false, nil } fieldSelector := fields.Set{resourceapi.ResourceSliceSelectorNodeName: node.Name} if driver != \"\" { fieldSelector[resourceapi.ResourceSliceSelectorDriver] = driver } err = h.kubeClient.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()}) switch { case err == nil: logger.V(3).Info(\"Deleted ResourceSlices\", \"fieldSelector\", fieldSelector) return true, nil case apierrors.IsUnauthorized(err): // This can happen while kubelet is still figuring out // its credentials. logger.V(5).Info(\"Deleting ResourceSlice failed, retrying\", \"fieldSelector\", fieldSelector, \"err\", err) return false, nil default: // Log and retry for other errors. logger.V(3).Info(\"Deleting ResourceSlice failed, retrying\", \"fieldSelector\", fieldSelector, \"err\", err) return false, nil } }) } // RegisterPlugin is called when a plugin can be registered. func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string, pluginClientTimeout *time.Duration) error { // Prepare a context with its own logger for the plugin. // // The lifecycle of the plugin's background activities is tied to our // root context, so canceling that will also cancel the plugin. // // The logger injects the plugin name as additional value // into all log output related to the plugin. ctx := h.backgroundCtx logger := klog.FromContext(ctx) logger = klog.LoggerWithValues(logger, \"pluginName\", pluginName) ctx = klog.NewContext(ctx, logger) logger.V(3).Info(\"Register new DRA plugin\", \"endpoint\", endpoint) highestSupportedVersion, err := h.validateVersions(pluginName, versions) if err != nil { return fmt.Errorf(\"version check of plugin %s failed: %w\", pluginName, err) } var timeout time.Duration if pluginClientTimeout == nil { timeout = defaultClientCallTimeout } else { timeout = *pluginClientTimeout } ctx, cancel := context.WithCancelCause(ctx) pluginInstance := &Plugin{ backgroundCtx: ctx, cancel: cancel, conn: nil, endpoint: endpoint, highestSupportedVersion: highestSupportedVersion, clientCallTimeout: timeout, } // Storing endpoint of newly registered DRA Plugin into the map, where plugin name will be the key // all other DRA components will be able to get the actual socket of DRA plugins by its name. if draPlugins.add(pluginName, pluginInstance) { logger.V(1).Info(\"Already registered, previous plugin was replaced\") } return nil } func (h *RegistrationHandler) validateVersions( pluginName string, versions []string, ) (*utilversion.Version, error) { if len(versions) == 0 { return nil, errors.New(\"empty list for supported versions\") } // Validate version newPluginHighestVersion, err := utilversion.HighestSupportedVersion(versions) if err != nil { // HighestSupportedVersion includes the list of versions in its error // if relevant, no need to repeat it here. return nil, fmt.Errorf(\"none of the versions are supported: %w\", err) } existingPlugin := draPlugins.get(pluginName) if existingPlugin == nil { return newPluginHighestVersion, nil } if existingPlugin.highestSupportedVersion.LessThan(newPluginHighestVersion) { return newPluginHighestVersion, nil } return nil, fmt.Errorf(\"another plugin instance is already registered with a higher supported version: %q < %q\", newPluginHighestVersion, existingPlugin.highestSupportedVersion) } // DeRegisterPlugin is called when a plugin has removed its socket, // signaling it is no longer available. func (h *RegistrationHandler) DeRegisterPlugin(pluginName string) { if p := draPlugins.delete(pluginName); p != nil { logger := klog.FromContext(p.backgroundCtx) logger.V(3).Info(\"Deregister DRA plugin\", \"endpoint\", p.endpoint) // Clean up the ResourceSlices for the deleted Plugin since it // may have died without doing so itself and might never come // back. go h.wipeResourceSlices(pluginName) return } logger := klog.FromContext(h.backgroundCtx) logger.V(3).Info(\"Deregister DRA plugin not necessary, was already removed\") } // ValidatePlugin is called by kubelet's plugin watcher upon detection // of a new registration socket opened by DRA plugin. func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error { _, err := h.validateVersions(pluginName, versions) if err != nil { return fmt.Errorf(\"invalid versions of plugin %s: %w\", pluginName, err) } return err } "} {"_id":"q-en-kubernetes-e7ce846309a8184798bd7d79b77dcf46c09a262f00e363c7a09cca4717cbd873","text":"const ( pvDeletionTimeout = 3 * time.Minute statefulSetReadyTimeout = 3 * time.Minute taintKeyPrefix = \"zoneTaint_\" ) var _ = utils.SIGDescribe(\"Regional PD\", func() {"} {"_id":"q-en-kubernetes-e7d86f4108fb5fd6117dfcb994f42796562b630eb232d6c005fb7fccd37624b7","text":"return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds} } // NewCoercingMultiGroupVersioner returns the provided group version for any incoming kind. // Incoming kinds that match the provided groupKinds are preferred. // Kind may be empty in the provided group kind, in which case any kind will match. // Examples: // gv=mygroup/__internal, groupKinds=mygroup/Foo, anothergroup/Bar // KindForGroupVersionKinds(yetanother/v1/Baz, anothergroup/v1/Bar) -> mygroup/__internal/Bar (matched preferred group/kind) // // gv=mygroup/__internal, groupKinds=mygroup, anothergroup // KindForGroupVersionKinds(yetanother/v1/Baz, anothergroup/v1/Bar) -> mygroup/__internal/Bar (matched preferred group) // // gv=mygroup/__internal, groupKinds=mygroup, anothergroup // KindForGroupVersionKinds(yetanother/v1/Baz, yetanother/v1/Bar) -> mygroup/__internal/Baz (no preferred group/kind match, uses first kind in list) func NewCoercingMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner { return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds, coerce: true} } // KindForGroupVersionKinds returns the target group version if any kind matches any of the original group kinds. It will // use the originating kind where possible. func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) {"} {"_id":"q-en-kubernetes-e80ff961b20b1b5a1e447b9624aca9f22c977f1df75594679a1eb60d05525d27","text":"// updated. The updated Endpoints object or an error will be returned. func (adapter *EndpointsAdapter) Update(namespace string, endpoints *corev1.Endpoints) (*corev1.Endpoints, error) { endpoints, err := adapter.endpointClient.Endpoints(namespace).Update(endpoints) if err == nil && adapter.endpointSliceClient != nil { _, err = adapter.ensureEndpointSliceFromEndpoints(namespace, endpoints) if err == nil { err = adapter.EnsureEndpointSliceFromEndpoints(namespace, endpoints) } return endpoints, err } // ensureEndpointSliceFromEndpoints accepts a namespace and Endpoints resource // and creates or updates a corresponding EndpointSlice. The EndpointSlice // and/or an error will be returned. func (adapter *EndpointsAdapter) ensureEndpointSliceFromEndpoints(namespace string, endpoints *corev1.Endpoints) (*discovery.EndpointSlice, error) { // EnsureEndpointSliceFromEndpoints accepts a namespace and Endpoints resource // and creates or updates a corresponding EndpointSlice if an endpointSliceClient // exists. An error will be returned if it fails to sync the EndpointSlice. func (adapter *EndpointsAdapter) EnsureEndpointSliceFromEndpoints(namespace string, endpoints *corev1.Endpoints) error { if adapter.endpointSliceClient == nil { return nil } endpointSlice := endpointSliceFromEndpoints(endpoints) _, err := adapter.endpointSliceClient.EndpointSlices(namespace).Get(endpointSlice.Name, metav1.GetOptions{}) currentEndpointSlice, err := adapter.endpointSliceClient.EndpointSlices(namespace).Get(endpointSlice.Name, metav1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { return adapter.endpointSliceClient.EndpointSlices(namespace).Create(endpointSlice) if _, err = adapter.endpointSliceClient.EndpointSlices(namespace).Create(endpointSlice); errors.IsAlreadyExists(err) { err = nil } } return nil, err return err } if apiequality.Semantic.DeepEqual(currentEndpointSlice.Endpoints, endpointSlice.Endpoints) && apiequality.Semantic.DeepEqual(currentEndpointSlice.Ports, endpointSlice.Ports) && apiequality.Semantic.DeepEqual(currentEndpointSlice.Labels, endpointSlice.Labels) { return nil } return adapter.endpointSliceClient.EndpointSlices(namespace).Update(endpointSlice) _, err = adapter.endpointSliceClient.EndpointSlices(namespace).Update(endpointSlice) return err } // endpointSliceFromEndpoints generates an EndpointSlice from an Endpoints"} {"_id":"q-en-kubernetes-e82b378dd04a9d7cb35a844ed4ce7c1efb719cd79e5363f5608a62b2c46109c8","text":"import ( \"fmt\" \"strings\" \"time\" \"k8s.io/kubernetes/pkg/api\" client \"k8s.io/kubernetes/pkg/client/unversioned\" \"k8s.io/kubernetes/pkg/util\" . \"github.com/onsi/ginkgo\""} {"_id":"q-en-kubernetes-e84c0e32bfe65505956074e2f3aaca99604674973b4c388043a60a6186bc3923","text":"t.Fatalf(\"failed to mark all StatefulSet pods to ready: %v\", err) } } // add for issue: https://github.com/kubernetes/kubernetes/issues/108837 func TestStatefulSetStatusWithPodFail(t *testing.T) { limitedPodNumber := 2 controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig() controlPlaneConfig.GenericConfig.AdmissionControl = &fakePodFailAdmission{ limitedPodNumber: limitedPodNumber, } _, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig) defer closeFn() config := restclient.Config{Host: s.URL} c, err := clientset.NewForConfig(&config) if err != nil { t.Fatalf(\"Could not create clientset: %v\", err) } resyncPeriod := 12 * time.Hour informers := informers.NewSharedInformerFactory(clientset.NewForConfigOrDie(restclient.AddUserAgent(&config, \"statefulset-informers\")), resyncPeriod) ssc := statefulset.NewStatefulSetController( informers.Core().V1().Pods(), informers.Apps().V1().StatefulSets(), informers.Core().V1().PersistentVolumeClaims(), informers.Apps().V1().ControllerRevisions(), clientset.NewForConfigOrDie(restclient.AddUserAgent(&config, \"statefulset-controller\")), ) ns := framework.CreateTestingNamespace(\"test-pod-fail\", s, t) defer framework.DeleteTestingNamespace(ns, s, t) ctx, cancel := context.WithCancel(context.Background()) defer cancel() informers.Start(ctx.Done()) go ssc.Run(ctx, 5) sts := newSTS(\"sts\", ns.Name, 4) _, err = c.AppsV1().StatefulSets(sts.Namespace).Create(context.TODO(), sts, metav1.CreateOptions{}) if err != nil { t.Fatalf(\"Could not create statefuleSet %s: %v\", sts.Name, err) } wantReplicas := limitedPodNumber var gotReplicas int32 if err := wait.PollImmediate(pollInterval, pollTimeout, func() (bool, error) { newSTS, err := c.AppsV1().StatefulSets(sts.Namespace).Get(context.TODO(), sts.Name, metav1.GetOptions{}) if err != nil { return false, err } gotReplicas = newSTS.Status.Replicas return gotReplicas == int32(wantReplicas), nil }); err != nil { t.Fatalf(\"StatefulSet %s status has %d replicas, want replicas %d: %v\", sts.Name, gotReplicas, wantReplicas, err) } } "} {"_id":"q-en-kubernetes-e85ed9aa688c730787be622b07eb18a2d5eb7ac72d15cac32179d75c14f08568","text":"Name: \"mypsp\", }, Spec: policy.PodSecurityPolicySpec{ AllowedUnsafeSysctls: []string{\"kernel.*\", \"net.ipv4.ip_local_port_range\"}, ForbiddenSysctls: []string{\"net.ipv4.ip_default_ttl\"}, SELinux: policy.SELinuxStrategyOptions{ Rule: policy.SELinuxStrategyRunAsAny, },"} {"_id":"q-en-kubernetes-e87da8bd1825dff673941393b9eda3da7d43e4c36eb94fd871e0d511fab6e15e","text":"defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pods := newTestPods(5) now := metav1.NewTime(time.Now()) pods[0].Status.Phase = v1.PodFailed pods[1].Status.Phase = v1.PodSucceeded // The pod is terminating, should not filter out. pods[2].Status.Phase = v1.PodRunning pods[2].DeletionTimestamp = &now pods[2].Status.ContainerStatuses = []v1.ContainerStatus{ {State: v1.ContainerState{ Running: &v1.ContainerStateRunning{ StartedAt: now, }, }}, } pods[3].Status.Phase = v1.PodPending pods[4].Status.Phase = v1.PodRunning expected := []*v1.Pod{pods[2], pods[3], pods[4]} kubelet.podManager.SetPods(pods)"} {"_id":"q-en-kubernetes-e889b1ec87e0b5f0fadbcae4bcfb2b9967a35c37a35c90df0d5282ec12bd9b3c","text":"podClient = f.PodClient() }) ginkgo.Context(\"when creating a pod in the host PID namespace\", func() { makeHostPidPod := func(podName, image string, command []string, hostPID bool) *v1.Pod { return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, HostPID: hostPID, Containers: []v1.Container{ { Image: image, Name: podName, Command: command, }, }, }, } } createAndWaitHostPidPod := func(podName string, hostPID bool) { podClient.Create(makeHostPidPod(podName, framework.BusyBoxImage, []string{\"sh\", \"-c\", \"pidof nginx || true\"}, hostPID, )) podClient.WaitForSuccess(podName, framework.PodStartTimeout) } nginxPid := \"\" ginkgo.BeforeEach(func() { nginxPodName := \"nginx-hostpid-\" + string(uuid.NewUUID()) podClient.CreateSync(makeHostPidPod(nginxPodName, imageutils.GetE2EImage(imageutils.Nginx), nil, true, )) output := f.ExecShellInContainer(nginxPodName, nginxPodName, \"cat /var/run/nginx.pid\") nginxPid = strings.TrimSpace(output) }) ginkgo.It(\"should show its pid in the host PID namespace [LinuxOnly] [NodeFeature:HostAccess]\", func() { busyboxPodName := \"busybox-hostpid-\" + string(uuid.NewUUID()) createAndWaitHostPidPod(busyboxPodName, true) logs, err := e2epod.GetPodLogs(f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName) if err != nil { framework.Failf(\"GetPodLogs for pod %q failed: %v\", busyboxPodName, err) } pids := strings.TrimSpace(logs) framework.Logf(\"Got nginx's pid %q from pod %q\", pids, busyboxPodName) if pids == \"\" { framework.Failf(\"nginx's pid should be seen by hostpid containers\") } pidSets := sets.NewString(strings.Split(pids, \" \")...) if !pidSets.Has(nginxPid) { framework.Failf(\"nginx's pid should be seen by hostpid containers\") } }) ginkgo.It(\"should not show its pid in the non-hostpid containers [LinuxOnly] [NodeFeature:HostAccess]\", func() { busyboxPodName := \"busybox-non-hostpid-\" + string(uuid.NewUUID()) createAndWaitHostPidPod(busyboxPodName, false) logs, err := e2epod.GetPodLogs(f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName) if err != nil { framework.Failf(\"GetPodLogs for pod %q failed: %v\", busyboxPodName, err) } pids := strings.TrimSpace(logs) framework.Logf(\"Got nginx's pid %q from pod %q\", pids, busyboxPodName) pidSets := sets.NewString(strings.Split(pids, \" \")...) if pidSets.Has(nginxPid) { framework.Failf(\"nginx's pid should not be seen by non-hostpid containers\") } }) }) ginkgo.Context(\"When creating a container with runAsUser\", func() { makeUserPod := func(podName, image string, command []string, userid int64) *v1.Pod { return &v1.Pod{"} {"_id":"q-en-kubernetes-e8d34f2b728b4b06db8131bd5bdfead7d71cdaad3966b2c0d21ebdbaca934df3","text":"return err } // ignoreStatusForbiddenFromError returns nil if the status code is StatusForbidden. // This happens when AuthorizationFailed is reported from Azure API. func ignoreStatusForbiddenFromError(err error) error { if err == nil { return nil } v, ok := err.(autorest.DetailedError) if ok && v.StatusCode == http.StatusForbidden { return nil } return err } /// getVirtualMachine calls 'VirtualMachinesClient.Get' with a timed cache /// The service side has throttling control that delays responses if there're multiple requests onto certain vm /// resource request in short period."} {"_id":"q-en-kubernetes-e8f144112ac1a67bc87d092ccb7bf937556dd04fe7fa113e4593b23c475ca859","text":"new.Spec.RequiresRepublish = &requiresRepublish }, }, { name: \"StorageCapacity changed\", modify: func(new *storage.CSIDriver) { new.Spec.StorageCapacity = ¬StorageCapacity }, }, } for _, test := range successCases { t.Run(test.name, func(t *testing.T) {"} {"_id":"q-en-kubernetes-e8f39dd825af32319dc2f48072c0788081cb8816cebb1a526d34cd36f8d70985","text":"if in.XEmbeddedResource { out.VendorExtensible.AddExtension(\"x-kubernetes-embedded-resource\", true) } if in.XIntOrString { out.VendorExtensible.AddExtension(\"x-kubernetes-int-or-string\", true) } return nil }"} {"_id":"q-en-kubernetes-e90c8857203276bd85e12e141fd54e14252db1505451c7abcf7dac1888ac107f","text":"started = !exists } podStatus.ContainerStatuses[i].Started = &started if started { var ready bool if c.State.Running == nil { ready = false } else if result, ok := m.readinessManager.Get(kubecontainer.ParseContainerID(c.ContainerID)); ok { ready = result == results.Success } else { // The check whether there is a probe which hasn't run yet. _, exists := m.getWorker(podUID, c.Name, readiness) ready = !exists } podStatus.ContainerStatuses[i].Ready = ready } } // init containers are ready if they have exited with success or if a readiness probe has // succeeded."} {"_id":"q-en-kubernetes-e939fb5debdbea59b360333b507c66c1b4c13623ecc0a2507d06f088af51575d","text":"%.png: %.seqdiag $(FONT) seqdiag --no-transparency -a -f '$(FONT)' $< # Build the stuff via a docker image .PHONY: docker docker: docker build -t clustering-seqdiag . docker run --rm clustering-seqdiag | tar xvf - docker-clean: docker rmi clustering-seqdiag || true docker images -q --filter \"dangling=true\" | xargs docker rmi fix-clock-skew: boot2docker ssh sudo date -u -D \"%Y%m%d%H%M.%S\" --set \"$(shell date -u +%Y%m%d%H%M.%S)\" "} {"_id":"q-en-kubernetes-e93d0b607c85b6c2cf41ca79c8e8b072dd18c0f2c8077a7581a376f70d360499","text":"\"log\" \"os\" \"os/exec\" \"os/signal\" \"path/filepath\" \"strings\" \"time\""} {"_id":"q-en-kubernetes-e947bfcf2f8deaa80fe9692e390f301c68cf78c3bc9378dd21c217897a8e77f6","text":"}) It(\"should have all expected certs on the master\", func() { if testContext.Provider != \"gce\" && testContext.Provider != \"gke\" { if !providerIs(\"gce\", \"gke\") { By(fmt.Sprintf(\"Skipping MasterCerts test for cloud provider %s (only supported for gce and gke)\", testContext.Provider)) return }"} {"_id":"q-en-kubernetes-e982dd843baa057965164342224d3d04ce5f0674d66fad57d31bab049d633599","text":"if ds.Status.DesiredNumberScheduled == desiredNumberScheduled && ds.Status.CurrentNumberScheduled == currentNumberScheduled && ds.Status.NumberMisscheduled == numberMisscheduled { return nil } var updateErr, getErr error for i := 0; i <= StatusUpdateRetries; i++ { ds.Status.DesiredNumberScheduled = desiredNumberScheduled"} {"_id":"q-en-kubernetes-e98edab55a2ef7d5ee9d7c7ed2e5d05e3fe8bce564797f44ed69b69e9ecfc026","text":"ObjectMeta: metav1.ObjectMeta{ Name: string(kl.nodeName), Labels: map[string]string{ metav1.LabelHostname: kl.hostname, metav1.LabelOS: goruntime.GOOS, metav1.LabelArch: goruntime.GOARCH, metav1.LabelFluentdDsReady: \"true\", metav1.LabelHostname: kl.hostname, metav1.LabelOS: goruntime.GOOS, metav1.LabelArch: goruntime.GOARCH, }, }, Spec: v1.NodeSpec{"} {"_id":"q-en-kubernetes-e9ee9608fdb91aeec05239a76f6e48b01eee0365377fddef30584a03bd4af83b","text":"expectedPatchDataPattern: `{\"status\":{\"$setElementOrder/conditions\":[{\"type\":\"currentType\"}],\"conditions\":[{\"lastProbeTime\":\"2020-05-13T01:01:01Z\",\"message\":\"newMessage\",\"reason\":\"newReason\",\"type\":\"currentType\"}]}}`, }, { name: \"Should make patch request if pod condition already exists and is identical but nominated node name is different\", name: \"Should not make patch request if pod condition already exists and is identical and nominated node name is not set\", currentPodConditions: []v1.PodCondition{ { Type: \"currentType\","} {"_id":"q-en-kubernetes-ea02d2eeb25c105c04b4170af0ea1092cf8aae0815a288347ae3bdb68dd6f017","text":"MUST match to expected used and total allowed resource quota count within namespace. release: v1.16 file: test/e2e/apimachinery/resource_quota.go - testname: ResourceQuota, manage lifecycle of a ResourceQuota codename: '[sig-api-machinery] ResourceQuota should manage the lifecycle of a ResourceQuota [Conformance]' description: Attempt to create a ResourceQuota for CPU and Memory quota limits. Creation MUST be successful. Attempt to list all namespaces with a label selector which MUST succeed. One list MUST be found. The ResourceQuota when patched MUST succeed. Given the patching of the ResourceQuota, the fields MUST equal the new values. It MUST succeed at deleting a collection of ResourceQuota via a label selector. release: v1.25 file: test/e2e/apimachinery/resource_quota.go - testname: ResourceQuota, quota scope, BestEffort and NotBestEffort scope codename: '[sig-api-machinery] ResourceQuota should verify ResourceQuota with best effort scope. [Conformance]'"} {"_id":"q-en-kubernetes-ea5a2d0c99fb4a52ad1f09f3a48ba611004073fe8bab84900eb3c750f1f236b1","text":"expectedErr: true, }, { desc: \"correct LUN and no error shall be returned if everything is good\", vmList: map[string]string{\"vm1\": \"PowerState/Running\"}, nodeName: \"vm1\", existedDisk: compute.Disk{Name: to.StringPtr(\"disk-name\"), DiskProperties: &compute.DiskProperties{Encryption: &compute.Encryption{DiskEncryptionSetID: &diskEncryptionSetID, Type: compute.EncryptionAtRestWithCustomerKey}}, Tags: testTags}, desc: \"correct LUN and no error shall be returned if everything is good\", vmList: map[string]string{\"vm1\": \"PowerState/Running\"}, nodeName: \"vm1\", existedDisk: compute.Disk{Name: to.StringPtr(\"disk-name\"), DiskProperties: &compute.DiskProperties{ Encryption: &compute.Encryption{DiskEncryptionSetID: &diskEncryptionSetID, Type: compute.EncryptionAtRestWithCustomerKey}, DiskSizeGB: to.Int32Ptr(4096), }, Tags: testTags}, expectedLun: 1, expectedErr: false, },"} {"_id":"q-en-kubernetes-ea60322a8e212f77fed6de1fd60f1e013453ac39c706015c8aeff42e6564ab56","text":"sanitizedSpecVolID := kstrings.EscapeQualifiedNameForDisk(specVolID) return path.Join(host.GetVolumeDevicePluginDir(csiPluginName), sanitizedSpecVolID, \"data\") } // hasReadWriteOnce returns true if modes contains v1.ReadWriteOnce func hasReadWriteOnce(modes []api.PersistentVolumeAccessMode) bool { if modes == nil { return false } for _, mode := range modes { if mode == api.ReadWriteOnce { return true } } return false } "} {"_id":"q-en-kubernetes-ea666026182ccfccc6a19616d22f71b8cbd9d8ea62fdfd2e828b408581b8a1a0","text":"new_storage_version=${test_data[5]} kube::log::status \"Verifying ${resource}/${namespace}/${name} has updated storage version ${new_storage_version} in etcd\" curl -s http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/registry/${resource}/${namespace}/${name} | grep ${new_storage_version} curl -s http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/${ETCD_PREFIX}/${resource}/${namespace}/${name} | grep ${new_storage_version} done killApiServer"} {"_id":"q-en-kubernetes-eb1fbe3b344397ccfa5bf355e370217fc3d5d85b3b97f7ed23e5cfd2f73d9472","text":"dockertypes \"github.com/docker/engine-api/types\" ) // These two functions are OS specific (for now at least) func updateHostConfig(config *dockercontainer.HostConfig) { } func DefaultMemorySwap() int64 { return -1 } func getContainerIP(container *dockertypes.ContainerJSON) string { return \"\" }"} {"_id":"q-en-kubernetes-eb264da187d63664252e85e6f56b93286205dae3ddddd946f23016a1bca0bb36","text":"} base := host hostURL, err := url.Parse(base) if err != nil { return nil, \"\", err } if hostURL.Scheme == \"\" || hostURL.Host == \"\" { if err != nil || hostURL.Scheme == \"\" || hostURL.Host == \"\" { scheme := \"http://\" if defaultTLS { scheme = \"https://\""} {"_id":"q-en-kubernetes-eb2fb2b99a42f440fa5477b0aa260ea8fde4068f05afeab9e58c44a24efdcb42","text":"package main import ( goflag \"flag\" \"fmt\" \"math/rand\" \"os\" \"time\" \"github.com/spf13/pflag\" utilflag \"k8s.io/apiserver/pkg/util/flag\" \"k8s.io/apiserver/pkg/util/logs\" \"k8s.io/kubernetes/cmd/kube-proxy/app\""} {"_id":"q-en-kubernetes-eb48251297b2ad77b0249236beb9681e9436ecfca440d7d8e68888932ae9779d","text":"\"context\" \"errors\" \"fmt\" \"net\" \"sync\" \"time\" v1 \"k8s.io/api/core/v1\" resourceapi \"k8s.io/api/resource/v1alpha3\" apierrors \"k8s.io/apimachinery/pkg/api/errors\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/fields\" \"google.golang.org/grpc\" \"google.golang.org/grpc/connectivity\" \"google.golang.org/grpc/credentials/insecure\" utilversion \"k8s.io/apimachinery/pkg/util/version\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/client-go/kubernetes\" \"k8s.io/klog/v2\" \"k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache\" drapb \"k8s.io/kubelet/pkg/apis/dra/v1alpha4\" ) // defaultClientCallTimeout is the default amount of time that a DRA driver has // to respond to any of the gRPC calls. kubelet uses this value by passing nil // to RegisterPlugin. Some tests use a different, usually shorter timeout to // speed up testing. // // This is half of the kubelet retry period (according to // https://github.com/kubernetes/kubernetes/commit/0449cef8fd5217d394c5cd331d852bd50983e6b3). const defaultClientCallTimeout = 45 * time.Second // RegistrationHandler is the handler which is fed to the pluginwatcher API. type RegistrationHandler struct { // backgroundCtx is used for all future activities of the handler. // This is necessary because it implements APIs which don't // provide a context. backgroundCtx context.Context kubeClient kubernetes.Interface getNode func() (*v1.Node, error) } // NewDRAPluginClient returns a wrapper around those gRPC methods of a DRA // driver kubelet plugin which need to be called by kubelet. The wrapper // handles gRPC connection management and logging. Connections are reused // across different NewDRAPluginClient calls. func NewDRAPluginClient(pluginName string) (*Plugin, error) { if pluginName == \"\" { return nil, fmt.Errorf(\"plugin name is empty\") } var _ cache.PluginHandler = &RegistrationHandler{} // NewPluginHandler returns new registration handler. // // Must only be called once per process because it manages global state. // If a kubeClient is provided, then it synchronizes ResourceSlices // with the resource information provided by plugins. func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *RegistrationHandler { handler := &RegistrationHandler{ // The context and thus logger should come from the caller. backgroundCtx: klog.NewContext(context.TODO(), klog.LoggerWithName(klog.TODO(), \"DRA registration handler\")), kubeClient: kubeClient, getNode: getNode, existingPlugin := draPlugins.get(pluginName) if existingPlugin == nil { return nil, fmt.Errorf(\"plugin name %s not found in the list of registered DRA plugins\", pluginName) } // When kubelet starts up, no DRA driver has registered yet. None of // the drivers are usable until they come back, which might not happen // at all. Therefore it is better to not advertise any local resources // because pods could get stuck on the node waiting for the driver // to start up. // // This has to run in the background. go handler.wipeResourceSlices(\"\") return existingPlugin, nil } type Plugin struct { backgroundCtx context.Context cancel func(cause error) return handler mutex sync.Mutex conn *grpc.ClientConn endpoint string highestSupportedVersion *utilversion.Version clientCallTimeout time.Duration } // wipeResourceSlices deletes ResourceSlices of the node, optionally just for a specific driver. func (h *RegistrationHandler) wipeResourceSlices(driver string) { if h.kubeClient == nil { return } ctx := h.backgroundCtx logger := klog.FromContext(ctx) func (p *Plugin) getOrCreateGRPCConn() (*grpc.ClientConn, error) { p.mutex.Lock() defer p.mutex.Unlock() backoff := wait.Backoff{ Duration: time.Second, Factor: 2, Jitter: 0.2, Cap: 5 * time.Minute, Steps: 100, if p.conn != nil { return p.conn, nil } // Error logging is done inside the loop. Context cancellation doesn't get logged. _ = wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) { node, err := h.getNode() if apierrors.IsNotFound(err) { return false, nil } if err != nil { logger.Error(err, \"Unexpected error checking for node\") return false, nil } fieldSelector := fields.Set{resourceapi.ResourceSliceSelectorNodeName: node.Name} if driver != \"\" { fieldSelector[resourceapi.ResourceSliceSelectorDriver] = driver } err = h.kubeClient.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()}) switch { case err == nil: logger.V(3).Info(\"Deleted ResourceSlices\", \"fieldSelector\", fieldSelector) return true, nil case apierrors.IsUnauthorized(err): // This can happen while kubelet is still figuring out // its credentials. logger.V(5).Info(\"Deleting ResourceSlice failed, retrying\", \"fieldSelector\", fieldSelector, \"err\", err) return false, nil default: // Log and retry for other errors. logger.V(3).Info(\"Deleting ResourceSlice failed, retrying\", \"fieldSelector\", fieldSelector, \"err\", err) return false, nil } }) } // RegisterPlugin is called when a plugin can be registered. func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string, pluginClientTimeout *time.Duration) error { // Prepare a context with its own logger for the plugin. // // The lifecycle of the plugin's background activities is tied to our // root context, so canceling that will also cancel the plugin. // // The logger injects the plugin name as additional value // into all log output related to the plugin. ctx := h.backgroundCtx ctx := p.backgroundCtx logger := klog.FromContext(ctx) logger = klog.LoggerWithValues(logger, \"pluginName\", pluginName) ctx = klog.NewContext(ctx, logger) logger.V(3).Info(\"Register new DRA plugin\", \"endpoint\", endpoint) highestSupportedVersion, err := h.validateVersions(pluginName, versions) network := \"unix\" logger.V(4).Info(\"Creating new gRPC connection\", \"protocol\", network, \"endpoint\", p.endpoint) // grpc.Dial is deprecated. grpc.NewClient should be used instead. // For now this gets ignored because this function is meant to establish // the connection, with the one second timeout below. Perhaps that // approach should be reconsidered? //nolint:staticcheck conn, err := grpc.Dial( p.endpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(ctx context.Context, target string) (net.Conn, error) { return (&net.Dialer{}).DialContext(ctx, network, target) }), ) if err != nil { return fmt.Errorf(\"version check of plugin %s failed: %w\", pluginName, err) } var timeout time.Duration if pluginClientTimeout == nil { timeout = defaultClientCallTimeout } else { timeout = *pluginClientTimeout return nil, err } ctx, cancel := context.WithCancelCause(ctx) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() pluginInstance := &Plugin{ backgroundCtx: ctx, cancel: cancel, conn: nil, endpoint: endpoint, highestSupportedVersion: highestSupportedVersion, clientCallTimeout: timeout, if ok := conn.WaitForStateChange(ctx, connectivity.Connecting); !ok { return nil, errors.New(\"timed out waiting for gRPC connection to be ready\") } // Storing endpoint of newly registered DRA Plugin into the map, where plugin name will be the key // all other DRA components will be able to get the actual socket of DRA plugins by its name. if draPlugins.add(pluginName, pluginInstance) { logger.V(1).Info(\"Already registered, previous plugin was replaced\") } return nil p.conn = conn return p.conn, nil } func (h *RegistrationHandler) validateVersions( pluginName string, versions []string, ) (*utilversion.Version, error) { if len(versions) == 0 { return nil, errors.New(\"empty list for supported versions\") } func (p *Plugin) NodePrepareResources( ctx context.Context, req *drapb.NodePrepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodePrepareResourcesResponse, error) { logger := klog.FromContext(ctx) logger.V(4).Info(\"Calling NodePrepareResources rpc\", \"request\", req) // Validate version newPluginHighestVersion, err := utilversion.HighestSupportedVersion(versions) conn, err := p.getOrCreateGRPCConn() if err != nil { // HighestSupportedVersion includes the list of versions in its error // if relevant, no need to repeat it here. return nil, fmt.Errorf(\"none of the versions are supported: %w\", err) } existingPlugin := draPlugins.get(pluginName) if existingPlugin == nil { return newPluginHighestVersion, nil return nil, err } if existingPlugin.highestSupportedVersion.LessThan(newPluginHighestVersion) { return newPluginHighestVersion, nil } return nil, fmt.Errorf(\"another plugin instance is already registered with a higher supported version: %q < %q\", newPluginHighestVersion, existingPlugin.highestSupportedVersion) } // DeRegisterPlugin is called when a plugin has removed its socket, // signaling it is no longer available. func (h *RegistrationHandler) DeRegisterPlugin(pluginName string) { if p := draPlugins.delete(pluginName); p != nil { logger := klog.FromContext(p.backgroundCtx) logger.V(3).Info(\"Deregister DRA plugin\", \"endpoint\", p.endpoint) // Clean up the ResourceSlices for the deleted Plugin since it // may have died without doing so itself and might never come // back. go h.wipeResourceSlices(pluginName) return } ctx, cancel := context.WithTimeout(ctx, p.clientCallTimeout) defer cancel() logger := klog.FromContext(h.backgroundCtx) logger.V(3).Info(\"Deregister DRA plugin not necessary, was already removed\") nodeClient := drapb.NewNodeClient(conn) response, err := nodeClient.NodePrepareResources(ctx, req) logger.V(4).Info(\"Done calling NodePrepareResources rpc\", \"response\", response, \"err\", err) return response, err } // ValidatePlugin is called by kubelet's plugin watcher upon detection // of a new registration socket opened by DRA plugin. func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error { _, err := h.validateVersions(pluginName, versions) func (p *Plugin) NodeUnprepareResources( ctx context.Context, req *drapb.NodeUnprepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodeUnprepareResourcesResponse, error) { logger := klog.FromContext(ctx) logger.V(4).Info(\"Calling NodeUnprepareResource rpc\", \"request\", req) conn, err := p.getOrCreateGRPCConn() if err != nil { return fmt.Errorf(\"invalid versions of plugin %s: %w\", pluginName, err) return nil, err } return err ctx, cancel := context.WithTimeout(ctx, p.clientCallTimeout) defer cancel() nodeClient := drapb.NewNodeClient(conn) response, err := nodeClient.NodeUnprepareResources(ctx, req) logger.V(4).Info(\"Done calling NodeUnprepareResources rpc\", \"response\", response, \"err\", err) return response, err }"} {"_id":"q-en-kubernetes-eb6be1e6a4215f41028aae75f55bf927c3d8320bcade944c5e0861ad1e7b09de","text":"}) It(\"should write files of various sizes, verify size, validate content\", func() { fileSizes := []int64{1 * framework.MiB, 100 * framework.MiB, 1 * framework.GiB} fileSizes := []int64{fileSizeSmall, fileSizeMedium, fileSizeLarge} err := testVolumeIO(f, cs, config, volSource, &podSec, testFile, fileSizes) Expect(err).NotTo(HaveOccurred()) })"} {"_id":"q-en-kubernetes-eba7a62362482022450bf05cfdbf1ca65be40f25f508e349418ef2a894ff5cc6","text":"import ( \"fmt\" \"os\" \"strings\" \"syscall\" \"unsafe\""} {"_id":"q-en-kubernetes-ebc3e5a6b86f0e4adb9f9569fc1b8668cdd790bf85ecf959d1d9bb8ef8757106","text":"t.Fatal(err) } j = convertNullTypeToNullable(j) j = stripIntOrStringType(j) openAPIJSON, err = json.Marshal(j) if err != nil { t.Fatal(err)"} {"_id":"q-en-kubernetes-ebfbc142309eaf532ab60148697a152ee7f48b5c99a5d9fc3a0193fd0089399a","text":"foo := newDeployment(\"foo\", 1, nil, nil, nil, map[string]string{\"foo\": \"bar\"}) foo.Spec.Strategy.Type = extensions.RecreateDeploymentStrategyType rs := newReplicaSet(foo, \"foo-1\", 1) pod := generatePodFromRS(rs) rs1 := newReplicaSet(foo, \"foo-1\", 1) rs2 := newReplicaSet(foo, \"foo-1\", 1) pod1 := generatePodFromRS(rs1) pod2 := generatePodFromRS(rs2) f.dLister = append(f.dLister, foo) f.rsLister = append(f.rsLister, rs) // Let's pretend this is a different pod. The gist is that the pod lister needs to // return a non-empty list. f.podLister = append(f.podLister, pod1, pod2) c, _ := f.newController() enqueued := false c.enqueueDeployment = func(d *extensions.Deployment) { if d.Name == \"foo\" { enqueued = true } } c.deletePod(pod1) if enqueued { t.Errorf(\"expected deployment %q not to be queued after pod deletion\", foo.Name) } } // TestPodDeletionPartialReplicaSetOwnershipEnqueueRecreateDeployment ensures that // the deletion of a pod will requeue a Recreate deployment iff there is no other // pod returned from the client in the case where a deployment has multiple replica // sets, some of which have empty owner references. func TestPodDeletionPartialReplicaSetOwnershipEnqueueRecreateDeployment(t *testing.T) { f := newFixture(t) foo := newDeployment(\"foo\", 1, nil, nil, nil, map[string]string{\"foo\": \"bar\"}) foo.Spec.Strategy.Type = extensions.RecreateDeploymentStrategyType rs1 := newReplicaSet(foo, \"foo-1\", 1) rs2 := newReplicaSet(foo, \"foo-2\", 2) rs2.OwnerReferences = nil pod := generatePodFromRS(rs1) f.dLister = append(f.dLister, foo) f.rsLister = append(f.rsLister, rs1, rs2) f.objects = append(f.objects, foo, rs1, rs2) c, _ := f.newController() enqueued := false c.enqueueDeployment = func(d *extensions.Deployment) { if d.Name == \"foo\" { enqueued = true } } c.deletePod(pod) if !enqueued { t.Errorf(\"expected deployment %q to be queued after pod deletion\", foo.Name) } } // TestPodDeletionPartialReplicaSetOwnershipDoesntEnqueueRecreateDeployment that the // deletion of a pod will not requeue a Recreate deployment iff there are other pods // returned from the client in the case where a deployment has multiple replica sets, // some of which have empty owner references. func TestPodDeletionPartialReplicaSetOwnershipDoesntEnqueueRecreateDeployment(t *testing.T) { f := newFixture(t) foo := newDeployment(\"foo\", 1, nil, nil, nil, map[string]string{\"foo\": \"bar\"}) foo.Spec.Strategy.Type = extensions.RecreateDeploymentStrategyType rs1 := newReplicaSet(foo, \"foo-1\", 1) rs2 := newReplicaSet(foo, \"foo-2\", 2) rs2.OwnerReferences = nil pod := generatePodFromRS(rs1) f.dLister = append(f.dLister, foo) f.rsLister = append(f.rsLister, rs1, rs2) f.objects = append(f.objects, foo, rs1, rs2) // Let's pretend this is a different pod. The gist is that the pod lister needs to // return a non-empty list. f.podLister = append(f.podLister, pod)"} {"_id":"q-en-kubernetes-ebff15c93364691f1e03b1c1b0ac628696a349d8cf9a24b81e164ed6ce74467b","text":"// GetZoneByNodeName gets cloudprovider.Zone by node name. func (ss *scaleSet) GetZoneByNodeName(name string) (cloudprovider.Zone, error) { _, _, vm, err := ss.getVmssVM(name) managedByAS, err := ss.isNodeManagedByAvailabilitySet(name) if err != nil { if err == ErrorNotVmssInstance { glog.V(4).Infof(\"GetZoneByNodeName: node %q is managed by availability set\", name) // Retry with standard type because nodes are not managed by vmss. return ss.availabilitySet.GetZoneByNodeName(name) } glog.Errorf(\"Failed to check isNodeManagedByAvailabilitySet: %v\", err) return cloudprovider.Zone{}, err } if managedByAS { // vm is managed by availability set. return ss.availabilitySet.GetZoneByNodeName(name) } _, _, vm, err := ss.getVmssVM(name) if err != nil { return cloudprovider.Zone{}, err }"} {"_id":"q-en-kubernetes-ec24b3419de5f077767872d50bec0ec54c146f42ed1b9177843825dd28fe9497","text":"# CNI storage path for Windows nodes export WINDOWS_CNI_STORAGE_PATH=\"https://storage.googleapis.com/k8s-artifacts-cni/release\" # CNI version for Windows nodes export WINDOWS_CNI_VERSION=\"v0.8.7\" export WINDOWS_CNI_VERSION=\"v0.9.1\" # Pod manifests directory for Windows nodes on Windows nodes. export WINDOWS_MANIFESTS_DIR=\"${WINDOWS_K8S_DIR}manifests\" # Directory where cert/key files will be stores on Windows nodes."} {"_id":"q-en-kubernetes-ec2a584f789d22a69fc37a2425c90be13d837c6bf6e26a432edaa3c89233145f","text":"// The name of this port. All ports in an EndpointSlice must have a unique // name. If the EndpointSlice is dervied from a Kubernetes service, this // corresponds to the Service.ports[].name. // Name must either be an empty string or pass IANA_SVC_NAME validation: // * must be no more than 15 characters long // * may contain only [-a-z0-9] // * must contain at least one letter [a-z] // * it must not start or end with a hyphen, nor contain adjacent hyphens // Name must either be an empty string or pass DNS_LABEL validation: // * must be no more than 63 characters long. // * must consist of lower case alphanumeric characters or '-'. // * must start and end with an alphanumeric character. // Default is empty string. Name *string `json:\"name,omitempty\" protobuf:\"bytes,1,name=name\"` // The IP protocol for this port."} {"_id":"q-en-kubernetes-ec59a5ccc120a0d41f1a18fe00a97c83faa734671c18c120f37e821d3cb630e2","text":"} glog.V(5).Infof(\"namespace controller - deleteAllContentForGroupVersionResource - items remaining - namespace: %s, gvr: %v, items: %v\", namespace, gvr, len(unstructuredList.Items)) if len(unstructuredList.Items) != 0 && estimate == int64(0) { // if any item has a finalizer, we treat that as a normal condition, and use a default estimation to allow for GC to complete. for _, item := range unstructuredList.Items { if len(item.GetFinalizers()) > 0 { glog.V(5).Infof(\"namespace controller - deleteAllContentForGroupVersionResource - items remaining with finalizers - namespace: %s, gvr: %v, finalizers: %v\", namespace, gvr, item.GetFinalizers()) return finalizerEstimateSeconds, nil } } // nothing reported a finalizer, so something was unexpected as it should have been deleted. return estimate, fmt.Errorf(\"unexpected items still remain in namespace: %s for gvr: %v\", namespace, gvr) } return estimate, nil"} {"_id":"q-en-kubernetes-ec63fc4fc32bbfd1c56e9870ee79239741c09d97ddc9229e91630ca825b62324","text":"// the test so we can ensure that we clean up after // ourselves defer podClient.Delete(pod.Name, api.NewDeleteOptions(0)) _, err = podClient.Create(pod) pod, err = podClient.Create(pod) if err != nil { Failf(\"Failed to create pod: %v\", err) } By(\"verifying the pod is in kubernetes\") selector = labels.SelectorFromSet(labels.Set(map[string]string{\"time\": value})) options = api.ListOptions{ LabelSelector: selector, ResourceVersion: pod.ResourceVersion, } pods, err = podClient.List(options) if err != nil { Failf(\"Failed to query for pods: %v\", err)"} {"_id":"q-en-kubernetes-ec9acbcc8bbdd5a3c4df5175648baec0700387a7f56d0d36f1448cae7dbb47bb","text":"return true }) if err != nil { if apiErr, ok := err.(awserr.Error); ok && apiErr.Code() == \"DelegationSetNotReusable\" || apiErr.Code() == \"NoSuchDelegationSet\" || apiErr.Code() == \"InvalidInput\" { return []dnsprovider.Zone{}, nil } return []dnsprovider.Zone{}, err } return zoneList, nil"} {"_id":"q-en-kubernetes-ed471791e5606d3be1585c6eb3fb95461e37c2c083c699923c7bbc9a02213c07","text":"func exportCustomMetricFromPod(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer { podAnnotations := map[string]string{ \"prometheus.io/scrape\": \"true\", \"prometheus.io/path\": \"/Metrics\", \"prometheus.io/path\": \"/metrics\", \"prometheus.io/port\": \"8080\", } return common.NewMetricExporter(consumerName, f.Namespace.Name, podAnnotations, nil, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)"} {"_id":"q-en-kubernetes-ed5727a3741a38a6180719d6022decf75b761e2b77e7b1034ba21363a1c29bdf","text":"package route53 import ( \"github.com/aws/aws-sdk-go/aws/awserr\" \"github.com/aws/aws-sdk-go/service/route53\" \"k8s.io/apimachinery/pkg/util/uuid\""} {"_id":"q-en-kubernetes-ed5d95ececc40164062f77e4c7d40b36324664058af89f6241d9161f6ab966de","text":"return info.HealthCheckNodePort } // GetNodePort is part of the ServicePort interface. func (info *BaseServiceInfo) GetNodePort() int { return info.NodePort } func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, service *v1.Service) *BaseServiceInfo { onlyNodeLocalEndpoints := false if apiservice.RequestsOnlyLocalTraffic(service) {"} {"_id":"q-en-kubernetes-ed6b5417c29cf068d69b8025154deaba63cae41331b67b6f1ebdb25979aed152","text":"kube::golang::setup_env make -C \"${KUBE_ROOT}\" WHAT=cmd/genswaggertypedocs # Find binary genswaggertypedocs=$(kube::util::find-binary \"genswaggertypedocs\") if [[ ! -x \"$genswaggertypedocs\" ]]; then { echo \"It looks as if you don't have a compiled genswaggertypedocs binary\" echo echo \"If you are running from a clone of the git repo, please run\" echo \"'make WHAT=cmd/genswaggertypedocs'.\" } >&2 exit 1 fi _tmpdir=\"$(kube::realpath \"$(mktemp -d -t swagger-docs.XXXXXX)\")\" function swagger_cleanup { rm -rf \"${_tmpdir}\""} {"_id":"q-en-kubernetes-ed97571e1c8d5e388cd9f545b9d9a020a7b85a6e31beedbe4173fb9cf4572020","text":"if err != nil { framework.Failf(\"Error getting node hostnames: %v\", err) } ginkgo.By(fmt.Sprintf(\"Found %d SSH'able hosts\", len(hosts))) testCases := []struct { cmd string"} {"_id":"q-en-kubernetes-edcbf51900748063d45b48d0141a032c6276337f094ca90b2d2a80f74896ff87","text":"} } func TestCacherNoLeakWithMultipleWatchers(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.WatchBookmark, true)() backingStorage := &dummyStorage{} cacher, _, err := newTestCacher(backingStorage, 1000) if err != nil { t.Fatalf(\"Couldn't create cacher: %v\", err) } defer cacher.Stop() // Wait until cacher is initialized. cacher.ready.wait() pred := storage.Everything pred.AllowWatchBookmarks = true // run the collision test for 3 seconds to let ~2 buckets expire stopCh := make(chan struct{}) time.AfterFunc(3*time.Second, func() { close(stopCh) }) wg := &sync.WaitGroup{} wg.Add(1) go func() { defer wg.Done() for { select { case <-stopCh: return default: ctx, _ := context.WithTimeout(context.Background(), 3*time.Second) w, err := cacher.Watch(ctx, \"pods/ns\", \"0\", pred) if err != nil { t.Fatalf(\"Failed to create watch: %v\", err) } w.Stop() } } }() wg.Add(1) go func() { defer wg.Done() for { select { case <-stopCh: return default: cacher.bookmarkWatchers.popExpiredWatchers() } } }() // wait for adding/removing watchers to end wg.Wait() // wait out the expiration period and pop expired watchers time.Sleep(2 * time.Second) cacher.bookmarkWatchers.popExpiredWatchers() cacher.bookmarkWatchers.lock.Lock() defer cacher.bookmarkWatchers.lock.Unlock() if len(cacher.bookmarkWatchers.watchersBuckets) != 0 { t.Errorf(\"unexpected bookmark watchers %v\", len(cacher.bookmarkWatchers.watchersBuckets)) } } func testCacherSendBookmarkEvents(t *testing.T, watchCacheEnabled, allowWatchBookmarks, expectedBookmarks bool) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.WatchBookmark, watchCacheEnabled)() backingStorage := &dummyStorage{}"} {"_id":"q-en-kubernetes-edd47c4b6eff769ce447fc2452e473c5bdff5b31bd57331f8323f5d1bd4ba1f4","text":"}) return args } func TestValidateKubeletFlags(t *testing.T) { tests := []struct { name string error bool labels map[string]string }{ { name: \"Invalid kubernetes.io label\", error: true, labels: map[string]string{ \"beta.kubernetes.io/metadata-proxy-ready\": \"true\", }, }, { name: \"Valid label outside of kubernetes.io and k8s.io\", error: false, labels: map[string]string{ \"cloud.google.com/metadata-proxy-ready\": \"true\", }, }, { name: \"Empty label list\", error: false, labels: map[string]string{}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := ValidateKubeletFlags(&KubeletFlags{ NodeLabels: tt.labels, }) if tt.error && err == nil { t.Errorf(\"ValidateKubeletFlags should have failed with labels: %+v\", tt.labels) } if !tt.error && err != nil { t.Errorf(\"ValidateKubeletFlags should not have failed with labels: %+v\", tt.labels) } }) } } "} {"_id":"q-en-kubernetes-edf154825571749ea0dfb356a22bd29c269a6b35c9a58c3972f09275d38b961b","text":"} } // Check if the inspected image matches what we are looking for func matchImageTagOrSHA(inspected dockertypes.ImageInspect, image string) bool { // The image string follows the grammar specified here // https://github.com/docker/distribution/blob/master/reference/reference.go#L4 named, err := dockerref.ParseNamed(image) if err != nil { glog.V(4).Infof(\"couldn't parse image reference %q: %v\", image, err) return false } _, isTagged := named.(dockerref.Tagged) digest, isDigested := named.(dockerref.Digested) if !isTagged && !isDigested { // No Tag or SHA specified, so just return what we have return true } if isTagged { // Check the RepoTags for an exact match for _, tag := range inspected.RepoTags { if tag == image { // We found a specific tag that we were looking for return true } } } if isDigested { algo := digest.Digest().Algorithm().String() sha := digest.Digest().Hex() // Look specifically for short and long sha(s) if strings.Contains(inspected.ID, algo+\":\"+sha) { // We found the short or long SHA requested return true } } glog.V(4).Infof(\"Inspected image (%q) does not match %s\", inspected.ID, image) return false } // applyDefaultImageTag parses a docker image string, if it doesn't contain any tag or digest, // a default tag will be applied. func applyDefaultImageTag(image string) (string, error) {"} {"_id":"q-en-kubernetes-edf4388215428f8afd1987e04577faeee63884d848149f7e13aac5381c190b6f","text":"resources []string namespace string name string names []string defaultNamespace bool requireNamespace bool"} {"_id":"q-en-kubernetes-ee1bc1d135b293fd95bf23538d57845980768f3ec1667369efd74c3758a83b07","text":"if err := deployClient.Delete(deployment.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf(\"failed to delete the deployment: %v\", err) } ginkgo.By(\"wait for 30 seconds to see if the garbage collector mistakenly deletes the rs\") time.Sleep(30 * time.Second) ginkgo.By(\"wait for deployment deletion to see if the garbage collector mistakenly deletes the rs\") err = wait.PollImmediate(500*time.Millisecond, 1*time.Minute, func() (bool, error) { dList, err := deployClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf(\"failed to list deployments: %v\", err) } return len(dList.Items) == 0, nil }) if err != nil { framework.Failf(\"Failed to wait for the Deployment to be deleted: %v\", err) } // Once the deployment object is gone, we'll know the GC has finished performing any relevant actions. objects := map[string]int{\"Deployments\": 0, \"ReplicaSets\": 1, \"Pods\": 2} ok, err := verifyRemainingObjects(f, objects) if err != nil {"} {"_id":"q-en-kubernetes-ee367047bc707c64d66f6cc2f49b714f5f797978cfa68d86532f4039682affc2","text":"} mockCadvisor.On(\"VersionInfo\").Return(versionInfo, nil) expectedNode := &api.Node{ ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}, ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, Status: api.NodeStatus{ Conditions: []api.NodeCondition{"} {"_id":"q-en-kubernetes-ee3fee3aa8419fd126391e842018dee10ac05eb62c1c61012e18754db9d5b718","text":". \"github.com/onsi/gomega\" ) func runLivenessTest(c *client.Client, podDescr *api.Pod) { defer GinkgoRecover() ns := \"e2e-test-\" + string(util.NewUUID()) By(fmt.Sprintf(\"Creating pod %s in namespace %s\", podDescr.Name, ns)) _, err := c.Pods(ns).Create(podDescr) Expect(err).NotTo(HaveOccurred(), fmt.Sprintf(\"creating pod %s\", podDescr.Name)) // At the end of the test, clean up by removing the pod. defer func() { By(\"deleting the pod\") c.Pods(ns).Delete(podDescr.Name) }() // Wait until the pod is not pending. (Here we need to check for something other than // 'Pending' other than checking for 'Running', since when failures occur, we go to // 'Terminated' which can cause indefinite blocking.) By(\"waiting for the pod to be something other than pending\") err = waitForPodNotPending(c, ns, podDescr.Name, 60*time.Second) Expect(err).NotTo(HaveOccurred(), fmt.Sprintf(\"starting pod %s in namespace %s\", podDescr.Name, ns)) By(fmt.Sprintf(\"Started pod %s in namespace %s\", podDescr.Name, ns)) // Check the pod's current state and verify that restartCount is present. By(\"checking the pod's current state and verifying that restartCount is present\") pod, err := c.Pods(ns).Get(podDescr.Name) Expect(err).NotTo(HaveOccurred(), fmt.Sprintf(\"getting pod %s in namespace %s\", podDescr.Name, ns)) initialRestartCount := pod.Status.Info[\"liveness\"].RestartCount By(fmt.Sprintf(\"Initial restart count of pod %s is %d\", podDescr.Name, initialRestartCount)) // Wait for at most 48 * 5 = 240s = 4 minutes until restartCount is incremented pass := false for i := 0; i < 48; i++ { // Wait until restartCount is incremented. time.Sleep(5 * time.Second) pod, err = c.Pods(ns).Get(podDescr.Name) Expect(err).NotTo(HaveOccurred(), fmt.Sprintf(\"getting pod %s\", podDescr.Name)) restartCount := pod.Status.Info[\"liveness\"].RestartCount By(fmt.Sprintf(\"Restart count of pod %s in namespace %s is now %d\", podDescr.Name, ns, restartCount)) if restartCount > initialRestartCount { By(fmt.Sprintf(\"Restart count of pod %s in namespace %s increased from %d to %d during the test\", podDescr.Name, ns, initialRestartCount, restartCount)) pass = true break } } if !pass { Fail(fmt.Sprintf(\"Did not see the restart count of pod %s in namespace %s increase from %d during the test\", podDescr.Name, ns, initialRestartCount)) } } var _ = Describe(\"Pods\", func() { var ( c *client.Client ) var c *client.Client BeforeEach(func() { var err error"} {"_id":"q-en-kubernetes-ee4d8f18b2cacad9bb8703a6b1ba6c526aeed4ecc23e96f0bb56f7cb2735fba4","text":"}, expected: &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: \"foo-94759gc65b\", Name: \"foo-548cm7fgdh\", }, Data: map[string][]byte{ v1.DockerConfigKey: secretData, v1.DockerConfigJsonKey: secretData, }, Type: v1.SecretTypeDockercfg, Type: v1.SecretTypeDockerConfigJson, }, expectErr: false, },"} {"_id":"q-en-kubernetes-ee69cca9db8679a883cd636097bcb282c6d8ddcd097af662686fcb77ed14cbc6","text":"} } azClientConfig := &azClientConfig{ subscriptionID: config.SubscriptionID, resourceManagerEndpoint: env.ResourceManagerEndpoint, servicePrincipalToken: servicePrincipalToken, rateLimiterReader: operationPollRateLimiter, rateLimiterWriter: operationPollRateLimiterWrite, CloudProviderBackoffRetries: config.CloudProviderBackoffRetries, CloudProviderBackoffDuration: config.CloudProviderBackoffDuration, ShouldOmitCloudProviderBackoff: config.shouldOmitCloudProviderBackoff(), } az := Cloud{ Config: *config, Environment: *env,"} {"_id":"q-en-kubernetes-ee8b9aed41941b9b945a491367aa16bcd59f97c291acdf1b7c6d3f1ad6f51c6e","text":"// InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes func (vs *VSphere) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) { return false, cloudprovider.NotImplemented nodeName, err := vs.GetNodeNameFromProviderID(providerID) if err != nil { glog.Errorf(\"Error while getting nodename for providerID %s\", providerID) return false, err } vsi, err := vs.getVSphereInstance(convertToK8sType(nodeName)) if err != nil { return false, err } // Ensure client is logged in and session is valid if err := vs.nodeManager.vcConnect(ctx, vsi); err != nil { return false, err } vm, err := vs.getVMFromNodeName(ctx, convertToK8sType(nodeName)) if err != nil { glog.Errorf(\"Failed to get VM object for node: %q. err: +%v\", nodeName, err) return false, err } isActive, err := vm.IsActive(ctx) if err != nil { glog.Errorf(\"Failed to check whether node %q is active. err: %+v.\", nodeName, err) return false, err } return !isActive, nil } // InstanceID returns the cloud provider ID of the node with the specified Name."} {"_id":"q-en-kubernetes-ee99c3a5e67af59161972ddca25be031a40ea44c68e419b0d1f1f21c8c2b6c62","text":"if s.ServiceClusterIPRange.IP == nil { glog.Fatal(\"No --service-cluster-ip-range specified\") } var ones, bits = s.ServiceClusterIPRange.Mask.Size() if bits-ones > 20 { glog.Fatal(\"Specified --service-cluster-ip-range is too large\") } } func newEtcd(etcdConfigFile string, etcdServerList []string, interfacesFunc meta.VersionInterfacesFunc, defaultVersion, storageVersion, pathPrefix string) (etcdStorage storage.Interface, err error) {"} {"_id":"q-en-kubernetes-eec1b25dcc12c0da2d2a53d066baa741d4e49d9109d20fabb05ee1e87edac6c5","text":"} func WaitForRootPaths(t *testing.T, ctx context.Context, client testClient, requirePaths, forbidPaths sets.Set[string]) error { return wait.PollUntilContextTimeout(ctx, 250*time.Millisecond, maxTimeout, true, func(ctx context.Context) (done bool, err error) { statusContent, err := client.Discovery().RESTClient().Get().AbsPath(\"/\").SetHeader(\"Accept\", \"application/json\").DoRaw(ctx) if err != nil { return false, err } rootPaths := metav1.RootPaths{} if err := json.Unmarshal(statusContent, &rootPaths); err != nil { return false, err } paths := sets.New(rootPaths.Paths...) if missing := requirePaths.Difference(paths); len(missing) > 0 { t.Logf(\"missing required root paths %v\", sets.List(missing)) return false, nil } if present := forbidPaths.Intersection(paths); len(present) > 0 { t.Logf(\"present forbidden root paths %v\", sets.List(present)) return false, nil } return true, nil }) } func WaitForGroups(ctx context.Context, client testClient, groups ...apidiscoveryv2beta1.APIGroupDiscovery) error { return WaitForResultWithCondition(ctx, client, func(groupList apidiscoveryv2beta1.APIGroupDiscoveryList) bool { for _, searchGroup := range groups {"} {"_id":"q-en-kubernetes-eee282261b8c52a658a83eac8fa40a41907ce25ad97ce7bb920ad092f7231caa","text":"fakeDocker.VersionInfo = []string{} kubeClient.ReactFn = testclient.NewSimpleFake(&api.NodeList{Items: []api.Node{ {ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}}, {ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}}, }}).ReactFn mockCadvisor := testKubelet.fakeCadvisor machineInfo := &cadvisorApi.MachineInfo{"} {"_id":"q-en-kubernetes-ef0515e6be4cb4ec7253b751f4c21fdf0dd7f85449cb555f5789e67d6f2a86ac","text":"// a map[family]ip for the caller to release when everything else has // executed successfully func (rs *REST) handleClusterIPsForUpdatedService(oldService *api.Service, service *api.Service) (allocated map[api.IPFamily]string, toRelease map[api.IPFamily]string, err error) { // We don't want to upgrade (add an IP) or downgrade (remove an IP) // following a cluster downgrade/upgrade to/from dual-stackness // a PreferDualStack service following principle of least surprise // That means: PreferDualStack service will only be upgraded // if: // - changes type to RequireDualStack // - manually adding or removing ClusterIP (secondary) // - manually adding or removing IPFamily (secondary) if isMatchingPreferDualStackClusterIPFields(oldService, service) { return allocated, toRelease, nil // nothing more to do. } // use cases: // A: service changing types from ExternalName TO ClusterIP types ==> allocate all new // B: service changing types from ClusterIP types TO ExternalName ==> release all allocated"} {"_id":"q-en-kubernetes-ef12fe4f3586ed116f8e231201ec307317ecd6744596b51b00a6fd8ca5c26e68","text":"//\t - ... zero or more // // * every specified field or array in s is also specified outside of value validation. // * metadata at the root can only restrict the name and generateName, and not be specified at all in nested contexts. // * additionalProperties at the root is not allowed. func ValidateStructural(s *Structural, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{}"} {"_id":"q-en-kubernetes-ef1b244cd33e87b21ca79e802b9ce9e42075cbeac38f60e97aacf03fe9fd99c4","text":"kr.CustomMustRegister(cs...) } // BuildVersion is a helper function that can be easily mocked. var BuildVersion = version.Get func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { r := &kubeRegistry{ PromRegistry: prometheus.NewRegistry(),"} {"_id":"q-en-kubernetes-ef1f0ad51ca30526af38fa6481977cc1b9513e0aaa7290c03e1f84837680ad8d","text":"// Store in cache c.lock.Lock() defer c.lock.Unlock() c.cache[key] = data c.lock.Unlock() // Remove in flight entry c.inFlightLock.Lock() defer c.inFlightLock.Unlock() delete(c.inFlight, key) c.inFlightLock.Unlock() }() return result }"} {"_id":"q-en-kubernetes-ef5027f2e80ba966164cd7425c1da49117430a50ad96dfeba74828a290e5bc4d","text":"clientset \"k8s.io/client-go/kubernetes\" kubeadmapi \"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm\" kubeadmconstants \"k8s.io/kubernetes/cmd/kubeadm/app/constants\" \"k8s.io/kubernetes/cmd/kubeadm/app/features\" kubeadmutil \"k8s.io/kubernetes/cmd/kubeadm/app/util\" \"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient\" \"k8s.io/kubernetes/pkg/api/legacyscheme\""} {"_id":"q-en-kubernetes-ef6c01cf4b16b0d168813095c59ba55091c5282d70f2e81e01519ad6fe894d86","text":"} func (flunderStrategy) NamespaceScoped() bool { return false return true } func (flunderStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {"} {"_id":"q-en-kubernetes-ef723f15c3671a933c56b0676b1e103aa96d98aac362d165a8e7253b04a20167","text":"return rs.releaseClusterIPs(toRelease) } // tests if two preferred dual-stack service have matching ClusterIPFields // assumption: old service is a valid, default service (e.g., loaded from store) func isMatchingPreferDualStackClusterIPFields(oldService, service *api.Service) bool { if oldService == nil { return false } if service.Spec.IPFamilyPolicy == nil { return false } // if type mutated then it is an update // that needs to run through the entire process. if oldService.Spec.Type != service.Spec.Type { return false } // both must be type that gets an IP assigned if service.Spec.Type != api.ServiceTypeClusterIP && service.Spec.Type != api.ServiceTypeNodePort && service.Spec.Type != api.ServiceTypeLoadBalancer { return false } if oldService.Spec.Type != api.ServiceTypeClusterIP && oldService.Spec.Type != api.ServiceTypeNodePort && oldService.Spec.Type != api.ServiceTypeLoadBalancer { return false } // both must be of IPFamilyPolicy==PreferDualStack if service.Spec.IPFamilyPolicy != nil && *(service.Spec.IPFamilyPolicy) != api.IPFamilyPolicyPreferDualStack { return false } if oldService.Spec.IPFamilyPolicy != nil && *(oldService.Spec.IPFamilyPolicy) != api.IPFamilyPolicyPreferDualStack { return false } // compare ClusterIPs lengths. // due to validation. if len(service.Spec.ClusterIPs) != len(oldService.Spec.ClusterIPs) { return false } for i, ip := range service.Spec.ClusterIPs { if oldService.Spec.ClusterIPs[i] != ip { return false } } // compare IPFamilies if len(service.Spec.IPFamilies) != len(oldService.Spec.IPFamilies) { return false } for i, family := range service.Spec.IPFamilies { if oldService.Spec.IPFamilies[i] != family { return false } } // they match on // Policy: preferDualStack // ClusterIPs // IPFamilies return true } // attempts to default service ip families according to cluster configuration // while ensuring that provided families are configured on cluster. func (rs *REST) tryDefaultValidateServiceClusterIPFields(service *api.Service) error { func (rs *REST) tryDefaultValidateServiceClusterIPFields(oldService, service *api.Service) error { // can not do anything here if service.Spec.Type == api.ServiceTypeExternalName { return nil"} {"_id":"q-en-kubernetes-efa631d67e7f989b3d4263e96cdae7f8b737f487bb6c5a397755ca3783ded978","text":"} } func TestHistogramClear(t *testing.T) { samples := []float64{0.5, 0.5, 0.5, 0.5, 1.5, 1.5, 1.5, 1.5, 3, 3, 3, 3, 6, 6, 6, 6} bounds := []float64{1, 2, 4, 8} h := samples2Histogram(samples, bounds) if *h.SampleCount == 0 { t.Errorf(\"Expected histogram .SampleCount to be non-zero\") } if *h.SampleSum == 0 { t.Errorf(\"Expected histogram .SampleSum to be non-zero\") } for _, b := range h.Bucket { if b.CumulativeCount != nil { if *b.CumulativeCount == 0 { t.Errorf(\"Expected histogram bucket to have non-zero comulative count\") } } } h.Clear() if *h.SampleCount != 0 { t.Errorf(\"Expected histogram .SampleCount to be zero, have %v instead\", *h.SampleCount) } if *h.SampleSum != 0 { t.Errorf(\"Expected histogram .SampleSum to be zero, have %v instead\", *h.SampleSum) } for _, b := range h.Bucket { if b.CumulativeCount != nil { if *b.CumulativeCount != 0 { t.Errorf(\"Expected histogram bucket to have zero comulative count, have %v instead\", *b.CumulativeCount) } } if b.UpperBound != nil { *b.UpperBound = 0 } } } func TestHistogramValidate(t *testing.T) { tests := []struct { name string"} {"_id":"q-en-kubernetes-efc9e5cc64bda9809522032597d869e45d57656c72ff466f777a35a894a694a0","text":"\"net/http\" \"path\" \"path/filepath\" \"runtime\" \"sync\" \"time\""} {"_id":"q-en-kubernetes-efd3a7d1996d915732c4ae2c09a53cf06652e53f84df98e9d3d101ac2673cbb0","text":"# Cluster Role # ################ kubectl \"${kube_flags[@]}\" api-resources if kube::test::if_supports_resource \"${clusterroles}\" ; then record_command run_clusterroles_tests fi"} {"_id":"q-en-kubernetes-eff01f8b68e8f8a1c9952bd9e0985e92e1fa7c937dbaece507c3afc16b3ba19e","text":"{Type: v1.NodeMemoryPressure, Status: v1.ConditionFalse}, {Type: v1.NodeDiskPressure, Status: v1.ConditionFalse}, {Type: v1.NodeNetworkUnavailable, Status: v1.ConditionFalse}, {Type: v1.NodeInodePressure, Status: v1.ConditionFalse}, } return node }(),"} {"_id":"q-en-kubernetes-f046f25f80abd9e198301de0f87a48ae1a04012158e8033431eea8eec2965f09","text":"return dswp, fakePodManager } func TestFindAndAddNewPods_WithRescontructedVolume(t *testing.T) { // create dswp dswp, fakePodManager := prepareDswpWithVolume(t) // create pod fakeOuterVolumeName := \"dswp-test-volume-name\" containers := []v1.Container{ { VolumeMounts: []v1.VolumeMount{ { Name: fakeOuterVolumeName, MountPath: \"/mnt\", }, }, }, } pod := createPodWithVolume(\"dswp-test-pod\", fakeOuterVolumeName, \"file-bound\", containers) fakePodManager.AddPod(pod) podName := util.GetUniquePodName(pod) mode := v1.PersistentVolumeFilesystem pv := &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: fakeOuterVolumeName, }, Spec: v1.PersistentVolumeSpec{ ClaimRef: &v1.ObjectReference{Namespace: \"ns\", Name: \"file-bound\"}, VolumeMode: &mode, }, } generatedVolumeName := \"fake-plugin/\" + pod.Spec.Volumes[0].Name uniqueVolumeName := v1.UniqueVolumeName(generatedVolumeName) expectedOuterVolumeName := \"dswp-test-volume-name\" opts := operationexecutor.MarkVolumeOpts{ PodName: podName, PodUID: pod.UID, VolumeName: uniqueVolumeName, OuterVolumeSpecName: generatedVolumeName, // fake reconstructed volume VolumeGidVolume: \"\", VolumeSpec: volume.NewSpecFromPersistentVolume(pv, false), VolumeMountState: operationexecutor.VolumeMounted, } dswp.actualStateOfWorld.MarkVolumeAsAttached(opts.VolumeName, opts.VolumeSpec, \"fake-node\", \"\") dswp.actualStateOfWorld.MarkVolumeAsMounted(opts) dswp.findAndAddNewPods() mountedVolumes := dswp.actualStateOfWorld.GetMountedVolumesForPod(podName) found := false for _, volume := range mountedVolumes { if volume.OuterVolumeSpecName == expectedOuterVolumeName { found = true break } } if !found { t.Fatalf( \"Could not found pod volume %v in the list of actual state of world volumes to mount.\", expectedOuterVolumeName) } } func TestFindAndAddNewPods_WithReprocessPodAndVolumeRetrievalError(t *testing.T) { // create dswp dswp, fakePodManager := prepareDswpWithVolume(t)"} {"_id":"q-en-kubernetes-f04a8a8ebef7d66fb544543b373508dafb7fd904c8b447d6538ab29ec032d31b","text":"// +k8s:deepcopy-gen=package package testing package testing // import \"k8s.io/apiserver/pkg/storage/testing\" "} {"_id":"q-en-kubernetes-f04e16b765fc15c63352942078ea479349ecf7a2a4deca5998ac73c57490179b","text":" kind: ReplicationController apiVersion: v1 apiVersion: extensions/v1beta1 kind: Deployment metadata: name: etcd creationTimestamp: spec: strategy: type: Recreate resources: {} triggers: - type: ConfigChange replicas: 3 selector: name: etcd matchLabels: name: etcd template: metadata: creationTimestamp: labels: name: etcd spec:"} {"_id":"q-en-kubernetes-f086dc1b587b1c9e45bff64e4df5390791ed90e5d4323aa3bdf8c085fd7c88a0","text":"// or the kubeadm preferred one for the desired Kubernetes version var desiredEtcdVersion *version.Version if cfg.Etcd.Local.ImageTag != \"\" { desiredEtcdVersion, err = version.ParseSemantic(cfg.Etcd.Local.ImageTag) desiredEtcdVersion, err = version.ParseSemantic( convertImageTagMetadataToSemver(cfg.Etcd.Local.ImageTag)) if err != nil { return true, errors.Wrapf(err, \"failed to parse tag %q as a semantic version\", cfg.Etcd.Local.ImageTag) }"} {"_id":"q-en-kubernetes-f092744af3c8c27c69a0522c777a3d4347f5295a9390b91e67a3a11525722baf","text":"// Cannot be updated. // +optional WorkingDir string `json:\"workingDir,omitempty\" protobuf:\"bytes,5,opt,name=workingDir\"` // List of ports to expose from the container. Exposing a port here gives // the system additional information about the network connections a // container uses, but is primarily informational. Not specifying a port here // List of ports to expose from the container. Not specifying a port here // DOES NOT prevent that port from being exposed. Any port which is // listening on the default \"0.0.0.0\" address inside a container will be // accessible from the network. // Modifying this array with strategic merge patch may corrupt the data. // For more information See https://github.com/kubernetes/kubernetes/issues/108255. // Cannot be updated. // +optional // +patchMergeKey=containerPort"} {"_id":"q-en-kubernetes-f0a8fdd4cf90141eb1a59b24146c324392e87a3f151e9e532cc5907beea21020","text":"const ( // StatusSuccess represents the successful completion of command. StatusSuccess = \"Success\" // StatusFailed represents that the command failed. StatusFailure = \"Failed\" // StatusNotSupported represents that the command is not supported. StatusNotSupported = \"Not supported\" )"} {"_id":"q-en-kubernetes-f0ae008905a48d4ab597dff6eefac07f84aef613d2bffb0428cdf16c6d9d1fa4","text":"FlagTimeout = \"request-timeout\" ) // RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags { return ConfigOverrideFlags{ AuthOverrideFlags: RecommendedAuthOverrideFlags(prefix), ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix), ContextOverrideFlags: RecommendedContextOverrideFlags(prefix), CurrentContext: FlagInfo{prefix + FlagContext, \"\", \"\", \"The name of the kubeconfig context to use\"}, Timeout: FlagInfo{prefix + FlagTimeout, \"\", \"0\", \"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\"}, } } // RecommendedAuthOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags { return AuthOverrideFlags{"} {"_id":"q-en-kubernetes-f0c1d0d51ee9714063554a951ca8bec470b8200e74ff32ff013a9f901ba39028","text":"t.Errorf(\"Timed out waiting for response.\") } } func TestWarningWithRequestTimeout(t *testing.T) { type result struct { err interface{} stackTrace string } clientDoneCh, resultCh := make(chan struct{}), make(chan result, 1) testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // this will catch recoverable panic like 'Header called after Handler finished'. // go runtime crashes the program if it detects a program-ending // panic like 'concurrent map iteration and map write', so this // panic can not be caught. defer func() { result := result{} result.err = recover() if result.err != nil { // Same as stdlib http server code. Manually allocate stack // trace buffer size to prevent excessively large logs const size = 64 << 10 buf := make([]byte, size) buf = buf[:goruntime.Stack(buf, false)] result.stackTrace = string(buf) } resultCh <- result }() // add warnings while we're waiting for the request to timeout to catch read/write races loop: for { select { case <-r.Context().Done(): break loop default: warning.AddWarning(r.Context(), \"a\", \"1\") } } // the request has just timed out, write to catch read/write races warning.AddWarning(r.Context(), \"agent\", \"text\") // give time for the timeout response to be written, then try to // write a response header to catch the \"Header after Handler finished\" panic <-clientDoneCh warning.AddWarning(r.Context(), \"agent\", \"text\") }) handler := newGenericAPIServerHandlerChain(t, \"/test\", testHandler) server := httptest.NewUnstartedServer(handler) server.EnableHTTP2 = true server.StartTLS() defer server.Close() request, err := http.NewRequest(\"GET\", server.URL+\"/test?timeout=100ms\", nil) if err != nil { t.Fatalf(\"unexpected error: %v\", err) } client := server.Client() response, err := client.Do(request) close(clientDoneCh) if err != nil { t.Errorf(\"expected server to return an HTTP response: %v\", err) } if want := http.StatusGatewayTimeout; response == nil || response.StatusCode != want { t.Errorf(\"expected server to return %d, but got: %v\", want, response) } var resultGot result select { case resultGot = <-resultCh: case <-time.After(wait.ForeverTestTimeout): t.Errorf(\"the handler never returned a result\") } if resultGot.err != nil { t.Errorf(\"Expected no panic, but got: %v\", resultGot.err) t.Errorf(\"Stack Trace: %s\", resultGot.stackTrace) } } // builds a handler chain with the given user handler as used by GenericAPIServer. func newGenericAPIServerHandlerChain(t *testing.T, path string, handler http.Handler) http.Handler { config, _ := setUp(t) s, err := config.Complete(nil).New(\"test\", NewEmptyDelegate()) if err != nil { t.Fatalf(\"Error in bringing up the server: %v\", err) } s.Handler.NonGoRestfulMux.Handle(path, handler) return s.Handler } "} {"_id":"q-en-kubernetes-f0ca2c87c1f9890ea3d6b385e3be0c7ea12642650ac0fb57e159d06c3d6b97bc","text":"metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/util/net\" \"k8s.io/apimachinery/pkg/util/runtime\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" corev1client \"k8s.io/client-go/kubernetes/typed/core/v1\" \"k8s.io/client-go/tools/record\""} {"_id":"q-en-kubernetes-f0ed166b3b61796722d6e450fd412ba6ed8e8cdfbcf8fdb6847d5c691c4fdf73","text":"mkdir -p \"${dst_dir}\" local salt_dir=\"${KUBE_ROOT}/cluster/saltbase/salt\" cp \"${salt_dir}/cluster-autoscaler/cluster-autoscaler.manifest\" \"${dst_dir}/\" cp \"${salt_dir}/fluentd-es/fluentd-es.yaml\" \"${release_stage}/\" cp \"${salt_dir}/fluentd-gcp/fluentd-gcp.yaml\" \"${release_stage}/\" cp \"${salt_dir}/kube-registry-proxy/kube-registry-proxy.yaml\" \"${release_stage}/\""} {"_id":"q-en-kubernetes-f1474a70c2f6cf8bcad84a497fe22704eb95dda435f4bdf926ada1c2336e6682","text":"if pod == nil { return framework.NewStatus(framework.Error, \"pod cannot be nil\") } state.RLock() defer state.RUnlock() if v, e := state.Read(framework.StateKey(pod.Name)); e == nil { if value, ok := v.(*stateData); ok && value.data == \"never bind\" { return framework.NewStatus(framework.Unschedulable, \"pod is not permitted\")"} {"_id":"q-en-kubernetes-f14a1033278e09a7a45e0218a3acc1220729663323bc341cf328c0685bbd19c4","text":"} } func TestValidateFinalizersUpdate(t *testing.T) { testcases := map[string]struct { Old api.ObjectMeta New api.ObjectMeta ExpectedErr string }{ \"invalid adding finalizers\": { Old: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/a\"}}, New: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/a\", \"y/b\"}}, ExpectedErr: \"y/b\", }, \"invalid changing finalizers\": { Old: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/a\"}}, New: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/b\"}}, ExpectedErr: \"x/b\", }, \"valid removing finalizers\": { Old: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/a\", \"y/b\"}}, New: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", DeletionTimestamp: &unversioned.Time{}, Finalizers: []string{\"x/a\"}}, ExpectedErr: \"\", }, \"valid adding finalizers for objects not being deleted\": { Old: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", Finalizers: []string{\"x/a\"}}, New: api.ObjectMeta{Name: \"test\", ResourceVersion: \"1\", Finalizers: []string{\"x/a\", \"y/b\"}}, ExpectedErr: \"\", }, } for name, tc := range testcases { errs := ValidateObjectMetaUpdate(&tc.New, &tc.Old, field.NewPath(\"field\")) if len(errs) == 0 { if len(tc.ExpectedErr) != 0 { t.Errorf(\"case: %q, expected error to contain %q\", name, tc.ExpectedErr) } } else if e, a := tc.ExpectedErr, errs.ToAggregate().Error(); !strings.Contains(a, e) { t.Errorf(\"case: %q, expected error to contain %q, got error %q\", name, e, a) } } } func TestValidateObjectMetaUpdatePreventsDeletionFieldMutation(t *testing.T) { now := unversioned.NewTime(time.Unix(1000, 0).UTC()) later := unversioned.NewTime(time.Unix(2000, 0).UTC())"} {"_id":"q-en-kubernetes-f18493885d7a515788a71305b971a62f1be8eca60c66ec97d5b9aeeb16ef57d9","text":"package clouddns import ( \"google.golang.org/api/googleapi\" \"k8s.io/kubernetes/federation/pkg/dnsprovider\" \"k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces\" )"} {"_id":"q-en-kubernetes-f1b9c367b2a1e04982f5b584f64cb75454395d8590120c6ca6dd5b3c5d45a1ae","text":"// Package discovery provides ways to discover server-supported // API groups, versions and resources. package discovery package discovery // import \"k8s.io/client-go/discovery\" "} {"_id":"q-en-kubernetes-f1d2a6d7624183b6c4c3f30454cd5f039f8b07e5932cffb28bded5189e8a6557","text":"serviceHasSynced = func() bool { return true } } nodeIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) var nodeHasSynced cache.InformerSynced var nodeLister corelisters.NodeLister if kubeDeps.KubeClient != nil { fieldSelector := fields.Set{api.ObjectNameField: string(nodeName)}.AsSelector() nodeLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.CoreV1().RESTClient(), \"nodes\", metav1.NamespaceAll, fieldSelector) r := cache.NewReflector(nodeLW, &v1.Node{}, nodeIndexer, 0) go r.Run(wait.NeverStop) kubeInformers := informers.NewSharedInformerFactoryWithOptions(kubeDeps.KubeClient, 0, informers.WithTweakListOptions(func(options *metav1.ListOptions) { options.FieldSelector = fields.Set{api.ObjectNameField: string(nodeName)}.String() })) nodeLister = kubeInformers.Core().V1().Nodes().Lister() nodeHasSynced = func() bool { if kubeInformers.Core().V1().Nodes().Informer().HasSynced() { klog.Infof(\"kubelet nodes sync\") return true } klog.Infof(\"kubelet nodes not sync\") return false } kubeInformers.Start(wait.NeverStop) klog.Info(\"Kubelet client is not nil\") } else { // we dont have a client to sync! nodeIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) nodeLister = corelisters.NewNodeLister(nodeIndexer) nodeHasSynced = func() bool { return true } klog.Info(\"Kubelet client is nil\") } nodeLister := corelisters.NewNodeLister(nodeIndexer) // TODO: get the real node object of ourself, // and use the real node name and UID."} {"_id":"q-en-kubernetes-f204246583119678e6d8eea34180fa08b4d4b4795277a01cb5f4b986f5ae26f5","text":"b.Do().Visit(func(r *resource.Info) error { services := r.Object.(*api.ServiceList).Items for _, service := range services { link := client.Host + \"/api/v1beta3/proxy/namespaces/\" + service.ObjectMeta.Namespace + \"/services/\" + service.ObjectMeta.Name var link string if len(service.Spec.PublicIPs) > 0 { for _, port := range service.Spec.Ports { link += \"http://\" + service.Spec.PublicIPs[0] + \":\" + strconv.Itoa(port.Port) + \" \" } } else { link = client.Host + \"/api/v1beta3/proxy/namespaces/\" + service.ObjectMeta.Namespace + \"/services/\" + service.ObjectMeta.Name } printService(out, service.ObjectMeta.Labels[\"name\"], link) } return nil"} {"_id":"q-en-kubernetes-f225138590d09c49cee89a28381cff37387733e001a4c63eb022aaf995729992","text":"framework.ExpectNoError(err, \"failed to delete Service %v in namespace %v\", testService.ObjectMeta.Name, ns) framework.Logf(\"Service %s deleted\", testSvcName) }) ginkgo.It(\"should delete a collection of services\", func() { ns := f.Namespace.Name svcClient := f.ClientSet.CoreV1().Services(ns) svcResource := schema.GroupVersionResource{Group: \"\", Version: \"v1\", Resource: \"services\"} svcDynamicClient := f.DynamicClient.Resource(svcResource).Namespace(ns) svcLabel := map[string]string{\"e2e-test-service\": \"delete\"} deleteLabel := labels.SelectorFromSet(svcLabel).String() ginkgo.By(\"creating a collection of services\") testServices := []struct { name string label map[string]string port int }{ { name: \"e2e-svc-a-\" + utilrand.String(5), label: map[string]string{\"e2e-test-service\": \"delete\"}, port: 8001, }, { name: \"e2e-svc-b-\" + utilrand.String(5), label: map[string]string{\"e2e-test-service\": \"delete\"}, port: 8002, }, { name: \"e2e-svc-c-\" + utilrand.String(5), label: map[string]string{\"e2e-test-service\": \"keep\"}, port: 8003, }, } for _, testService := range testServices { func() { framework.Logf(\"Creating %s\", testService.name) svc := v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: testService.name, Labels: testService.label, }, Spec: v1.ServiceSpec{ Type: \"ClusterIP\", Ports: []v1.ServicePort{{ Name: \"http\", Protocol: v1.ProtocolTCP, Port: int32(testService.port), TargetPort: intstr.FromInt(testService.port), }}, }, } _, err := svcClient.Create(context.TODO(), &svc, metav1.CreateOptions{}) framework.ExpectNoError(err, \"failed to create Service\") }() } svcList, err := cs.CoreV1().Services(ns).List(context.TODO(), metav1.ListOptions{}) framework.ExpectNoError(err, \"failed to list Services\") framework.ExpectEqual(len(svcList.Items), 3, \"Required count of services out of sync\") ginkgo.By(\"deleting service collection\") err = svcDynamicClient.DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: deleteLabel}) framework.ExpectNoError(err, \"failed to delete service collection. %v\", err) svcList, err = cs.CoreV1().Services(ns).List(context.TODO(), metav1.ListOptions{}) framework.ExpectNoError(err, \"failed to list Services\") framework.ExpectEqual(len(svcList.Items), 1, \"Required count of services out of sync\") framework.Logf(\"Collection of services has been deleted\") }) }) // execAffinityTestForSessionAffinityTimeout is a helper function that wrap the logic of"} {"_id":"q-en-kubernetes-f24c5685fa6bb01dd198f367c52265d44ef66880fbed7b1d6e67f1636d09fa98","text":"if pod.Name != mirrorPod.Name || pod.Namespace != mirrorPod.Namespace { return false } return api.Semantic.DeepEqual(&pod.Spec, &mirrorPod.Spec) hash, ok := getHashFromMirrorPod(mirrorPod) if !ok { return false } return hash == getPodHash(pod) } func podsMapToPods(UIDMap map[types.UID]*api.Pod) []*api.Pod {"} {"_id":"q-en-kubernetes-f25ee5470849701b59b97001f00a458a23ad30592940f31728ca8ce2e9c77c30","text":"return p, err } // waitForRCPodToDisappear returns nil if the pod from the given replication controller (described by rcName) no longer exists. // In case of failure or too long waiting time, an error is returned. func waitForRCPodToDisappear(c *client.Client, ns, rcName, podName string) error { label := labels.SelectorFromSet(labels.Set(map[string]string{\"name\": rcName})) return wait.Poll(20*time.Second, 5*time.Minute, func() (bool, error) { func waitForPodToDisappear(c *client.Client, ns, podName string, label labels.Selector, interval, timeout time.Duration) error { return wait.Poll(interval, timeout, func() (bool, error) { Logf(\"Waiting for pod %s to disappear\", podName) pods, err := c.Pods(ns).List(label, fields.Everything()) if err != nil {"} {"_id":"q-en-kubernetes-f28523489dbbebc6eb5a04614cf33647cab55e841322e1d19e7420a73672e9b8","text":"}, }, }, map[string]interface{}{\"field\": map[string]interface{}{}}, }, false}, {\"!nullable against null\", args{ apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\", Nullable: false, }, }, objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": map[string]interface{}{}}, }, map[string]interface{}{\"field\": nil}, }, true}, {\"!nullable against undefined\", args{ apiextensions.JSONSchemaProps{ failingObjects: []interface{}{ map[string]interface{}{\"field\": \"foo\"}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"nullable\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\", Nullable: false, Nullable: true, }, }, }, map[string]interface{}{}, }, false}, {\"nullable against non-null\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": nil}, }, failingObjects: []interface{}{ map[string]interface{}{\"field\": \"foo\"}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"nullable and no type\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\", Nullable: true, }, }, }, map[string]interface{}{\"field\": map[string]interface{}{}}, }, false}, {\"nullable against null\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": nil}, map[string]interface{}{\"field\": \"foo\"}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"x-kubernetes-int-or-string\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\", Nullable: true, XIntOrString: true, }, }, }, map[string]interface{}{\"field\": nil}, }, false}, {\"!nullable against undefined\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": \"foo\"}, }, failingObjects: []interface{}{ map[string]interface{}{\"field\": nil}, map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"nullable and x-kubernetes-int-or-string\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"object\", Nullable: true, Nullable: true, XIntOrString: true, }, }, }, map[string]interface{}{}, }, false}, {\"nullable and no type against non-nil\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": \"foo\"}, map[string]interface{}{\"field\": nil}, }, failingObjects: []interface{}{ map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"nullable, x-kubernetes-int-or-string and user-provided anyOf\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Nullable: true, Nullable: true, XIntOrString: true, AnyOf: []apiextensions.JSONSchemaProps{ {Type: \"integer\"}, {Type: \"string\"}, }, }, }, }, map[string]interface{}{\"field\": 42}, }, false}, {\"nullable and no type against nil\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": nil}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": \"foo\"}, }, failingObjects: []interface{}{ map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"nullable, x-kubernetes-int-or-string and user-provider allOf\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Nullable: true, Nullable: true, XIntOrString: true, AllOf: []apiextensions.JSONSchemaProps{ { AnyOf: []apiextensions.JSONSchemaProps{ {Type: \"integer\"}, {Type: \"string\"}, }, }, }, }, }, }, map[string]interface{}{\"field\": nil}, }, false}, {\"invalid regex\", args{ apiextensions.JSONSchemaProps{ objects: []interface{}{ map[string]interface{}{}, map[string]interface{}{\"field\": nil}, map[string]interface{}{\"field\": 42}, map[string]interface{}{\"field\": \"foo\"}, }, failingObjects: []interface{}{ map[string]interface{}{\"field\": true}, map[string]interface{}{\"field\": 1.2}, map[string]interface{}{\"field\": map[string]interface{}{}}, map[string]interface{}{\"field\": []interface{}{}}, }, }, {name: \"invalid regex\", schema: apiextensions.JSONSchemaProps{ Properties: map[string]apiextensions.JSONSchemaProps{ \"field\": { Type: \"string\","} {"_id":"q-en-kubernetes-f286a1e96d66903fca4ee0789949116482edb1c5736ca29bf6dd3033dfb39405","text":"}, { message: \"{\", err: \"error stream protocol error: unexpected end of JSON input in \"{\"\", err: \"unexpected end of JSON input in \"{\"\", }, { message: `{\"status\": \"Success\" }`,"} {"_id":"q-en-kubernetes-f28aa540f00652cdf4d0f03188d3b56eb67f09abfe7af4e61faa98cc4959cf36","text":"package mount import ( \"reflect\" \"strings\" \"testing\" )"} {"_id":"q-en-kubernetes-f2a71729954894b52f6cb3a79e046146ca5f30b2edfd719032c2ee9b4d16f1ed","text":"// Leave something on the stack, so that calls to struct tag getters never fail. s.srcStack.push(scopeStackElem{}) s.destStack.push(scopeStackElem{}) return c.convert(sv, dv, s) return f(sv, dv, s) } // callCustom calls 'custom' with sv & dv. custom must be a conversion function."} {"_id":"q-en-kubernetes-f2d2143a508f3a1e534bec04e74f6be618a436cd4176c1ac3d84ba9cd65e3437","text":"existingFilterChains := proxier.getExistingChains(proxier.filterChainsData, utiliptables.TableFilter) existingNATChains := proxier.getExistingChains(proxier.iptablesData, utiliptables.TableNAT) // ensure KUBE-MARK-DROP chain exist but do not change any rules for _, ch := range iptablesEnsureChains { if _, err := proxier.iptables.EnsureChain(ch.table, ch.chain); err != nil { klog.Errorf(\"Failed to ensure that %s chain %s exists: %v\", ch.table, ch.chain, err) return } } // Make sure we keep stats for the top-level chains for _, ch := range iptablesChains { if _, err := proxier.iptables.EnsureChain(ch.table, ch.chain); err != nil {"} {"_id":"q-en-kubernetes-f2d3bc4aad61c40584e39737d5d223f0a060e06110f0f5de1877c561caeb5b02","text":"fi fi # generate the controller manager token here since its only used on the master. KUBE_CONTROLLER_MANAGER_TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d \"=+/\" | dd bs=32 count=1 2>/dev/null) # KUBERNETES_CONTAINER_RUNTIME is set by the `kube-env` file, but it's a bit of a mouthful if [[ \"${CONTAINER_RUNTIME:-}\" == \"\" ]]; then CONTAINER_RUNTIME=\"${KUBERNETES_CONTAINER_RUNTIME:-docker}\""} {"_id":"q-en-kubernetes-f2e92ff035352b5e99069e5720438db879d6c7cf2b80839556f2a5fac363cf8b","text":"apierrors \"k8s.io/apimachinery/pkg/api/errors\" \"k8s.io/apimachinery/pkg/api/resource\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\" \"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/sets\" \"k8s.io/apimachinery/pkg/util/wait\" clientset \"k8s.io/client-go/kubernetes\" \"k8s.io/client-go/util/retry\" batchinternal \"k8s.io/kubernetes/pkg/apis/batch\" \"k8s.io/kubernetes/test/e2e/framework\" e2ejob \"k8s.io/kubernetes/test/e2e/framework/job\""} {"_id":"q-en-kubernetes-f2f6c47d546d84798950b888afe622a749a7521985a15fa404e29a7fba4bfa18","text":"import ( \"fmt\" \"sync\" \"time\" \"github.com/golang/glog\""} {"_id":"q-en-kubernetes-f31a66de7a792b9ed2eeed3febd01148ea3ffc1f214396ca2acb4d14d508758f","text":"metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/util/wait\" \"k8s.io/apiserver/pkg/admission\" \"k8s.io/client-go/informers\" clientset \"k8s.io/client-go/kubernetes\" typedappsv1 \"k8s.io/client-go/kubernetes/typed/apps/v1\" typedv1 \"k8s.io/client-go/kubernetes/typed/core/v1\" restclient \"k8s.io/client-go/rest\" \"k8s.io/client-go/util/retry\" api \"k8s.io/kubernetes/pkg/apis/core\" //svc \"k8s.io/kubernetes/pkg/api/v1/service\" \"k8s.io/kubernetes/pkg/controller/statefulset\""} {"_id":"q-en-kubernetes-f34dbb4acafd63ebdf0884dcf2c0332708146f8c5e380cfc5a7905d9e45a3f38","text":"framework.Logf(\"Service %s deleted\", testSvcName) }) ginkgo.It(\"should delete a collection of services\", func() { /* Release: v1.23 Testname: Service, deletes a collection of services Description: Create three services with the required labels and ports. It MUST locate three services in the test namespace. It MUST succeed at deleting a collection of services via a label selector. It MUST locate only one service after deleting the service collection. */ framework.ConformanceIt(\"should delete a collection of services\", func() { ns := f.Namespace.Name svcClient := f.ClientSet.CoreV1().Services(ns)"} {"_id":"q-en-kubernetes-f3b92121551ba3fdf7822de70b9c4114669295c0540f32d42d23f21b041f5df7","text":"nodePortAddresses []string, ) (proxy.Provider, error) { // Create an ipv4 instance of the single-stack proxier nodePortAddresses4, nodePortAddresses6 := utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, false) ipv4Proxier, err := NewProxier(ipt[0], sysctl, exec, syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, localDetectors[0], hostname, nodeIP[0], recorder, healthzServer, nodePortAddresses) nodeIP[0], recorder, healthzServer, nodePortAddresses4) if err != nil { return nil, fmt.Errorf(\"unable to create ipv4 proxier: %v\", err) } ipv6Proxier, err := NewProxier(ipt[1], sysctl, exec, syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, localDetectors[1], hostname, nodeIP[1], recorder, healthzServer, nodePortAddresses) nodeIP[1], recorder, healthzServer, nodePortAddresses6) if err != nil { return nil, fmt.Errorf(\"unable to create ipv6 proxier: %v\", err) }"} {"_id":"q-en-kubernetes-f3bc6a11135c7caa85a55e6a1704bb47385debd91538599eb4d9b5700d7b08ba","text":"\"k8s.io/apimachinery/pkg/runtime/schema\" \"k8s.io/apiserver/pkg/authentication/serviceaccount\" clientset \"k8s.io/client-go/kubernetes\" imageutils \"k8s.io/kubernetes/test/utils/image\" \"github.com/onsi/ginkgo\""} {"_id":"q-en-kubernetes-f3be04498e5fe5a582f8bf721da99303bd7f4ade9a2fd3c676c035723e144ba4","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( \"encoding/json\" \"flag\" \"fmt\" \"os\" \"path\" \"strconv\" \"strings\" \"time\" \"github.com/coreos/etcd/etcdserver\" pb \"github.com/coreos/etcd/etcdserver/etcdserverpb\" \"github.com/coreos/etcd/etcdserver/membership\" \"github.com/coreos/etcd/mvcc/backend\" \"github.com/coreos/etcd/mvcc/mvccpb\" \"github.com/coreos/etcd/pkg/pbutil\" \"github.com/coreos/etcd/pkg/types\" \"github.com/coreos/etcd/raft/raftpb\" \"github.com/coreos/etcd/snap\" \"github.com/coreos/etcd/store\" \"github.com/coreos/etcd/wal\" \"github.com/coreos/etcd/wal/walpb\" \"github.com/golang/glog\" ) const rollbackVersion = \"2.3.7\" var ( migrateDatadir = flag.String(\"data-dir\", \"\", \"Path to the data directory\") ttl = flag.Duration(\"ttl\", time.Hour, \"TTL of event keys (default 1 hour)\") ) func main() { flag.Parse() if len(*migrateDatadir) == 0 { glog.Fatal(\"need to set '--data-dir'\") } dbpath := path.Join(*migrateDatadir, \"member\", \"snap\", \"db\") // etcd3 store backend. We will use it to parse v3 data files and extract information. be := backend.NewDefaultBackend(dbpath) tx := be.BatchTx() // etcd2 store backend. We will use v3 data to update this and then save snapshot to disk. st := store.New(etcdserver.StoreClusterPrefix, etcdserver.StoreKeysPrefix) expireTime := time.Now().Add(*ttl) tx.Lock() err := tx.UnsafeForEach([]byte(\"key\"), func(k, v []byte) error { kv := &mvccpb.KeyValue{} kv.Unmarshal(v) // This is compact key. if !strings.HasPrefix(string(kv.Key), \"/\") { return nil } ttlOpt := store.TTLOptionSet{} if kv.Lease != 0 { ttlOpt = store.TTLOptionSet{ExpireTime: expireTime} } if !isTombstone(k) { sk := path.Join(strings.Trim(etcdserver.StoreKeysPrefix, \"/\"), string(kv.Key)) _, err := st.Set(sk, false, string(kv.Value), ttlOpt) if err != nil { return err } } else { st.Delete(string(kv.Key), false, false) } return nil }) if err != nil { glog.Fatal(err) } tx.Unlock() if err := traverseAndDeleteEmptyDir(st, \"/\"); err != nil { glog.Fatal(err) } // rebuild cluster state. metadata, hardstate, oldSt, err := rebuild(*migrateDatadir) if err != nil { glog.Fatal(err) } // In the following, it's low level logic that saves metadata and data into v2 snapshot. backupPath := *migrateDatadir + \".rollback.backup\" if err := os.Rename(*migrateDatadir, backupPath); err != nil { glog.Fatal(err) } if err := os.MkdirAll(path.Join(*migrateDatadir, \"member\", \"snap\"), 0700); err != nil { glog.Fatal(err) } walDir := path.Join(*migrateDatadir, \"member\", \"wal\") w, err := wal.Create(walDir, metadata) if err != nil { glog.Fatal(err) } err = w.SaveSnapshot(walpb.Snapshot{Index: hardstate.Commit, Term: hardstate.Term}) if err != nil { glog.Fatal(err) } w.Close() event, err := oldSt.Get(etcdserver.StoreClusterPrefix, true, false) if err != nil { glog.Fatal(err) } // nodes (members info) for ConfState nodes := []uint64{} traverseMetadata(event.Node, func(n *store.NodeExtern) { if n.Key != etcdserver.StoreClusterPrefix { // update store metadata v := \"\" if !n.Dir { v = *n.Value } if n.Key == path.Join(etcdserver.StoreClusterPrefix, \"version\") { v = rollbackVersion } if _, err := st.Set(n.Key, n.Dir, v, store.TTLOptionSet{}); err != nil { glog.Fatal(err) } // update nodes fields := strings.Split(n.Key, \"/\") if len(fields) == 4 && fields[2] == \"members\" { nodeID, err := strconv.ParseUint(fields[3], 16, 64) if err != nil { glog.Fatalf(\"failed to parse member ID (%s): %v\", fields[3], err) } nodes = append(nodes, nodeID) } } }) data, err := st.Save() if err != nil { glog.Fatal(err) } raftSnap := raftpb.Snapshot{ Data: data, Metadata: raftpb.SnapshotMetadata{ Index: hardstate.Commit, Term: hardstate.Term, ConfState: raftpb.ConfState{ Nodes: nodes, }, }, } snapshotter := snap.New(path.Join(*migrateDatadir, \"member\", \"snap\")) if err := snapshotter.SaveSnap(raftSnap); err != nil { glog.Fatal(err) } fmt.Println(\"Finished successfully\") } func traverseMetadata(head *store.NodeExtern, handleFunc func(*store.NodeExtern)) { q := []*store.NodeExtern{head} for len(q) > 0 { n := q[0] q = q[1:] handleFunc(n) for _, next := range n.Nodes { q = append(q, next) } } } const ( revBytesLen = 8 + 1 + 8 markedRevBytesLen = revBytesLen + 1 markBytePosition = markedRevBytesLen - 1 markTombstone byte = 't' ) func isTombstone(b []byte) bool { return len(b) == markedRevBytesLen && b[markBytePosition] == markTombstone } func traverseAndDeleteEmptyDir(st store.Store, dir string) error { e, err := st.Get(dir, true, false) if err != nil { return err } if len(e.Node.Nodes) == 0 { st.Delete(dir, true, true) return nil } for _, node := range e.Node.Nodes { if !node.Dir { glog.V(2).Infof(\"key: %s\", node.Key[len(etcdserver.StoreKeysPrefix):]) } else { err := traverseAndDeleteEmptyDir(st, node.Key) if err != nil { return err } } } return nil } func rebuild(datadir string) ([]byte, *raftpb.HardState, store.Store, error) { waldir := path.Join(datadir, \"member\", \"wal\") snapdir := path.Join(datadir, \"member\", \"snap\") ss := snap.New(snapdir) snapshot, err := ss.Load() if err != nil && err != snap.ErrNoSnapshot { return nil, nil, nil, err } var walsnap walpb.Snapshot if snapshot != nil { walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term } w, err := wal.OpenForRead(waldir, walsnap) if err != nil { return nil, nil, nil, err } defer w.Close() meta, hardstate, ents, err := w.ReadAll() if err != nil { return nil, nil, nil, err } st := store.New(etcdserver.StoreClusterPrefix, etcdserver.StoreKeysPrefix) if snapshot != nil { err := st.Recovery(snapshot.Data) if err != nil { return nil, nil, nil, err } } cluster := membership.NewCluster(\"\") cluster.SetStore(st) applier := etcdserver.NewApplierV2(st, cluster) for _, ent := range ents { if ent.Type == raftpb.EntryConfChange { var cc raftpb.ConfChange pbutil.MustUnmarshal(&cc, ent.Data) switch cc.Type { case raftpb.ConfChangeAddNode: m := new(membership.Member) if err := json.Unmarshal(cc.Context, m); err != nil { return nil, nil, nil, err } cluster.AddMember(m) case raftpb.ConfChangeRemoveNode: id := types.ID(cc.NodeID) cluster.RemoveMember(id) case raftpb.ConfChangeUpdateNode: m := new(membership.Member) if err := json.Unmarshal(cc.Context, m); err != nil { return nil, nil, nil, err } cluster.UpdateRaftAttributes(m.ID, m.RaftAttributes) } continue } var raftReq pb.InternalRaftRequest if !pbutil.MaybeUnmarshal(&raftReq, ent.Data) { // backward compatible var r pb.Request pbutil.MustUnmarshal(&r, ent.Data) applyRequest(&r, applier) } else { if raftReq.V2 != nil { req := raftReq.V2 applyRequest(req, applier) } } } return meta, &hardstate, st, nil } func toTTLOptions(r *pb.Request) store.TTLOptionSet { refresh, _ := pbutil.GetBool(r.Refresh) ttlOptions := store.TTLOptionSet{Refresh: refresh} if r.Expiration != 0 { ttlOptions.ExpireTime = time.Unix(0, r.Expiration) } return ttlOptions } func applyRequest(r *pb.Request, applyV2 etcdserver.ApplierV2) { toTTLOptions(r) switch r.Method { case \"PUT\": applyV2.Put(r) case \"DELETE\": applyV2.Delete(r) case \"POST\", \"QGET\", \"SYNC\": return default: glog.Fatal(\"unknown command\") } } "} {"_id":"q-en-kubernetes-f3bf24a042ea25e0f025fae7f60e3e1df9cae0d766aba7c7faa9f76a4baf2982","text":"import ( \"fmt\" \"reflect\" \"k8s.io/apimachinery/pkg/api/meta\" \"k8s.io/apimachinery/pkg/labels\" \"k8s.io/apimachinery/pkg/runtime/schema\" serializer \"k8s.io/apimachinery/pkg/runtime/serializer\" \"k8s.io/apimachinery/pkg/runtime/serializer\" \"k8s.io/client-go/rest\" \"k8s.io/client-go/util/flowcontrol\""} {"_id":"q-en-kubernetes-f3c119848d862fd6cb46dd39a04479a25c3a0be0fecd27bf80abfcbbbf175ae2","text":"return err } if !mountPoint { return fmt.Errorf(\"azureDisk - Not a mounting point for disk %s on %s\", diskName, dir) glog.V(4).Infof(\"azureDisk - already mounted to target %s\", dir) return nil } if err := os.MkdirAll(dir, 0750); err != nil {"} {"_id":"q-en-kubernetes-f3cdc11ba3b216d511de3cab3c38eb8540579d747129dd07eab0824c789d783d","text":"if len(q.nominatedPods.nominatedPods[\"node1\"]) != 2 { t.Errorf(\"Expected medPriorityPod and unschedulablePod to be still present in nomindatePods: %v\", q.nominatedPods.nominatedPods[\"node1\"]) } if q.unschedulableQ.get(&highPriNominatedPod) != &highPriNominatedPod { if getUnschedulablePod(q, &highPriNominatedPod) != &highPriNominatedPod { t.Errorf(\"Pod %v was not found in the unschedulableQ.\", highPriNominatedPod.Name) } }"} {"_id":"q-en-kubernetes-f3d3bf36a0e3d97d22209da99dcc300cd99a628ea831dcec76fea4e3a7cc3d50","text":"return \"\", err } return image.TagFromImage(pod.Spec.Containers[0].Image), nil return convertImageTagMetadataToSemver(image.TagFromImage(pod.Spec.Containers[0].Image)), nil } // convertImageTagMetadataToSemver converts imagetag in the format of semver_metadata to semver+metadata func convertImageTagMetadataToSemver(tag string) string { // Container registries do not support `+` characters in tag names. This prevents imagetags from // correctly representing semantic versions which use the plus symbol to delimit build metadata. // Kubernetes uses the convention of using an underscore in image registries to preserve // build metadata information in imagetags. return strings.Replace(tag, \"_\", \"+\", 1) }"} {"_id":"q-en-kubernetes-f3dfe3bbb20982c454bb6cb44b63075a1252dd5c764644ce47d62feb98b744f8","text":"// In case of failure or too long waiting time, an error is returned. func waitForRCPodToDisappear(c *client.Client, ns, rcName, podName string) error { label := labels.SelectorFromSet(labels.Set(map[string]string{\"name\": rcName})) return waitForPodToDisappear(c, ns, podName, label, 20*time.Second, 5*time.Minute) // NodeController evicts pod after 5 minutes, so we need timeout greater than that. // Additionally, there can be non-zero grace period, so we are setting 10 minutes // to be on the safe size. return waitForPodToDisappear(c, ns, podName, label, 20*time.Second, 10*time.Minute) } // waitForService waits until the service appears (exist == true), or disappears (exist == false)"} {"_id":"q-en-kubernetes-f3e081db144073cd2830de316b49b8635aa0a9a0deb182e9c667846d0b11055d","text":"if utilfeature.DefaultFeatureGate.Enabled(features.CSIDriverRegistry) { csiClient := host.GetKubeClient() if csiClient == nil { return errors.New(\"unable to get Kubernetes client\") klog.Warning(log(\"kubeclient not set, assuming standalone kubelet\")) } else { // Start informer for CSIDrivers. factory := csiapiinformer.NewSharedInformerFactory(csiClient, csiResyncPeriod) p.csiDriverInformer = factory.Storage().V1beta1().CSIDrivers() p.csiDriverLister = p.csiDriverInformer.Lister() go factory.Start(wait.NeverStop) } // Start informer for CSIDrivers. factory := csiapiinformer.NewSharedInformerFactory(csiClient, csiResyncPeriod) p.csiDriverInformer = factory.Storage().V1beta1().CSIDrivers() p.csiDriverLister = p.csiDriverInformer.Lister() go factory.Start(wait.NeverStop) } // Initializing the label management channels"} {"_id":"q-en-kubernetes-f40c4b05bbb966b01fca153ff47622806d26bb9cfb5286aa5f46463d669635ca","text":"// EnsureDesiredReplicasInRange ensure the replicas is in a desired range func (rc *ResourceConsumer) EnsureDesiredReplicasInRange(ctx context.Context, minDesiredReplicas, maxDesiredReplicas int, duration time.Duration, hpaName string) { interval := 10 * time.Second err := wait.PollUntilContextTimeout(ctx, interval, duration, true, func(ctx context.Context) (bool, error) { replicas := rc.GetReplicas(ctx) framework.Logf(\"expecting there to be in [%d, %d] replicas (are: %d)\", minDesiredReplicas, maxDesiredReplicas, replicas) as, err := rc.GetHpa(ctx, hpaName) if err != nil { framework.Logf(\"Error getting HPA: %s\", err) } else { framework.Logf(\"HPA status: %+v\", as.Status) } if replicas < minDesiredReplicas { return false, fmt.Errorf(\"number of replicas below target\") } else if replicas > maxDesiredReplicas { return false, fmt.Errorf(\"number of replicas above target\") } else { return false, nil // Expected number of replicas found. Continue polling until timeout. } }) // The call above always returns an error, but if it is timeout, it's OK (condition satisfied all the time). if wait.Interrupted(err) { framework.Logf(\"Number of replicas was stable over %v\", duration) return desiredReplicasErr := framework.Gomega().Consistently(ctx, func(ctx context.Context) int { return rc.GetReplicas(ctx) }).WithTimeout(duration).WithPolling(interval).Should(gomega.And(gomega.BeNumerically(\">=\", minDesiredReplicas), gomega.BeNumerically(\"<=\", maxDesiredReplicas))) // dump HPA for debugging as, err := rc.GetHpa(ctx, hpaName) if err != nil { framework.Logf(\"Error getting HPA: %s\", err) } else { framework.Logf(\"HPA status: %+v\", as.Status) } framework.ExpectNoErrorWithOffset(1, err) framework.ExpectNoError(desiredReplicasErr) } // Pause stops background goroutines responsible for consuming resources."} {"_id":"q-en-kubernetes-f4208f2d0d0f428317e9af55e70bb3b85775210c45c328a4e20644d53b48fee1","text":"ginkgo.It(\"should always delete fast (ALL of 100 namespaces in 150 seconds) [Feature:ComprehensiveNamespaceDraining]\", func() { extinguish(f, 100, 0, 150) }) ginkgo.It(\"should patch a Namespace\", func() { ginkgo.By(\"creating a Namespace\") namespaceName := \"nspatchtest-\" + string(uuid.NewUUID()) ns, err := f.CreateNamespace(namespaceName, nil) framework.ExpectNoError(err, \"failed creating Namespace\") namespaceName = ns.ObjectMeta.Name ginkgo.By(\"patching the Namespace\") nspatch, err := json.Marshal(map[string]interface{}{ \"metadata\": map[string]interface{}{ \"labels\": map[string]string{\"testLabel\": \"testValue\"}, }, }) framework.ExpectNoError(err, \"failed to marshal JSON patch data\") _, err = f.ClientSet.CoreV1().Namespaces().Patch(namespaceName, types.StrategicMergePatchType, []byte(nspatch)) framework.ExpectNoError(err, \"failed to patch Namespace\") ginkgo.By(\"get the Namespace and ensuring it has the label\") namespace, err := f.ClientSet.CoreV1().Namespaces().Get(namespaceName, metav1.GetOptions{}) framework.ExpectNoError(err, \"failed to get Namespace\") framework.ExpectEqual(namespace.ObjectMeta.Labels[\"testLabel\"], \"testValue\", \"namespace not patched\") }) })"} {"_id":"q-en-kubernetes-f43535527db482bed8c7b18f0962bc61d93e11b2f14465a4f8f80b8b839bcda0","text":"var map_EnvVarSource = map[string]string{ \"\": \"EnvVarSource represents a source for the value of an EnvVar.\", \"fieldRef\": \"Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\", \"fieldRef\": \"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\", \"resourceFieldRef\": \"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.\", \"configMapKeyRef\": \"Selects a key of a ConfigMap.\", \"secretKeyRef\": \"Selects a key of a secret in the pod's namespace\","} {"_id":"q-en-kubernetes-f46e339ea0ca663a58d8e41e07ebeb2212c9bcb0d18ca233ba4f4144261b88c1","text":"safeIpset := newSafeIpset(ipset) nodePortAddresses4, nodePortAddresses6 := utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, false) // Create an ipv4 instance of the single-stack proxier ipv4Proxier, err := NewProxier(ipt[0], ipvs, safeIpset, sysctl, exec, syncPeriod, minSyncPeriod, filterCIDRs(false, excludeCIDRs), strictARP, tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit, localDetectors[0], hostname, nodeIP[0], recorder, healthzServer, scheduler, nodePortAddresses, kernelHandler) recorder, healthzServer, scheduler, nodePortAddresses4, kernelHandler) if err != nil { return nil, fmt.Errorf(\"unable to create ipv4 proxier: %v\", err) }"} {"_id":"q-en-kubernetes-f493a427d21a18310599379d48f941ded64099911dadabd815089ef0b5a6545a","text":"// Not local instance, get instanceID from Azure ARM API. if !isLocalInstance { return az.vmSet.GetInstanceIDByNodeName(nodeName) if az.vmSet != nil { return az.vmSet.GetInstanceIDByNodeName(nodeName) } // vmSet == nil indicates credentials are not provided. return \"\", fmt.Errorf(\"no credentials provided for Azure cloud provider\") } // Get resource group name."} {"_id":"q-en-kubernetes-f4949ced9af0b45f1bfa8099a45bec008466ab0e4baaa62ffdf55566faa1ed5e","text":"--bind-address=\"${API_HOST}\" --insecure-port=\"${API_PORT}\" --etcd-servers=\"http://${ETCD_HOST}:${ETCD_PORT}\" --etcd-prefix=\"${ETCD_PREFIX}\" --runtime-config=\"${RUNTIME_CONFIG}\" --cert-dir=\"${TMPDIR:-/tmp/}\" --service-cluster-ip-range=\"10.0.0.0/24\" "} {"_id":"q-en-kubernetes-f4a18ee30d26c34111d883fdada694d537c6d354e6e720ea9c8cbc7e4ea2943a","text":"}, \"securityContext\": { \"$ref\": \"#/definitions/io.k8s.api.core.v1.SecurityContext\", \"description\": \"Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\" \"description\": \"SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\" }, \"startupProbe\": { \"$ref\": \"#/definitions/io.k8s.api.core.v1.Probe\","} {"_id":"q-en-kubernetes-f4c6e72e64583bd7773bda6d6f03f203e8d5be167ee47b74b4fda7b7b913bf5b","text":") const ( validTmpl = \"image: {{ .ImageRepository }}/pause-{{ .Arch }}:3.0\" validTmplOut = \"image: gcr.io/google_containers/pause-amd64:3.0\" doNothing = \"image: gcr.io/google_containers/pause-amd64:3.0\" validTmpl = \"image: {{ .ImageRepository }}/pause-{{ .Arch }}:3.1\" validTmplOut = \"image: gcr.io/google_containers/pause-amd64:3.1\" doNothing = \"image: gcr.io/google_containers/pause-amd64:3.1\" invalidTmpl1 = \"{{ .baz }/d}\" invalidTmpl2 = \"{{ !foobar }}\" )"} {"_id":"q-en-kubernetes-f4c971f79683015692d9acc8d1693406940f24dd83472ee0467b3e460bad9586","text":" apiVersion: v1 kind: ServiceAccount metadata: name: elasticsearch "} {"_id":"q-en-kubernetes-f4f1567d15f1f09f67c42502cdaaec4d43af12ac0d92f3c4ab2abfc38e30cd73","text":"return } RemoveCleanupAction(f.cleanupHandle) // This should not happen. Given ClientSet is a public field a test must have updated it! // Error out early before any API calls during cleanup. if f.ClientSet == nil {"} {"_id":"q-en-kubernetes-f50c2191cb28957e7af69b36d252738c37ecc815d22d31c17dccf984188a4064","text":"} } func newDeployment(deploymentName string, replicas int, podLabels map[string]string, imageName string, image string) *extensions.Deployment { func newDeployment(deploymentName string, replicas int, podLabels map[string]string, imageName string, image string, strategyType extensions.DeploymentStrategyType) *extensions.Deployment { return &extensions.Deployment{ ObjectMeta: api.ObjectMeta{ Name: deploymentName, }, Spec: extensions.DeploymentSpec{ Replicas: replicas, Selector: podLabels, Replicas: replicas, Selector: podLabels, Strategy: extensions.DeploymentStrategy{ Type: strategyType, }, UniqueLabelKey: extensions.DefaultDeploymentUniqueLabelKey, Template: api.PodTemplateSpec{ ObjectMeta: api.ObjectMeta{"} {"_id":"q-en-kubernetes-f55c0256574318aa178b0dae1548fdc61e2a308d3fb7ed09f76dbcb9ebf1e6ba","text":"package logs import ( \"bufio\" \"bytes\" \"context\" \"fmt\" \"io\" \"io/ioutil\" \"os\" \"testing\" \"time\""} {"_id":"q-en-kubernetes-f55ece34f732a75829cae4337808636e142cbf8f0ff161de11b35719866d5672","text":"proberDurationLabels := metrics.Labels{ \"probe_type\": w.probeType.String(), \"container\": w.container.Name, \"pod\": podName, \"pod\": w.pod.Name, \"namespace\": w.pod.Namespace, }"} {"_id":"q-en-kubernetes-f5c914240d396374c1aa353d5ae00433613de616d82a2945b1c3942b2f5b5eb8","text":"service Node { // NodePrepareResources prepares several ResourceClaims // for use on the node. If an error is returned, the // response is ignored. Failures for individidual claims // response is ignored. Failures for individual claims // can be reported inside NodePrepareResourcesResponse. rpc NodePrepareResources (NodePrepareResourcesRequest) returns (NodePrepareResourcesResponse) {}"} {"_id":"q-en-kubernetes-f5dce306954e9e0e50aef74fac640713a9cc69cf0fb563dc4d1e0a0978b93253","text":"var _ = Describe(\"Shell\", func() { defer GinkgoRecover() // A number of scripts only work on gce if testContext.Provider != \"gce\" && testContext.Provider != \"gke\" { By(fmt.Sprintf(\"Skipping Shell test, which is only supported for provider gce and gke (not %s)\", testContext.Provider)) return } // Slurp up all the tests in hack/e2e-suite bashE2ERoot := filepath.Join(root, \"hack/e2e-suite\") files, err := ioutil.ReadDir(bashE2ERoot)"} {"_id":"q-en-kubernetes-f62a1f397a8d719414d5127bed707330442add96089b4acb5d16d48275fd1b9e","text":"klog.ErrorS(err, \"Unable to connect to device plugin client with socket path\", \"path\", c.socket) return err } c.mutex.Lock() c.grpc = conn c.client = client c.mutex.Unlock() return c.handler.PluginConnected(c.resource, c) }"} {"_id":"q-en-kubernetes-f64a5aa235920f09a7fc87037349e8454b3a0191abba92d8659256a423c4ebd1","text":"\"Required Drop Capabilities:s*\", \"Allowed Capabilities:s*\", \"Allowed Volume Types:s*\", \"Allowed Unsafe Sysctls:s*kernel.*,net.ipv4.ip_local_port_range\", \"Forbidden Sysctls:s*net.ipv4.ip_default_ttl\", \"Allow Host Network:s*false\", \"Allow Host Ports:s*\", \"Allow Host PID:s*false\","} {"_id":"q-en-kubernetes-f657a8cf5ec84653406e5b5341ac48a37aac2d5c9658a2d50139551f941e349f","text":"assert.Equal(t, test.expectStderr, stderrBuf.String()) } } func TestReadLogsLimitsWithTimestamps(t *testing.T) { logLineFmt := \"2022-10-29T16:10:22.592603036-05:00 stdout P %vn\" logLineNewLine := \"2022-10-29T16:10:22.592603036-05:00 stdout F n\" tmpfile, err := ioutil.TempFile(\"\", \"log.*.txt\") assert.NoError(t, err) count := 10000 for i := 0; i < count; i++ { tmpfile.WriteString(fmt.Sprintf(logLineFmt, i)) } tmpfile.WriteString(logLineNewLine) for i := 0; i < count; i++ { tmpfile.WriteString(fmt.Sprintf(logLineFmt, i)) } tmpfile.WriteString(logLineNewLine) // two lines are in the buffer defer os.Remove(tmpfile.Name()) // clean up assert.NoError(t, err) tmpfile.Close() var buf bytes.Buffer w := io.MultiWriter(&buf) err = ReadLogs(context.Background(), tmpfile.Name(), \"\", &LogOptions{tail: -1, bytes: -1, timestamp: true}, nil, w, w) assert.NoError(t, err) lineCount := 0 scanner := bufio.NewScanner(bytes.NewReader(buf.Bytes())) for scanner.Scan() { lineCount++ // Split the line ts, logline, _ := bytes.Cut(scanner.Bytes(), []byte(\" \")) // Verification // 1. The timestamp should exist // 2. The last item in the log should be 9999 _, err = time.Parse(time.RFC3339, string(ts)) assert.NoError(t, err, \"timestamp not found\") assert.Equal(t, true, bytes.HasSuffix(logline, []byte(\"9999\")), \"is the complete log found\") } assert.Equal(t, 2, lineCount, \"should have two lines\") } "} {"_id":"q-en-kubernetes-f6a5f086e16a35780fc69f27f64ffbcc5faa21cf4adbe1ed40ffe8d8859c614b","text":"cp \"${src_file}\" /etc/kubernetes/manifests } # Starts cluster autoscaler. function start-cluster-autoscaler { if [ \"${ENABLE_NODE_AUTOSCALER:-}\" = \"true\" ]; then touch /etc/kubernetes/start-cluster-autoscaler-enabled # Remove salt comments and replace variables with values src_file=\"${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/cluster-autoscaler.manifest\" remove-salt-config-comments \"${src_file}\" local params=`sed 's/^/\"/;s/ /\",\"/g;s/$/\",/' <<< \"${AUTOSCALER_MIG_CONFIG}\"` sed -i -e \"s@\"{{param}}\",@${params}@g\" \"${src_file}\" sed -i -e \"s@{%.*%}@@g\" \"${src_file}\" cp \"${src_file}\" /etc/kubernetes/manifests fi } # A helper function for copying addon manifests and set dir/files # permissions. #"} {"_id":"q-en-kubernetes-f6f7c6384c04bab0a1dd81fa2e794f07858a9d7b47b566b9cf486eeda7169e53","text":"if StatusStrategy.AllowCreateOnUpdate() { t.Errorf(\"Namespaces should not allow create on update\") } now := util.Now() oldNamespace := &api.Namespace{ ObjectMeta: api.ObjectMeta{Name: \"foo\", ResourceVersion: \"10\"}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{\"kubernetes\"}}, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ ObjectMeta: api.ObjectMeta{Name: \"foo\", ResourceVersion: \"9\"}, ObjectMeta: api.ObjectMeta{Name: \"foo\", ResourceVersion: \"9\", DeletionTimestamp: &now}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } StatusStrategy.PrepareForUpdate(namespace, oldNamespace)"} {"_id":"q-en-kubernetes-f6ffe2edad939090f6912ed2d681b52b1f1172ea3fd462600a61b2c39023fb2b","text":"nodeIP: netutils.ParseIPSloppy(\"::\"), nodeAddresses: []v1.NodeAddress{}, cloudProviderType: cloudProviderExternal, expectedAddresses: []v1.NodeAddress{}, shouldError: false, expectedAddresses: []v1.NodeAddress{ {Type: v1.NodeHostName, Address: testKubeletHostname}, }, shouldError: false, }, { name: \"cloud provider is external and no nodeIP\", nodeAddresses: []v1.NodeAddress{}, cloudProviderType: cloudProviderExternal, expectedAddresses: []v1.NodeAddress{}, shouldError: false, expectedAddresses: []v1.NodeAddress{ {Type: v1.NodeHostName, Address: testKubeletHostname}, }, shouldError: false, }, { name: \"cloud doesn't report hostname, no override, detected hostname mismatch\","} {"_id":"q-en-kubernetes-f731ab3816a92c1b6569a231fe6aebed16045fbb6eb7b386929bc865484b58eb","text":"} func (mounter *execMounter) IsNotMountPoint(dir string) (bool, error) { return IsNotMountPoint(mounter, dir) return isNotMountPoint(mounter, dir) } func (mounter *execMounter) IsLikelyNotMountPoint(file string) (bool, error) {"} {"_id":"q-en-kubernetes-f73ac31aad0d03fcbc40548d97e3710f76602dd53a791335b19ad6cd6a910673","text":" // Build it with: // $ dot -Tsvg releasing.dot >releasing.svg digraph tagged_release { size = \"5,5\" // Arrows go up. rankdir = BT subgraph left { // Group the left nodes together. ci012abc -> pr101 -> ci345cde -> pr102 style = invis } subgraph right { // Group the right nodes together. version_commit -> dev_commit style = invis } { // Align the version commit and the info about it. rank = same // Align them with pr101 pr101 version_commit // release_info shows the change in the commit. release_info } { // Align the dev commit and the info about it. rank = same // Align them with 345cde ci345cde dev_commit dev_info } // Join the nodes from subgraph left. pr99 -> ci012abc pr102 -> pr100 // Do the version node. pr99 -> version_commit dev_commit -> pr100 tag -> version_commit pr99 [ label = \"Merge PR #99\" shape = box fillcolor = \"#ccccff\" style = \"filled\" fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; ci012abc [ label = \"012abc\" shape = circle fillcolor = \"#ffffcc\" style = \"filled\" fontname = \"Consolas, Liberation Mono, Menlo, Courier, monospace\" ]; pr101 [ label = \"Merge PR #101\" shape = box fillcolor = \"#ccccff\" style = \"filled\" fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; ci345cde [ label = \"345cde\" shape = circle fillcolor = \"#ffffcc\" style = \"filled\" fontname = \"Consolas, Liberation Mono, Menlo, Courier, monospace\" ]; pr102 [ label = \"Merge PR #102\" shape = box fillcolor = \"#ccccff\" style = \"filled\" fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; version_commit [ label = \"678fed\" shape = circle fillcolor = \"#ccffcc\" style = \"filled\" fontname = \"Consolas, Liberation Mono, Menlo, Courier, monospace\" ]; dev_commit [ label = \"456dcb\" shape = circle fillcolor = \"#ffffcc\" style = \"filled\" fontname = \"Consolas, Liberation Mono, Menlo, Courier, monospace\" ]; pr100 [ label = \"Merge PR #100\" shape = box fillcolor = \"#ccccff\" style = \"filled\" fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; release_info [ label = \"pkg/version/base.go:ngitVersion = \"v0.5\";\" shape = none fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; dev_info [ label = \"pkg/version/base.go:ngitVersion = \"v0.5-dev\";\" shape = none fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; tag [ label = \"$ git tag -a v0.5\" fillcolor = \"#ffcccc\" style = \"filled\" fontname = \"Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif\" ]; } "} {"_id":"q-en-kubernetes-f73c008b8718ffbb658f43045944adee08e9a5a9c371df0f20354292eb3067a5","text":"loadBalancerName := cloudprovider.GetLoadBalancerName(apiService) serviceName := types.NamespacedName{Namespace: apiService.Namespace, Name: apiService.Name} securityGroupIDs, err := c.buildELBSecurityGroupList(serviceName, loadBalancerName, annotations[ServiceAnnotationLoadBalancerExtraSecurityGroups]) securityGroupIDs, err := c.buildELBSecurityGroupList(serviceName, loadBalancerName, annotations) if err != nil { return nil, err }"} {"_id":"q-en-kubernetes-f740146422fa9d92b4512091e13b031ffaa922c4132cc8fe40f7222b881d84d0","text":"kube::test::get_object_assert 'rc mock2' \"{{${labels_field}.status}}\" 'replaced' fi fi # Command: kubectl edit multiple resources temp_editor=\"${KUBE_TEMP}/tmp-editor.sh\" echo -e '#!/bin/bashnsed -i \"s/status: replaced/status: edited/g\" $@' > \"${temp_editor}\" chmod +x \"${temp_editor}\" EDITOR=\"${temp_editor}\" kubectl edit \"${kube_flags[@]}\" -f \"${file}\" # Post-condition: mock service (and mock2) and mock rc (and mock2) are edited if [ \"$has_svc\" = true ]; then kube::test::get_object_assert 'services mock' \"{{${labels_field}.status}}\" 'edited' if [ \"$two_svcs\" = true ]; then kube::test::get_object_assert 'services mock2' \"{{${labels_field}.status}}\" 'edited' fi fi if [ \"$has_rc\" = true ]; then kube::test::get_object_assert 'rc mock' \"{{${labels_field}.status}}\" 'edited' if [ \"$two_rcs\" = true ]; then kube::test::get_object_assert 'rc mock2' \"{{${labels_field}.status}}\" 'edited' fi fi # cleaning rm \"${temp_editor}\" # Command # We need to set --overwrite, because otherwise, if the first attempt to run \"kubectl label\" # fails on some, but not all, of the resources, retries will fail because it tries to modify"} {"_id":"q-en-kubernetes-f753848d008009a168ddea7e54613ff956313bb3557540a5d16ecd085fff672c","text":"// Returns true if and only if changes were made // The security group must already exist func (c *Cloud) addSecurityGroupIngress(securityGroupID string, addPermissions []*ec2.IpPermission) (bool, error) { // We do not want to make changes to the Global defined SG if securityGroupID == c.cfg.Global.ElbSecurityGroup { return false, nil } group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warningf(\"Error retrieving security group: %q\", err)"} {"_id":"q-en-kubernetes-f75bc6f5ba449199a1a2a5da407a278944bf4906792a5f2400ed5b69e3ce26be","text":"// canConnect returns true if a network connection is possible to the SSHPort. func canConnect(host string) bool { if _, ok := os.LookupEnv(sshBastionEnvKey); ok { return true } hostPort := net.JoinHostPort(host, SSHPort) conn, err := net.DialTimeout(\"tcp\", hostPort, 3*time.Second) if err != nil { e2elog.Logf(\"cannot dial %s: %v\", hostPort, err) return false } conn.Close()"} {"_id":"q-en-kubernetes-f76ff24bccf498c6a4594c8faff83b00ada38f698111905c32b479ca1e1ad08e","text":"\"//pkg/scheduler/algorithm:go_default_library\", \"//pkg/scheduler/algorithm/predicates:go_default_library\", \"//pkg/scheduler/cache:go_default_library\", \"//pkg/scheduler/metrics:go_default_library\", \"//pkg/util/hash:go_default_library\", \"//staging/src/k8s.io/api/core/v1:go_default_library\", \"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library\","} {"_id":"q-en-kubernetes-f7777a468576d8a545d38f9d5508f015e7b3136d23cecc3575aadd9afb3528ae","text":"hard[v1.ResourceQuotas] = resource.MustParse(\"1\") hard[v1.ResourceCPU] = resource.MustParse(\"1\") hard[v1.ResourceMemory] = resource.MustParse(\"500Mi\") hard[v1.ResourceConfigMaps] = resource.MustParse(\"2\") hard[v1.ResourceConfigMaps] = resource.MustParse(\"10\") hard[v1.ResourceSecrets] = resource.MustParse(\"10\") hard[v1.ResourcePersistentVolumeClaims] = resource.MustParse(\"10\") hard[v1.ResourceRequestsStorage] = resource.MustParse(\"10Gi\")"} {"_id":"q-en-kubernetes-f78047637f4dcf9e8ca1f0afbb35ef45c2a421785b9a45e2d3178bb83bd626a0","text":"- base - debian-auto-upgrades - salt-helpers {% if grains.get('cloud') == 'aws' %} - ntp {% endif %} 'roles:kubernetes-pool': - match: grain"} {"_id":"q-en-kubernetes-f78551fdd9a516f286253b61bc6635bab2691d8df7070e2079c175b1dd4307b4","text":" /* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This file was autogenerated by go-to-protobuf. Do not edit it manually! syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.apps.v1alpha1; import \"k8s.io/kubernetes/pkg/api/resource/generated.proto\"; import \"k8s.io/kubernetes/pkg/api/unversioned/generated.proto\"; import \"k8s.io/kubernetes/pkg/api/v1/generated.proto\"; import \"k8s.io/kubernetes/pkg/util/intstr/generated.proto\"; // Package-wide variables from generator \"generated\". option go_package = \"v1alpha1\"; // PetSet represents a set of pods with consistent identities. // Identities are defined as: // - Network: A single stable DNS and hostname. // - Storage: As many VolumeClaims as requested. // The PetSet guarantees that a given network identity will always // map to the same storage identity. PetSet is currently in alpha // and subject to change without notice. message PetSet { optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; // Spec defines the desired identities of pets in this set. optional PetSetSpec spec = 2; // Status is the current status of Pets in this PetSet. This data // may be out of date by some window of time. optional PetSetStatus status = 3; } // PetSetList is a collection of PetSets. message PetSetList { optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; repeated PetSet items = 2; } // A PetSetSpec is the specification of a PetSet. message PetSetSpec { // Replicas is the desired number of replicas of the given Template. // These are replicas in the sense that they are instantiations of the // same Template, but individual replicas also have a consistent identity. // If unspecified, defaults to 1. // TODO: Consider a rename of this field. optional int32 replicas = 1; // Selector is a label query over pods that should match the replica count. // If empty, defaulted to labels on the pod template. // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2; // Template is the object that describes the pod that will be created if // insufficient replicas are detected. Each pod stamped out by the PetSet // will fulfill this Template, but have a unique identity from the rest // of the PetSet. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; // VolumeClaimTemplates is a list of claims that pets are allowed to reference. // The PetSet controller is responsible for mapping network identities to // claims in a way that maintains the identity of a pet. Every claim in // this list must have at least one matching (by name) volumeMount in one // container in the template. A claim in this list takes precedence over // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // ServiceName is the name of the service that governs this PetSet. // This service must exist before the PetSet, and is responsible for // the network identity of the set. Pets get DNS/hostnames that follow the // pattern: pet-specific-string.serviceName.default.svc.cluster.local // where \"pet-specific-string\" is managed by the PetSet controller. optional string serviceName = 5; } // PetSetStatus represents the current state of a PetSet. message PetSetStatus { // most recent generation observed by this autoscaler. optional int64 observedGeneration = 1; // Replicas is the number of actual replicas. optional int32 replicas = 2; } "} {"_id":"q-en-kubernetes-f7ce21d49c9cc28eb20a11850a34026bfa251c080f39dedac8a4904e2c2ff4cd","text":"var errBadJSONDoc = fmt.Errorf(\"Invalid JSON Document\") var errBadJSONPatch = fmt.Errorf(\"Invalid JSON Patch\") var errBadMergeTypes = fmt.Errorf(\"Mismatched JSON Documents\") // MergeMergePatches merges two merge patches together, such that // applying this resulting merged merge patch to a document yields the same"} {"_id":"q-en-kubernetes-f7ff62d616972738022bbb109de62d090adbb925e77279916310f81d743b548d","text":"} func getMemoryStat(f *framework.Framework, host string) (rss, workingSet float64) { memCmd := \"cat /sys/fs/cgroup/memory/system.slice/node-problem-detector.service/memory.usage_in_bytes && cat /sys/fs/cgroup/memory/system.slice/node-problem-detector.service/memory.stat\" var memCmd string isCgroupV2 := isHostRunningCgroupV2(f, host) if isCgroupV2 { memCmd = \"cat /sys/fs/cgroup/system.slice/node-problem-detector.service/memory.current && cat /sys/fs/cgroup/system.slice/node-problem-detector.service/memory.stat\" } else { memCmd = \"cat /sys/fs/cgroup/memory/system.slice/node-problem-detector.service/memory.usage_in_bytes && cat /sys/fs/cgroup/memory/system.slice/node-problem-detector.service/memory.stat\" } result, err := e2essh.SSH(memCmd, host, framework.TestContext.Provider) framework.ExpectNoError(err) framework.ExpectEqual(result.Code, 0)"} {"_id":"q-en-kubernetes-f833c7e5ae75777383ee75161fd366da4959cd37f4f3d83a0648d20922988aaf","text":") const ( diskPartitionSuffix = \"\" checkSleepDuration = time.Second diskPartitionSuffix = \"\" nvmeDiskPartitionSuffix = \"p\" checkSleepDuration = time.Second ) // AWSDiskUtil provides operations for EBS volume."} {"_id":"q-en-kubernetes-f84ec6d37ca6f6e505d05bdddcd62aeb35a12044aca2d4da45d178d45d5dd393","text":"<-stoppedChan // Simulate what DSOWP does pv.Spec.Capacity[v1.ResourceStorage] = tc.newPVSize volumeSpec = &volume.Spec{PersistentVolume: pv} pvWithSize.Spec.Capacity[v1.ResourceStorage] = tc.newPVSize volumeSpec = &volume.Spec{PersistentVolume: pvWithSize} dsw.AddPodToVolume(podName, pod, volumeSpec, volumeSpec.Name(), \"\" /* volumeGidValue */) // mark volume as resize required asw.MarkFSResizeRequired(volumeName, podName)"} {"_id":"q-en-kubernetes-f850ccaa6a71334670066bd500c025d804261cec3aac7fa37f7c765b5e877ccc","text":"@JsonIgnoreProperties(ignoreUnknown = true) static class Address { public String IP; public String ip; } @JsonIgnoreProperties(ignoreUnknown = true)"} {"_id":"q-en-kubernetes-f8605dd6db376a30731e3663f2e483081aba64b5673b1cdf1b86c450f18f7654","text":" apiVersion: v1beta3 kind: ReplicationController apiVersion: v1beta1 id: kube-dns namespace: default labels: k8s-app: kube-dns kubernetes.io/cluster-service: \"true\" desiredState: metadata: labels: k8s-app: kube-dns kubernetes.io/cluster-service: \"true\" name: kube-dns namespace: default spec: replicas: {{ pillar['dns_replicas'] }} replicaSelector: selector: k8s-app: kube-dns podTemplate: labels: name: kube-dns k8s-app: kube-dns kubernetes.io/cluster-service: \"true\" desiredState: manifest: version: v1beta2 id: kube-dns dnsPolicy: \"Default\" # Don't use cluster DNS. containers: - name: etcd image: gcr.io/google_containers/etcd:2.0.9 command: [ \"/usr/local/bin/etcd\", \"--addr\", \"127.0.0.1:4001\", \"--bind-addr\", \"127.0.0.1:4001\", \"-initial-cluster-token=skydns-etcd\", ] - name: kube2sky image: gcr.io/google_containers/kube2sky:1.4 volumeMounts: - name: dns-token mountPath: /etc/dns_token readOnly: true command: [ # entrypoint = \"/kube2sky\", \"-domain={{ pillar['dns_domain'] }}\", \"-kubecfg_file=/etc/dns_token/kubeconfig\", ] - name: skydns image: gcr.io/google_containers/skydns:2015-03-11-001 command: [ # entrypoint = \"/skydns\", \"-machines=http://localhost:4001\", \"-addr=0.0.0.0:53\", \"-domain={{ pillar['dns_domain'] }}.\", ] ports: - name: dns containerPort: 53 protocol: UDP volumes: - name: dns-token source: secret: target: kind: Secret namespace: default name: token-system-dns template: metadata: labels: k8s-app: kube-dns kubernetes.io/cluster-service: \"true\" name: kube-dns spec: containers: - name: etcd image: gcr.io/google_containers/etcd:2.0.9 command: - /usr/local/bin/etcd - --addr - 127.0.0.1:4001 - --bind-addr - 127.0.0.1:4001 - -initial-cluster-token=skydns-etcd - name: kube2sky image: gcr.io/google_containers/kube2sky:1.4 args: # entrypoint = \"/kube2sky\" - -domain={{ pillar['dns_domain'] }} - -kubecfg_file=/etc/dns_token/kubeconfig volumeMounts: - mountPath: /etc/dns_token name: dns-token readOnly: true - name: skydns image: gcr.io/google_containers/skydns:2015-03-11-001 args: # entrypoint = \"/skydns\" - -machines=http://localhost:4001 - -addr=0.0.0.0:53 - -domain={{ pillar['dns_domain'] }}. ports: - containerPort: 53 name: dns protocol: UDP livenessProbe: exec: command: - \"/bin/sh\" - \"-c\" # The health check succeeds by virtue of not hanging. It'd be nice # to also check local services are known, but if that's broken then # etcd or kube2sky has to be restarted, not skydns. - \"nslookup foobar 127.0.0.1 &> /dev/null; echo ok\" initialDelaySeconds: 30 timeoutSeconds: 5 dnsPolicy: Default # Don't use cluster DNS. volumes: - name: dns-token secret: secretName: token-system-dns "} {"_id":"q-en-kubernetes-f8732e6e3988eef5b5467e97817b0a0f377b90d2958309d22f8c4019b94f3b3a","text":"## Prerequisites This example requires a running Kubernetes cluster and kubectl in the version at least 1.1. [Heapster](https://github.com/kubernetes/heapster) monitoring needs to be deployed in the cluster as horizontal pod autoscaler uses it to collect metrics (if you followed [getting started on GCE guide](../../../docs/getting-started-guides/gce.md), heapster monitoring will be turned-on by default). ## Step One: Run & expose php-apache server"} {"_id":"q-en-kubernetes-f874189ec9cfac3c2e7c3767ea2bc90359ac87506d526b0a1352251035258f88","text":"env.ServiceManagementEndpoint) } return nil, fmt.Errorf(\"No credentials provided for AAD application %s\", config.AADClientID) return nil, ErrorNoAuth } // ParseAzureEnvironment returns azure environment by name"} {"_id":"q-en-kubernetes-f87b99a25f9a793b04ba641e269dd3ec09c3fa3c220fe546de2b7de449e562b4","text":"return -1, danglingErr } if disk.DiskProperties != nil && disk.DiskProperties.Encryption != nil && disk.DiskProperties.Encryption.DiskEncryptionSetID != nil { diskEncryptionSetID = *disk.DiskProperties.Encryption.DiskEncryptionSetID if disk.DiskProperties != nil { if disk.DiskProperties.DiskSizeGB != nil && *disk.DiskProperties.DiskSizeGB >= diskCachingLimit && cachingMode != compute.CachingTypesNone { // Disk Caching is not supported for disks 4 TiB and larger // https://docs.microsoft.com/en-us/azure/virtual-machines/premium-storage-performance#disk-caching cachingMode = compute.CachingTypesNone klog.Warningf(\"size of disk(%s) is %dGB which is bigger than limit(%dGB), set cacheMode as None\", diskURI, *disk.DiskProperties.DiskSizeGB, diskCachingLimit) } if disk.DiskProperties.Encryption != nil && disk.DiskProperties.Encryption.DiskEncryptionSetID != nil { diskEncryptionSetID = *disk.DiskProperties.Encryption.DiskEncryptionSetID } } if v, ok := disk.Tags[WriteAcceleratorEnabled]; ok { if v != nil && strings.EqualFold(*v, \"true\") { writeAcceleratorEnabled = true"} {"_id":"q-en-kubernetes-f8a0255790bc3c5700ba6c6090be5d9a19f08ee0066cc445e0d4568df594f868","text":"return nil, err } leaderElectionClient := clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, \"leader-election\")) // shallow copy, do not modify the kubeconfig.Timeout. config := *kubeconfig config.Timeout = s.GenericComponent.LeaderElection.RenewDeadline.Duration leaderElectionClient := clientset.NewForConfigOrDie(restclient.AddUserAgent(&config, \"leader-election\")) eventRecorder := createRecorder(client, KubeControllerManagerUserAgent)"} {"_id":"q-en-kubernetes-f8a6e0531ecdb6da2735962cfb98eb0c57cec7b361bde59f22317f92bc86ec5a","text":"assert.Exactly(t, []*PodLifecycleEvent{event}, actualEvents) } } func TestRunningPodAndContainerCount(t *testing.T) { fakeRuntime := &containertest.FakeRuntime{} runtimeCache, _ := kubecontainer.NewRuntimeCache(fakeRuntime) metrics.Register(runtimeCache) testPleg := newTestGenericPLEG() pleg, runtime := testPleg.pleg, testPleg.runtime runtime.AllPodList = []*containertest.FakePod{ {Pod: &kubecontainer.Pod{ ID: \"1234\", Containers: []*kubecontainer.Container{ createTestContainer(\"c1\", kubecontainer.ContainerStateRunning), createTestContainer(\"c2\", kubecontainer.ContainerStateUnknown), createTestContainer(\"c3\", kubecontainer.ContainerStateUnknown), }, }}, {Pod: &kubecontainer.Pod{ ID: \"4567\", Containers: []*kubecontainer.Container{ createTestContainer(\"c1\", kubecontainer.ContainerStateExited), }, }}, } pleg.relist() // assert for container count with label \"running\" actualMetricRunningContainerCount := &dto.Metric{} expectedMetricRunningContainerCount := float64(1) metrics.RunningContainerCount.WithLabelValues(string(kubecontainer.ContainerStateRunning)).Write(actualMetricRunningContainerCount) assert.Equal(t, expectedMetricRunningContainerCount, actualMetricRunningContainerCount.GetGauge().GetValue()) // assert for container count with label \"unknown\" actualMetricUnknownContainerCount := &dto.Metric{} expectedMetricUnknownContainerCount := float64(2) metrics.RunningContainerCount.WithLabelValues(string(kubecontainer.ContainerStateUnknown)).Write(actualMetricUnknownContainerCount) assert.Equal(t, expectedMetricUnknownContainerCount, actualMetricUnknownContainerCount.GetGauge().GetValue()) // assert for running pod count actualMetricRunningPodCount := &dto.Metric{} metrics.RunningPodCount.Write(actualMetricRunningPodCount) expectedMetricRunningPodCount := float64(2) assert.Equal(t, expectedMetricRunningPodCount, actualMetricRunningPodCount.GetGauge().GetValue()) } "} {"_id":"q-en-kubernetes-f8a8e302e4a026e47c36fdce91d3ad335d8e6dc9a8eb510585ee0081875bf364","text":"ginkgo.By(\"Wait for the node to be ready\") waitForNodeReady() for _, customClass := range []*schedulingv1.PriorityClass{customClassA, customClassB, customClassC} { customClasses := []*schedulingv1.PriorityClass{customClassA, customClassB, customClassC} for _, customClass := range customClasses { _, err := f.ClientSet.SchedulingV1().PriorityClasses().Create(context.Background(), customClass, metav1.CreateOptions{}) framework.ExpectNoError(err) if err != nil && !apierrors.IsAlreadyExists(err) { framework.ExpectNoError(err) } } gomega.Eventually(func() error { for _, customClass := range customClasses { _, err := f.ClientSet.SchedulingV1().PriorityClasses().Get(context.Background(), customClass.Name, metav1.GetOptions{}) if err != nil { return err } } return nil }, priorityClassesCreateTimeout, pollInterval).Should(gomega.BeNil()) }) ginkgo.AfterEach(func() {"} {"_id":"q-en-kubernetes-f8b438deb7fa7722c017632bbde01b3ba0d04ea323fc2e4af096a81de288565b","text":"n.mu.RLock() defer n.mu.RUnlock() value, ok = n.cache[predicateKey][equivalenceHash] if ok { metrics.EquivalenceCacheHits.Inc() } else { metrics.EquivalenceCacheMisses.Inc() } return value, ok }"} {"_id":"q-en-kubernetes-f8bad76e6eb67ed972dc87604f81ab99a4bcebe934e7e5bad9316d817dfbec77","text":"import ( \"context\" \"strings\" metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\" utilversion \"k8s.io/apimachinery/pkg/util/version\" \"k8s.io/apiserver/pkg/endpoints/discovery\""} {"_id":"q-en-kubernetes-f8d1da8080510cd2186469dff04103556f34aed75d956740330d88ac439e57f5","text":"mockCadvisor.On(\"VersionInfo\").Return(versionInfo, nil) expectedNode := &api.Node{ ObjectMeta: api.ObjectMeta{Name: \"127.0.0.1\"}, ObjectMeta: api.ObjectMeta{Name: testKubeletHostname}, Spec: api.NodeSpec{}, Status: api.NodeStatus{ Conditions: []api.NodeCondition{"} {"_id":"q-en-kubernetes-f8f2cd9db5113e76efd6fbbc0b5f47b04c8a6a37531996c6417011bfdb2322c8","text":"func TestVersion(t *testing.T) { fakeRuntime, endpoint := createAndStartFakeRemoteRuntime(t) defer fakeRuntime.Stop() defer func() { fakeRuntime.Stop() // clear endpoint file if addr, _, err := util.GetAddressAndDialer(endpoint); err == nil { if _, err := os.Stat(addr); err == nil { os.Remove(addr) } } }() r := createRemoteRuntimeService(endpoint, t) version, err := r.Version(apitest.FakeVersion)"} {"_id":"q-en-kubernetes-f9092873f54c1ef07c56a1364024bc84dfd5c8f62ea70ed79349cf7eba056d37","text":"\"testing\" \"time\" dto \"github.com/prometheus/client_model/go\" \"github.com/stretchr/testify/assert\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/apimachinery/pkg/util/clock\" \"k8s.io/apimachinery/pkg/util/diff\" kubecontainer \"k8s.io/kubernetes/pkg/kubelet/container\" containertest \"k8s.io/kubernetes/pkg/kubelet/container/testing\" \"k8s.io/kubernetes/pkg/kubelet/metrics\" ) const ("} {"_id":"q-en-kubernetes-f9167060562ca9418529f280bee20408d287e8a054460e56b0416620ec384bc9","text":"if config.EnableContentionProfiling { goruntime.SetBlockProfileRate(1) } routes.DebugFlags{}.Install(pathRecorderMux, \"v\", routes.StringFlagPutHandler(logs.GlogSetter)) } return pathRecorderMux }"} {"_id":"q-en-kubernetes-f9316cbf3446c7bc3d1fdcf8342fb3f479b00049c0d1c6f0eae0e1a94933dd15","text":"\"k8s.io/client-go/restmapper\" \"k8s.io/component-base/featuregate\" featuregatetesting \"k8s.io/component-base/featuregate/testing\" \"k8s.io/component-base/metrics/legacyregistry\" \"k8s.io/klog/v2\" \"k8s.io/kubernetes/test/integration/framework\" testutils \"k8s.io/kubernetes/test/utils\""} {"_id":"q-en-kubernetes-f9b58627dfa0a3ab8c41f1728ed5adccb967351e35c9a897e7eab0ff5c0f0dce","text":"allErrs = append(allErrs, field.Invalid(fldPath.Child(\"type\"), s.Type, \"must be object at the root\")) } // restrict metadata schemas to name and generateName only if metadata, found := s.Properties[\"metadata\"]; found && lvl == rootLevel { // metadata is a shallow copy. We can mutate it. _, foundName := metadata.Properties[\"name\"] _, foundGenerateName := metadata.Properties[\"generateName\"] if foundName && foundGenerateName && len(metadata.Properties) == 2 { metadata.Properties = nil } else if (foundName || foundGenerateName) && len(metadata.Properties) == 1 { metadata.Properties = nil } metadata.Type = \"\" if metadata.ValueValidation == nil { metadata.ValueValidation = &ValueValidation{} } if !reflect.DeepEqual(metadata, Structural{ValueValidation: &ValueValidation{}}) { // TODO: this is actually a field.Invalid error, but we cannot do JSON serialization of metadata here to get a proper message allErrs = append(allErrs, field.Forbidden(fldPath.Child(\"properties\").Key(\"metadata\"), \"must not specify anything other than name and generateName, but metadata is implicitly specified\")) } } if s.XEmbeddedResource && !s.XPreserveUnknownFields && s.Properties == nil { allErrs = append(allErrs, field.Required(fldPath.Child(\"properties\"), \"must not be empty if x-kubernetes-embedded-resource is true without x-kubernetes-preserve-unknown-fields\")) }"} {"_id":"q-en-kubernetes-f9b69c967ae0669bdad7480ada8ba77cbc709f187f424322518bf320f8c9a115","text":"// cleanupPodsInNamespace deletes the pods in the given namespace and waits for them to // be actually deleted. func cleanupPodsInNamespace(cs clientset.Interface, t *testing.T, ns string) { if err := cs.CoreV1().Pods(ns).DeleteCollection(context.TODO(), *metav1.NewDeleteOptions(0), metav1.ListOptions{}); err != nil { if err := cs.CoreV1().Pods(ns).DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{}); err != nil { t.Errorf(\"error while listing pod in namespace %v: %v\", ns, err) return }"} {"_id":"q-en-kubernetes-f9cbc29abc0eac857048d407a3e88b27c1b988cf440d601d7c88f1245cef7c9f","text":"} // Walks through the plugin directory discover any existing plugin sockets. // Goroutines started here will be waited for in Stop() before cleaning up. // Ignore all errors except root dir not being walkable func (w *Watcher) traversePluginDir(dir string) error { return w.fs.Walk(dir, func(path string, info os.FileInfo, err error) error { if err != nil { return fmt.Errorf(\"error accessing path: %s error: %v\", path, err) if path == dir { return fmt.Errorf(\"error accessing path: %s error: %v\", path, err) } glog.Errorf(\"error accessing path: %s error: %v\", path, err) return nil } switch mode := info.Mode(); {"} {"_id":"q-en-kubernetes-f9d415b1c25fa210512361ca3c7472740259055a5750ebed78f838d7a742b003","text":"} return nil }, // MinionList.Items had a wrong name in v1beta1 func(in *MinionList, out *v1beta1.MinionList) error { Convert(&in.JSONBase, &out.JSONBase) Convert(&in.Items, &out.Items) out.Minions = out.Items return nil }, func(in *v1beta1.MinionList, out *MinionList) error { Convert(&in.JSONBase, &out.JSONBase) if len(in.Items) == 0 { Convert(&in.Minions, &out.Items) } else { Convert(&in.Items, &out.Items) } return nil }, ) }"} {"_id":"q-en-kubernetes-fa09ab41b5e12bb6bc8ee74665b9e578edcbfc2894e7a160da324531e4b96bc7","text":"\"k8s.io/kubernetes/pkg/kubelet/network\" proberesults \"k8s.io/kubernetes/pkg/kubelet/prober/results\" kubetypes \"k8s.io/kubernetes/pkg/kubelet/types\" \"k8s.io/kubernetes/pkg/kubelet/util/cache\" \"k8s.io/kubernetes/pkg/types\" \"k8s.io/kubernetes/pkg/util/flowcontrol\" \"k8s.io/kubernetes/pkg/util/oom\""} {"_id":"q-en-kubernetes-fa4c420c42221a713697c9022bbe57fca63d1ed29681f6d16276bee34b127686","text":" ##### Deprecation Notice: This directory has entered maintenance mode and will not be accepting new providers. Cloud Providers in this directory will continue to be actively developed or maintained and supported at their current level of support as a longer-term solution evolves. ## Overview: ##### Deprecation Notice: cloud providers in this directory are deprecated and will be removed in favor of external (a.k.a out-of-tree) providers. Existing providers in this directory (a.k.a in-tree providers) should only make small incremental changes as needed and avoid large refactors or new features. New providers seeking to support Kubernetes should follow the out-of-tree model as specified in the [Running Kubernetes Cloud Controller Manager docs](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/). For more information on the future of Kubernetes cloud providers see [KEP-0002](https://github.com/kubernetes/community/blob/master/keps/sig-cloud-provider/0002-cloud-controller-manager.md) and [KEP-0013](https://github.com/kubernetes/community/blob/master/keps/sig-cloud-provider/0013-build-deploy-ccm.md). Cloud Providers in this directory will continue to be actively developed or maintained and supported at their current level of support as a longer-term solution evolves. ## Overview: The mechanism for supporting cloud providers is currently in transition: the original method of implementing cloud provider-specific functionality within the main kubernetes tree (here) is no longer advised; however, the proposed solution is still in development. #### Guidance for potential cloud providers: * Support for cloud providers is currently in a state of flux. Background information on motivation and the proposal for improving is in the github [proposal](https://git.k8s.io/community/contributors/design-proposals/cloud-provider/cloud-provider-refactoring.md). * In support of this plan, a new cloud-controller-manager binary was added in 1.6. This was the first of several steps (see the proposal for more information). * Attempts to contribute new cloud providers or (to a lesser extent) persistent volumes to the core repo will likely meet with some pushback from reviewers/approvers. * It is understood that this is an unfortunate situation in which 'the old way is no longer supported but the new way is not ready yet', but the initial path is unsustainable, and contributors are encouraged to participate in the implementation of the proposed long-term solution, as there is risk that PRs for new cloud providers here will not be approved. * Though the fully productized support envisioned in the proposal is still 2 - 3 releases out, the foundational work is underway, and a motivated cloud provider could accomplish the work in a forward-looking way. Contributors are encouraged to assist with the implementation of the design outlined in the proposal. #### Some additional context on status / direction: #### Guidance for potential cloud providers: * Support for cloud providers is currently in a state of flux. Background information on motivation and the proposal for improving is in the github [proposal](https://git.k8s.io/community/contributors/design-proposals/cloud-provider/cloud-provider-refactoring.md). * In support of this plan, a new cloud-controller-manager binary was added in 1.6. This was the first of several steps (see the proposal for more information). * Attempts to contribute new cloud providers or (to a lesser extent) persistent volumes to the core repo will likely meet with some pushback from reviewers/approvers. * It is understood that this is an unfortunate situation in which 'the old way is no longer supported but the new way is not ready yet', but the initial path is unsustainable, and contributors are encouraged to participate in the implementation of the proposed long-term solution, as there is risk that PRs for new cloud providers here will not be approved. * Though the fully productized support envisioned in the proposal is still 2 - 3 releases out, the foundational work is underway, and a motivated cloud provider could accomplish the work in a forward-looking way. Contributors are encouraged to assist with the implementation of the design outlined in the proposal. #### Some additional context on status / direction: * 1.6 added a new cloud-controller-manager binary that may be used for testing the new out-of-core cloudprovider flow. * Setting cloud-provider=external allows for creation of a separate controller-manager binary * 1.7 adds [extensible admission control](https://git.k8s.io/community/contributors/design-proposals/api-machinery/admission_control_extension.md), further enabling topology customization. * 1.7 adds [extensible admission control](https://git.k8s.io/community/contributors/design-proposals/api-machinery/admission_control_extension.md), further enabling topology customization. "} {"_id":"q-en-kubernetes-fa50d510924add1ed53eff584fc3722e8a4b3052b0e2c25e42d658fb17fd6d1d","text":"// Sleep 1s to verify no detach are triggered after second pod is added in the future. time.Sleep(1000 * time.Millisecond) verifyVolumeAttachedToNode(t, generatedVolumeName, nodeName1, cache.AttachStateAttached, asw) verifyVolumeNoStatusUpdateNeeded(t, logger, generatedVolumeName, nodeName1, asw) // verifyVolumeNoStatusUpdateNeeded(t, logger, generatedVolumeName, nodeName1, asw) // Add a third pod which tries to attach the volume to a different node. // At this point, volume is still attached to first node. There are no status update for both nodes."} {"_id":"q-en-kubernetes-fa6c3b2574294352298d01d63385cc37ed2abba4723d80cefd0769a4f955f99f","text":"How To Run ------ ``` cd kubernetes/test/integration/scheduler_perf ```shell # In Kubernetes root path make generated_files cd test/integration/scheduler_perf ./test-performance.sh ```"} {"_id":"q-en-kubernetes-fa8124a3bea0a8a72cbbd9c1a7ea2aec1fbb0cb525fa94b09bba67813b09cb22","text":"cniArch = \"amd64\" cniDirectory = \"cni/bin\" // The CNI tarball places binaries under directory under \"cni/bin\". cniConfDirectory = \"cni/net.d\" cniURL = \"https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-\" + cniArch + \"-\" + cniVersion + \".tgz\" cniURL = \"https://dl.k8s.io/network-plugins/cni-plugins-\" + cniArch + \"-\" + cniVersion + \".tgz\" ) const cniConfig = `{"} {"_id":"q-en-kubernetes-fa8ef9f34c29137e79fd04fbbda414424bbc054b4d1e77b0b32589f4ef5a8da1","text":"func TestSyncReplicationControllerCreates(t *testing.T) { c := clientset.NewForConfigOrDie(&restclient.Config{Host: \"\", ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) manager, _, rcInformer := newReplicationManagerFromClient(c, BurstReplicas) manager, podInformer, rcInformer := newReplicationManagerFromClient(c, BurstReplicas) // A controller with 2 replicas and no pods in the store, 2 creates expected // A controller with 2 replicas and no active pods in the store. // Inactive pods should be ignored. 2 creates expected. rc := newReplicationController(2) rcInformer.Informer().GetIndexer().Add(rc) failedPod := newPod(\"failed-pod\", rc, v1.PodFailed, nil, true) deletedPod := newPod(\"deleted-pod\", rc, v1.PodRunning, nil, true) deletedPod.DeletionTimestamp = &metav1.Time{Time: time.Now()} podInformer.Informer().GetIndexer().Add(failedPod) podInformer.Informer().GetIndexer().Add(deletedPod) fakePodControl := controller.FakePodControl{} manager.podControl = &fakePodControl"} {"_id":"q-en-kubernetes-fa91c274be48353536b59a6844c80620f2da4bdf37336c477935f11b860bb98a","text":"} // TODO: switch this to full namespacers type rsListFunc func(string, metav1.ListOptions) ([]*extensions.ReplicaSet, error) type RsListFunc func(string, metav1.ListOptions) ([]*extensions.ReplicaSet, error) type podListFunc func(string, metav1.ListOptions) (*v1.PodList, error) // ListReplicaSets returns a slice of RSes the given deployment targets. // Note that this does NOT attempt to reconcile ControllerRef (adopt/orphan), // because only the controller itself should do that. // However, it does filter out anything whose ControllerRef doesn't match. func ListReplicaSets(deployment *extensions.Deployment, getRSList rsListFunc) ([]*extensions.ReplicaSet, error) { func ListReplicaSets(deployment *extensions.Deployment, getRSList RsListFunc) ([]*extensions.ReplicaSet, error) { // TODO: Right now we list replica sets by their labels. We should list them by selector, i.e. the replica set's selector // should be a superset of the deployment's selector, see https://github.com/kubernetes/kubernetes/issues/19830. namespace := deployment.Namespace"} {"_id":"q-en-kubernetes-fadce43c7652280d7667d6a50cfcb93490b456a80343ccd6b9046c6167a33c4a","text":"defer logs.FlushLogs() if err := command.Execute(); err != nil { fmt.Fprintf(os.Stderr, \"%vn\", err) os.Exit(1) } }"} {"_id":"q-en-kubernetes-fafdcd171430fd022edd55d11537c413d9ce30549fd40fb8d801e560fbd5a557","text":"} } // BindOverrideFlags is a convenience method to bind the specified flags to their associated variables func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, flagNames ConfigOverrideFlags) { BindAuthInfoFlags(&overrides.AuthInfo, flags, flagNames.AuthOverrideFlags) BindClusterFlags(&overrides.ClusterInfo, flags, flagNames.ClusterOverrideFlags) BindContextFlags(&overrides.Context, flags, flagNames.ContextOverrideFlags) flagNames.CurrentContext.BindStringFlag(flags, &overrides.CurrentContext) flagNames.Timeout.BindStringFlag(flags, &overrides.Timeout) } // BindAuthInfoFlags is a convenience method to bind the specified flags to their associated variables func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, flagNames AuthOverrideFlags) { flagNames.ClientCertificate.BindStringFlag(flags, &authInfo.ClientCertificate)"} {"_id":"q-en-kubernetes-fb41bc2f57f290ad2e0fcee010aeabb7819939dbeda9a9f1ec505d188835f1c1","text":" apiVersion: v1beta3 kind: ResourceQuota metadata: name: quota spec: hard: cpu: \"20\" memory: 1Gi persistentvolumeclaims: \"10\" pods: \"10\" replicationcontrollers: \"20\" resourcequotas: \"1\" secrets: \"10\" services: \"5\" "} {"_id":"q-en-kubernetes-fb7a96b013da8d318f8877e2ad0a4fd18ec20103169e0f0bd582d570b4042534","text":"\"github.com/golang/glog\" \"k8s.io/apimachinery/pkg/types\" \"k8s.io/kubernetes/pkg/cloudprovider\" ) // AttachDisk attaches a vhd to vm"} {"_id":"q-en-kubernetes-fb876af0ba403181d60a8eccd4e95c068bf882669c4635b1509668fdee6232c0","text":"[[projects]] name = \"github.com/json-iterator/go\" packages = [\".\"] revision = \"ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4\" version = \"1.1.3\" [[projects]] name = \"github.com/modern-go/concurrent\" packages = [\".\"] revision = \"e0a39a4cb4216ea8db28e22a69f4ec25610d513a\""} {"_id":"q-en-kubernetes-fb991e5df075657c1eb93149eabee869d0215cb54fd817b1588e553fd834eaa6","text":"# TODO: This timeout should really be lower, this is a *long* time to test one # package, however pkg/api/testing in particular will fail with a lower timeout # currently. We should attempt to lower this over time. KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout=170s} KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout=180s} KUBE_COVER=${KUBE_COVER:-n} # set to 'y' to enable coverage collection KUBE_COVERMODE=${KUBE_COVERMODE:-atomic} # The directory to save test coverage reports to, if generating them. If unset,"} {"_id":"q-en-kubernetes-fbab38252b6d037ea3d2d4764f6d72c06b42eef4e971fdb7d2428615d6db6a08","text":"case \"$tree\" in w/-text) # Only binary files have a size limit. size=\"$(stat --printf=%s \"$file\")\" size=\"$(wc -c < \"$file\")\" if [ \"${size}\" -gt \"$maxsize\" ] && ! kube::util::array_contains \"$file\" \"${allowlist[@]}\"; then echo \"$file is too large ($size bytes)\""} {"_id":"q-en-kubernetes-fbbe0d04760fa4703fbd0cc64c8e3c4015ed70ce31d8ba0ed58b044c47001e90","text":"HostIP: \"1.2.3.4\", }, }, false}, {api.Node{ ObjectMeta: api.ObjectMeta{ Name: \"foo\", Labels: map[string]string{\"bar\": \"foo\"}, }, Status: api.NodeStatus{ HostIP: \"1.2.3.4\", }, }, api.Node{ ObjectMeta: api.ObjectMeta{ Name: \"foo\", Labels: map[string]string{\"bar\": \"fooobaz\"}, }, }, true}, } for _, test := range tests { errs := ValidateMinionUpdate(&test.oldMinion, &test.minion)"} {"_id":"q-en-kubernetes-fbfbad523648010f75f75eda52015a203819bfd213b9fdbf65c0683bfbc1e410","text":"for _, l := range strings.Split(string(f.Lines), \"n\") { if strings.Contains(l, fmt.Sprintf(\"-A %v\", chainName)) { newRule := Rule(map[string]string{}) for _, arg := range []string{Destination, Source, DPort, Protocol, Jump, ToDest, Recent} { for _, arg := range []string{Destination, Source, DPort, Protocol, Jump, ToDest, Recent, MatchSet} { tok := getToken(l, arg) if tok != \"\" { newRule[arg] = tok"} {"_id":"q-en-kubernetes-fbfbd517739c1490804871fd5366020886ee18d1837b317043ea14660ab84e28","text":"# machines) we have to talk directly to the container IP. There is no one # strategy that works in all cases so we test to figure out which situation we # are in. if kube::build::probe_address 127.0.0.1 ${mapped_port}; then if kube::build::rsync_probe 127.0.0.1 ${mapped_port}; then KUBE_RSYNC_ADDR=\"127.0.0.1:${mapped_port}\" sleep 0.5 return 0 elif kube::build::probe_address \"${container_ip}\" ${KUBE_CONTAINER_RSYNC_PORT}; then elif kube::build::rsync_probe \"${container_ip}\" ${KUBE_CONTAINER_RSYNC_PORT}; then KUBE_RSYNC_ADDR=\"${container_ip}:${KUBE_CONTAINER_RSYNC_PORT}\" sleep 0.5 return 0 fi"} {"_id":"q-en-kubernetes-fc1a4b39e6f041452bc65cfebe5495adbe45f427a36b50e69e7221ca39488694","text":" apiVersion: v1 kind: ReplicationController metadata: name: es-master labels: component: elasticsearch role: master spec: replicas: 1 template: metadata: labels: component: elasticsearch role: master spec: serviceAccount: elasticsearch containers: - name: es-master securityContext: capabilities: add: - IPC_LOCK image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4 env: - name: KUBERNETES_CA_CERTIFICATE_FILE value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: \"CLUSTER_NAME\" value: \"myesdb\" - name: NODE_MASTER value: \"true\" - name: NODE_DATA value: \"false\" - name: HTTP_ENABLE value: \"false\" ports: - containerPort: 9300 name: transport protocol: TCP volumeMounts: - mountPath: /data name: storage volumes: - name: storage emptyDir: {} "} {"_id":"q-en-kubernetes-fc2079ad34362adea24961c313ecd587c88639df9d7b6ad6819146371685876a","text":"# Nodelocal DNS Cache Using NodeLocal DNSCache in Kubernetes clusters(https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/). This addon runs a node-local-dns pod on all cluster nodes. The pod runs CoreDNS as the dns cache. It runs with `hostNetwork:True` and creates a dedicated dummy interface with a link local ip(169.254.20.10/32 by default) to listen for DNS queries. The cache instances connect to clusterDNS in case of cache misses. Design details [here](https://git.k8s.io/enhancements/keps/sig-network/0030-nodelocal-dns-cache.md) KEP to graduate to beta [here](https://git.k8s.io/enhancements/keps/sig-network/20190424-NodeLocalDNS-beta-proposal.md) Design details [here](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/1024-nodelocal-cache-dns/README.md) This feature is graduating to Beta in release 1.15. This feature is graduating to GA in release 1.18(Beta in release 1.15). ## nodelocaldns addon template This directory contains the addon config yaml - `nodelocaldns.yaml` The variables will be substituted by the configure scripts when the yaml is copied into master. We have the following variables in the yaml: `__PILLAR__DNS__SERVER__` - set to kube-dns service IP. `__PILLAR__LOCAL__DNS__` - set to the link-local IP(169.254.20.10 by default). `__PILLAR__DNS__DOMAIN__` - set to the cluster domain(cluster.local by default). We have the following variables in the yaml: `__PILLAR__DNS__SERVER__` - set to kube-dns service IP. `__PILLAR__LOCAL__DNS__` - set to the link-local IP(169.254.20.10 by default). `__PILLAR__DNS__DOMAIN__` - set to the cluster domain(cluster.local by default). Note: The local listen IP address for NodeLocal DNSCache can be any address that can be guaranteed to not collide with any existing IP in your cluster. It's recommended to use an address with a local scope, per example, from the link-local range 169.254.0.0/16 for IPv4 or from the Unique Local Address range in IPv6 fd00::/8. The following variables will be set by the node-cache images - k8s.gcr.io/k8s-dns-node-cache:1.15.6 or later. The values will be determined by reading the kube-dns configMap for custom Upstream server configuration. `__PILLAR__CLUSTER__DNS__` - Upstream server for in-cluster queries. `__PILLAR__UPSTREAM__SERVERS__` - Upstream servers for external queries. Upstream server configuration. `__PILLAR__CLUSTER__DNS__` - Upstream server for in-cluster queries. `__PILLAR__UPSTREAM__SERVERS__` - Upstream servers for external queries. ### Network policy and DNS connectivity When running nodelocaldns addon on clusters using network policy, additional rules might be required to enable dns connectivity. Using a namespace selector for dns egress traffic as shown [here](https://docs.projectcalico.org/v2.6/getting-started/kubernetes/tutorials/advanced-policy) Using a namespace selector for dns egress traffic as shown [here](https://docs.projectcalico.org/security/tutorials/kubernetes-policy-advanced) might not be enough since the node-local-dns pods run with `hostNetwork: True` One way to enable connectivity from node-local-dns pods to clusterDNS ip is to use an ipBlock rule instead:"} {"_id":"q-en-kubernetes-fc7fc76d0264e2b2ed2b1640fb8c48705defe85178f89e7db7e9022c8b526c14","text":"allErrs = append(allErrs, field.Invalid(fldPath.Child(\"SyncPeriod\"), config.MinSyncPeriod, fmt.Sprintf(\"must be greater than or equal to %s\", fldPath.Child(\"MinSyncPeriod\").String()))) } allErrs = append(allErrs, validateIPVSTimeout(config, fldPath)...) allErrs = append(allErrs, validateIPVSSchedulerMethod(kubeproxyconfig.IPVSSchedulerMethod(config.Scheduler), fldPath.Child(\"Scheduler\"))...) allErrs = append(allErrs, validateIPVSExcludeCIDRs(config.ExcludeCIDRs, fldPath.Child(\"ExcludeCidrs\"))...)"} {"_id":"q-en-kubernetes-fcde7d934394c92d95322a48c50f8677a28908db4743cbaa74d20f1d19ddf5bb","text":" /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package util import ( \"testing\" \"time\" federation_api \"k8s.io/kubernetes/federation/apis/federation/v1beta1\" federation_release_1_4 \"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4\" fake_federation_release_1_4 \"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4/fake\" api \"k8s.io/kubernetes/pkg/api\" api_v1 \"k8s.io/kubernetes/pkg/api/v1\" \"k8s.io/kubernetes/pkg/client/cache\" \"k8s.io/kubernetes/pkg/client/testing/core\" \"k8s.io/kubernetes/pkg/controller/framework\" \"k8s.io/kubernetes/pkg/runtime\" \"k8s.io/kubernetes/pkg/watch\" \"github.com/stretchr/testify/assert\" ) // Basic test for Federated Informer. Checks whether the subinformer are added and deleted // when the corresponding cluster entries appear and dissapear from etcd. func TestFederatedInformer(t *testing.T) { fakeClient := &fake_federation_release_1_4.Clientset{} // Add a single cluster to federation and remove it when needed. cluster := federation_api.Cluster{ ObjectMeta: api_v1.ObjectMeta{ Name: \"mycluster\", }, Status: federation_api.ClusterStatus{ Conditions: []federation_api.ClusterCondition{ {Type: federation_api.ClusterReady, Status: api_v1.ConditionTrue}, }, }, } fakeClient.AddReactor(\"list\", \"clusters\", func(action core.Action) (bool, runtime.Object, error) { return true, &federation_api.ClusterList{Items: []federation_api.Cluster{cluster}}, nil }) deleteChan := make(chan struct{}) fakeClient.AddWatchReactor(\"clusters\", func(action core.Action) (bool, watch.Interface, error) { fakeWatch := watch.NewFake() go func() { <-deleteChan fakeWatch.Delete(&cluster) }() return true, fakeWatch, nil }) // There is a single service ns1/s1 in cluster mycluster. service := api_v1.Service{ ObjectMeta: api_v1.ObjectMeta{ Namespace: \"ns1\", Name: \"s1\", }, } fakeClient.AddReactor(\"list\", \"services\", func(action core.Action) (bool, runtime.Object, error) { return true, &api_v1.ServiceList{Items: []api_v1.Service{service}}, nil }) fakeClient.AddWatchReactor(\"services\", func(action core.Action) (bool, watch.Interface, error) { return true, watch.NewFake(), nil }) targetInformerFactory := func(cluster *federation_api.Cluster, clientset federation_release_1_4.Interface) (cache.Store, framework.ControllerInterface) { return framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { return clientset.Core().Services(api_v1.NamespaceAll).List(options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { return clientset.Core().Services(api_v1.NamespaceAll).Watch(options) }, }, &api_v1.Service{}, 10*time.Second, framework.ResourceEventHandlerFuncs{}) } informer := NewFederatedInformer(fakeClient, targetInformerFactory).(*federatedInformerImpl) informer.clientFactory = func(cluster *federation_api.Cluster) (federation_release_1_4.Interface, error) { return fakeClient, nil } assert.NotNil(t, informer) informer.Start() // Wait until mycluster is synced. for !informer.GetTargetStore().ClustersSynced([]*federation_api.Cluster{&cluster}) { time.Sleep(time.Millisecond * 100) } readyClusters, err := informer.GetReadyClusters() assert.NoError(t, err) assert.Contains(t, readyClusters, &cluster) serviceList, err := informer.GetTargetStore().List() assert.NoError(t, err) assert.Contains(t, serviceList, &service) service1, found, err := informer.GetTargetStore().GetByKey(\"mycluster\", \"ns1/s1\") assert.NoError(t, err) assert.True(t, found) assert.EqualValues(t, &service, service1) // All checked, lets delete the cluster. deleteChan <- struct{}{} for !informer.GetTargetStore().ClustersSynced([]*federation_api.Cluster{}) { time.Sleep(time.Millisecond * 100) } readyClusters, err = informer.GetReadyClusters() assert.NoError(t, err) assert.Empty(t, readyClusters) serviceList, err = informer.GetTargetStore().List() assert.NoError(t, err) assert.Empty(t, serviceList) // Test complete. informer.Stop() } "} {"_id":"q-en-kubernetes-fcf325d258126fb7a32b4ae1314279d929af7ec21f56d8c21e74e4f7d6d27dd7","text":"import ( \"errors\" \"fmt\" \"k8s.io/klog\" \"path\" \"strconv\" \"strings\" \"k8s.io/klog\" ) // FindMultipathDeviceForDevice given a device name like /dev/sdx, find the devicemapper parent"} {"_id":"q-en-kubernetes-fd1f62fc136a8c086ddc8eaa283661413ba8c9270e8ee069703b419c310b76a1","text":"\"net/http\" \"net/url\" gpath \"path\" \"strings\" \"time\" \"k8s.io/kubernetes/pkg/admission\""} {"_id":"q-en-kubernetes-fd22047972ce572eb059f1c19db7b9072555918440d247d8f5829932cb870413","text":"# # $1 - server architecture kube::build::get_docker_wrapped_binaries() { local debian_iptables_version=buster-v1.4.0 local debian_iptables_version=buster-v1.5.0 local go_runner_version=buster-v2.2.4 ### If you change any of these lists, please also update DOCKERIZED_BINARIES ### in build/BUILD. And kube::golang::server_image_targets"} {"_id":"q-en-kubernetes-fd8cc5ce2c382d7d7a21e3e296a481542730dd2080d2a7f0cb727b25109c4301","text":"function kube-up { echo \"Starting cluster using os distro: ${KUBE_OS_DISTRIBUTION}\" >&2 get-tokens detect-image"} {"_id":"q-en-kubernetes-fe11371e53fe658eb65505e429001fa9694b088af4385396930b11753c0e15a5","text":"if strings.Compare(p.Status.Conditions[0].Reason, \"Unschedulable\") != 0 { t.Fatalf(\"Failed as Pod %s reason was: %s but expected: Unschedulable\", podName, p.Status.Conditions[0].Reason) } if !strings.Contains(p.Status.Conditions[0].Message, \"MatchNodeSelector\") || !strings.Contains(p.Status.Conditions[0].Message, \"VolumeNodeAffinityConflict\") { t.Fatalf(\"Failed as Pod's %s failure message does not contain expected keywords: MatchNodeSelector, VolumeNodeAffinityConflict\", podName) if !strings.Contains(p.Status.Conditions[0].Message, \"node(s) didn't match node selector\") || !strings.Contains(p.Status.Conditions[0].Message, \"node(s) had volume node affinity conflict\") { t.Fatalf(\"Failed as Pod's %s failure message does not contain expected message: node(s) didn't match node selector, node(s) had volume node affinity conflict\", podName) } if err := config.client.CoreV1().Pods(config.ns).Delete(podName, &metav1.DeleteOptions{}); err != nil { t.Fatalf(\"Failed to delete Pod %s: %v\", podName, err)"} {"_id":"q-en-kubernetes-fe13a9fbadb3be24fb180c4aa9202eda575ff8279c5d07a0a76cbccaacdde5dd","text":"} delete(plugin.podCIDRs, id) glog.V(3).Infof(\"Calling cni plugins to remove container from network with cni runtime: %+v\", rt) if err := plugin.cniConfig.DelNetwork(plugin.netConfig, rt); err != nil { return fmt.Errorf(\"Error removing container from network: %v\", err) }"} {"_id":"q-en-kubernetes-fe5068a2f7a389a4d4f0dba88c8c2495cb9066a8255a1624e10213069aca5e16","text":" [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/horizontal-pod-autoscaling/README.md?pixel)]() No newline at end of file"} {"_id":"q-en-kubernetes-fe50a90f73b1cb6aefb125036495938af3a51ac1cc7fea157d4be14411b2fa04","text":"return nil } func (ctrl *controller) getParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass) (claimParameters, classParameters interface{}, err error) { func (ctrl *controller) getParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass, notifyClaim bool) (claimParameters, classParameters interface{}, err error) { classParameters, err = ctrl.driver.GetClassParameters(ctx, class) if err != nil { ctrl.eventRecorder.Event(class, v1.EventTypeWarning, \"Failed\", err.Error()) err = fmt.Errorf(\"class parameters %s: %v\", class.ParametersRef, err) return } claimParameters, err = ctrl.driver.GetClaimParameters(ctx, claim, class, classParameters) if err != nil { if notifyClaim { ctrl.eventRecorder.Event(claim, v1.EventTypeWarning, \"Failed\", err.Error()) } err = fmt.Errorf(\"claim parameters %s: %v\", claim.Spec.ParametersRef, err) return }"} {"_id":"q-en-kubernetes-fe567d9cf78409720bcbb87b1ad6339cb18b53dd88041da1d575419b6cc2df05","text":" # The Kubernetes API Primary system and API concepts are documented in the [User guide](user-guide.md). Overall API conventions are described in the [API conventions doc](api-conventions.md). Complete API details are documented via [Swagger](http://swagger.io/). The Kubernetes apiserver (aka \"master\") exports an API that can be used to retrieve the [Swagger spec](https://github.com/swagger-api/swagger-spec/tree/master/schemas/v1.2) for the Kubernetes API, by default at `/swaggerapi`, and a UI you can use to browse the API documentation at `/swaggerui`. We also periodically update a [statically generated UI](http://kubernetes.io/third_party/swagger-ui/). Remote access to the API is discussed in the [access doc](accessing_the_api.md). The Kubernetes API also serves as the foundation for the declarative configuration schema for the system. The [Kubectl](kubectl.md) command-line tool can be used to create, update, delete, and get API objects. Kubernetes also stores its serialized state (currently in [etcd](https://coreos.com/docs/distributed-configuration/getting-started-with-etcd/)) in terms of the API resources. Kubernetes itself is decomposed into multiple components, which interact through its API. ## API changes In our experience, any system that is successful needs to grow and change as new use cases emerge or existing ones change. Therefore, we expect the Kubernetes API to continuously change and grow. However, we intend to not break compatibility with existing clients, for an extended period of time. In general, new API resources and new resource fields can be expected to be added frequently. Elimination of resources or fields will require following a deprecation process. The precise deprecation policy for eliminating features is TBD, but once we reach our 1.0 milestone, there will be a specific policy. What constitutes a compatible change and how to change the API are detailed by the [API change document](devel/api_changes.md). ## API versioning Fine-grain resource evolution alone makes it difficult to eliminate fields or restructure resource representations. Therefore, Kubernetes supports multiple API versions, each at a different API path prefix, such as `/api/v1beta3`. These are simply different interfaces to read and/or modify the same underlying resources. In general, all API resources are accessible via all API versions, though there may be some cases in the future where that is not true. Distinct API versions present more clear, consistent views of system resources and behavior than intermingled, independently evolved resources. They also provide a more straightforward mechanism for controlling access to end-of-lifed and/or experimental APIs. The [API and release versioning proposal](versioning.md) describes the current thinking on the API version evolution process. ## v1beta1 and v1beta2 are deprecated; please move to v1beta3 ASAP As of April 1, 2015, the Kubernetes v1beta3 API has been enabled by default, and the v1beta1 and v1beta2 APIs are deprecated. v1beta3 should be considered the v1 release-candidate API, and the v1 API is expected to be substantially similar. As \"pre-release\" APIs, v1beta1, v1beta2, and v1beta3 will be eliminated once the v1 API is available, by the end of June 2015. ## v1beta3 conversion tips We're working to convert all documentation and examples to v1beta3. Most examples already contain a v1beta3 subdirectory with the API objects translated to v1beta3. A simple [API conversion tool](cluster_management.md#switching-your-config-files-to-a-new-api-version) has been written to simplify the translation process. Use `kubectl create --validate` in order to validate your json or yaml against our Swagger spec. Some important differences between v1beta1/2 and v1beta3: * The resource `id` is now called `name`. * `name`, `labels`, `annotations`, and other metadata are now nested in a map called `metadata` * `desiredState` is now called `spec`, and `currentState` is now called `status` * `/minions` has been moved to `/nodes`, and the resource has kind `Node` * The namespace is required (for all namespaced resources) and has moved from a URL parameter to the path: `/api/v1beta3/namespaces/{namespace}/{resource_collection}/{resource_name}` * The names of all resource collections are now lower cased - instead of `replicationControllers`, use `replicationcontrollers`. * To watch for changes to a resource, open an HTTP or Websocket connection to the collection URL and provide the `?watch=true` URL parameter along with the desired `resourceVersion` parameter to watch from. * The container `entrypoint` has been renamed to `command`, and `command` has been renamed to `args`. * Container, volume, and node resources are expressed as nested maps (e.g., `resources{cpu:1}`) rather than as individual fields, and resource values support [scaling suffixes](resources.md#resource-quantities) rather than fixed scales (e.g., milli-cores). * Restart policy is represented simply as a string (e.g., \"Always\") rather than as a nested map (\"always{}\"). * The volume `source` is inlined into `volume` rather than nested. "} {"_id":"q-en-kubernetes-fe615ecb605ea9cd4d39dd3f2bc4e9030d18bdc2bf65717f3edfb2f949cf2290","text":"}, } resolvConf, cleanup := getResolvConf(t) defer cleanup() resolvConfContent := []byte(fmt.Sprintf(\"nameserver %snsearch %sn\", testHostNameserver, testHostDomain)) tmpfile, err := os.CreateTemp(\"\", \"tmpResolvConf\") if err != nil { t.Fatal(err) } defer os.Remove(tmpfile.Name()) if _, err := tmpfile.Write(resolvConfContent); err != nil { t.Fatal(err) } if err := tmpfile.Close(); err != nil { t.Fatal(err) } configurer := NewConfigurer(recorder, nodeRef, nil, []net.IP{netutils.ParseIPSloppy(testClusterNameserver)}, testClusterDNSDomain, resolvConf) configurer.getHostDNSConfig = fakeGetHostDNSConfigCustom configurer := NewConfigurer(recorder, nodeRef, nil, []net.IP{netutils.ParseIPSloppy(testClusterNameserver)}, testClusterDNSDomain, tmpfile.Name()) testCases := []struct { desc string"} {"_id":"q-en-kubernetes-fe6ea681b06ea1488875f2efa43792cd90e0aa823b784a94af1bc84fb6c69146","text":"useCustomImsCache: true, expectedErrMsg: fmt.Errorf(\"getError\"), }, { name: \"NodeAddresses should report error if VMSS instanceID is invalid\", nodeName: \"vm123456\", metadataName: \"vmss_$123\", providerID: \"azure:///subscriptions/subscription/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm1\", vmType: vmTypeVMSS, expectedErrMsg: fmt.Errorf(\"failed to parse VMSS instanceID %q: strconv.ParseInt: parsing %q: invalid syntax\", \"$123\", \"$123\"), }, } for _, test := range testcases {"} {"_id":"q-en-kubernetes-fe76167d8ae3d15798dd16b90dfdbba3d89fdb02cf02abbc63ab856aefb5bd69","text":"// +listType=map // +listMapKey=name // +optional Variables []Variable `json:\"variables\" patchStrategy:\"merge\" patchMergeKey:\"name\" protobuf:\"bytes,7,rep,name=variables\"` Variables []Variable `json:\"variables,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"name\" protobuf:\"bytes,7,rep,name=variables\"` } // ParamKind is a tuple of Group Kind and Version."} {"_id":"q-en-kubernetes-fe7d5cf580fb63e809a501c6d500e8b5dfd74f13d1a63f513e748afe0b37534d","text":"return len(br) } // Less breaks ties first by creation timestamp, then by name func (br byRevision) Less(i, j int) bool { if br[i].Revision == br[j].Revision { if br[j].CreationTimestamp.Equal(&br[i].CreationTimestamp) { return br[i].Name < br[j].Name } return br[j].CreationTimestamp.After(br[i].CreationTimestamp.Time) } return br[i].Revision < br[j].Revision }"} {"_id":"q-en-kubernetes-fe8f820400f1edc5d05f4f6403cece3f14d841eec9396013f16753e8c8aa16bf","text":" DOCKER_OPTS=\"\" {% if grains.docker_opts is defined %} {% set docker_opts = grains.docker_opts %} {% else %} {% set docker_opts = \"\" %} DOCKER_OPTS=\"${DOCKER_OPTS} {{grains.docker_opts}}\" {% endif %} DOCKER_OPTS=\"{{docker_opts}} --bridge cbr0 --iptables=false --ip-masq=false -r=false\" DOCKER_OPTS=\"${DOCKER_OPTS} --bridge cbr0 --iptables=false --ip-masq=false -r=false\" "} {"_id":"q-en-kubernetes-fe96420bd3c7c731cfd4aea2e5a3c852aa2f473c0f9243d695f26a84f2918450","text":"# Downloaded kubernetes binary release tar ball kubernetes.tar.gz # generated files in any directory # TODO(thockin): uncomment this when we stop committing the generated files. #zz_generated.* zz_generated.openapi.go # Phony test files used as part of coverage generation zz_generated_*_test.go # TODO(roycaihw): remove this when we stop committing the generated definition !staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go !staging/src/k8s.io/kube-aggregator/pkg/generated/openapi/zz_generated.openapi.go # low-change blueprint in code-generator to notice changes !staging/src/k8s.io/code-generator/examples/apiserver/openapi/zz_generated.openapi.go # low-change sample-apiserver spec to be compilable when published !staging/src/k8s.io/sample-apiserver/pkg/generated/openapi/zz_generated.openapi.go # make-related metadata /.make/"} {"_id":"q-en-kubernetes-feaf310fbf1b6e9f34b0a68c0ede7fb60ed6a0c35f828c7279e02ee3f940300e","text":"EXPOSE 2379 2380 4001 7001 WORKDIR C:/usr/local/bin COPY etcd* etcdctl* /usr/local/bin/ COPY migrate-if-needed.bat /usr/local/bin/ COPY migrate /usr/local/bin/migrate.exe"} {"_id":"q-en-kubernetes-fef182742fa73788d0e84559094ae552984664c9789cc551608b6db19a16cc32","text":"}{ { expected: api.VolumeMount{ Name: \"pki\", Name: \"k8s\", MountPath: \"/etc/kubernetes/\", ReadOnly: true, },"} {"_id":"q-en-kubernetes-fefa3bdc49b8af56fdf7c0009763645d4cef3b1dc70a58e932a40b134322da0a","text":"fifo := cache.NewDeltaFIFO(cache.MetaNamespaceKeyFunc, nil, downstream) // Let's do threadsafe output to get predictable test results. outputSetLock := sync.Mutex{} outputSet := util.StringSet{} deletionCounter := make(chan string, 1000) cfg := &framework.Config{ Queue: fifo,"} {"_id":"q-en-kubernetes-ff27ed26835e4e73c8ed77068b0bb07f1b03eac9af8dc0e81d9bdce7477b7ae9","text":"} output, err := json.Marshal(agg) require.NoError(t, err) // Content-type is \"aggregated\" discovery format. w.Header().Set(\"Content-Type\", AcceptV2Beta1) // Content-type is \"aggregated\" discovery format. Add extra parameter // to ensure we are resilient to these extra parameters. w.Header().Set(\"Content-Type\", AcceptV2Beta1+\"; charset=utf-8\") w.WriteHeader(http.StatusOK) w.Write(output) }))"} {"_id":"q-en-kubernetes-ff40ad39cb54ef746f3c01e40f700b6cfdbf2c866e5ce8e5c0ec0fc25d054c54","text":"If you have questions or want to start contributing please reach out. We don't bite! The Kubernetes team is hanging out on IRC on the [#google-containers channel on freenode.net](http://webchat.freenode.net/?channels=google-containers). We also have the [google-containers Google Groups mailing list](https://groups.google.com/forum/#!forum/google-containers) for questions and discussion as well as the [kubernetes-announce mailing list](https://groups.google.com/forum/#!forum/kubernetes-announce) for important announcements (low-traffic, no chatter). The Kubernetes team is hanging out on IRC on the [#google-containers channel on freenode.net](http://webchat.freenode.net/?channels=google-containers). This client may be overloaded from time to time. If this happens you can use any [IRC client out there](http://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) to talk to us. We also have the [google-containers Google Groups mailing list](https://groups.google.com/forum/#!forum/google-containers) for questions and discussion as well as the [kubernetes-announce mailing list](https://groups.google.com/forum/#!forum/kubernetes-announce) for important announcements (low-traffic, no chatter). If you are a company and are looking for a more formal engagement with Google around Kubernetes and containers at Google as a whole, please fill out [this form](https://docs.google.com/a/google.com/forms/d/1_RfwC8LZU4CKe4vKq32x5xpEJI5QZ-j0ShGmZVv9cm4/viewform) and we'll be in touch."} {"_id":"q-en-kubernetes-ff6cbd9a0afafde0b71b39c7567f5fa26fef06b47c989d69348cf657be0580cc","text":"var notMnt bool var err error if extensiveMountPointCheck { notMnt, err = IsNotMountPoint(mounter, mountPath) notMnt, err = mounter.IsNotMountPoint(mountPath) } else { notMnt, err = mounter.IsLikelyNotMountPoint(mountPath) }"} {"_id":"q-en-kubernetes-ffa42b8d7ffb77b2d5b2a9e41359720876eff709bf2b63221f4df3d8cdeb03a4","text":"import ( \"fmt\" \"os\" \"sort\" \"strings\" \"github.com/spf13/cobra\""} {"_id":"q-en-kubernetes-ffadf208832ed9b44182bdcdb9d4cadf431b7f2f48d87bb5ec5356359efc00c7","text":"if err != nil { framework.Logf(\"Failed to delete adapter deployment file: %s\", err) } cleanupClusterAdminBinding(namespace) cleanupClusterAdminBinding() } func cleanupClusterAdminBinding(namespace string) { stat, err := framework.RunKubectl(namespace, \"delete\", \"clusterrolebinding\", ClusterAdminBinding) func cleanupClusterAdminBinding() { stat, err := framework.RunKubectl(\"\", \"delete\", \"clusterrolebinding\", ClusterAdminBinding) framework.Logf(stat) if err != nil { framework.Logf(\"Failed to delete cluster admin binding: %s\", err)"} {"_id":"q-en-kubernetes-ffd75e950e3acba300669c082557ae1dd3fac98677e61f852102c6ecd50bd855","text":"}, }, SchemaProps: spec.SchemaProps{ Description: \"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.\", Description: \"List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.\", Type: []string{\"array\"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{"} {"_id":"q-en-kubernetes-ffe304c79f860ba60bab5beae2f53125b8ee6474edfc4a2179f955d021396ebf","text":"network_mode: openvswitch networkInterfaceName: eth1 etcd_servers: $MASTER_IP api_servers: $MASTER_IP cloud: vagrant cloud_provider: vagrant roles:"}