Commit Graph

1217 Commits

Author SHA1 Message Date
Bassem Dghaidi 3021be73c7
Add security guidelines and policy 2022-12-13 11:39:39 +00:00
Bassem Dghaidi adb5bc9f66
Add code of conduct 2022-12-13 11:38:01 +00:00
Bassem Dghaidi 466be710ee
Add the actions-runtime team to codeowners 2022-12-13 06:24:20 -05:00
Yusuke Kuoka acbce4b70a
runner: Expose dind runner dockerd logs via stdout/stderr (#2082)
* runner: Expose dind runner dockerd logs via stdout/stderr

We've been letting supervisord to run dockerd within the dind runner container presuming it would avoid producing zombie processes. However we used dumb-init to wrap supervisord to wrap dockerd. In this picture supervisord might be unnecessary and dumb-init is actually a correct pid 0 for containers.

Rmoving supervisord removes this unnecessary complexity, while saving a little memory, and more importantly logs from dockerd is exposed via stdout/stderr of the container for easy access from kubectl-logs, fluentd, and so on.
2022-12-12 08:39:35 +09:00
Callum Tait 418f719bdf
chore: highlight watch namespace (#2087)
* chore: highlight watch namespace

* chore: wording

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-12 08:39:04 +09:00
Yusuke Kuoka 300e93c59d
Expose workflow job metrics via new actions-metrics-server (#2057)
* Add workflow job metrics to Github webhook server

* Fix handling of workflow_job.Conclusion

* Make the prometheus metrics exporter for the workflow jobs a dedicated application

* chart: Add support for deploying actions-metrics-server

* A few improvements to make it easy to cover in E2E

* chart: Add missing actionsmetrics.service.yaml

* chart: Do not modify actionsMetricsServer.replicaCount

* chart: Add documentation for actionsMetrics and actionsMetricsServer

Co-authored-by: Colin Heathman <cheathman@benchsci.com>
2022-12-10 08:24:28 +09:00
renovate[bot] 0285da1a32
fix(deps): update kubernetes packages to v0.25.5 (#2083)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-09 07:03:21 +09:00
renovate[bot] b8e5185fef
fix(deps): update module golang.org/x/oauth2 to v0.3.0 (#2074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-08 07:09:07 +09:00
renovate[bot] 187479f08c
chore(deps): update golang docker tag to v1.19.4 (#2076)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-08 07:07:47 +09:00
Callum Tait 31244dd61b
ci: add new runners to deploy (#2081) 2022-12-08 07:06:35 +09:00
Callum Tait a8417ec67e
feat: dind-rootless 22.04 runner (#2033)
* feat: dind-rootless 22.04 runner

* runner: Bring back packages needed by rootlesskit

* e2e: Update E2E buildvars with ubuntu 22.04 dockerfiles

* feat: use new uid for runner user

* e2e: Make it possible to inject ubuntu version via envvar for actiosn-runner-dind image

* doc: Use fsGroup=1001 for IRSA on Ubuntu 22.04 runner

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-12-07 19:02:35 +09:00
Callum Tait 775dc60c94
feat: dind 22.04 runner (#2030)
* feat: dind 22.04 runner

* chore: remove zstd

* chore: remove test

* chore: add missing make targets and bcump

* runner: Add missing iptables package to dind ubuntu 22.04

* feat: use new ids

* feat: use new ids

* Revert "feat: use new ids"

This reverts commit 2e4e2bb6d9.

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-12-07 14:20:45 +09:00
Yusuke Kuoka ecd7531917
feat: Set runner UID and docker GID to match github actions runner (#2077)
This is a successor to #1688

Co-authored-by: Suhas Gaddam <sgaddam@trueaccord.com>
2022-12-07 14:17:57 +09:00
Callum Tait ad1989072e
feat: use new uid for 22.04 images (#2079)
* feat: use new uid for 22.04 images

* feat: use new gid for docker group

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-07 14:14:31 +09:00
Callum Tait fe05987eea
ci: use single quotes (#2067)
* ci: use single quotes

* ci: add 22.04 image to renovate

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-02 09:14:29 +09:00
Callum Tait bd392c3665
ci: fix runners workflow 2022-12-01 22:35:31 +00:00
renovate[bot] 58d80a7c12
fix(deps): update module go.uber.org/zap to v1.24.0 (#2059)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-02 07:30:58 +09:00
Callum Tait 212b9daec3
feat: 22.04 default runner image (#2050)
* feat: 22.04 default runner image

* docs: update bundled software

* chore: remove test in Dockerfile

* ci: add 22.04 runner build

* chore: remove build-essential

* chore: remove python path entry

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-02 07:29:59 +09:00
Callum Tait 28ea8d4e7b
ci: align renovate config with new names (#2065) 2022-12-02 06:40:49 +09:00
Callum Tait c1fb793773
feat: bump docker and hooks in 20.04 (#2063)
Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-02 06:40:12 +09:00
Callum Tait 63d2cbfdaa
ci: multiple ubuntu version (#2036)
* ci: prepare ci for multiple runners

* chore: rename dockerfiles

* chore: sup multiple os in makefile

* chore: changes to support multiple versions

* chore: remove test for TARGETPLATFORM

* chore: fixes and add individual targets

* ci: add latest tag back in

* ci: remove latest suffix tag

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-12-01 00:00:16 +09:00
Yusuke Kuoka 18077a1e83
docs: do not recommend combining pull-based autoscaling with webhook-based autoscaling (#2051)
Ref https://github.com/actions-runner-controller/actions-runner-controller/issues/1962
2022-11-27 19:31:12 +00:00
Yusuke Kuoka 3ae9f09532
e2e: Do honor the runner graceful stop timeout also in the dockerd sidecar prestop hook (#2044)
The runner graceful stop timeout has never been propagated to the dind sidecar due to configuration error in E2E. This fixes it, so that we can verify that the dind sidecar prestop can respect the graceful stop timeout.

Related to #1759
2022-11-27 11:13:56 +09:00
Yusuke Kuoka 96a930bfd9
Fix runner pod to not stuck in Terminating when runner got deleted before pod scheduling (#2043)
This fixes the said issue that I found while I was running a series of E2E tests to test other features and pull requestes I have recently contributed.
2022-11-27 11:13:38 +09:00
Alex Grand 877c93c5c3
Fix `admissionWebHooks.caBundle` template formatting (#2049)
* Use quote on caBundle values for the webhook deployment

* Drop unrecognized --log-format arg on the manager container

* Update custom cert docs with the default san/secret names

* Revert "Drop unrecognized --log-format arg on the manager container"

This reverts commit d76dd67317.
2022-11-27 09:46:33 +09:00
Igor Sarkisov 95c324b550
Add rootless runner to the Makefile and improve target platform handling. (#2005)
* Add rootless runner to the Makefile and improve target platform handling

* Add rootless image to docker-push-ubuntu target

* Update runner/Makefile

* Update runner/actions-runner-dind-rootless.dockerfile

* Update runner/actions-runner-dind.dockerfile

* Update runner/actions-runner.dockerfile

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-26 18:10:26 +09:00
renovate[bot] 5e8f576f65
fix(deps): update kubernetes packages to v0.25.4 (#2008)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-26 13:14:43 +09:00
Callum Tait cc15ff0119
docs: remove caveat from useRunnerGroupsVisibility (#2034) 2022-11-26 13:09:20 +09:00
Gwyn 8318523627
Update Etcd To Make `make test-with-deps` Work On macOS (#2013)
* Fixes etcd for macos.

The older version of etcd packaged in kubebuilder 2.3.2 for Darwin
throws a stack trace upon attempted startup.

This retrieves the latest version of etcd from coreos and installs
that instead; this works on all OSes.

I removed some redundancy in the Makefile around test dependency
retrieval, too.

* Capture further OS specific test command tweaks.
2022-11-26 13:08:24 +09:00
Callum Tait fcb65b046b
ci: fix multi-arch runner builds (#2048)
* ci: fix multi-arch runner builds
2022-11-25 15:48:18 +00:00
Callum Tait 87f566e1e6
feat: add docker-compose and clean up the default runner (#1924)
* feat: clean and add docker-compose

* feat: make docker compose download arch aware

* fix: use new ARG name

* fix: correct case in url

* ci: add some debug output to workflow

* ci: add ARG for docker

* fix: various fixes

* chore: more alignment changes

* chore: use /usr/bin over /usr/local/bin

* chore: more logical order

* fix: add recursive flag

* chore: actions/runner stuff with actions/runner

* ci: bump checkout to latest

* fix: rootless build

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-25 10:31:13 +09:00
Callum Tait a786dae450
docs: disable runner log levels (#2042) 2022-11-25 08:48:58 +09:00
Callum Tait 666ce8f917
feat: add docker-compose and clean up the dind runner (#1925)
* feat: align runner and add docker compose

* feat: make docker compose download arch aware

* fix: use new ARG name

* chore: alignment stuff

* chore: use /usr/bin over /usr/local/bin

* chore: replicate default runner order

* feat: set-up actions container hooks

* chore: small flags

* fix: install all docker components

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-11-22 12:10:38 +09:00
Callum Tait 9ba4b6b96a
chore: clean up the dind rootless dockerfile so it aligns with the other runners (#1926)
* chore: align dockerfile with other runners

* chore: superfluous comments

* feat: make docker compose download arch aware

* chore: stuff

* chore: align runner tool cache set-up

* fix: copy and paste error

* feat: add container hooks

* feat: add rootless into makefile

* feat: support all architectures and fix compose

* fix: export SKIP_IPTABLES correctly

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-11-22 12:10:28 +09:00
Yusuke Kuoka ae86b1a011
Use the patch API instead to prevent unnecessary field updates (#1998)
Fixes #1916
2022-11-22 12:09:24 +09:00
Yusuke Kuoka 154fcde7d0
runner: Make WAIT_FOR_DOCKER_SECONDS configurable and working (#1999)
* runner: Make WAIT_FOR_DOCKER_SECONDS configurable and working

Ref #1830
Ref #1804

* Update acceptance/testdata/runnerdeploy.envsubst.yaml

Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>

* Update docs/detailed-docs.md

Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>

Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>
2022-11-22 12:08:54 +09:00
Yusuke Kuoka 86d7893d61
breaking: Make legacy webhook scale triggers no-op (#2001)
Ref #1607
2022-11-22 12:08:29 +09:00
Igor Sarkisov 8f374d561f
Do not explicitly set Privileged to false. (#2009)
Setting SecurityContext.Privileged bit to false, which is default,
prevents GKE from admitting Windows pods.  Privileged bit is not
supported on Windows.
2022-11-15 11:29:37 +09:00
renovate[bot] 40eec3c783
fix(deps): update module github.com/prometheus/client_golang to v1.14.0 (#1996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-10 19:06:26 +09:00
renovate[bot] 0c4798b773
fix(deps): update module golang.org/x/oauth2 to v0.2.0 (#2004)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-10 07:42:29 +09:00
renovate[bot] 7680cfd371
fix(deps): update module github.com/onsi/gomega to v1.24.1 (#2003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-10 07:42:14 +09:00
DongHo Jung 3b1771385f
enhance webhook setting doc (#1995) 2022-11-09 11:39:04 +09:00
qube cb288fc99b
Fix typo in detailed-doc.md (#1997) 2022-11-09 11:38:48 +09:00
Vitalii Tverdokhlib 7c81c2eec1
fix doc detailed-docs.md (#1992)
helm params
2022-11-09 10:20:04 +09:00
Callum Tait 0908715786
docs: better wording and grammar 2022-11-07 20:24:00 +00:00
Yusuke Kuoka 186c98cf36
ci: Fix runner builds for pull requests coming from "master" branches of forks (#1983)
* ci: Fix runner builds but not pushes for forks

I noticed that our runners workflow is failing on docker-login due to that a pull request workflow job from a fork does not have access to repo secrets.

https://github.com/malachiobadeyi/actions-runner-controller/actions/runs/3390463793/jobs/5634638183

Can we try this, so that hopefully it suppresses docker-login for pull requests from forks?

* Update .github/workflows/runners.yaml

* fixup! Update .github/workflows/runners.yaml

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* fixup! fixup! Update .github/workflows/runners.yaml

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-07 19:01:03 +09:00
Callum Tait d328c61fc3
docs: add the limitation to disabling updates (#1988)
* docs: add the limitation to disabling updates

* docs: better wording
2022-11-06 08:13:31 +09:00
Richard Fussenegger 61d1235d2a
Added `DEBIAN_FRONTEND=noninteractive` to `sudo` (#1859)
By default `sudo` drops all environment variables and executes its commands with a clean environment. This is by design, but for the `DEBIAN_FRONTEND` environment variable it is not what we want, since it results in installers being interactive. This adds the `env_keep` instruction to `/etc/sudoers` to keep `DEBIAN_FRONTEND` with its `noninteractive` value, and thus pass it on to commands that care about it. Note that this makes no difference in our builds, because we are running them directly as `root`. However, for users of our image this is going to make a difference, since they start out as `runner` and have to use `sudo`.

Co-authored-by: Fleshgrinder <fleshgrinder@users.noreply.github.com>
2022-11-05 17:20:53 +09:00
Claudio Vellage 3b36a81db6
Allow to set docker default address pool (#1971)
* Allow to set docker default address pool

* fixup! Allow to set docker default address pool

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>

* Revert unnecessary chart ver bump

* Update docs for DOCKER_DEFAULT_ADDRESS_POOL_*

* Fix the dockerd default address pool scripts to actually work as probably intended

* Update the E2E testdata runnerdeployment to accomodate the new docker default addr pool options

* Correct default dockerd addr pool doc

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Co-authored-by: Claudio Vellage <claudio.vellage@pm.me>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-05 14:46:32 +09:00
malachiobadeyi fbdfe0df8c
1770 update log format and add additional fields to webhook server logs (#1771)
* 1770 update log format and add runID and Id to worflow logs

update tests, change log format for controllers.HorizontalRunnerAutoscalerGitHubWebhook

use logging package

remove unused modules

add setup name to setuplog

add flag to change log format

change flag name to enableProdLogConfig

move log opts to logger package

remove empty else and reset timeEncoder

update flag description

use get function to handle nil

rename flag and update logger function

Update main.go

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>

Update controllers/horizontal_runner_autoscaler_webhook.go

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>

Update logging/logger.go

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>

copy log opt per each NewLogger call

revert to use autoscaler.log

update flag descript and remove unused imports

add logFormat to readme

 rename setupLog to logger

make fmt

* Fix E2E along the way

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-04 10:46:58 +09:00