.gitignore rules were preventing kubebuilder generated files to be present in the repo and it's essential to implement the runtime.Object interface which is the standard interface that represents any Kind object. So I was hitting this when locally building the image:
# github.com/tuenti/secrets-manager/api/v1alpha1
api/v1alpha1/secretdefinition_types.go:68:25: cannot use &SecretDefinition{} (type *SecretDefinition) as type runtime.Object in argument to SchemeBuilder.Register:
*SecretDefinition does not implement runtime.Object (missing DeepCopyObject method)
api/v1alpha1/secretdefinition_types.go:68:46: cannot use &SecretDefinitionList{} (type *SecretDefinitionList) as type runtime.Object in argument to SchemeBuilder.Register:
*SecretDefinitionList does not implement runtime.Object (missing DeepCopyObject method)
ERROR: Service 'tests' failed to build: The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${SECRETS_MANAGER_VERSION}" -a -o secrets-manager main.go' returned a non-zero code: 2
make: *** [Makefile:78: docker-test] Error 1
List of fixes # (issue)
fixes broken builds with more recent versions of kubernetes libraries
Type of change
Please delete options that are not relevant.
[x ] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
make test
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
…
Status
READY
Migrations
NO
Description
.gitignore
rules were preventing kubebuilder generated files to be present in the repo and it's essential to implement theruntime.Object
interface which is the standard interface that represents anyKind
object. So I was hitting this when locally building the image:List of fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
make test
Checklist: