Commit Graph

1200 Commits

Author SHA1 Message Date
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
Yusuke Kuoka 63e8f32281
Fix permission issue when you use PV for rootless dind cache (#1977)
* Fix permission issue when you use PV for rootless dind cache

This fixes the said issue I have found while testing #1759.

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-11-04 06:46:21 +09:00
renovate[bot] 2ac48038c6
fix(deps): update module sigs.k8s.io/controller-runtime to v0.13.1 (#1982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 06:30:18 +09:00
Yusuke Kuoka 23c8fe4a8b
Fix dead-lock when runner unregistration triggered before PV attachment (#1975)
This fixes an issue discovered while I was testing #1759. Please see the new comment in code for more information.
2022-11-04 06:29:19 +09:00
Yusuke Kuoka 8505c95719
runner: Fix rootless dind to respect specified MTU (#1976)
While testing #1759, I found an issue in the rootless dind entrypoint that it was not respecting the configured MTU for dind docker due to a permission issue. This fixes that.
2022-11-04 06:29:03 +09:00
Yusuke Kuoka 3de8085b87
Fix rootless dind to do write logs (#1978)
It turned out too hard to debug configuration issues on the rootless dind daemon as it was not writing any logs to stdout/stderr of the container. This fixes that, so that any rootless dind configuration or startup errors are visible in e.g. the kubectl-logs output.
2022-11-04 06:28:47 +09:00
Cristian Calin 828d51baf2
admissionWebHooks: fix checking for caBundle (#1968) 2022-11-03 22:48:39 +09:00
Jakub Bielawski 0b0219b88f
docs: add missing index entry (#1981)
docs: add missing index entry for "Slow / failure to boot dind sidecar (default runner)"
2022-11-03 12:36:14 +00:00
Jakub Bielawski 362b6c10a3
Describe slow/failure to boot dind sidecar in TROUBLESHOOTING.md (#1972)
* Update TROUBLESHOOTING.md

Describe solution for slowly starting dind containers

* Fix typeos

* Fix typeos
2022-11-03 20:58:40 +09:00
Mark Woolley 2110fa5122
Add some information on Prometheus metrics (#1966) 2022-11-03 20:57:36 +09:00
Gwyn 9eae9ac75f
Updates Makefile so shellcheck is cross-platform. (#1946)
Specifically, it was always downloading the linux version
no matter the platform. So I moved the OS detection to be early
in the makefile and verified that I can now download the darwin
version of shellcheck.
2022-11-03 20:57:04 +09:00
Yusuke Kuoka 9bb416084b
e2e: Fix continuous rolling updater to do stop on test completion (#1979) 2022-11-03 11:55:36 +00:00
Yusuke Kuoka fdb049ba1e
e2e: Bump runner version to 2.299.1 (#1980) 2022-11-03 10:02:54 +00:00
Callum Tait 5f27548a73
ci: replace set-output (#1928)
* ci: replace set-output

* ci: use env var format

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
2022-11-03 18:43:39 +09:00
renovate[bot] f7fb1490dc
chore(deps): update golang docker tag to v1.19.3 (#1969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 18:42:02 +09:00
renovate[bot] 9d48c791f5
fix(deps): update module github.com/onsi/gomega to v1.24.0 (#1953)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 17:51:24 +09:00
renovate[bot] 371eff09ce
chore(deps): update azure/setup-helm action to v3.4 (#1959)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 14:40:54 +09:00
renovate[bot] cfad7a9b08
fix(deps): update module github.com/prometheus/client_golang to v1.13.1 (#1970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 14:40:39 +09:00