diff --git a/.gitignore b/.gitignore index 437eeac1..680ddf4c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,7 @@ config/manager/kustomization.yaml # Common CI tools repository CI_TOOLS_REPO + +#ignore go.work as it is generated on the fly +go.work +go.work.sum diff --git a/Makefile b/Makefile index 4a799928..9acfb83b 100644 --- a/Makefile +++ b/Makefile @@ -288,3 +288,15 @@ golangci: get-ci-tools # Run go lint against code golint: get-ci-tools PATH=$(GOBIN):$(PATH); $(CI_TOOLS_REPO_DIR)/test-runner/golint.sh + +.PHONY: operator-lint +operator-lint: $(LOCALBIN) gowork ## Runs operator-lint + #TODO(gibi): bump this to v0.2.2 as soon as that version is tagged + GOBIN=$(LOCALBIN) go install github.com/gibizer/operator-lint@2ffa25b7f1c13fb2bdae5444a3dd1b5bbad529b1 + go vet -vettool=$(LOCALBIN)/operator-lint ./... ./api/... + +.PHONY: gowork +gowork: ## Generate go.work file + test -f go.work || go work init + go work use . + go work use ./api diff --git a/api/v1beta1/mariadb_types.go b/api/v1beta1/mariadb_types.go index dd3ccb3d..0bbefd51 100644 --- a/api/v1beta1/mariadb_types.go +++ b/api/v1beta1/mariadb_types.go @@ -32,7 +32,7 @@ type MariaDBSpec struct { // +kubebuilder:validation:Optional // +kubebuilder:default="quay.io/tripleozedcentos9/openstack-mariadb:current-tripleo" - ContainerImage string `json:"containerImage,omitempty"` + ContainerImage string `json:"containerImage"` AdoptionRedirect AdoptionRedirectSpec `json:"adoptionRedirect,omitempty"` } diff --git a/templates/mariadb/bin/mariadb_init.sh b/templates/mariadb/bin/mariadb_init.sh old mode 100644 new mode 100755