<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.): no</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): "is:issue is:open federation service", "is:issue is:open federated service"</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:16:57Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:10:32Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} "><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:10:32Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} 
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): jessie (Debian 8)</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux ip-172-20-110-96 4.4.23-k8s <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Fri Sep 30 13:51:02 UTC 2016 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>: kops</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
We are applying label selectors to a service that is federated. e.g.,</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="apiVersion: v1
kind: Service
metadata:
  name: date-time-federated
spec:
  selector:
    name: update-demo
    version: black
  ports:
    -
      protocol: TCP
      port: 8080
      targetPort: 8080
  type: LoadBalancer"><pre class="notranslate"><span class="pl-ent">apiVersion</span>: <span class="pl-c1">v1</span>
<span class="pl-ent">kind</span>: <span class="pl-s">Service</span>
<span class="pl-ent">metadata</span>:
  <span class="pl-ent">name</span>: <span class="pl-s">date-time-federated</span>
<span class="pl-ent">spec</span>:
  <span class="pl-ent">selector</span>:
    <span class="pl-ent">name</span>: <span class="pl-s">update-demo</span>
    <span class="pl-ent">version</span>: <span class="pl-s">black</span>
  <span class="pl-ent">ports</span>:
    -
      <span class="pl-ent">protocol</span>: <span class="pl-s">TCP</span>
      <span class="pl-ent">port</span>: <span class="pl-c1">8080</span>
      <span class="pl-ent">targetPort</span>: <span class="pl-c1">8080</span>
  <span class="pl-ent">type</span>: <span class="pl-s">LoadBalancer</span></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
We expect the federated service to be updated on all clusters. Instead, the controller manager reports no changes to the service.</p>
<p dir="auto">When we print the service YAML from the federation, it contains the new label selectors. When we print the service YAML directly from the clusters' APIs (who are members of the federation) there are no updates to the service whatsoever.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Set <code class="notranslate">--v=5</code> on the federation controller manager. Create a federated service. Add some label selectors to the service and apply it through the federation. Watch the federation controller manager logs while applying the new label selectors and observe the logs that indicate there is no update because there are no perceived changes to the service.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
We see that the controller manager is only evaluating the ports for changes to the service. See the  <a href="https://github.com/kubernetes/kubernetes/blob/v1.4.0/federation/pkg/federation-controller/service/servicecontroller.go#L397-L411">1.4.0 reference</a> and the <a href="https://github.com/kubernetes/kubernetes/blob/master/federation/pkg/federation-controller/service/servicecontroller.go#L419-L433">master reference</a>.</p>
<p dir="auto">Do we have the correct expectation that update criteria should be broader than just changes to ports?</p>
<p dir="auto">Our use case is for deployment update strategies like sticking a canary under the service.</p>
<p dir="auto">Thanks a bunch!</p>
<p dir="auto">Reported by a couple users. For example:<br>
<a href="http://stackoverflow.com/questions/34732597/kubernetes-pod-cant-connect-through-service-to-self-only-to-other-pod-contai" rel="nofollow">http://stackoverflow.com/questions/34732597/kubernetes-pod-cant-connect-through-service-to-self-only-to-other-pod-contai</a></p>
<p dir="auto">If deliberate, we should document it. I don't see this mentioned in services.md, for instance.</p>