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

Remove scripts related to k8s-artifacts-prod-vuln-dashboard #1643

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,3 @@ metadata:
iam.gke.io/gcp-service-account: k8s-infra-gcr-promoter@k8s-artifacts-prod-bak.iam.gserviceaccount.com
name: k8s-infra-gcr-promoter-bak
namespace: test-pods
---
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
iam.gke.io/gcp-service-account: k8s-infra-gcr-vuln-dashboard@k8s-artifacts-prod.iam.gserviceaccount.com
name: k8s-infra-gcr-vuln-dashboard
namespace: test-pods
38 changes: 0 additions & 38 deletions infra/gcp/ensure-prod-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,44 +372,6 @@ color 6 "Handling special cases"
"${PROD_PROJECT}" \
$(svc_acct_email "${PROD_PROJECT}" "${PROMOTER_VULN_SCANNING_SVCACCT}")
done

color 6 "Ensuring prod promoter vuln-dashboard svcacct exists"
ensure_service_account \
"${PROD_PROJECT}" \
"${VULN_DASHBOARD_SVCACCT}" \
"k8s-infra container image vuln dashboard"
Comment on lines -377 to -380
Copy link
Member

Choose a reason for hiding this comment

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

will remove this post-merge

Copy link
Member

Choose a reason for hiding this comment

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

removed


color 6 "Empowering promoter-scanning namespace to use prod promoter vuln-dashboard svcacct"
for project in "${PROW_TRUSTED_BUILD_CLUSTER_PROJECTS[@]}"; do
empower_ksa_to_svcacct \
"${project}.svc.id.goog[test-pods/k8s-infra-gcr-vuln-dashboard]" \
"${PROD_PROJECT}" \
$(svc_acct_email "${PROD_PROJECT}" "${VULN_DASHBOARD_SVCACCT}")
done

# Special case: grant the k8s-infra-gcr-vuln-dashboard account access to
# write to the prod vuln dashboard GCS bucket.
ensure_prod_gcs_bucket "${PROD_PROJECT}" "gs://${PROD_PROJECT}-vuln-dashboard" 2>&1 | indent
Copy link
Member

Choose a reason for hiding this comment

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

this has been manually removed already


color 6 "Empowering vuln-dashboard svcacct to vuln-dashboard bucket"
empower_svcacct_to_write_gcs_bucket \
"$(svc_acct_email "${PROD_PROJECT}" "${VULN_DASHBOARD_SVCACCT}")" \
"gs://${PROD_PROJECT}-vuln-dashboard"

# Special case: grant the k8s-infra-gcr-vuln-dashboard account access to
# container analysis results for the prod project.
color 6 "Empowering vuln-dashboard svcacct to prod vulnerability scanning"
empower_service_account_for_cip_vuln_scanning \
"$(svc_acct_email "${PROD_PROJECT}" "${VULN_DASHBOARD_SVCACCT}")" \
"${PROD_PROJECT}"

# Special case: don't use retention on vulnerability dashboard bucket
# 'ci-release-vulndash-update' runs periodically in Prow and
# requires access to overwrite the dashboard's html.
# This should maybe one day be wired up as a Netlify site, but
# one step at a time!
color 6 "Removing retention on the ${PROD_PROJECT}-vuln-dashboard bucket"
gsutil retention clear "gs://${PROD_PROJECT}-vuln-dashboard"
) 2>&1 | indent

color 6 "Done"
3 changes: 0 additions & 3 deletions infra/gcp/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ PROMOTER_SVCACCT="k8s-infra-gcr-promoter"
# The service account name for the image promoter's vulnerability check.
PROMOTER_VULN_SCANNING_SVCACCT="k8s-infra-gcr-vuln-scanning"

# The service account name for the k8s vulnerability dashboard.
VULN_DASHBOARD_SVCACCT="k8s-infra-gcr-vuln-dashboard"

# The service account name for the GCR auditor (Cloud Run runtime service
# account).
AUDITOR_SVCACCT="k8s-infra-gcr-auditor"
Expand Down