tuenti / secrets-manager

A daemon to sync Vault secrets to Kubernetes secrets
Apache License 2.0
171 stars 26 forks source link

keep generated files in repo to implement runtime.Object interface #89

Closed fcgravalos closed 1 year ago

fcgravalos commented 1 year ago

Status

READY

Migrations

NO

Description

.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)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

make test

Checklist: