operator-sdk: bundle validate - service account name cannot match service account defined for deployment spec in CSV

Bug Report

What did you do?

When running operator-sdk bundle validate ./bundle or by using the Makefile make bundle the validation fails when having a service account defined which needs to exist in order to run a deployment.

Our setup consists of the deployment for the Operator itself and an additional deployment for a mutating webhook. Since the webhook needs a separate service account for running properly we create it in our manifests and reference it for the kustiomization files.

When having that SA defined in the manifests and using it in the deployment the bundle validation fails with the following error msg: ERRO[0000] Error: Value <service_account_name>: invalid service account found in bundle. sa name cannot match service account defined for deployment spec in CSV

Environment

Operator type:

/language go

operator-sdk version: “v1.12.0”, commit: “d3b2761afdb78f629a7eaf4461b0fb8ae3b02860”, kubernetes version: “v1.21”, go version: “go1.17”,

Additional context

Example repo here: https://github.com/Dynatrace/dynatrace-oneagent-operator

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (10 by maintainers)

Commits related to this issue

Most upvoted comments

The issue still does not seem to be fixed

https://github.com/open-telemetry/opentelemetry-operator/pull/450

~/projects/opentelemetry/opentelemetry-operator(bump-operator-sdk*) » operator-sdk version                                                                                                                                                                                                                                         1 ↵ ploffay@fedora
operator-sdk version: "v1.13.1", commit: "1659ab58a073999463e6dcdf18bdc359a315e091", kubernetes version: "1.21", go version: "go1.16.8", GOOS: "linux", GOARCH: "amd64"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/projects/opentelemetry/opentelemetry-operator(bump-operator-sdk*) » operator-sdk bundle validate ./bundle                                                                                                                                                                                                                            ploffay@fedora
ERRO[0000] Error: Value opentelemetry-operator-controller-manager: invalid service account found in bundle. sa name cannot match service account defined for deployment spec in CSV 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/projects/opentelemetry/opentelemetry-operator(bump-operator-sdk*) »t spec in CSV 
make: *** [Makefile:219: bundle] Error 1

It seems solved in : https://github.com/operator-framework/operator-sdk/pull/5282 And should be pushed in the next release. I think we will create a patch one 1.13.1. c/c @jmrodri

Hi @DTMad,

See that the error is just to test the bundle. So, if you need to build the bundle and want to try to move forward without the test you can comment on the line: https://github.com/operator-framework/operator-sdk/blob/master/testdata/go/v3/memcached-operator/Makefile#L154. OR you can use an old version of SDK as well.