Support the controller to watching a single namespace.#2374
Conversation
06d8243 to
4c06ca2
Compare
fedc29a to
1725f23
Compare
4c06ca2 to
f55e53a
Compare
1725f23 to
b1d9c03
Compare
0feb964 to
82dfa7f
Compare
b1d9c03 to
8d924ae
Compare
82dfa7f to
b9b5743
Compare
8d924ae to
fb2b6a0
Compare
b9b5743 to
f3ee54e
Compare
fb2b6a0 to
b9c7561
Compare
f3ee54e to
23884b9
Compare
b9c7561 to
2d1e2d2
Compare
b57b9d4 to
a90f469
Compare
| // We don't support metrics for AutoRunnerScaleSet for now | ||
| metricsAddr = "0" | ||
|
|
||
| managerNamespace = os.Getenv("CONTROLLER_MANAGER_POD_NAMESPACE") |
There was a problem hiding this comment.
I don't know if this would be a good idea, but I'll just ask for discussion:
Should we default to the default namespace if no namespace is provided, like k8s does? It seems more dangerous in case someone makes a mistake, but it also aligns well with the way k8s treats the empty value
There was a problem hiding this comment.
This env var gets its value from
- name: CONTROLLER_MANAGER_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
so it depends on where arc is installed?
There was a problem hiding this comment.
Yes, but I am not sure if it is going to receive "" if no namespace is set metadata.namespace is not set
There was a problem hiding this comment.
It should never be empty though, you can't create a resource outside a namespace?
| {{- $counter = add $counter 1 }} | ||
| {{- $controllerDeployment = $deployment }} | ||
| {{- if kindIs "map" $deployment.metadata.labels }} | ||
| {{- if eq (get $deployment.metadata.labels "app.kubernetes.io/part-of") "gha-runner-scale-set-controller" }} |
There was a problem hiding this comment.
Is this a new value that we should set for the part-of?
The ADR says just "actions-runner-controller"
Should we update the ADR?
There was a problem hiding this comment.
Good shout, the ADR pre dates the rename.
ca31c3e to
9b97a9f
Compare
1823362 to
6577d7b
Compare
9b97a9f to
0825c8b
Compare
6577d7b to
83ca034
Compare
0825c8b to
1744fe4
Compare
82086d6 to
01dbfc3
Compare
1744fe4 to
d286007
Compare
01dbfc3 to
5ef6ef3
Compare
5ef6ef3 to
9760054
Compare
9760054 to
b1d6551
Compare
Part 3 of #2275
watchSingleNametogha-runner-scale-set-controllerto allow the controller only watch resources in a single namespace.