-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fetch and set up secret for skaffold-metrics project #6104
Fetch and set up secret for skaffold-metrics project #6104
Conversation
deploy/setup-secret.sh
Outdated
while read -r KEY_ID | ||
do | ||
if gsutil cp gs://${BUCKET_ID}/${KEY_ID}.json ${KEY_FILE}; then | ||
if gsutil cp gs://${BUCKET_ID}/${LATEST_GCS_PATH}.json ${KEY_FILE}; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LATEST_GCS_PATH=keys.json so I think this will be keys.json
.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
@@ -30,10 +31,10 @@ done | |||
|
|||
function download_existing_key() { | |||
# Download a valid key created within the past two weeks. | |||
KEY_IDS=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@k8s-skaffold.iam.gserviceaccount.com --project=k8s-skaffold --managed-by=user --filter="validAfterTime>-P2W" --format="value(name)") | |||
KEY_IDS=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@${METRICS_PROJECT_ID}.iam.gserviceaccount.com --project=${METRICS_PROJECT_ID} --managed-by=user --format="value(name)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is this still needed? --filter="validAfterTime>-P2W"
I'm guessing that w/ the new project and expiration date it isn't, just verifying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. new keys live longer and hence we don't need that check.
5d7ae87
to
118a557
Compare
118a557
to
b9c4244
Compare
Codecov Report
@@ Coverage Diff @@
## master #6104 +/- ##
=======================================
Coverage 70.18% 70.18%
=======================================
Files 475 475
Lines 18156 18156
=======================================
Hits 12743 12743
Misses 4476 4476
Partials 937 937
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In this PR
No code change required for instrumentation as project id is derived from the secret itself.
Earlier dashboard can be used as k8s-skaffold is defines as scoped project https://cloud.google.com/monitoring/settings#concept-scope