mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-09-30 17:30:45 +02:00
127 lines
4.3 KiB
YAML
127 lines
4.3 KiB
YAML
suite: "Controller Deployment args"
|
|
templates:
|
|
- deployment.yaml
|
|
tests:
|
|
- it: should include metrics-disabled flags by default
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--metrics-addr=0"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--listener-metrics-addr=0"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--listener-metrics-endpoint="
|
|
|
|
- it: should include watch-single-namespace flag when configured
|
|
set:
|
|
controller:
|
|
manager:
|
|
config:
|
|
watchSingleNamespace: "demo"
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--watch-single-namespace=demo"
|
|
|
|
- it: should include exclude-label-propagation-prefix flags when configured
|
|
set:
|
|
controller:
|
|
manager:
|
|
config:
|
|
excludeLabelPropagationPrefixes:
|
|
- "prefix.com/"
|
|
- "complete.io/label"
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--exclude-label-propagation-prefix=prefix.com/"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--exclude-label-propagation-prefix=complete.io/label"
|
|
|
|
- it: should render metrics port when metrics are enabled
|
|
set:
|
|
controller:
|
|
metrics:
|
|
controllerManagerAddr: ":8080"
|
|
listenerAddr: ":8081"
|
|
listenerEndpoint: "/metrics"
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- equal:
|
|
path: spec.template.spec.containers[0].ports[0].containerPort
|
|
value: 8080
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--metrics-addr=:8080"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--listener-metrics-addr=:8081"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--listener-metrics-endpoint=/metrics"
|
|
|
|
- it: should omit every max-concurrent-reconciles flag by default
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--ephemeral-runner-max-concurrent-reconciles=1"
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--default-max-concurrent-reconciles=1"
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--autoscaling-runner-set-max-concurrent-reconciles=1"
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--autoscaling-listener-max-concurrent-reconciles=1"
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--ephemeral-runner-set-max-concurrent-reconciles=1"
|
|
|
|
- it: should include every max-concurrent-reconciles flag when configured
|
|
set:
|
|
controller:
|
|
manager:
|
|
config:
|
|
defaultMaxConcurrentReconciles: 4
|
|
autoscalingRunnerSetMaxConcurrentReconciles: 3
|
|
autoscalingListenerMaxConcurrentReconciles: 5
|
|
ephemeralRunnerSetMaxConcurrentReconciles: 6
|
|
ephemeralRunnerMaxConcurrentReconciles: 20
|
|
release:
|
|
name: "test-arc"
|
|
namespace: "test-ns"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--default-max-concurrent-reconciles=4"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--autoscaling-runner-set-max-concurrent-reconciles=3"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--autoscaling-listener-max-concurrent-reconciles=5"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--ephemeral-runner-set-max-concurrent-reconciles=6"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].args
|
|
content: "--ephemeral-runner-max-concurrent-reconciles=20"
|