Change:
t.Errorf("syncPetSet should return actual amount of pods") } } <ins> type fakeClient struct { fake_internal.Clientset petSetClient *fakePetSetClient } func (c *fakeClient) Apps() unversioned.AppsInterface { return &fakeApps{c, &fake.FakeApps{}} } type fakeApps struct { *fakeClient *fake.FakeApps } func (c *fakeApps) PetSets(namespace string) unversioned.PetSetInterface { c.petSetClient.Namespace = namespace return c.petSetClient } type fakePetSetClient struct { *fake.FakePetSets Namespace string replicas  int } func (f *fakePetSetClient) UpdateStatus(petSet *apps.PetSet) (*apps.PetSet, error) { f.replicas = petSet.Status.Replicas return petSet, nil } func TestPetSetReplicaCount(t *testing.T) { fpsc := &fakePetSetClient{} psc, _ := newFakePetSetController() psc.kubeClient = &fakeClient{ petSetClient: fpsc, } ps := newPetSet(3) psKey := fmt.Sprintf("%v/%v", ps.Namespace, ps.Name) psc.psStore.Store.Add(ps) if err := psc.Sync(psKey); err != nil { t.Errorf("Error during sync of deleted petset %v", err) } if fpsc.replicas != 1 { t.Errorf("Replicas count sent as status update for PetSet should be 1, is %d instead", fpsc.replicas) } } </ins>

Discussion:
Is this a request for help? Nope What keywords did you search in Kubernetes issues before filing this one? petset replicas current desired Is this a BUG REPORT or FEATURE REQUEST? BUG Kubernetes version Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+", GitCommit:"", GitTreeState:"not a git tree", BuildDate:"2016-09-01T10:49:36Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+", GitCommit:"", GitTreeState:"not a git tree", BuildDate:"2016-09-01T10:49:36Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} Environment: Cloud provider or hardware configuration: 24 cores, 64 GB RAM OS Arch Linux Kernel (e.g. ): Linux hostname 4.4.13-1-lts SMP Wed Jun 8 16:44:31 CEST 2016 x86_64 GNU/Linux Install tools: local-cluster- Others: What happened: While creating PetSet based on this tutorial: first PetSet pod was stuck in pending state due to lack of PersistentVolumes in cluster. When getting the petset info via I expected to see "CURRENT" set to 1, while the kubectl output was as follows: While clearly shows that only one pod is created: In json and yaml output, status.replicas value was also 2. What you expected to happen: I expected that CURRENT value shown by kubectl would be due to only one pod being created. How to reproduce it (as minimally and precisely as possible): Create via on empty cluster and run and . Anything else do we need to know: Nope
CURRENT is the number of pods that have been created, not that they are READY. See for example the latest api change for replica sets where we exactly for this reason. All controllers (petsets, daemonsets, deployments, etc.) should have ReadyReplicas cc:
See also
I guess it doesn't work anyway, since only one pod was created for this PetSet, but the CURRENT says that 2 were created. I will change bug description then.

Hmm, the idea is to sync every pet periodically, but only create them one at a time. The logic that counts status.replicas is wrong. This counter shouldn't be incremented in the case where we didn't update/sync or create a pet: Today we do increment it all pet creation is blocked on the first pet becoming unhealthy. Should be an easy fix if anyone wants to jump in ( fyi) otherwise I'll get to it once 1.4 is out.
I can try to fix it if that's OK. Thanks for the pointer to the source code!
Please do, co-assigned