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

Grafana - Add default datasources, dashboards and optional ingress based on contour. #567

Merged
merged 2 commits into from
May 24, 2021
Merged

Grafana - Add default datasources, dashboards and optional ingress based on contour. #567

merged 2 commits into from
May 24, 2021

Conversation

akodali18
Copy link
Contributor

@akodali18 akodali18 commented May 17, 2021

What this PR does / why we need it

This PR includes prometheus as a default datasource, as users install grafana following installing the Prometheus InstalledPackage. This also includes a couple of out of the box dashboards for cluster monitoring.

Which issue(s) this PR fixes

NONE

Describe testing done for PR

Ran make check

$ make check
make -C hack/tools golangci-lint
make[1]: Nothing to be done for `golangci-lint'.
hack/tools/bin/golangci-lint run -v --timeout=5m
INFO [config_reader] Config search paths: [./ /Users/akodali/workspace/akodali18/tce /Users/akodali/workspace/akodali18 /Users/akodali/workspace /Users/akodali /Users /]
INFO [config_reader] Used config file .golangci.yaml
INFO [lintersdb] Active 35 linters: [bodyclose deadcode depguard dogsled dupl errcheck funlen goconst gocritic gocyclo gofmt goheader goimports golint gomnd goprintffuncname gosec gosimple govet ineffassign maligned misspell nakedret noctx nolintlint rowserrcheck staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace]
INFO [loader] Go packages loading at mode 575 (compiled_files|deps|exports_file|imports|name|types_sizes|files) took 3.352614529s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 3.864181ms
INFO [linters context/goanalysis] analyzers took 0s with no stages
INFO [linters context/goanalysis] analyzers took 0s with no stages
INFO [runner] Issues before processing: 89, after processing: 0
INFO [runner] Processors filtering stat (out/in): identifier_marker: 89/89, skip_files: 89/89, exclude-rules: 4/89, path_prettifier: 89/89, filename_unadjuster: 89/89, skip_dirs: 89/89, autogenerated_exclude: 89/89, exclude: 89/89, nolint: 0/4, cgo: 89/89
INFO [runner] processing took 10.92039ms with stages: autogenerated_exclude: 3.891093ms, path_prettifier: 1.971148ms, nolint: 1.794277ms, identifier_marker: 1.407193ms, exclude-rules: 1.220809ms, exclude: 432.674µs, skip_dirs: 176.565µs, cgo: 12.505µs, filename_unadjuster: 10.115µs, max_same_issues: 955ns, uniq_by_line: 547ns, diff: 387ns, sort_results: 360ns, max_from_linter: 328ns, skip_files: 304ns, source_code: 285ns, path_shortener: 229ns, max_per_file_from_linter: 218ns, severity-rules: 206ns, path_prefixer: 192ns
INFO [runner] linters took 1.563149412s with stages: goanalysis_metalinter: 1.550210679s, unused: 1.916359ms
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 51 samples, avg is 95.7MB, max is 141.3MB
INFO Execution took 4.933399377s
hack/check-mdlint.sh
hack/check-shell.sh

Used the hack/addon-dev/dev-deploy-addon.sh script to successfully upload and deploy the new bundle successfully.
Port forwarded grafana and verified that grafana contains a default datasource and two default dashboards.

For Optional Ingress testing: Deployed Grafana on a tkg environment with contour as ingress. Verified using fqdn that grafana is accessible.

Special notes for your reviewer

NONE

Does this PR introduce a user-facing change?

Users will be able to see a default prometheus datasource if they install grafana after installing the Prometheus package.
They will also get out of the box dashboards for cluster monitoring.

Cc: @LukeWinikates

@jpmcb jpmcb self-assigned this May 18, 2021
@akodali18 akodali18 changed the title Grafana - Add default datasources and dashboards. Grafana - Add default datasources, dashboards and optional ingress based on contour. May 19, 2021
@LukeWinikates
Copy link
Contributor

lgtm

@@ -32,5 +64,9 @@ grafana:
secret:
type: "Opaque"
admin_user: "YWRtaW4="
admin_password: ""
admin_password: "cGFzc3dvcmQ="
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is the base64 for "password"? Might be worth documenting this default value in the future so customers don't get confused. Otherwise LGTM!

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.

3 participants