Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: replace marker with integer results in bad code #32

Closed
lander2k2 opened this issue Jun 10, 2022 · 0 comments
Closed

bug: replace marker with integer results in bad code #32

lander2k2 opened this issue Jun 10, 2022 · 0 comments

Comments

@lander2k2
Copy link
Contributor

Consider the following marker:

  # +operator-builder:collection:field:name=google.projectNumber,type=int,default=12345,replace=PROJECT_NUMBER,description=`
  # +kubebuilder:validation:Required
  # Project number for the google.project that is being used.`
  member: serviceAccount:service-12345@container-engine-robot.iam.gserviceaccount.com

Results in the following error:

/home/scottd018/VSCode/github/project/operator/bin/controller-gen "crd:preserveUnknownFields=false,crdVersions=v1,trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/scottd018/VSCode/github/project/operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
# github.com/project/operator/apis/infra/v1alpha1/cluster
apis/infra/v1alpha1/cluster/google_kms_key.go:141:41: invalid operation: "serviceAccount:service-" + collection.Spec.Google.ProjectNumber (mismatched types untyped string and int)
make: *** [Makefile:50: vet] Error 2
scottd018 pushed a commit that referenced this issue Jun 14, 2022
* Remove static resource definition

* Bump ocgk to v0.2.1

* Bump ocgk to v0.2.2

* refactored nested dep check and made logic more obvious

Signed-off-by: Dustin Scott <sdustin@vmware.com>

Co-authored-by: Dustin Scott <sdustin@vmware.com>
Signed-off-by: Jeff Davis <jeffda@vmware.com>
scottd018 added a commit that referenced this issue Jun 14, 2022
Signed-off-by: Dustin Scott <dustin.scott18@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant