Skip to content

Commit db5bee2

Browse files
committed
commands/.../build.go: add comment to verifyDeploymentImage
1 parent e34fcaf commit db5bee2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

commands/operator-sdk/cmd/build.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ For example:
6060
return buildCmd
6161
}
6262

63+
/*
64+
* verifyDeploymentImages checks image names of pod 0 in deployments found in the provided yaml file.
65+
* This is done because e2e tests require a namespaced manifest file to configure a namespace with
66+
* required resources. This function is intended to identify if a user used a different image name
67+
* for their operator in the provided yaml, which would result in the testing of the wrong operator
68+
* image. As it is possible for a namespaced yaml to have multiple deployments (such as the vault
69+
* operator, which depends on the etcd-operator), this is just a warning, not a fatal error.
70+
*/
6371
func verifyDeploymentImage(yamlFile []byte, imageName string) string {
6472
warningMessages := ""
6573
yamlSplit := bytes.Split(yamlFile, []byte("\n---\n"))

0 commit comments

Comments
 (0)