From 8b88fcd5ea895d1dde3adad056cabdfa41e1c8e6 Mon Sep 17 00:00:00 2001 From: Sergi Castro Date: Fri, 9 Aug 2024 20:06:08 +0200 Subject: [PATCH] Fix build improvement (#17) --- Makefile | 2 +- controllers/spec/template/yaml/Templates.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ef2feac..66fd805 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." + go generate ./... .PHONY: fmt fmt: ## Run go fmt against code. @@ -66,7 +67,6 @@ test: build envtest kind ## Run tests. .PHONY: build build: manifests generate fmt vet $(addprefix build/,$(subst $(comma),$(space),$(PLATFORMS))) ## Build manager binary. - go generate build/%: PLATFORM=$(*) build/%: GOARCH=$(notdir $(PLATFORM)) diff --git a/controllers/spec/template/yaml/Templates.go b/controllers/spec/template/yaml/Templates.go index 537a9f2..8029058 100644 --- a/controllers/spec/template/yaml/Templates.go +++ b/controllers/spec/template/yaml/Templates.go @@ -1,10 +1,10 @@ -package yaml +package yaml - // This file is auto generated by the script in 'WriteYamlTemplatesInGoFile.go'. - // Any manual modification to this file will be lost during next compilation. +// This file is auto generated by the script in 'WriteYamlTemplatesInGoFile.go'. +// Any manual modification to this file will be lost during next compilation. const ( -BackUpCronJobTemplate = `apiVersion: batch/v1 + BackUpCronJobTemplate = `apiVersion: batch/v1 kind: CronJob metadata: name: backup-job-postgres-name @@ -65,7 +65,7 @@ spec: - name: BACKUP_SOURCE_DB_HOST_NAME value: toBeReplaced ` -BaseConfigMapTemplate = `apiVersion: v1 + BaseConfigMapTemplate = `apiVersion: v1 kind: ConfigMap metadata: name: base-kubegres-config @@ -318,7 +318,7 @@ data: touch $promotionTriggerFilePath ` -PrimaryServiceTemplate = `apiVersion: v1 + PrimaryServiceTemplate = `apiVersion: v1 kind: Service metadata: name: postgres-name @@ -335,7 +335,7 @@ spec: app: postgres-name replicationRole: primary ` -PrimaryStatefulSetTemplate = `apiVersion: apps/v1 + PrimaryStatefulSetTemplate = `apiVersion: apps/v1 kind: StatefulSet metadata: name: postgres-name-0 @@ -444,7 +444,7 @@ spec: mountPath: /etc/pg_hba.conf subPath: pg_hba.conf ` -ReplicaServiceTemplate = `apiVersion: v1 + ReplicaServiceTemplate = `apiVersion: v1 kind: Service metadata: name: postgres-name-replica @@ -461,7 +461,7 @@ spec: app: postgres-name replicationRole: replica ` -ReplicaStatefulSetTemplate = `apiVersion: apps/v1 + ReplicaStatefulSetTemplate = `apiVersion: apps/v1 kind: StatefulSet metadata: name: postgres-name-1