mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-22 07:54:05 +02:00
Upgrade resources in-place, causing 1-1 mapping between autoscaling runner set and ephemeral runner set (#4516)
This commit is contained in:
+4
-1
@@ -59,7 +59,10 @@ spec:
|
||||
description: EphemeralRunnerSetSpec defines the desired state of EphemeralRunnerSet
|
||||
properties:
|
||||
ephemeralRunnerMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal resources
|
||||
description: |-
|
||||
EphemeralRunnerMetadata is the metadata to be applied to all ephemeral runners created by this set.
|
||||
If the EphemeralRunnerMetadata is updated, the update applies to new ephemeral runners created after the update,
|
||||
but does not apply to existing ephemeral runners.
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
|
||||
@@ -50,9 +50,6 @@ args:
|
||||
{{- with .Values.controller.manager.config.runnerMaxConcurrentReconciles }}
|
||||
- "--runner-max-concurrent-reconciles={{ . }}"
|
||||
{{- end }}
|
||||
{{- with .Values.controller.manager.config.updateStrategy }}
|
||||
- "--update-strategy={{ . }}"
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics }}
|
||||
{{- with .Values.controller.metrics }}
|
||||
- "--listener-metrics-addr={{ .listenerAddr }}"
|
||||
|
||||
@@ -31,9 +31,6 @@ controller:
|
||||
# The maximum number of concurrent reconciles which can be run by the EphemeralRunner controller.
|
||||
runnerMaxConcurrentReconciles: 2
|
||||
|
||||
# How the controller handles upgrades with running jobs: "immediate" or "eventual".
|
||||
updateStrategy: "immediate"
|
||||
|
||||
# List of label prefixes that should NOT be propagated to internal resources.
|
||||
excludeLabelPropagationPrefixes: []
|
||||
# Example:
|
||||
|
||||
+4
-1
@@ -59,7 +59,10 @@ spec:
|
||||
description: EphemeralRunnerSetSpec defines the desired state of EphemeralRunnerSet
|
||||
properties:
|
||||
ephemeralRunnerMetadata:
|
||||
description: ResourceMeta carries metadata common to all internal resources
|
||||
description: |-
|
||||
EphemeralRunnerMetadata is the metadata to be applied to all ephemeral runners created by this set.
|
||||
If the EphemeralRunnerMetadata is updated, the update applies to new ephemeral runners created after the update,
|
||||
but does not apply to existing ephemeral runners.
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
|
||||
@@ -70,9 +70,6 @@ spec:
|
||||
{{- with .Values.flags.runnerMaxConcurrentReconciles }}
|
||||
- "--runner-max-concurrent-reconciles={{ . }}"
|
||||
{{- end }}
|
||||
{{- with .Values.flags.updateStrategy }}
|
||||
- "--update-strategy={{ . }}"
|
||||
{{- end }}
|
||||
{{- if .Values.metrics }}
|
||||
{{- with .Values.metrics }}
|
||||
- "--listener-metrics-addr={{ .listenerAddr }}"
|
||||
|
||||
@@ -363,7 +363,6 @@ func TestTemplate_ControllerDeployment_Defaults(t *testing.T) {
|
||||
"--auto-scaling-runner-set-only",
|
||||
"--log-level=debug",
|
||||
"--log-format=text",
|
||||
"--update-strategy=immediate",
|
||||
"--metrics-addr=0",
|
||||
"--listener-metrics-addr=0",
|
||||
"--listener-metrics-endpoint=",
|
||||
@@ -431,7 +430,6 @@ func TestTemplate_ControllerDeployment_Customize(t *testing.T) {
|
||||
"topologySpreadConstraints[0].maxSkew": "1",
|
||||
"topologySpreadConstraints[0].topologyKey": "foo",
|
||||
"priorityClassName": "test-priority-class",
|
||||
"flags.updateStrategy": "eventual",
|
||||
"flags.logLevel": "info",
|
||||
"flags.logFormat": "json",
|
||||
"volumes[0].name": "customMount",
|
||||
@@ -516,7 +514,6 @@ func TestTemplate_ControllerDeployment_Customize(t *testing.T) {
|
||||
"--auto-scaler-image-pull-secrets=dockerhub",
|
||||
"--log-level=info",
|
||||
"--log-format=json",
|
||||
"--update-strategy=eventual",
|
||||
"--listener-metrics-addr=0",
|
||||
"--listener-metrics-endpoint=",
|
||||
"--metrics-addr=0",
|
||||
@@ -645,7 +642,6 @@ func TestTemplate_EnableLeaderElection(t *testing.T) {
|
||||
"--leader-election-id=test-arc-gha-rs-controller",
|
||||
"--log-level=debug",
|
||||
"--log-format=text",
|
||||
"--update-strategy=immediate",
|
||||
"--listener-metrics-addr=0",
|
||||
"--listener-metrics-endpoint=",
|
||||
"--metrics-addr=0",
|
||||
@@ -687,7 +683,6 @@ func TestTemplate_ControllerDeployment_ForwardImagePullSecrets(t *testing.T) {
|
||||
"--auto-scaler-image-pull-secrets=ghcr",
|
||||
"--log-level=debug",
|
||||
"--log-format=text",
|
||||
"--update-strategy=immediate",
|
||||
"--listener-metrics-addr=0",
|
||||
"--listener-metrics-endpoint=",
|
||||
"--metrics-addr=0",
|
||||
@@ -778,7 +773,6 @@ func TestTemplate_ControllerDeployment_WatchSingleNamespace(t *testing.T) {
|
||||
"--log-level=debug",
|
||||
"--log-format=text",
|
||||
"--watch-single-namespace=demo",
|
||||
"--update-strategy=immediate",
|
||||
"--listener-metrics-addr=0",
|
||||
"--listener-metrics-endpoint=",
|
||||
"--metrics-addr=0",
|
||||
|
||||
@@ -115,22 +115,6 @@ flags:
|
||||
# It may also increase the load on the API server and the external service (e.g. GitHub API).
|
||||
runnerMaxConcurrentReconciles: 2
|
||||
|
||||
## Defines how the controller should handle upgrades while having running jobs.
|
||||
##
|
||||
## The strategies available are:
|
||||
## - "immediate": (default) The controller will immediately apply the change causing the
|
||||
## recreation of the listener and ephemeral runner set. This can lead to an
|
||||
## overprovisioning of runners, if there are pending / running jobs. This should not
|
||||
## be a problem at a small scale, but it could lead to a significant increase of
|
||||
## resources if you have a lot of jobs running concurrently.
|
||||
##
|
||||
## - "eventual": The controller will remove the listener and ephemeral runner set
|
||||
## immediately, but will not recreate them (to apply changes) until all
|
||||
## pending / running jobs have completed.
|
||||
## This can lead to a longer time to apply the change but it will ensure
|
||||
## that you don't have any overprovisioning of runners.
|
||||
updateStrategy: "immediate"
|
||||
|
||||
## Defines a list of prefixes that should not be propagated to internal resources.
|
||||
## This is useful when you have labels that are used for internal purposes and should not be propagated to internal resources.
|
||||
## See https://github.com/actions/actions-runner-controller/issues/3533 for more information.
|
||||
|
||||
@@ -15,13 +15,13 @@ scaleset:
|
||||
## maxRunners is the max number of runners the autoscaling runner set will scale up to.
|
||||
# maxRunners: 5
|
||||
|
||||
# Auth object provides authorization parameters.
|
||||
# You should apply either:
|
||||
# 1) secretName referencing the secret containing authorization parameters in the same namespace where the scale set is being installed in
|
||||
# 2) app object parameters
|
||||
# 3) github_tokne
|
||||
#
|
||||
# If multiple of them are set, only single one will be applied based on the above mentioned order.
|
||||
# Auth object provides authorization parameters.
|
||||
# You should apply either:
|
||||
# 1) secretName referencing the secret containing authorization parameters in the same namespace where the scale set is being installed in
|
||||
# 2) app object parameters
|
||||
# 3) github_tokne
|
||||
#
|
||||
# If multiple of them are set, only single one will be applied based on the above mentioned order.
|
||||
auth:
|
||||
url: "" # Required
|
||||
githubToken: ""
|
||||
@@ -43,7 +43,6 @@ secretResolution:
|
||||
# - "kubernetes" - use Kubernetes secrets
|
||||
# - "azureKeyVault" - use Azure Key Vault
|
||||
type: "kubernetes"
|
||||
|
||||
## Proxy settings when type is NOT "kubernetes"
|
||||
# proxy:
|
||||
# http:
|
||||
@@ -63,37 +62,37 @@ secretResolution:
|
||||
# tenant_id: ""
|
||||
# certificate_path: ""
|
||||
|
||||
## Proxy can be used to define proxy settings that will be used by the
|
||||
## controller, the listener and the runner of this scale set.
|
||||
# proxy:
|
||||
# http:
|
||||
# url: http://proxy.com:1234
|
||||
# credentialSecretRef: proxy-auth # a secret with `username` and `password` keys
|
||||
# https:
|
||||
# url: http://proxy.com:1234
|
||||
# credentialSecretRef: proxy-auth # a secret with `username` and `password` keys
|
||||
# noProxy:
|
||||
# - example.com
|
||||
# - example.org
|
||||
## Proxy can be used to define proxy settings that will be used by the
|
||||
## controller, the listener and the runner of this scale set.
|
||||
# proxy:
|
||||
# http:
|
||||
# url: http://proxy.com:1234
|
||||
# credentialSecretRef: proxy-auth # a secret with `username` and `password` keys
|
||||
# https:
|
||||
# url: http://proxy.com:1234
|
||||
# credentialSecretRef: proxy-auth # a secret with `username` and `password` keys
|
||||
# noProxy:
|
||||
# - example.com
|
||||
# - example.org
|
||||
|
||||
## listenerTemplate is the PodSpec for each listener Pod
|
||||
## For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
|
||||
# listenerPodTemplate:
|
||||
# spec:
|
||||
# containers:
|
||||
# # Use this section to append additional configuration to the listener container.
|
||||
# # If you change the name of the container, the configuration will not be applied to the listener,
|
||||
# # and it will be treated as a side-car container.
|
||||
# - name: listener
|
||||
# securityContext:
|
||||
# runAsUser: 1000
|
||||
# # Use this section to add the configuration of a side-car container.
|
||||
# # Comment it out or remove it if you don't need it.
|
||||
# # Spec for this container will be applied as is without any modifications.
|
||||
# - name: side-car
|
||||
# image: example-sidecar
|
||||
## listenerTemplate is the PodSpec for each listener Pod
|
||||
## For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
|
||||
# listenerPodTemplate:
|
||||
# spec:
|
||||
# containers:
|
||||
# # Use this section to append additional configuration to the listener container.
|
||||
# # If you change the name of the container, the configuration will not be applied to the listener,
|
||||
# # and it will be treated as a side-car container.
|
||||
# - name: listener
|
||||
# securityContext:
|
||||
# runAsUser: 1000
|
||||
# # Use this section to add the configuration of a side-car container.
|
||||
# # Comment it out or remove it if you don't need it.
|
||||
# # Spec for this container will be applied as is without any modifications.
|
||||
# - name: side-car
|
||||
# image: example-sidecar
|
||||
|
||||
## Resource object allows modifying resources created by the chart itself
|
||||
## Resource object allows modifying resources created by the chart itself
|
||||
resource:
|
||||
# Specifies metadata that will be applied to all resources managed by ARC
|
||||
all:
|
||||
@@ -195,10 +194,9 @@ resource:
|
||||
metadata:
|
||||
labels: {}
|
||||
annotations: {}
|
||||
|
||||
# TODO: Add more resource customizations when needed
|
||||
|
||||
# Template applied for the runner container
|
||||
# Template applied for the runner container
|
||||
runner:
|
||||
# Mode can be used to automatically add configuration for the selected mode
|
||||
# The available modes are:
|
||||
@@ -288,28 +286,28 @@ runner:
|
||||
# spec:
|
||||
# containers: []
|
||||
|
||||
## A self-signed CA certificate for communication with the GitHub server can be
|
||||
## provided using a config map key selector. If `runnerMountPath` is set, for
|
||||
## each runner pod ARC will:
|
||||
## - create a `github-server-tls-cert` volume containing the certificate
|
||||
## specified in `certificateFrom`
|
||||
## - mount that volume on path `runnerMountPath`/{certificate name}
|
||||
## - set NODE_EXTRA_CA_CERTS environment variable to that same path
|
||||
## - set RUNNER_UPDATE_CA_CERTS environment variable to "1" (as of version
|
||||
## 2.303.0 this will instruct the runner to reload certificates on the host)
|
||||
##
|
||||
## If any of the above had already been set by the user in the runner pod
|
||||
## template, ARC will observe those and not overwrite them.
|
||||
## Example configuration:
|
||||
#
|
||||
# githubServerTLS:
|
||||
# certificateFrom:
|
||||
# configMapKeyRef:
|
||||
# name: config-map-name
|
||||
# key: ca.crt
|
||||
# runnerMountPath: /usr/local/share/ca-certificates/
|
||||
## A self-signed CA certificate for communication with the GitHub server can be
|
||||
## provided using a config map key selector. If `runnerMountPath` is set, for
|
||||
## each runner pod ARC will:
|
||||
## - create a `github-server-tls-cert` volume containing the certificate
|
||||
## specified in `certificateFrom`
|
||||
## - mount that volume on path `runnerMountPath`/{certificate name}
|
||||
## - set NODE_EXTRA_CA_CERTS environment variable to that same path
|
||||
## - set RUNNER_UPDATE_CA_CERTS environment variable to "1" (as of version
|
||||
## 2.303.0 this will instruct the runner to reload certificates on the host)
|
||||
##
|
||||
## If any of the above had already been set by the user in the runner pod
|
||||
## template, ARC will observe those and not overwrite them.
|
||||
## Example configuration:
|
||||
#
|
||||
# githubServerTLS:
|
||||
# certificateFrom:
|
||||
# configMapKeyRef:
|
||||
# name: config-map-name
|
||||
# key: ca.crt
|
||||
# runnerMountPath: /usr/local/share/ca-certificates/
|
||||
|
||||
## controllerServiceAccount is the service account of the controller
|
||||
## controllerServiceAccount is the service account of the controller
|
||||
controllerServiceAccount:
|
||||
namespace: ""
|
||||
name: ""
|
||||
|
||||
Reference in New Issue
Block a user