Refresh infra scripts to address audit followups, reduce output noise#1859
Refresh infra scripts to address audit followups, reduce output noise#1859k8s-ci-robot merged 16 commits intokubernetes:mainfrom
Conversation
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c224676 to
22e6015
Compare
|
I ran |
|
I ran |
|
I ran |
|
Ran |
|
Continued with |
|
Going to disable extraneous services in staging projects as listed in #1675 (comment) export PLAN_URL=https://gist.githubusercontent.com/spiffxp/1cbf779d7dc1c025a445b91909f55bf7/raw/49971cd6699c4dace4f47fcba8c068c212e0ad2e/k8s-staging-service-disable-plan.yaml
K8S_INFRA_ENSURE_ONLY_SERVICES_WILL_FORCE_DISABLE=true \
./ensure-staging-storage.sh \
$(curl -s "${PLAN_URL}" \
| yq -r 'keys | .[]' \
| sed -e 's/k8s-staging-//g') |
|
Extraneous services in k8s-staging-* projects have been disabled, see https://gist.github.com/spiffxp/1cbf779d7dc1c025a445b91909f55bf7 for log output |
22e6015 to
3bd55d2
Compare
e8c7436 to
072ef48
Compare
specifically - use ensure_only_services - use ensure_secret_role_binding - use TMPDIR
specifically - use ensure_only_services - use lib_iam funcs
specifically - use ensure_only_services - use lib_iam and lib_gcs funcs for role bindings - use TMPDIR instead of non-portable mktemp -p
specifically - only create predefined projects (same bug ensure-staging-projects had) - fix some shellcheck nits - use ensure_only_services - add support for resetting ssh-keys (since it's not clear if we want to do this by default, gate behind setting the obnoxiously long env var K8S_INFRA_ENSURE_E2E_PROJECTS_RESETS_SSH_KEYS=true - reduce output noise by using lib_iam funcs
072ef48 to
28a3c3b
Compare
specifically - use ensure_only_services to clean up manually enabled services - use lib_iam funcs for less noise - move k8s-staging-releng-test special case into its own func to prep making this non-special-case for k8s-infra-prow-build-trusted - sort projects
28a3c3b to
5357b89
Compare
|
As of 5357b89 I ran the following:
Earlier (see comments above), I ran:
I didn't touch them as part of this PR, but for grins (and mostly to close #299), I also ran:
|
|
/lgtm |
|
Taking one last look at latest audit PR results before removing hold #1874 |
|
/hold cancel |
|
Related to refactoring infra/gcp, ref: #516 |
I've run these a few times locally and the results are showing up in audit PRs, so I should probably share what I'm working on.
Will update this description to link to issues these fixes resolve once I've taken care of the WIP commits
Should allow us to address #1675
K8S_INFRA_ENSURE_ONLY_SERVICES_WILL_FORCE_DISABLE=true ./infra/gcp/ensure-staging-storage.shshould disable all of the unexpected services. I plan on doing a first pass without that set to get a log of which projects would have which services disabled first.Fixes #299
user:foo roles/ownerbinding removed immediately after the project is created. I plan on running ./infra/gcp/*.sh to ensure theroles/ownerbinding is removed for all existing projects.See individual commits for details