{"query_id": "q-en-kubernetes-000242c2918540a01bf6dfa641982378771c50cbb36bc192ba673dc4532d1660", "query": "// 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, as can extra tags for any // new groups. // new groups. The annotation \"ServiceAnnotationLoadBalancerSecurityGroups\" allows for // setting the security groups specified. func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, loadBalancerName string, annotations map[string]string) ([]string, error) { var err error var securityGroupID string", "positive_passages": [{"docid": "doc-en-kubernetes-fdb254d1c454599ab2a014bd4bd3d3565c782a0922e5e1002d9488ae7f81b35f", "text": " - [Compute Resources](#compute-resources) - [Container and Pod Resource Limits](#container-and-pod-resource-limits) - [How Pods with Resource Limits are Scheduled](#how-pods-with-resource-limits-are-scheduled) - [Resource Requests and Limits of Pod and Container](#resource-requests-and-limits-of-pod-and-container) - [How Pods with Resource Requests are Scheduled](#how-pods-with-resource-requests-are-scheduled) - [How Pods with Resource Limits are Run](#how-pods-with-resource-limits-are-run) - [Monitoring Compute Resource Usage](#monitoring-compute-resource-usage) - [Troubleshooting](#troubleshooting)", "positive_passages": [{"docid": "doc-en-kubernetes-5fc4e751e745de69116834ce03b7837a309be77d0620f5863e45d7db6ce6fe64", "text": "did which addresses some of them, but turns up a lot more.\nAlright, I will do that.", "commid": "kubernetes_issue_13074", "tokennum": 21}], "negative_passages": []} {"query_id": "q-en-kubernetes-01e6c74c20425b29f15dcee960129002500d15937dca233dba59ca59f1a677c7", "query": "// Grabber provides functions which grab metrics from components type Grabber struct { client clientset.Interface externalClient clientset.Interface grabFromAPIServer bool grabFromControllerManager bool grabFromKubelets bool grabFromScheduler bool grabFromClusterAutoscaler bool masterName string registeredMaster bool client clientset.Interface externalClient clientset.Interface grabFromAPIServer bool grabFromControllerManager bool grabFromKubelets bool grabFromScheduler bool grabFromClusterAutoscaler bool masterName string registeredMaster bool waitForControllerManagerReadyOnce sync.Once } // NewMetricsGrabber returns new metrics which are initialized.", "positive_passages": [{"docid": "doc-en-kubernetes-4c3acc20533c8149b86b9009e7cd590aceab013b6a2e59c16f0c7f0b9926f0c4", "text": " \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\">

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

", "positive_passages": [{"docid": "doc-en-kubernetes-0ed81b33e69f20e4772957c3f3b996322e79fc4a38431490adc0e507670d4af6", "text": "This includes but effects multiple docs.\nThis issue was also raised on the repository, see:\nWhat's needed to fix this? Are the broken headers being generated automatically somewhere?\n- The warning section is pre-pended to the md docs from the following script The fixes this issue, updating this script and all the docs... However, there is an open question as to whether \"old\" docs should be removed from this repo, which has prevented this PR from being merged.", "commid": "kubernetes_issue_26357", "tokennum": 105}], "negative_passages": []} {"query_id": "q-en-kubernetes-0ce257c954d5f26e51617af79726a6a48057c9317c94482fb534129894c29571", "query": "shopt -s dotglob cp -af \"${KUBE_TEMP}\"/* \"${KUBE_ROOT}\" shopt -u dotglob # Replace with placeholder docs kube::util::set-placeholder-gen-docs ", "positive_passages": [{"docid": "doc-en-kubernetes-d3238db0b99bb26483f3c309f119f9254a0b4343de045647cc58cdb0578b1eaf", "text": "Instead, have a presubmit test that verifies that the docs can be generated. This will reduce the number of conflicts & rebases, therefore increase speed through the queue. Confirmed with that nothing depends on these docs at the moment. fyi, some manual process might have to change once this is in.\nYes, we want to generate the docs into , anyway. cc\nExcellent. One closer step to YAML generation, I hope. :)\nwas interested in working on this.\nWant to get started on this?\nis this still a goal of ours?\nI've seen a thread this week-end about that. I think docs have moved but we still need to generate them there.\ncan this issue be closed then?\nrelated to ?\nIssues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. Prevent issues from auto-closing with an comment. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale\n/remove-lifecycle stale /lifecycle frozen There's still cruft in the docs directory.\n/remove-help I don't think this meets . Please add back via if I'm incorrect\n/sig docs /sig release /remove-area test-infra /area build-release /area kubeadm /area kubectl All of the following dirs/files have the following content. Do we need them? This file is autogenerated, but we've stopped checking such files into the repository to reduce the need for rebases. Please run hack/generate- to populate this file. docs/admin: .md files for kube components and kubeadm commands man/man1: .1 files for same user-guide/kubectl: .md files for kubectl commands yaml/kubectl: .yaml files for kubectl commands\n/help Now that we have /good-first-issue, I think this does meet the criteria for help wanted. Probably need to talk to someone from sig-docs and figure out if/how these are used.\nThis request has been marked as needing help from a contributor. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command.", "commid": "kubernetes_issue_26205", "tokennum": 526}], "negative_passages": []} {"query_id": "q-en-kubernetes-0ce257c954d5f26e51617af79726a6a48057c9317c94482fb534129894c29571", "query": "shopt -s dotglob cp -af \"${KUBE_TEMP}\"/* \"${KUBE_ROOT}\" shopt -u dotglob # Replace with placeholder docs kube::util::set-placeholder-gen-docs ", "positive_passages": [{"docid": "doc-en-kubernetes-e15857595c560e7736808e4f4dee7a83a3e93bfb6642752007538775a4e2052e", "text": " func resourceContainerSpec(memory, cpu string) v1.ResourceRequirements { return v1.ResourceRequirements{ Requests: allocatableResources(memory, cpu), } }
func resourcePodSpecWithoutNodeName(memory, cpu string) v1.PodSpec { return v1.PodSpec{ Containers: []v1.Container{{", "positive_passages": [{"docid": "doc-en-kubernetes-979e171a904fd74827d082a4dff4b21b841e3aaaf5f752d97c83c1a15ac4bde4", "text": "Is this a BUG REPORT or FEATURE REQUEST?: /kind enhancement /sig apps Description: is a key function of DaemonSet; it's better to have more unit test case for it, e.g. node status, pod on the node. There's several test cases to the DaemonSet's finial decision, which are kind of integration test to me; prefer to provide more unit test case for this key function.\nGitHub didn't allow me to assign the following users: mathspanda. Note that only can be assigned. - PATH=$HOME/gopath/bin:./third_party/etcd:$PATH ./hack/verify-gendocs.sh
- PATH=$HOME/gopath/bin:./third_party/etcd:$PATH ./hack/test-integration.sh notifications:", "positive_passages": [{"docid": "doc-en-kubernetes-bca2d299c16cd4bcf1368f7229babb47adfec8e31d2e49404b302f343e273216", "text": "Manually updated docs have a tendency to drift from actual implementation. It shouldn't be too hard to add a script to generate the markdown from a . We could then run the script manually or as a commit hook when changes are made to pkg/kubectl.\nA big chunk of that is cut/paste from the help output anyway.. Brendan On Jan 9, 2015 4:20 PM, \"Jeff Lowdermilk\" wrote:\nWhy are we including the help output? Seems like cobra should do that, or we should just tell the user to ask for help if they want it.\nIt's useful to see generated markdown of help output for the full command tree, e.g. if you want to link to the syntax on irc or something. Anyway, this was quite easy to do, I'll have a PR shortly.", "commid": "kubernetes_issue_3379", "tokennum": 178}], "negative_passages": []} {"query_id": "q-en-kubernetes-0db79fc88a2cafc81468140ddda0f15a2ecefff9724a6ef741bf11ca2d9b6fe4", "query": "} func (p *podPreemptorImpl) setNominatedNodeName(pod *v1.Pod, nominatedNodeName string) error { klog.V(3).Infof(\"Setting nominated node name for %s/%s to \"%s\"\", pod.Namespace, pod.Name, nominatedNodeName) if pod.Status.NominatedNodeName == nominatedNodeName { return nil } podCopy := pod.DeepCopy() oldData, err := json.Marshal(podCopy) if err != nil { return err } podCopy.Status.NominatedNodeName = nominatedNodeName _, err := p.Client.CoreV1().Pods(pod.Namespace).UpdateStatus(context.TODO(), podCopy, metav1.UpdateOptions{}) newData, err := json.Marshal(podCopy) if err != nil { return err } patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, &v1.Pod{}) if err != nil { return fmt.Errorf(\"failed to create merge patch for pod %q/%q: %v\", pod.Namespace, pod.Name, err) } _, err = p.Client.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, \"status\") return err }", "positive_passages": [{"docid": "doc-en-kubernetes-23c11ae4e6b1b2f23879b1520616569f6d258aefb6ca55e4259c5b611988fc4e", "text": " \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\">

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

", "positive_passages": [{"docid": "doc-en-kubernetes-0ed81b33e69f20e4772957c3f3b996322e79fc4a38431490adc0e507670d4af6", "text": "This includes but effects multiple docs.\nThis issue was also raised on the repository, see:\nWhat's needed to fix this? Are the broken headers being generated automatically somewhere?\n- The warning section is pre-pended to the md docs from the following script The fixes this issue, updating this script and all the docs... However, there is an open question as to whether \"old\" docs should be removed from this repo, which has prevented this PR from being merged.", "commid": "kubernetes_issue_26357", "tokennum": 105}], "negative_passages": []} {"query_id": "q-en-kubernetes-1c48394eade57103aa3e33241689740c780591a6e166396bff4c723338114bcf", "query": "Verb: \"get\", Resource: schema.GroupVersionResource{Resource: \"group\"}, } c.Invokes(action, nil) if _, err := c.Invokes(action, nil); err != nil { return nil, err } groups := map[string]*metav1.APIGroup{}", "positive_passages": [{"docid": "doc-en-kubernetes-9ea306bfc555a77b505a4a3bcfd889404ac5980d1f16c8bc2559ea7b2d00b933", "text": "I'm writing a UT for the following function: The code branch where the server returns an error other than could not be tested using 's . This is because does not handle the error returned by and therefore could not return errors other than : Ref: Add a to so simulate errors other than . Run the following UT (should fail):\nThis issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. if string(patchBytes) == \"{}\" {
if string(patchBytes) == \"{}\" && !printObject { count++ cmdutil.PrintSuccess(shortOutput, out, info.Object, false, \"unchanged\") return nil } } count++ if len(output) > 0 && !shortOutput { if printObject { return cmdutil.PrintObject(cmd, info.Object, out) } cmdutil.PrintSuccess(shortOutput, out, info.Object, dryRun, \"configured\")", "positive_passages": [{"docid": "doc-en-kubernetes-f9fbfb6195731f14481a9309c722cc276aa2f7ee5be384a29725f5ddba99c457", "text": "Is this a BUG REPORT or FEATURE REQUEST?: Bug Report /kind bug What happened: Applying a file that has no changes compared to current will output something like , which muddles the output when using What you expected to happen: Using the -o flag should suppress the unchanged messages in stdout to prevent output from being muddled How to reproduce it (as minimally and precisely as possible): Given the file Will result in proper yaml being generated as expected Run again, and is outputted to stdout, and is invalid yaml Anything else we need to know?: I do need to check whether this still affects the most recent version kubectl Environment: Kubernetes version (use ): 1.8.6 Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Darwin Install tools: Others:\nconfirmed on latest stable version (1.9.2)\nReiterating the mentions to trigger a notification: echo \"EOF on prompt. Skipping upload\"
kube::log::status \"EOF on prompt. Skipping upload\" return } [[ $REPLY =~ ^[yY]$ ]] || { echo \"Skipping upload\" kube::log::status \"Skipping upload\" return } } kube::log::status \"Deleting everything under ${gcs_destination}\" gsutil -q -m rm -f -R \"${gcs_destination}\" || return 1 fi", "positive_passages": [{"docid": "doc-en-kubernetes-ea2e1a82ebee1f2cda815bb4169a1042d0fb3a569ecfad2985d19cce45c20d94", "text": "(cc Despite doing very, very similar things, doesn't rely on . It should, or the logic should otherwise be consolidated. I'm going to maybe work on this to make easier.", "commid": "kubernetes_issue_14785", "tokennum": 40}], "negative_passages": []} {"query_id": "q-en-kubernetes-1caaea9fd207d4c4f73586352469afd9d916ec0b04b2d765d565d18bfab228dc", "query": "HardPodAffinitySymmetricWeight: v1.DefaultHardPodAffinitySymmetricWeight, Client: clientSet, InformerFactory: informerFactory, PodInformer: factory.NewPodInformer(clientSet, 0, v1.DefaultSchedulerName), PodInformer: factory.NewPodInformer(clientSet, 0), EventClient: clientSet.CoreV1(), Recorder: eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: v1.DefaultSchedulerName}), Broadcaster: eventBroadcaster,", "positive_passages": [{"docid": "doc-en-kubernetes-8a2849c1d5058c6c5be662d50498532aa1beb7f8030f3f5350dc4d4f5f79fed7", "text": " \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\"> \"WARNING\" \"WARNING\" width=\"25\" height=\"25\">

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

", "positive_passages": [{"docid": "doc-en-kubernetes-0ed81b33e69f20e4772957c3f3b996322e79fc4a38431490adc0e507670d4af6", "text": "This includes but effects multiple docs.\nThis issue was also raised on the repository, see:\nWhat's needed to fix this? Are the broken headers being generated automatically somewhere?\n- The warning section is pre-pended to the md docs from the following script The fixes this issue, updating this script and all the docs... However, there is an open question as to whether \"old\" docs should be removed from this repo, which has prevented this PR from being merged.", "commid": "kubernetes_issue_26357", "tokennum": 105}], "negative_passages": []} {"query_id": "q-en-kubernetes-53f8010d25bdc0ddf952125a653d959849fce9d35ab3160de3ec36d78c4e8373", "query": "return portsToEndpoints } // ContainsIPv4Loopback returns true if the input is empty or one of the CIDR contains an IPv4 loopback address. func ContainsIPv4Loopback(cidrStrings []string) bool { if len(cidrStrings) == 0 { return true } // RFC 5735 127.0.0.0/8 - This block is assigned for use as the Internet host loopback address ipv4LoopbackStart := netutils.ParseIPSloppy(\"127.0.0.0\") for _, cidr := range cidrStrings { if IsZeroCIDR(cidr) { return true } ip, ipnet, err := netutils.ParseCIDRSloppy(cidr) if err != nil { continue } if netutils.IsIPv6CIDR(ipnet) { continue } if ip.IsLoopback() { return true } if ipnet.Contains(ipv4LoopbackStart) { return true } } return false } // IsZeroCIDR checks whether the input CIDR string is either // the IPv4 or IPv6 zero CIDR func IsZeroCIDR(cidr string) bool {", "positive_passages": [{"docid": "doc-en-kubernetes-84b9d124d8173dd7a98f474b147e3c88b1473ea2fb361b309cee2ed86bd6b59d", "text": "Just similar to , for service with type nodeport , iptable proxy should add IsLoopback check for nodeAddress. Line 1104-1106 check nodeAddress is localhost address or not for ipvs mode proxy but for iptable mode proxy , when deal with nodePort type service, there is no similar check for nodeAddress since the use of localhost addresses for nodeports is the only know reason to require (), Just for the purpose of security ,this requirement shall be removed for proxy-mode=itable. Start a cluster with proxy-mode=iptable and some services Do; iptable -Ln | grep 127.0.0.1 just as says : ipv6+iptables , ::1 is not work for Nodeport all supporting proxy-mode=iptable any any /sig network /kind cleanup /area iptable\n/sig network\nThe label(s) cannot be applied, because the repository doesn't have them. // ContainsIPv4Loopback returns true if the input is empty or one of the CIDR contains an IPv4 loopback address. func ContainsIPv4Loopback(cidrStrings []string) bool { if len(cidrStrings) == 0 { return true } // RFC 5735 127.0.0.0/8 - This block is assigned for use as the Internet host loopback address ipv4LoopbackStart := netutils.ParseIPSloppy(\"127.0.0.0\") for _, cidr := range cidrStrings { if IsZeroCIDR(cidr) { return true } ip, ipnet, err := netutils.ParseCIDRSloppy(cidr) if err != nil { continue } if netutils.IsIPv6CIDR(ipnet) { continue } if ip.IsLoopback() { return true } if ipnet.Contains(ipv4LoopbackStart) { return true } } return false }
// IsZeroCIDR checks whether the input CIDR string is either // the IPv4 or IPv6 zero CIDR func IsZeroCIDR(cidr string) bool {", "positive_passages": [{"docid": "doc-en-kubernetes-919bd2039803f2f1af49de7ffc356d62009aa7d11d0205567cb74c1523db29ba", "text": "As much as I'd like it to be the default, I think the only way to get there is to add a flag with compatible default behavior and encourage people to turn it on. e.g. add a kube-proxy config like defaulting to true, and encourage people/tools to set it to false.\nI've found a better way ;)\n/triage accepted", "commid": "kubernetes_issue_106976", "tokennum": 81}], "negative_passages": []} {"query_id": "q-en-kubernetes-53fca1049cc18cce4107a5dbb954c207dbe4391cf619b7a13c68b1f679678160", "query": "return r, pods, svc } func JSONToYAMLOrDie(in []byte) []byte { data, err := yaml.JSONToYAML(in) if err != nil { panic(err) } return data } func streamYAMLTestData() (io.Reader, *api.PodList, *api.ServiceList) { pods, svc := testData() r, w := io.Pipe() go func() { defer w.Close() w.Write(JSONToYAMLOrDie([]byte(runtime.EncodeOrDie(latest.Codec, pods)))) w.Write([]byte(\"n---n\")) w.Write(JSONToYAMLOrDie([]byte(runtime.EncodeOrDie(latest.Codec, svc)))) }() return r, pods, svc } type testVisitor struct { InjectErr error Infos []*Info", "positive_passages": [{"docid": "doc-en-kubernetes-9d4f465534109f3dbb202d16c71aba04693e26fab9029cf5614c4c021d578619", "text": "If I stuff into a file and use that after -f, it works fine. cc\nWhat's on stdin?\nBug, I'm only accepting json because I naively reused watch partitioner and we don't have test cases. Will fix tonight.\nIf that's the problem, why did it work when I gave it that file not over stdin?\nDifferent code path. Stdin supports streaming json a la watch (multiple json objects in a stream), so you can do Unfortunately I missed yaml input and didn't use a segmenting yaml decoder (returning a stream of yaml objects).\nAh! Thanks for explanation. I think it would be good for us to ask for e2e runs before merging kubectl changes, since there's not quite enough coverage in test- yet.\nYeah, I'm slacking on that for these changes.\nFix incoming.\nFix provided. More tests to test-cmd... :)", "commid": "kubernetes_issue_3448", "tokennum": 205}], "negative_passages": []} {"query_id": "q-en-kubernetes-541331541cc1395804b28ff0ffdf413be825390e9c5aac1c9d174671af4215c0", "query": "return defaultPlugins } type pluginIndex struct { index int plugin v1beta2.Plugin } func mergePluginSet(defaultPluginSet, customPluginSet v1beta2.PluginSet) v1beta2.PluginSet { disabledPlugins := sets.NewString() enabledCustomPlugins := make(map[string]pluginIndex) for _, disabledPlugin := range customPluginSet.Disabled { disabledPlugins.Insert(disabledPlugin.Name) } for index, enabledPlugin := range customPluginSet.Enabled { enabledCustomPlugins[enabledPlugin.Name] = pluginIndex{index, enabledPlugin} } var enabledPlugins []v1beta2.Plugin if !disabledPlugins.Has(\"*\") { for _, defaultEnabledPlugin := range defaultPluginSet.Enabled { if disabledPlugins.Has(defaultEnabledPlugin.Name) { continue } // The default plugin is explicitly re-configured, update the default plugin accordingly. if customPlugin, ok := enabledCustomPlugins[defaultEnabledPlugin.Name]; ok { klog.InfoS(\"Defaut plugin is explicitly re-configured and is overriding.\", \"plugin\", defaultEnabledPlugin.Name) // update the default plugin in place to preserve order defaultEnabledPlugin = customPlugin.plugin // kick the plugin from the enabled list of custom plugins customPluginSet.Enabled = append(customPluginSet.Enabled[:customPlugin.index], customPluginSet.Enabled[customPlugin.index+1:]...) } enabledPlugins = append(enabledPlugins, defaultEnabledPlugin) } }", "positive_passages": [{"docid": "doc-en-kubernetes-8e9b60668e11892d0cf1efadc95cb7254da2e1216d2e6be4a1b97ad91ea591dc", "text": " When specifying a [pod](pods.md), you can optionally specify how much CPU and memory (RAM) each container needs. When containers have resource limits, the scheduler is able to make better decisions about which nodes to place pods on, and contention for resources can be handled in a consistent manner. container needs. When containers have their resource requests specified, the scheduler is able to make better decisions about which nodes to place pods on; and when containers have their limits specified, contention for resources on a node can be handled in a specified manner. For more details about the difference between requests and limits, please refer to [Resource QoS](../proposals/resource-qos.md). *CPU* and *memory* are each a *resource type*. A resource type has a base unit. CPU is specified in units of cores. Memory is specified in units of bytes.", "positive_passages": [{"docid": "doc-en-kubernetes-5fc4e751e745de69116834ce03b7837a309be77d0620f5863e45d7db6ce6fe64", "text": "did which addresses some of them, but turns up a lot more.\nAlright, I will do that.", "commid": "kubernetes_issue_13074", "tokennum": 21}], "negative_passages": []} {"query_id": "q-en-kubernetes-bc6713f63bf240ae619b6ca63534b96f030f2f3a8395fb264ff21115367d37dc", "query": "go_library( name = \"go_default_library\", srcs = select({ \"@io_bazel_rules_go//go/platform:linux_amd64\": [ \"fake.go\", ], \"//conditions:default\": [], }), srcs = [\"fake.go\"], importpath = \"k8s.io/kubernetes/pkg/proxy/ipvs/testing\", tags = [\"automanaged\"], )", "positive_passages": [{"docid": "doc-en-kubernetes-cdd967792af25eca230a3c2d67a9f73b8b56e425054b036284cdf310cf0ccc5f", "text": "