Skip to content

terraform/k8s-infra-prow-build: add dashboards #2938

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

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

spiffxp
Copy link
Member

@spiffxp spiffxp commented Oct 14, 2021

Related:

I added these to the k8s-infra-prow-build terraform module since it's been handling everything for this GCP project. I'm happy to move to the k8s-infra-monitoring module if that's your preference @ameukam

Actually "deploying" this is going to require a terraform import since the dashboards already exist (these were copied out of audit and piped through jq for legibility)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 14, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spiffxp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2021
@k8s-ci-robot k8s-ci-robot added area/infra Infrastructure management, infrastructure design, code in infra/ area/prow Setting up or working with prow in general, prow.k8s.io, prow build clusters area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 14, 2021
@spiffxp
Copy link
Member Author

spiffxp commented Oct 14, 2021

/uncc @e-blackwelder @michelle192837
/cc @ameukam

/cc @cjwagner @chaodaiG
In case you have other suggestions based on the terraform work you've done for oss-test-infra

@k8s-ci-robot k8s-ci-robot requested review from ameukam, chaodaiG and cjwagner and removed request for michelle192837 and e-blackwelder October 14, 2021 15:46
@spiffxp
Copy link
Member Author

spiffxp commented Oct 14, 2021

/hold
for comment

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 14, 2021
@chaodaiG
Copy link
Contributor

@cjwagner and I were discussing about this, mainly around whether to source control dashboard(s) or not. For us it's still at exploratory state, so we might not want to source control the exported json file, at least not at this time, on the other hand we are not seeing any one manually editing this json for dashboard changes.

The main reason for exporting the json, is for serving the purpose of rolling it back and being able to track history. So alternatively we are considering automating the json export to GCS, which we'll be using a versioned blob so that we can track history. The automation can potentially be done by a periodic prow job, or even Cloud Run etc.

@ameukam
Copy link
Member

ameukam commented Oct 14, 2021

I don't have a strong preference for the moment. I think I want some answers to the meta-questions (#2588) related to k8s-infra monitoring before we decide what's the correct way to handle monitoring dashboards.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2021
@spiffxp
Copy link
Member Author

spiffxp commented Oct 14, 2021

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 14, 2021
@k8s-ci-robot k8s-ci-robot merged commit e15f2f5 into kubernetes:main Oct 14, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 14, 2021
@spiffxp spiffxp deleted the k8s-infra-prow-dashboards branch October 14, 2021 22:02
@spiffxp
Copy link
Member Author

spiffxp commented Oct 14, 2021

for f in dashboards/*.json; do 
  echo $f; 
  file=$(basename $f); 
  name=$(<$f jq -r .name); 
  terraform import google_monitoring_dashboard.dashboards[\"$file\"] $name;
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/infra Infrastructure management, infrastructure design, code in infra/ area/prow Setting up or working with prow in general, prow.k8s.io, prow build clusters area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants