jiebi/CodeConvo huggingface dataset:
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind feature /sig cli What happened: I have two custom resources in my cluster called Cluster, and couldn't figure out how to ask for one or the other. was of no help, and various Google searches for things like "kubectl apigroup" or "kubectl crd" revealed nothing of use. Worse, some bugs that came up like suggested that the syntax was , which produced entirely incorrect output (e.g. results in . Eventually, I stumbled by accident on the correct way to do it, which is to do and then , where is the name of the custom resource exactly as listed in the output of . I still don't know how to request a specific API version using this syntax, if that is even possible. What you expected to happen: I expected to document how to query custom resources, given that they're increasingly central to running production quality clusters with various operators. Failing that, I expected the k8s website to have documentation on querying custom resources that is discoverable via Google search. How to reproduce it (as minimally and precisely as possible): Install something that uses custom resources (e.g. Calico in k8s datastore mode, Rook), and try to one of the custom resources by precise name (e.g. assume that there are multiple objects defined by different CRDs, so you can't just , you have to be more precise). Environment: Kubernetes version (use ): 1.10.2 client+cserver
Opened with examples

Discussion:
# List a single replication controller with specified NAME in ps output format. kubectl get replicationcontroller web <ins> # List deployments in JSON output format, in the "v1" version of the "apps" API group: kubectl get deployments.v1.apps -o json </ins> # List a single pod in JSON output format. kubectl get -o json pod web-pod-13je7

kubectl get rc,services # List one or more resources by their type and names. <del> kubectl get rc/web service/frontend pods/web-pod-13je7 # List all resources with different types. kubectl get all`)) </del> <ins> kubectl get rc/web service/frontend pods/web-pod-13je7`)) </ins> ) const (

validArgs := cmdutil.ValidArgList(f) cmd := &cobra.Command{ <del> Use: "get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE [NAME | -l label] | TYPE/NAME ...) [flags]", </del> <ins> Use: "get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]", </ins> DisableFlagsInUseLine: true, Short:   i18n.T("Display one or many resources"), Long:    getLong + "nn" + cmdutil.SuggestApiResources(parent),
Change:
/kind bug If a PV's zone annotation format indicates that it's a regional PD, but pdName corresponds to a regular PD, currently the GCE PD plugin allows attach to succeed. It should fail, because the mismatch is often caused by user error. /sig gcp /sig storage /assign
Can we have an admission controller that checks for this user error?
how would an out of tree volume plugin enforce this restriction? Shouldn't we try to model surfacing the error using the flows available to CSI plugins, since the in-tree plugins are planned to migrate to that?
cc I think the ValidateVolumeCapabilities call may be able work for this purpose. We would still need some sort of CSI admission controller/webhook to make the callout to the plugin for this though. Another alternative. Today we already have an admission controller that auto-fills in zone information for GCE PDs. It is being moved into the cloud-specific admission controllers, and we could potentially extend this there.
Today the PVLabel admission controller already overwrites the user-specified label with the correct label, but it's important to have a secondary check in the plugin. Consider this scenario: both a regional and a regular disk exist with name , and the user's PV has the zone label matching the regional disk. The admission controller then retains the user specified label since it's valid. Next, the user deletes the regional disk, and the PV is left unchanged. When a pod is created with this PV, the regular disk will be attached, even though the attach should fail. As for CSI, yeah it looks like we could use as the call is designed for verifying pre-provisioned volumes. And I agree, if there are cloud-specific admission controllers in the future, it'd be good to include this check there instead. When CSI begins to support topology, ideally should also have a topology field. Synced with offline.

Discussion:
if regional && utilfeature.DefaultFeatureGate.Enabled(features.GCERegionalPersistentDisk) { disk, err = gce.getRegionalDiskByName(diskName) if err != nil { <del> glog.V(5).Infof("Could not find regional PD named %q to Attach. Will look for a zonal PD", diskName) err = nil } else { mc = newDiskMetricContextRegional("attach", gce.region) </del> <ins> return err </ins> } <del> } if disk == nil { </del> <ins> mc = newDiskMetricContextRegional("attach", gce.region) } else { </ins> disk, err = gce.getDiskByName(diskName, instance.Zone) if err != nil { return err
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: The test is flaky with the error something like: What you expected to happen: Test should pass /assign
/sig network /area ipvs
/close
Cases are green now. :tada:

Discussion:
} if err := proxier.syncService(svcNameString, serv, true); err == nil { activeIPVSServices[serv.String()] = true <del> if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints, serv); err != nil { </del> <ins> if err := proxier.syncEndpoint(svcName, false, serv); err != nil { </ins> glog.Errorf("Failed to sync endpoint for service: %v, err: %v", serv, err) } } else {

serv.Timeout = uint32(svcInfo.StickyMaxAgeSeconds) } if err := proxier.syncService(svcNameString, serv, true); err == nil { <ins> // check if service need skip endpoints that not in same host as kube-proxy onlyLocal := svcInfo.SessionAffinityType == api.ServiceAffinityClientIP && svcInfo.OnlyNodeLocalEndpoints </ins> activeIPVSServices[serv.String()] = true <del> if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints, serv); err != nil { </del> <ins> if err := proxier.syncEndpoint(svcName, onlyLocal, serv); err != nil { </ins> glog.Errorf("Failed to sync endpoint for service: %v, err: %v", serv, err) } } else {

// There is no need to bind Node IP to dummy interface, so set parameter `bindAddr` to `false`. if err := proxier.syncService(svcNameString, serv, false); err == nil { activeIPVSServices[serv.String()] = true <del> if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints, serv); err != nil { </del> <ins> if err := proxier.syncEndpoint(svcName, false, serv); err != nil { </ins> glog.Errorf("Failed to sync endpoint for service: %v, err: %v", serv, err) } } else {

} for _, epInfo := range proxier.endpointsMap[svcPortName] { <ins> if onlyNodeLocalEndpoints && !epInfo.GetIsLocal() { continue } </ins> newEndpoints.Insert(epInfo.String()) }
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If this may be security issue, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: I run and I got Running with shows What you expected to happen: How to reproduce it (as minimally and precisely as possible): With Kubernetes master branch and in different terminal on the same machine Anything else we need to know?: Environment: Kubernetes version (use ):Cloud provider or hardware configuration: VM via libvirtd OS (e.g. from /etc/os-release): Fedora 27 with golang-1.10.1-1.fc29.x86_64 from rawhide Kernel (e.g. ):Install tools: ?? Others:
/sig cli
/assign
/assign

Discussion:
Selector  string Namespace string <del> Describer func(*meta.RESTMapping) (printers.Describer, error) Builder   *resource.Builder </del> <ins> Describer  func(*meta.RESTMapping) (printers.Describer, error) NewBuilder func() *resource.Builder </ins> BuilderArgs []string

o.BuilderArgs = args o.Describer = f.Describer <del> o.Builder = f.NewBuilder() </del> <ins> o.NewBuilder = f.NewBuilder </ins> // include the uninitialized objects by default // unless user explicitly set --include-uninitialized=false

} func (o *DescribeOptions) Run() error { <del> r := o.Builder. </del> <ins> r := o.NewBuilder(). </ins> Unstructured(). ContinueOnError(). NamespaceParam(o.Namespace).DefaultNamespace().AllNamespaces(o.AllNamespaces).

} func (o *DescribeOptions) DescribeMatchingResources(originalError error, resource, prefix string) error { <del> r := o.Builder. </del> <ins> r := o.NewBuilder(). </ins> Unstructured(). NamespaceParam(o.Namespace).DefaultNamespace(). ResourceTypeOrNameArgs(true, resource).

b.errs = append(b.errs, fmt.Errorf("no unstructured mapper provided")) return b } <del> if b.mapper != nil { </del> <ins> if b.mapper != nil && b.mapper != b.unstructured { </ins> b.errs = append(b.errs, fmt.Errorf("another mapper was already selected, cannot use unstructured types")) return b }

b.errs = append(b.errs, fmt.Errorf("no internal mapper provided")) return b } <del> if b.mapper != nil { </del> <ins> if b.mapper != nil && b.mapper != b.internal { </ins> b.errs = append(b.errs, fmt.Errorf("another mapper was already selected, cannot use internal types")) return b }
Change:
in the integration test in an seemingly unrelated PR
/assign
It is known that may be nil during testing, and we've checked this case in some other places. But not sure why this happens in TestTaintNodeByCondition right now. Looking looking ...
Another case in another unrelated PR https://k8s-
, thanks for your input, I'd like to see what will happen after merged :)
still seeing this: panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1103224] goroutine [running]: (0x0, 0x0, 0x0) +0x107 panic(0x361b8e0, 0x71ac100) +0x229 (ObjectMeta).GetName(...) (EquivalenceCache).RunPredicate(0xc42500cd40, 0x3f62748, 0x3e2aa3f, 0x11, 0xc42f9a2380, 0x523ab40, 0xc4345c8e10, 0x0, 0xc4235e5d50, 0x528e060, ...) +0xc4 (0xc42f9a2380, 0x523ab40, 0xc4345c8e10, 0x0, 0xc4339a3320, 0x528e060, 0xc42436fa40, 0xc42500cd40, 0x527b2c0, 0xc43b40ee70, ...) +0x1de (*genericScheduler).findNodesThatFit.func1(0x0) +0x19a (0xc4235e5d90, 0xc42cdbad20, 0xc43bb83dc0) +0x96 created by +0x10b https://k8s-
is the failing code live in master or feature gated? is this a release blocker?
The failing code is live in master(, we enabled the feature gate in the test), where as the equivalence cache is still in alpha. While the issue is something needs to be fixed in ecache code which is working on, this shouldn't be be blocking 1.11 release as we are still planning to graduate ecache to beta and that has not yet happened. I will send a PR to disable test till the promotion happens. While promoting ecache we can re-enable it.
Equivalence cache implementation is behind a feature gate, and still alpha.

Discussion:
package core import ( <ins> "fmt" </ins> "hash/fnv" "sync"

) (bool, []algorithm.PredicateFailureReason, error) { ec.mu.Lock() defer ec.mu.Unlock() <ins> if nodeInfo == nil || nodeInfo.Node() == nil { // This may happen during tests. return false, []algorithm.PredicateFailureReason{}, fmt.Errorf("nodeInfo is nil or node is invalid") } </ins> fit, reasons, invalid := ec.lookupResult(pod.GetName(), nodeInfo.Node().GetName(), predicateKey, equivClassInfo.hash) if !invalid { return fit, reasons, nil
Change:
/kind failing-test /sig node , , Failure: is the likely culprit. /assign cc
/kind e2e-test-failure
I'll take a look... Thanks!

Discussion:
) func setDesiredConfiguration(initialConfig *kubeletconfig.KubeletConfiguration) { <del> initialConfig.EnforceNodeAllocatable = []string{"pods", "kube-reserved", "system-reserved"} </del> <ins> initialConfig.EnforceNodeAllocatable = []string{"pods", kubeReservedCgroup, systemReservedCgroup} </ins> initialConfig.SystemReserved = map[string]string{ string(v1.ResourceCPU):    "100m", string(v1.ResourceMemory): "100Mi",

} const ( <del> kubeReservedCgroup   = "kube_reserved" systemReservedCgroup = "system_reserved" </del> <ins> kubeReservedCgroup   = "kube-reserved" systemReservedCgroup = "system-reserved" </ins> ) func createIfNotExists(cm cm.CgroupManager, cgroupConfig *cm.CgroupConfig) error {
Change:
/kind feature What happened: When an ELB is provisioned as a LoadBalancer, the client traffic's security group rule can be scoped to specific ranges but the MTU discovery rule cannot. What you expected to happen: The MTU discovery security group rule source range is configurable or matches the values of Anything else we need to know?: The value appears to be . I operate in an environment where as a source range is generally disallowed. Environment: Kubernetes version (use ): 1.10.1 Cloud provider or hardware configuration: AWS Others: ELB, not using ALB in this case
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale
is there any plans to fix this issue in the near future?
yep, PR being worked on over here
I can see the fixed merged in to Kubernetes 1.12

Discussion:
IpProtocol: aws.String("icmp"), FromPort:   aws.Int64(3), ToPort:     aws.Int64(4), <del> IpRanges:   []*ec2.IpRange{{CidrIp: aws.String("0.0.0.0/0")}}, </del> <ins> IpRanges:   ec2SourceRanges, </ins> } permissions.Insert(permission)
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: E2E keeps failing with internal Ginkgo failure of "Node 1 disappeared before completing BeforeSuite" on my PR. https://k8s- What you expected to happen: Not that. How to reproduce it (as minimally and precisely as possible): Run /retest on my PR. It's happened 5 times in a row. Anything else we need to know?: I am almost certain my change does not affect that test suite in any way.
cc
Worked on https://k8s- this morning: https://k8s-
Does this repo on an empty changelist?
Looks like it repos on ci: https://k8s-
Talked with gke dev oncall... internal dashboards look fine, doesn't seem like a gke issue.
Most interesting thing on is maybe the prow bump?
I'm seeing this too on my PR
Trying on a clean PR:
Did something bad happen between versions 342 and 346 on 1.11.0-alpha.2? CI fails to start starts: PR:
Maybe this has something to do with
I'm not sure. That was adding permissions back to nodes so they can delete themselves. It had broken downgrades, so it was reverted. It fixed this: https://k8s-
Testing the theory in
looks like no
https://k8s- so absolutely nothing changed on the test-infra side between the last pass at 9:10 and first failure at 9:55 (prow updated before 9a, same kubetest image, test-infra commit) Seems to be failing here : https://k8s- compared to passing run https://k8s- /unassign /assign
The client go auth plugins are by import. kubectl imports the gcp provider explicitly, but the e2e test apparently doesn't. is in the range when the e2e test started failing, and the description of that PR indicates it trimmed lots of dependencies. I'd look at whether the e2e test had only imported that auth plugin indirectly via one of those removed dependencies in that PR. If the e2e test requires that auth plugin, it should import it like kubectl and the kubeapiserver does:
Are you saying the e2e suite imports kubeadm code? On Fri, May 11, 2018, 19:57 Jordan Liggitt <:
e2e imports kubeadm util: which imports preflight: which imported kubeapiserveroptions prior to : which imported: which imported the apiserver authenticator: which imported the auth plugins:
potential fix in
Thanks Great bug :^)

Discussion:
"//vendor/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", "//vendor/k8s.io/client-go/kubernetes:go_default_library", <ins> "//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library", </ins> ], )

"k8s.io/kubernetes/test/e2e/framework/metrics" "k8s.io/kubernetes/test/e2e/manifest" testutils "k8s.io/kubernetes/test/utils" <ins> // ensure auth plugins are loaded _ "k8s.io/client-go/plugin/pkg/client/auth" </ins> ) var (
Change:
/kind bug The annotation has been deprecated for 2 releases but it seems its replacement was never implemented.

Discussion:
# # -M installs the master set +x <del> curl -L http://bootstrap.saltstack.com | sh -s -- -M -X </del> <ins> curl -L --connect-timeout 20 --retry 6 --retry-delay 10 http://bootstrap.saltstack.com | sh -s -- -M -X </ins> set -x echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd

# # We specify -X to avoid a race condition that can cause minion failure to # install.  See https://github.com/saltstack/salt-bootstrap/issues/270 <del> curl -L http://bootstrap.saltstack.com | sh -s -- -X </del> <ins> curl -L --connect-timeout 20 --retry 6 --retry-delay 10 http://bootstrap.saltstack.com | sh -s -- -X </ins>
Change:
https://k8s- This test is currently failing in sig-release master-blocking and upgrade suites since late 5/11. . This could potentially block Beta v1.11 which is due to be cut Tuesday,5/15. can you please help triage? /kind bug /priority failing-test /priority important-soon /sig cli cc /assign
Here are the failing upgrade jobs
Its all green now and I feel like crying :) thanks

Discussion:
} __EOF__ <ins> # taint/untaint # Pre-condition: node has no taints kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.taints}}" '<no value>' # taint can add a taint kubectl taint node 127.0.0.1 dedicated=foo:PreferNoSchedule kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{.effect}}{{end}}' 'PreferNoSchedule' # taint can remove a taint kubectl taint node 127.0.0.1 dedicated- # Post-condition: node has no taints kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.taints}}" '<no value>' </ins> ### kubectl cordon update with --dry-run does not mark node unschedulable # Pre-condition: node is schedulable kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.unschedulable}}" '<no value>'

if err != nil { return err } <ins> outputObj = cmdutil.AsDefaultVersionedOrOriginal(outputObj, mapping) </ins> printer, err := o.ToPrinter(operation) if err != nil {
Change:
/kind bug What happened: If you start with a minimal Debian image and attempt to install kubernetes- as an artifact from a Bazel build, it will fail with: This has been a known issue in the past, and there are workarounds for CI in place, but it's still unexpected behaviour () What you expected to happen: kubernetes- installs. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): master Cloud provider or hardware configuration: n/a OS (e.g. from /etc/os-release): debian Kernel (e.g. ): n/a Install tools: Others: /sig cluster-lifecycle
hm, this might be a bug in our "fast" tar builder (). if I revert to the bazel-supplied version: then the tarball looks more like we'd expect:
I'll dig a bit more. I started with the assumption that this was a Bazel bug needing a workaround.
cc
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale /assign This should probably still be fixed.
/assign
/lifecycle active
Once is ok & merged, referenced will need updating in
Oops. Didn't realise this issue was getting spammed by my bazel testing.
yep, better not include references in commits. is this resolved?
Yes, fixed this.
we still need to bump the kubernetes/repo-infra dependency in WORKSPACE though. I'll open a PR to do that for kubernetes/kubernetes.

Discussion:
http_archive( name = "io_kubernetes_build", <del> sha256 = "66a44fd5f6357268340d66fbd8a502065445a7c022732fe5f6fd84d9a20f75a3", strip_prefix = "repo-infra-e8f2f7c3decf03e1fde9f30d249e39b8328aa8b0", urls = mirror("https://github.com/kubernetes/repo-infra/archive/e8f2f7c3decf03e1fde9f30d249e39b8328aa8b0.tar.gz"), </del> <ins> sha256 = "21160531ea8a9a4001610223ad815622bf60671d308988c7057168a495a7e2e8", strip_prefix = "repo-infra-b4bc4f1552c7fc1d4654753ca9b0e5e13883429f", urls = mirror("https://github.com/kubernetes/repo-infra/archive/b4bc4f1552c7fc1d4654753ca9b0e5e13883429f.tar.gz"), </ins> ) http_archive(
Change:
To continue the work from and this issue helps track additional methods from the cmdutil.Factory that should further be removed, or turned into helpers, independent from the factory. In [x] MapBasedSelectorForObject [x] ProtocolsForObject [x] SuggestedPodTemplateResources [x] Pauser / Resumer [x] LabelsForObject [x] Command [x] ResolveImage [x] CanBeExposed Most of these should be turned into cmd/util helpers under the package with a specific file for each, and an exposed global variable under actually exposing a mutate-able var for that helper (refer to the examples already there). cc /assign /assign /assign
/sig cli

Discussion:
import ( "fmt" <del> "strings" </del> <ins> "github.com/golang/glog" </ins> "github.com/spf13/cobra" <del> "github.com/golang/glog" </del> "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types"

func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command { o := NewResourcesOptions(streams) <del> resourceTypesWithPodTemplate := []string{} for _, resource := range f.SuggestedPodTemplateResources() { resourceTypesWithPodTemplate = append(resourceTypesWithPodTemplate, resource.Resource) } </del> cmd := &cobra.Command{ Use: "resources (-f FILENAME | TYPE NAME)  ([--limits=LIMITS & --requests=REQUESTS]", DisableFlagsInUseLine: true, Short:   i18n.T("Update resource requests/limits on objects with pod templates"), <del> Long:    fmt.Sprintf(resources_long, strings.Join(resourceTypesWithPodTemplate, ", ")), </del> <ins> Long:    fmt.Sprintf(resources_long, cmdutil.SuggestApiResources("kubectl")), </ins> Example: resources_example, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(o.Complete(f, cmd, args))

"strings" "k8s.io/apimachinery/pkg/api/meta" <del> "k8s.io/apimachinery/pkg/runtime/schema" </del> "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest"

// and which implements the common patterns for CLI interactions with generic resources. NewBuilder() *resource.Builder <del> // SuggestedPodTemplateResources returns a list of resource types that declare a pod template SuggestedPodTemplateResources() []schema.GroupResource </del> // Returns the default namespace to use in cases where no // other namespace is specified and whether the namespace was // overridden.

return restclient.RESTClientFor(clientConfig) } <del> func (f *ring0Factory) SuggestedPodTemplateResources() []schema.GroupResource { return []schema.GroupResource{ {Resource: "replicationcontroller"}, {Resource: "deployment"}, {Resource: "daemonset"}, {Resource: "job"}, {Resource: "replicaset"}, } } </del> func (f *ring0Factory) DefaultNamespace() (string, bool, error) { return f.clientGetter.ToRawKubeConfigLoader().Namespace() }