-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init kube-style org config Signed-off-by: Ian Rudie <[email protected]> * update teams, refine org Signed-off-by: Ian Rudie <[email protected]> * begin working on the script which manages the org Signed-off-by: Ian Rudie <[email protected]> * define workflow to update org, dry run only Signed-off-by: Ian Rudie <[email protected]> * update.sh fix to prevent unintended file execution Signed-off-by: Ian Rudie <[email protected]> * add notify-call-to-vote team to org Signed-off-by: Ian Rudie <[email protected]> --------- Signed-off-by: Ian Rudie <[email protected]>
- Loading branch information
Showing
3 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Manage K8sGateway Org | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- org.yaml | ||
jobs: | ||
prep: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout community repo | ||
uses: actions/checkout@v4 | ||
- name: create token | ||
run: | | ||
echo $GH_TOK >> ./GH_TOK | ||
env: | ||
GH_TOK: ${{secrets.GATEWAYBOT}} | ||
- name: update org | ||
run: | | ||
script/org/update.sh # --confirm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
orgs: | ||
k8sgateway: | ||
admins: | ||
- ilevine | ||
- ilrudie | ||
- linsun | ||
- nfuden | ||
- sam-heilbron | ||
- williamgrh | ||
- yuval-k | ||
members: | ||
- artberger | ||
- craigbox | ||
- danehans | ||
- jbohanon | ||
- jenshu | ||
- josh-pritchard | ||
- kevin-shelaga | ||
- lgadban | ||
- Nadine2016 | ||
- shashankram | ||
- sheidkamp | ||
- Sodman | ||
- stevenctl | ||
teams: | ||
community-maintainers: | ||
description: "" | ||
members: | ||
- craigbox | ||
- danehans | ||
- ilrudie | ||
- jenshu | ||
- linsun | ||
privacy: closed | ||
repos: | ||
community: maintain | ||
controller-maintainers: | ||
description: "" | ||
members: | ||
- danehans | ||
- jenshu | ||
- lgadban | ||
- nfuden | ||
- sam-heilbron | ||
- shashankram | ||
- sheidkamp | ||
- stevenctl | ||
- yuval-k | ||
privacy: closed | ||
repos: | ||
k8sgateway: maintain | ||
documentation-maintainers: | ||
description: "" | ||
members: | ||
- artberger | ||
- craigbox | ||
- Nadine2016 | ||
- williamgrh | ||
privacy: closed | ||
repos: | ||
k8sgateway.io: maintain | ||
notify-call-to-vote: | ||
description: This team grants no permissions, it should be notified of all votes. | ||
members: | ||
- ilrudie | ||
privacy: closed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -x | ||
|
||
REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P) | ||
readonly REPO_ROOT | ||
|
||
# these org admins are required for safety! | ||
# peribolos requires that the user it runs as be an org admin, also for safety | ||
readonly org_admins=( | ||
ilevine | ||
ilrudie | ||
linsun | ||
yuval-k | ||
) | ||
|
||
cd "${REPO_ROOT}" | ||
|
||
readonly BIN_PATH="${REPO_ROOT}/bin" | ||
|
||
cmd="${BIN_PATH}/peribolos" | ||
|
||
# remove any existing peribolos, always install to prevent execution of an unintended file | ||
if [ -e "${cmd}" ]; then | ||
rm "${cmd}" | ||
fi | ||
|
||
# install peribolos | ||
GOBIN=${BIN_PATH} go install sigs.k8s.io/prow/cmd/peribolos@main | ||
|
||
# maybe add --ignore-invitees | ||
args=( | ||
--github-token-path="${REPO_ROOT}/GH_TOK" | ||
--config-path="${REPO_ROOT}/org.yaml" | ||
--fix-org | ||
--fix-org-members | ||
--fix-teams | ||
--fix-team-members | ||
--fix-team-repos | ||
"${org_admins[@]/#/--required-admins=}" | ||
) | ||
|
||
# if you are feeling brave, run this script with org:admin and add the `--confirm` | ||
"${cmd}" "${args[@]}" "${@}" |