Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a Warning Icon on a StatefulSet if the Pods can't be created #4205

Closed
kimwnasptd opened this issue Aug 17, 2019 · 2 comments · Fixed by #5055
Closed

Have a Warning Icon on a StatefulSet if the Pods can't be created #4205

kimwnasptd opened this issue Aug 17, 2019 · 2 comments · Fixed by #5055
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@kimwnasptd
Copy link

kimwnasptd commented Aug 17, 2019

What would you like to be added

Have a warning icon instead of the green circle check for StatefulSets if the Pods cannot be created.

For example, if I create a StatefulSet with a non existent ServiceAccount, then the StatefulSet controller will not be able to create the Pod to the API Server. The problem is that the StatefulSet's Status doesn't reflect that error and only shows replicas: 0. But, we can get this info by looking at the StatefulSet's Events.

Why is this needed

If the StatefulSet controller can't create the Pods, then the UI will show a green check which implies that the STS is OK.

Althought, on the card it shows that there are 0/1 Pods available and I can see what is wrong if I click on the STS and see its Events. But I think it would be useful if the icon would be a warning to indicate that something is wrong.

Comments

You can check this behavior by creating this StatefulSet

apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  ports:
  - port: 80
    name: web
  clusterIP: None
  selector:
    app: nginx
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  selector:
    matchLabels:
      app: nginx # has to match .spec.template.metadata.labels
  replicas: 1
  serviceName: "nginx"
  template:
    metadata:
      labels:
        app: nginx # has to match .spec.selector.matchLabels
    spec:
      terminationGracePeriodSeconds: 10
      serviceAccountName: nonexistent-service-account-test
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeMounts:
        - name: www
          mountPath: /usr/share/nginx/html
@kimwnasptd kimwnasptd added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 17, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 15, 2019
@maciaszczykm
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants