Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Add rolebinding yaml for kubernetes/manifest-monitoring #739

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

unicell
Copy link

@unicell unicell commented Sep 21, 2017

Post k8s 1.6, RBAC enforces more strict policy for service account
outside of "kube-system"[1]. Since grafana-import-dashboards Job has an
init-container that need to reach endpoints API, this change will assign
a view clusterrole to default service account.

[1] https://kubernetes.io//docs/admin/authorization/rbac/#upgrading-from-15

  • Read the contribution guidelines
  • Include a reference to a related issue in this repository
  • A description of the changes proposed in the pull request

Post k8s 1.6, RBAC enforces more strict policy for service account
outside of "kube-system"[1]. Since grafana-import-dashboards Job has an
init-container that need to reach endpoints API, this change will assign
a `view` clusterrole to `default` service account.

[1] https://kubernetes.io//docs/admin/authorization/rbac/#upgrading-from-15
@unicell
Copy link
Author

unicell commented Sep 21, 2017

@philwinder could you help to take a look? This fixes the problem I'm hitting when deploying microservice-demo on Kubernetes 1.7 cluster.

@etiennetremel
Copy link
Contributor

@unicell thanks for pointing this out. My suggestion would be to replace the init container script to directly call the Grafana endpoint and remove the Kubernetes API call.

Something that could look like this:

echo "Waiting for Grafana to become ready..."
until curl -s -o /dev/null http://grafana/public/img/grafana_icon.svg
do
  sleep 1
done
echo "Grafana is ready."

What do you think?

@unicell
Copy link
Author

unicell commented Oct 6, 2017

@etiennetremel Yeah, this way it certainly removes the complexity. The only remaining question I have is, is there more canonically way to test Grafana API availability, rather than relying on internal knowledge (public/img/grafana_icon.svg)

@etiennetremel
Copy link
Contributor

etiennetremel commented Oct 9, 2017

@unicell yes, I was not up to date with the latest change, they introduced a /api/health endpoint some time ago, you can use this one instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants