Serviceaccount property naming discrepancy between code and documentation
Hello,
During the deployment of this operator on our Openshift Cluster, I had trouble to overwrite the runner pod ServiceAccount
.
Indeed, in documentation it is stated that runner object property serviceAcccount
must be used to override the default service account : https://docs.gitlab.com/runner/configuration/configuring_runner_openshift.html#operator-properties
When I set this property, the override was ignored and the default gitlab-runner-sa
account was used. After a quick look at the sources, I've found out that the serviceaccount
property (without the capital "A") had to be set : https://gitlab.com/gitlab-org/gl-openshift/gitlab-runner-operator/-/blob/master/api/v1beta2/runner_types.go#L91
To summarize, this runner will use the alternate service account :
---
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
name: gitlab-runner
spec:
gitlabUrl: https://my.gitlab-instance.com
token: gitlab-runner-secret
serviceaccount: gitlab-sa
This one won't :
---
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
name: gitlab-runner
spec:
gitlabUrl: https://my.gitlab-instance.com
token: gitlab-runner-secret
serviceAccount: gitlab-sa
Can you check the operator code and fix if needed the documentation ?
Our setup :
- Official Gitlab Runner Operator v1.4.0
- Openshift 4.8.25
Regards,
Antoine