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

feat: expose grafana and generate admin password #237

Merged
merged 5 commits into from
Nov 13, 2023

Conversation

LucaLanziani
Copy link
Member

@LucaLanziani LucaLanziani commented Oct 27, 2023

What does this PR do?

Please include a summary of the change, and please also include relevant motivation and context. List any dependencies that are required for this change.

Related issues

Please include a link to the issues related to this Pull Request.

Checklist before merging

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have checked the contributing document.
  • I have checked the existing Pull Requests to see whether someone else has raised a similar idea or question.
  • I have added tests that prove my fix is effective or that my feature works.

- expose grafana on grafana.externalDomain
- fail if externalDomain is not defined
- generate the grafana admin password
- add a tilt resource to read and output the generated password
most of the paths can be generated appending the addon name to the
`/addons/` prefix
@LucaLanziani
Copy link
Member Author

LucaLanziani commented Oct 27, 2023

To test this PR, destroy the cluster with:

make tilt-down

Recreate the whole stack

make

Get the grafana passwor from tilt
image

Get the cluster ingress address with

kubectl get service -n istio-ingress istio-ingressgateway -o go-template='{{(index .status.loadBalancer.ingress 0).ip}}'

Add the following entry to your hosts file

<ingress-address> grafana.example.com

Navigate to grafana.example.com and try to login as the admin user and the password you got from tilt

@francardoso93
Copy link

I've destroyed and recreated cluster multiple times, and it doesn't always work, recorded here:

FailGrafanaPassword.mp4

After finding this behavior, I've deleted the pod and awaited for the new one to be in running state. Now when I've tried again, it worked.

Main theory is that this problem happens when pod is created before the secret.

@francardoso93
Copy link

No test changes required?

@mablanco mablanco enabled auto-merge (squash) November 13, 2023 13:25
@mablanco mablanco merged commit d31d28b into main Nov 13, 2023
8 of 10 checks passed
@mablanco mablanco deleted the feature/expose-services branch November 13, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants