Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
865 lines (682 loc) · 34.6 KB
/
Copy pathMakefile
File metadata and controls
865 lines (682 loc) · 34.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
all: build
SHELL :=/bin/bash -euEo pipefail -O inherit_errexit
comma :=,
IMAGE_TAG ?= latest
IMAGE_REF ?= docker.io/scylladb/scylla-operator:$(IMAGE_TAG)
BUNDLE_IMAGE_REF ?= docker.io/scylladb/scylla-operator-bundle:$(IMAGE_TAG)
MAKE_REQUIRED_MIN_VERSION:=4.2 # for SHELLSTATUS
# Support container build from git worktrees where the parent git folder isn't available.
GIT ?=git
GIT_TAG_SHORT ?=$(shell [ ! -d ".git/" ] || $(GIT) describe --tags --abbrev=7 --match 'v[0-9]*')$(if $(filter $(.SHELLSTATUS),0),,$(error $(GIT) describe failed))
GIT_COMMIT ?=$(shell [ ! -d ".git/" ] || $(GIT) rev-parse --short "HEAD^{commit}" 2>/dev/null)$(if $(filter $(.SHELLSTATUS),0),,$(error $(GIT) rev-parse failed))
GO ?=go
GO_MODULE ?=$(shell $(GO) list -m)$(if $(filter $(.SHELLSTATUS),0),,$(error failed to list go module name))
GOPATH ?=$(shell $(GO) env GOPATH)
GOOS ?=$(shell $(GO) env GOOS)
GOEXE ?=$(shell $(GO) env GOEXE)
GO_VERSION :=$(shell $(GO) version | sed -E -e 's/.*go([0-9]+.[0-9]+.[0-9]+).*/\1/')
GO_PACKAGE ?=$(shell $(GO) list -m -f '{{ .Path }}' || echo 'no_package_detected')
GO_PACKAGES ?=./...
go_packages_dirs :=$(shell $(GO) list -f '{{ .Dir }}' $(GO_PACKAGES) || echo 'no_package_dir_detected')
GO_TEST_PACKAGES ?=$(GO_PACKAGES)
GO_BUILD_PACKAGES ?=./cmd/...
GO_BUILD_PACKAGES_EXPANDED ?=$(shell $(GO) list $(GO_BUILD_PACKAGES))
go_build_binaries =$(notdir $(GO_BUILD_PACKAGES_EXPANDED))
GO_BUILD_FLAGS ?=-trimpath
GO_BUILD_BINDIR ?=
GO_LD_EXTRA_FLAGS ?=
GO_TEST_FLAGS ?=-race
GO_TEST_COUNT ?=
GO_TEST_EXTRA_FLAGS ?=
GO_TEST_ARGS ?=
GO_TEST_EXTRA_ARGS ?=
GO_TEST_E2E_EXTRA_ARGS ?=
JQ ?=jq
YQ ?=yq -e
GSUTIL ?=gsutil -m -q
GOLANGCI_LINT ?=golangci-lint
CODEGEN_PKG ?=./vendor/k8s.io/code-generator
CODEGEN_HEADER_FILE ?=/dev/null
OPERATOR_SDK ?=operator-sdk
api_groups :=$(patsubst %/,%,$(wildcard ./pkg/api/*/))
nonrest_api_groups :=$(patsubst %/.,%,$(wildcard ./pkg/scylla/api/*/.))
api_package_dirs :=$(api_groups)
api_packages =$(call expand_go_packages_with_spaces,$(addsuffix /...,$(api_package_dirs)))
HELM ?=helm
HELM_CHANNEL ?=latest
HELM_CHARTS ?=scylla-operator scylla-manager scylla
HELM_CHARTS_DIR ?=helm
HELM_BUILD_DIR ?=$(HELM_CHARTS_DIR)/build
HELM_LOCAL_REPO ?=$(HELM_CHARTS_DIR)/repo/$(HELM_CHANNEL)
HELM_APP_VERSION ?=$(IMAGE_TAG)
HELM_CHART_VERSION_SUFFIX ?=
HELM_CHART_VERSION ?=$(GIT_TAG_SHORT)$(HELM_CHART_VERSION_SUFFIX)
HELM_BUCKET ?=gs://scylla-operator-charts/$(HELM_CHANNEL)
HELM_REPOSITORY ?=https://scylla-operator-charts.storage.googleapis.com/$(HELM_CHANNEL)
HELM_MANIFEST_CACHE_CONTROL ?=public, max-age=600
CONTROLLER_GEN ?=$(GO) run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen --
CRD_PATH ?= pkg/api/scylla/v1/scylla.scylladb.com_scyllaclusters.yaml
CRD_FILES ?=$(shell find ./pkg/api/ -name '*.yaml')$(if $(filter $(.SHELLSTATUS),0),,$(error "can't find CRDs"))
MONITORING_DASHBOARDS_DIR :=./submodules/github.com/scylladb/scylla-monitoring/grafana/build
MONITORING_RULES_DIR :=./submodules/github.com/scylladb/scylla-monitoring/prometheus/prom_rules
DOCS_API_REFERENCE_DIR :=./docs/source/reference/api
define version-ldflags
-X $(1).commitFromGit="$(GIT_COMMIT)"
endef
GO_LD_FLAGS ?=-ldflags '$(strip $(call version-ldflags,$(GO_PACKAGE)/pkg/build) $(GO_LD_EXTRA_FLAGS))'
RENOVATE_CONFIG ?=./renovate.json
KIND_CLUSTER_NAME=scylla-operator-e2e
# TODO: look into how to make these local to the targets
export DOCKER_BUILDKIT :=1
export GOVERSION :=$(shell go version)
export KUBEBUILDER_ASSETS :=$(GOPATH)/bin
export PATH :=$(GOPATH)/bin:$(PATH):
# $1 - required version
# $2 - current version
define is_equal_or_higher_version
$(strip $(filter $(2),$(firstword $(shell printf '%s\n%s' '$(1)' '$(2)' | sort -V -r -b))))
endef
# $1 - program name
# $2 - required version variable name
# $3 - current version string
define require_minimal_version
$(if $($(2)),\
$(if $(strip $(call is_equal_or_higher_version,$($(2)),$(3))),,$(error `$(1)` is required with minimal version "$($(2))", detected version "$(3)". You can override this check by using `make $(2):=`)),\
)
endef
ifneq "$(MAKE_REQUIRED_MIN_VERSION)" ""
$(call require_minimal_version,make,MAKE_REQUIRED_MIN_VERSION,$(MAKE_VERSION))
endif
# $1 - package name
define build-package
$(if $(GO_BUILD_BINDIR),mkdir -p '$(GO_BUILD_BINDIR)',)
$(strip CGO_ENABLED=0 $(GO) build $(GO_BUILD_FLAGS) $(GO_LD_FLAGS) \
$(if $(GO_BUILD_BINDIR),-o '$(GO_BUILD_BINDIR)/$(notdir $(1))$(GOEXE)',) \
$(1))
endef
# $1 - chart name
# $2 - destination dir
# $3 - app version
# $4 - chart version
define package-helm
helm package '$(HELM_CHARTS_DIR)/$(1)' --destination '$(2)' --app-version '$(3)' --version '$(4)'
endef
# $1 - chart name
define lint-helm
helm lint helm/$(1)
endef
# $1 - manifest
# $2 - output
define append-manifest
echo -e '\n---' | cat '$(1)' - >> '$(2)'
endef
# $1 - manifest files list
# $2 - output
define concat-manifests
true > '$(2)'
$(foreach file,$(1),$(call append-manifest,$(file),$(2)))
endef
# We need to build each package separately so go build creates appropriate binaries
build:
$(if $(strip $(GO_BUILD_PACKAGES_EXPANDED)),,$(error no packages to build: GO_BUILD_PACKAGES_EXPANDED var is empty))
$(foreach package,$(GO_BUILD_PACKAGES_EXPANDED),$(call build-package,$(package)))
.PHONY: build
clean:
$(RM) $(go_build_binaries)
.PHONY: clean
submodules:
$(GIT) submodule update --init --recursive
.PHONY: submodules
verify-lint:
@$(GOLANGCI_LINT) run || \
(echo "$(GOLANGCI_LINT) run failed. You can run \`make lint\` to automatically apply fixes for some of the issues (e.g., formatting)." && \
exit 1)
.PHONY: verify-lint
lint:
$(GOLANGCI_LINT) run --fix
.PHONY: lint
verify-gofmt:
$(info Running $(GOLANGCI_LINT) fmt --diff)
@output=$$( $(GOLANGCI_LINT) fmt --diff ); \
if [ -n "$${output}" ]; then \
echo "$@ failed - please run \`make gofmt\` to fix following files:"; \
echo "$${output}"; \
exit 1; \
fi;
.PHONY: verify-gofmt
gofmt:
$(info Running $(GOLANGCI_LINT) fmt)
@$(GOLANGCI_LINT) fmt
.PHONY: gofmt
# We need to force locale so different envs sort files the same way for recursive traversals
diff :=LC_COLLATE=C diff --no-dereference -N
# setup-deps-verification sets up two copies of the project for dependency verification:
# 1. A symbolic link to the current directory (as-is)
# 2. A copy with freshly processed dependencies (updated go.mod replace directives, tidied go.mod and go.sum, and recreated vendor/)
# This allows comparing go.mod, go.sum, and vendor/ contents to ensure they are correct.
# $1 - temporary directory
define setup-deps-verification
ln -s $(abspath ./) "$(1)"/current
cp -R -H ./ "$(1)"/updated
$(RM) -r "$(1)"/updated/vendor
cd "$(1)"/updated && \
./hack/update-go-mod-replace.sh && \
$(GO) mod tidy && \
$(GO) mod vendor && \
$(GO) mod verify
endef
verify-deps: tmp_dir:=$(shell mktemp -d)
verify-deps:
$(call setup-deps-verification,$(tmp_dir))
@echo $(diff) "$(tmp_dir)"/{current,updated}/go.mod
@ $(diff) "$(tmp_dir)"/{current,updated}/go.mod || ( echo '`go.mod` content is incorrect - did you run `make update-go-mod-replace` and `go mod tidy`?' && false )
@echo $(diff) "$(tmp_dir)"/{current,updated}/go.sum
@ $(diff) "$(tmp_dir)"/{current,updated}/go.sum || ( echo '`go.sum` content is incorrect - did you run `go mod tidy`?' && false )
@echo $(diff) -r "$(tmp_dir)"/{current,updated}/vendor
@ $(diff) -r "$(tmp_dir)"/{current,updated}/vendor || ( echo '`vendor/` content is incorrect - did you run `go mod vendor`?' && false )
$(RM) -r "$(tmp_dir)"
.PHONY: verify-deps
verify-helm-lint:
@$(foreach chart,$(HELM_CHARTS),$(call lint-helm,$(chart)))
.PHONY: verify-helm-lint
# $1 - codegen command
# $2 - extra args
define run-codegen
$(GO) run "$(CODEGEN_PKG)/cmd/$(1)" --go-header-file='$(CODEGEN_HEADER_FILE)' $(2)
endef
# $1 - api packages
define run-deepcopy-gen
$(call run-codegen,deepcopy-gen,--output-file='zz_generated.deepcopy.go' $(1))
endef
# $1 - group
# $2 - api packages
# $3 - client dir
define run-client-gen
$(call run-codegen,client-gen,--clientset-name=versioned --input-base='./' --output-pkg='$(GO_PACKAGE)/$(3)/$(1)/clientset' --output-dir='./$(3)/$(1)/clientset/' $(foreach p,$(2),--input='$(p)'))
endef
# $1 - group
# $2 - api packages
# $3 - client dir
define run-lister-gen
$(call run-codegen,lister-gen,--output-pkg='$(GO_PACKAGE)/$(3)/$(1)/listers' --output-dir='./$(3)/$(1)/listers/' $(2))
endef
# $1 - group
# $2 - api packages
# $3 - client dir
define run-informer-gen
$(call run-codegen,informer-gen,--output-pkg='$(GO_PACKAGE)/$(3)/$(1)/informers' --output-dir='./$(3)/$(1)/informers/' --versioned-clientset-package '$(GO_PACKAGE)/$(3)/$(1)/clientset/versioned' --listers-package='$(GO_PACKAGE)/$(3)/$(1)/listers' $(2))
endef
# $1 - packages
expand_go_packages_to_json=$(shell $(GO) list -json $(1) | $(JQ) -sr 'map(select(.Name | test("^v[0-9]+.*$$"))) | reduce .[] as $$item ([]; . + [$$item.ImportPath])')$(if $(filter $(.SHELLSTATUS),0),,$(error failed to expand packages to json: $(1)))
# $1 - packages
expand_go_packages_with_commas=$(shell echo '$(call expand_go_packages_to_json,$(1))' | $(JQ) -r '. | join(",")')$(if $(filter $(.SHELLSTATUS),0),,$(error failed to expand packages with commas: $(1)))
# $1 - packages
expand_go_packages_with_spaces=$(shell echo '$(call expand_go_packages_to_json,$(1))' | $(JQ) -r '. | join(" ")')$(if $(filter $(.SHELLSTATUS),0),,$(error failed to expand packages with spaces: $(1)))
# $1 - group
# $2 - api packages
# $3 - client dir
define run-client-generators
$(call run-client-gen,$(1),$(2),$(3))
$(call run-lister-gen,$(1),$(2),$(3))
$(call run-informer-gen,$(1),$(2),$(3))
endef
define run-update-codegen
$(call run-deepcopy-gen,$(addsuffix /...,$(api_groups) $(nonrest_api_groups)))
$(foreach group,$(api_groups),$(call run-client-generators,$(notdir $(group)),$(call expand_go_packages_with_spaces,$(group)/...),pkg/client))
endef
update-codegen:
$(call run-update-codegen)
.PHONY: update-codegen
# $1 - original dir
# $2 - generated dir
define verify-group-deepcopy-gen
find $(1) $(2) -type f -name 'zz_generated.deepcopy.go' -printf '%P\n' | sort | uniq | while read -r f; do $(diff) -r "$(1)/$${f}" "$(2)/$${f}"; done
endef
verify-codegen: tmp_dir :=$(shell mktemp -d /tmp/codegen-TMPXXXXXX)
verify-codegen:
cp -R -H ./ "$(tmp_dir)/original"
cp -R -H ./ "$(tmp_dir)/generated"
find $(foreach group,$(api_groups) $(nonrest_api_groups),"$(tmp_dir)/generated/$(group)") -name 'zz_generated.deepcopy.go' -delete
$(RM) -r "$(tmp_dir)/generated/pkg/client"
+$(MAKE) -C "$(tmp_dir)/generated" update-codegen
$(foreach group,$(api_groups) $(nonrest_api_groups),$(call verify-group-deepcopy-gen,"$(tmp_dir)/original/$(group)","$(tmp_dir)/generated/$(group)"))
$(diff) -r "$(tmp_dir)/"{original,generated}/pkg/client
.PHONY: verify-codegen
# $1 - api package
# $2 - output dir
# We need to cleanup `---` in the yaml output manually because it shouldn't be there and it breaks opm.
define run-crd-gen
$(CONTROLLER_GEN) crd paths='$(1)' output:dir='$(2)'
find '$(2)' -mindepth 1 -maxdepth 1 -type f -name '*.yaml' -exec $(YQ) -i eval '... style=""' {} \;
endef
# $1 - dir prefix
define generate-crds
$(foreach p,$(api_packages),$(call run-crd-gen,$(subst $(GO_MODULE)/,,./$(p)),$(1)$(subst $(GO_MODULE)/,,./$(p))))
endef
update-crds:
$(call generate-crds,)
.PHONY: update-crds
verify-crds: tmp_dir :=$(shell mktemp -d /tmp/crd-TMPXXXXXX)
verify-crds:
mkdir '$(tmp_dir)'/{original,generated}
find $(api_package_dirs) -type f -name '*.yaml' -exec cp --parent {} '$(tmp_dir)'/original \;
$(call generate-crds,$(tmp_dir)/generated/)
$(diff) -r '$(tmp_dir)'/{original,generated} || (echo 'CRD definitions are not up-to date. Please run `make update-crds` to update it or manually remove the ones that should no longer be generated.' && false)
.PHONY: verify-crds
# $1 - target file
define generate-helm-schema-scylla
$(YQ) eval -j '{"$$schema": "http://json-schema.org/schema#"} * (.spec.versions[] | select(.name == "v1") | \
.schema.openAPIV3Schema.properties.spec) | \
.properties.racks=.properties.datacenter.properties.racks | \
.properties.datacenter={"type": "string"}' $(CRD_PATH) > '$(1)'
endef
# $1 - Scylla schema
# $2 - target file
define generate-helm-schema-scylla-manager
$(YQ) eval-all -j 'select(fi==0).properties.scylla = ( \
select(fi==1) | del(.$$schema) \
) | select(fi==0)' '$(HELM_CHARTS_DIR)/scylla-manager/values.schema.template.json' '$(1)' > '$(2)'
endef
update-helm-schemas:
$(call generate-helm-schema-scylla,'$(HELM_CHARTS_DIR)/scylla/values.schema.json')
$(call generate-helm-schema-scylla-manager,'$(HELM_CHARTS_DIR)/scylla/values.schema.json','$(HELM_CHARTS_DIR)/scylla-manager/values.schema.json')
.PHONY: update-helm-schemas
verify-helm-schemas: tmp_dir:=$(shell mktemp -d)
verify-helm-schemas:
mkdir -p $(tmp_dir)/{scylla,scylla-manager}
$(call generate-helm-schema-scylla,'$(tmp_dir)/scylla/values.schema.json')
$(diff) '$(tmp_dir)/scylla/values.schema.json' '$(HELM_CHARTS_DIR)/scylla/values.schema.json'
$(call generate-helm-schema-scylla-manager,'$(HELM_CHARTS_DIR)/scylla/values.schema.json','$(tmp_dir)/scylla-manager/values.schema.json')
$(diff) '$(tmp_dir)/scylla-manager/values.schema.json' '$(HELM_CHARTS_DIR)/scylla-manager/values.schema.json'
.PHONY: verify-helm-schemas
# $1 - name
# $2 - chart path
# $3 - values path
# $4 - target dir
define generate-manifests-from-helm
$(HELM) template '$(1)' '$(2)' --namespace='$(1)' --values='$(3)' --output-dir='$(4)'
find '$(4)' -name '*.yaml' -exec sed -i -e '/^---$$/d' -e '/^# Source: /d' {} \;
endef
# $1 - Helm values file
# $2 - output_dir
# $3 - tmp_dir
define generate-operator-manifests
$(call generate-manifests-from-helm,scylla-operator,helm/scylla-operator,$(1),$(3))
mv '$(3)'/scylla-operator/templates/operator.clusterrole.yaml '$(2)'/00_operator.clusterrole.yaml
mv '$(3)'/scylla-operator/templates/operator.clusterrole_def.yaml '$(2)'/00_operator.clusterrole_def.yaml
mv '$(3)'/scylla-operator/templates/operator.clusterrole_def_openshift.yaml '$(2)'/00_operator.clusterrole_def_openshift.yaml
mv '$(3)'/scylla-operator/templates/view_clusterrole.yaml '$(2)'/00_scyllacluster_clusterrole_view.yaml
mv '$(3)'/scylla-operator/templates/edit_clusterrole.yaml '$(2)'/00_scyllacluster_clusterrole_edit.yaml
mv '$(3)'/scylla-operator/templates/scyllacluster_member_clusterrole.yaml '$(2)'/00_scyllacluster_member_clusterrole.yaml
mv '$(3)'/scylla-operator/templates/scyllacluster_member_clusterrole_def.yaml '$(2)'/00_scyllacluster_member_clusterrole_def.yaml
mv '$(3)'/scylla-operator/templates/scyllacluster_member_clusterrole_def_openshift.yaml '$(2)'/00_scyllacluster_member_clusterrole_def_openshift.yaml
mv '$(3)'/scylla-operator/templates/scylladbmonitoring_prometheus_clusterrole.yaml '$(2)'/00_scylladbmonitoring_prometheus_clusterrole.yaml
mv '$(3)'/scylla-operator/templates/scylladbmonitoring_prometheus_clusterrole_def.yaml '$(2)'/00_scylladbmonitoring_prometheus_clusterrole_def.yaml
mv '$(3)'/scylla-operator/templates/scylladbmonitoring_prometheus_clusterrole_def_openshift.yaml '$(2)'/00_scylladbmonitoring_prometheus_clusterrole_def_openshift.yaml
mv '$(3)'/scylla-operator/templates/scylladbmonitoring_grafana_clusterrole.yaml '$(2)'/00_scylladbmonitoring_grafana_clusterrole.yaml
mv '$(3)'/scylla-operator/templates/scylladbmonitoring_grafana_clusterrole_def_openshift.yaml '$(2)'/00_scylladbmonitoring_grafana_clusterrole_def_openshift.yaml
mv '$(3)'/scylla-operator/templates/issuer.yaml '$(2)'/10_issuer.yaml
mv '$(3)'/scylla-operator/templates/certificate.yaml '$(2)'/10_certificate.yaml
mv '$(3)'/scylla-operator/templates/validatingwebhook.yaml '$(2)'/10_validatingwebhook.yaml
mv '$(3)'/scylla-operator/templates/mutatingwebhook.yaml '$(2)'/10_mutatingwebhook.yaml
mv '$(3)'/scylla-operator/templates/webhookserver.service.yaml '$(2)'/10_webhookserver.service.yaml
mv '$(3)'/scylla-operator/templates/webhookserver.serviceaccount.yaml '$(2)'/10_webhookserver.serviceaccount.yaml
mv '$(3)'/scylla-operator/templates/operator.serviceaccount.yaml '$(2)'/10_operator.serviceaccount.yaml
mv '$(3)'/scylla-operator/templates/operator.pdb.yaml '$(2)'/10_operator.pdb.yaml
mv '$(3)'/scylla-operator/templates/webhookserver.pdb.yaml '$(2)'/10_webhookserver.pdb.yaml
mv '$(3)'/scylla-operator/templates/clusterrolebinding.yaml '$(2)'/20_clusterrolebinding.yaml
mv '$(3)'/scylla-operator/templates/operator.deployment.yaml '$(2)'/50_operator.deployment.yaml
mv '$(3)'/scylla-operator/templates/webhookserver.deployment.yaml '$(2)'/50_webhookserver.deployment.yaml
@leftovers=$$( find '$(3)'/scylla-operator/ -mindepth 1 -type f ) && [[ "$${leftovers}" == "" ]] || \
( echo -e "Internal error: Unhandled helm files: \n$${leftovers}" && false )
endef
# $1 - Helm values file
# $2 - output_dir
# $3 - tmp_dir
define generate-manager-manifests
$(call generate-manifests-from-helm,scylla-manager,helm/scylla-manager,$(1),$(3))
mv '$(3)'/scylla-manager/templates/manager_service.yaml '$(2)'/10_manager_service.yaml
mv '$(3)'/scylla-manager/templates/manager_serviceaccount.yaml '$(2)'/10_manager_serviceaccount.yaml
mv '$(3)'/scylla-manager/templates/manager_configmap.yaml '$(2)'/10_manager_configmap.yaml
mv '$(3)'/scylla-manager/templates/manager_networkpolicy.yaml '$(2)'/10_manager_networkpolicy.yaml
mv '$(3)'/scylla-manager/charts/scylla/templates/scyllacluster.yaml '$(2)'/50_scyllacluster.yaml
mv '$(3)'/scylla-manager/templates/manager_deployment.yaml '$(2)'/50_manager_deployment.yaml
@leftovers=$$( find '$(3)'/scylla-manager/ -mindepth 1 -type f ) && [[ "$${leftovers}" == "" ]] || \
( echo -e "Internal error: Unhandled helm files: \n$${leftovers}" && false )
endef
# $1 - chart dir
# $2 - default app version
define set-default-app-version
$(YQ) eval -i -P '.appVersion = "$(2)"' '$(1)'/Chart.yaml
endef
# $1 - values.yaml
define update-scylla-helm-versions
$(YQ) eval-all -i -P '\
select(fi==0).scyllaImage.tag = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0).agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
# $1 - values.yaml
define update-scylla-manager-helm-versions
$(YQ) eval-all -i -P '\
select(fi==0).scylla.scyllaImage.tag = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0).scylla.agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0).image.tag = ( select(fi==1) | .operator.scyllaDBManagerVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
# $1 - file path
# $2 - container name
# $3 - target image ref
define replace-template-container-image-ref
$(YQ) eval -i '(.spec.template.spec.containers[]|select(.name == "$(2)").image) |= "$(3)"' $(1)
endef
update-helm-charts:
$(call set-default-app-version,helm/scylla-operator,$(IMAGE_TAG))
$(call set-default-app-version,helm/scylla-manager,$(IMAGE_TAG))
$(call update-scylla-helm-versions,./helm/scylla/values.yaml)
$(call update-scylla-manager-helm-versions,./helm/scylla-manager/values.yaml)
$(call update-scylla-manager-helm-versions,./helm/deploy/manager_prod.yaml)
.PHONY: update-helm-charts
verify-helm-charts: tmp_dir:=$(shell mktemp -d)
verify-helm-charts:
cp -r './helm/.' '$(tmp_dir)/'
$(call set-default-app-version,$(tmp_dir)/scylla-operator,$(IMAGE_TAG))
$(call set-default-app-version,$(tmp_dir)/scylla-manager,$(IMAGE_TAG))
$(call update-scylla-helm-versions,$(tmp_dir)/scylla/values.yaml)
$(call update-scylla-manager-helm-versions,$(tmp_dir)/scylla-manager/values.yaml)
$(call update-scylla-manager-helm-versions,$(tmp_dir)/deploy/manager_prod.yaml)
$(diff) -r '$(tmp_dir)'/ ./helm/
.PHONY: verify-helm-charts
update-deploy: tmp_dir:=$(shell mktemp -d)
update-deploy:
$(call generate-operator-manifests,helm/deploy/operator.yaml,./deploy/operator,$(tmp_dir))
$(call concat-manifests,$(sort $(wildcard deploy/operator/*.yaml)),./deploy/operator.yaml)
$(call generate-manager-manifests,helm/deploy/manager_prod.yaml,./deploy/manager,$(tmp_dir))
$(call concat-manifests,$(sort $(wildcard ./deploy/manager/*.yaml)),./deploy/manager.yaml)
.PHONY: update-deploy
verify-deploy: tmp_dir :=$(shell mktemp -d)
verify-deploy: tmp_dir_generate :=$(shell mktemp -d)
verify-deploy:
mkdir -p $(tmp_dir)/{operator,manager}
cp -r deploy/operator/. $(tmp_dir)/operator/.
$(call generate-operator-manifests,helm/deploy/operator.yaml,$(tmp_dir)/operator,$(tmp_dir_generate))
$(diff) -r '$(tmp_dir)'/operator deploy/operator
$(call concat-manifests,$(sort $(wildcard ./deploy/operator/*.yaml)),'$(tmp_dir)'/operator.yaml)
$(diff) '$(tmp_dir)'/operator.yaml deploy/operator.yaml
cp -r deploy/manager/. $(tmp_dir)/manager/.
$(call generate-manager-manifests,helm/deploy/manager_prod.yaml,$(tmp_dir)/manager,$(tmp_dir_generate))
$(diff) -r '$(tmp_dir)'/manager deploy/manager
$(call concat-manifests,$(sort $(wildcard ./deploy/manager/*.yaml)),'$(tmp_dir)'/manager.yaml)
$(diff) '$(tmp_dir)'/manager.yaml deploy/manager.yaml
.PHONY: verify-deploy
# $1 - file name
# $2 - ScyllaCluster document index
define replace-scyllacluster-versions
$(YQ) eval-all -i -P '\
select(fi==0 and di==$(2)).spec.version = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0 and di==$(2)).spec.agentVersion = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
update-examples:
update-examples:
$(call replace-scyllacluster-versions,./examples/scylladb/scylla.scyllacluster.yaml,0)
$(call concat-manifests,$(sort $(wildcard ./examples/third-party/haproxy-ingress/*.yaml)),./examples/third-party/haproxy-ingress.yaml)
./hack/third-party/build-cert-manager-manifest.sh "./examples/third-party/cert-manager.yaml"
./hack/third-party/build-prometheus-operator-manifest.sh "./examples/third-party/prometheus-operator.yaml"
./hack/third-party/build-local-csi-driver-manifests.sh "./examples/common/local-volume-provisioner/local-csi-driver"
.PHONY: update-examples
verify-examples: tmp_dir :=$(shell mktemp -d)
verify-examples:
cp -r ./examples/. $(tmp_dir)/
$(call replace-scyllacluster-versions,$(tmp_dir)/scylladb/scylla.scyllacluster.yaml,0)
$(call concat-manifests,$(sort $(wildcard ./examples/third-party/haproxy-ingress/*.yaml)),$(tmp_dir)/third-party/haproxy-ingress.yaml)
./hack/third-party/build-cert-manager-manifest.sh "$(tmp_dir)/third-party/cert-manager.yaml"
./hack/third-party/build-prometheus-operator-manifest.sh "$(tmp_dir)/third-party/prometheus-operator.yaml"
./hack/third-party/build-local-csi-driver-manifests.sh "$(tmp_dir)/common/local-volume-provisioner/local-csi-driver"
$(diff) -r '$(tmp_dir)'/ ./examples
.PHONY: verify-examples
# $1 - dashboard dir
# $2 - output configmap location
define embed-dashboard
if [[ ! -d '$(2)' ]]; then mkdir '$(2)'; fi
cp -r '$(1)'/*.json '$(2)'
# FIXME: Amnon: This need to be fixed in the monitoring repo
find '$(2)' -name '*.json' -exec sed -i -e 's/job=\\"scylla\\"/job=~\\"$$cluster|$$^\\"/g' {} \;
endef
# $1 - monitoring assets dir
define embed-dashboards
$(foreach d,$(wildcard $(MONITORING_DASHBOARDS_DIR)/ver_*),$(call embed-dashboard,$(d),$(1)/$(subst ver_,scylladb-,$(notdir $(d)))))
$(foreach d,$(wildcard $(MONITORING_DASHBOARDS_DIR)/manager_*),$(call embed-dashboard,$(d),$(1)/$(subst manager_,manager-,$(notdir $(d)))))
endef
# $1 - rules assets dir
define embed-rules
cp '$(MONITORING_RULES_DIR)'/*.yml '$(1)'/
endef
# $1 - rules assets dir
define embed-monitoring
$(RM) -r '$(1)/grafana/v1alpha1/dashboards/platform/'*/
$(RM) -r '$(1)/prometheus/v1/rules/'*/
$(call embed-dashboards,$(1)/grafana/v1alpha1/dashboards/platform)
$(call embed-rules,$(1)/prometheus/v1/rules)
endef
update-monitoring: submodules
$(call embed-monitoring,./assets/monitoring)
.PHONY: update-monitoring
verify-monitoring: tmp_dir :=$(shell mktemp -d)
verify-monitoring: submodules
cp -r ./assets/monitoring/. '$(tmp_dir)/'
$(RM) -r '$(tmp_dir)/'{grafana/v1alpha1/dashboards/platform/*,prometheus/v1/rules/*}
$(call embed-monitoring,$(tmp_dir)/)
$(diff) -r '$(tmp_dir)'/ ./assets/monitoring
.PHONY: verify-monitoring
# $1 - extra flags
define run-update-docs
$(GO) run ./cmd/gen-api-reference/ --templates-dir '$(DOCS_API_REFERENCE_DIR)'/templates $(1) $(CRD_FILES)
endef
update-docs-api:
$(call run-update-docs,--output-dir='$(DOCS_API_REFERENCE_DIR)'/groups --overwrite)
.PHONY: update-docs-api
verify-docs-api: tmp_dir :=$(shell mktemp -d)
verify-docs-api:
$(call run-update-docs,--output-dir="$(tmp_dir)")
$(diff) -r '$(tmp_dir)' '$(DOCS_API_REFERENCE_DIR)'/groups || (echo 'Generated API docs are not up-to date. Please run `make update-docs-api` to update it or remove the extra files.' && false)
.PHONY: verify-docs-api
verify-links:
@set -euEo pipefail; broken_links=( $$( find . -type l ! -exec test -e {} \; -print ) ); \
if [[ -n "$${broken_links[@]}" ]]; then \
echo "The following links are broken:" > /dev/stderr; \
ls -l --color=auto $${broken_links[@]}; \
exit 1; \
fi;
.PHONY: verify-links
# patch-bundle applies patches matching the glob pattern to the target file. It strips any head comments from the patch files.
# $1 - path to the target being patched
# $2 - glob pattern for patch files
define patch-bundle
for f in $(2); do \
$(YQ) -i -e '. *= (load("'"$$f"'") | ... head_comment="")' $(1); \
done
endef
# $1 - path to manifests directory
define fix-bundle-manifests-filenames
find $(1) -type f -name '*:*' | while read file; do \
newfile=$$(echo "$$file" | sed 's/:/-/g'); \
mv "$$file" "$$newfile"; \
done
endef
# $1 - path to clusterserviceversion
define fix-bundle-webhook-certificate-volume
$(YQ) -i e 'del( .spec.install.spec.deployments.[] | select( .name == "webhook-server" ) | .spec.template.spec.volumes.[] | select( .name == "cert" ) )' $(1)
$(YQ) -i e 'del( .spec.install.spec.deployments.[] | select( .name == "webhook-server" ) | .spec.template.spec.containers.[] | select( .name == "webhook-server" ) | .volumeMounts.[] | select( .name == "cert" ) )' $(1)
endef
# $1 - logo path
# $2 - logo patch path
define update-bundle-patches-manifests-logo
$(YQ) -i ".spec.icon[0].base64data = \"$$( base64 -w 0 '$(1)' )\"" '$(2)'
$(YQ) -i ".spec.icon[0].mediatype = \"$$( file --mime-type -b '$(1)' )\"" '$(2)'
endef
# $1 - metadata file
# $2 - patch file
define update-bundle-patches-manifests-versions
$(YQ) eval-all -i -P '\
select(fi==0).spec.minKubeVersion = ( select(fi==1) | .operator.minKubernetesVersion ) | \
select(fi==0)' \
'$(2)' '$(1)'
endef
# $1 - patch file
define update-bundle-patches-manifests-internal-objects
$(YQ) eval-all -i -P '\
select(fi==0).metadata.annotations."operators.operatorframework.io/internal-objects" = ( [select(fi!=0) | select(.metadata.annotations."scylla-operator.scylladb.com/internal-api-type" == "true") | .metadata.name] | sort | tojson ) | \
select(fi==0)' \
'$(1)' $(CRD_FILES)
endef
# $1 - metadata file
# $2 - bundle metadata annotations file
define update-bundle-patches-metadata-versions
$(YQ) eval-all -i -P '\
select(fi==0).annotations."com.redhat.openshift.versions" = ( select(fi==1) | "v" + .operator.minOpenShiftVersion + "-v" + .operator.maxOpenShiftVersion ) | \
select(fi==0)' \
'$(2)' '$(1)'
endef
# $1 - bundle path
define update-bundle-patches
$(call update-bundle-patches-manifests-logo,./logo.svg,$(1)/patches/manifests/logo.clusterserviceversion.yaml)
$(call update-bundle-patches-manifests-versions,assets/metadata/metadata.yaml,$(1)/patches/manifests/versions.clusterserviceversion.yaml)
$(call update-bundle-patches-manifests-internal-objects,$(1)/patches/manifests/internal-objects.clusterserviceversion.yaml)
$(call update-bundle-patches-metadata-versions,assets/metadata/metadata.yaml,$(1)/patches/metadata/versions.annotations.yaml)
endef
# $1 - path to bundle
define apply-bundle-fixes
$(call patch-bundle,$(1)/manifests/scylladb-operator.clusterserviceversion.yaml,$(1)/patches/manifests/*.clusterserviceversion.yaml)
$(call patch-bundle,$(1)/metadata/annotations.yaml,$(1)/patches/metadata/*.annotations.yaml)
# Workaround for https://github.com/operator-framework/operator-registry/issues/1741
$(call fix-bundle-manifests-filenames, $(1)/manifests)
# OLM Bundles enforces their certificate, we cannot use custom source of it
# https://olm.operatorframework.io/docs/advanced-tasks/adding-admission-and-conversion-webhooks/#deploying-an-operator-with-webhooks-using-olm
# Hence we cannot require our own copy coming from secret in webhook-server deployment.
# Delete volume and related volume mount and use only what OLM provides.
$(call fix-bundle-webhook-certificate-volume, $(1)/manifests/scylladb-operator.clusterserviceversion.yaml)
endef
# $1 - bundle path
define generate-bundle
$(call update-bundle-patches,$(1))
$(OPERATOR_SDK) generate bundle --package scylladb-operator --deploy-dir deploy/operator/ --manifests --output-dir $(1) --overwrite
$(call apply-bundle-fixes,$(1))
endef
update-bundle:
$(call generate-bundle,./bundle)
.PHONY: update-bundle
verify-bundle: tmp_dir :=$(shell mktemp -d)
verify-bundle:
cp -r ./bundle/. $(tmp_dir)/
$(call generate-bundle,$(tmp_dir))
$(diff) -r '$(tmp_dir)'/ ./bundle
.PHONY: verify-bundle
update-go-mod-replace:
./hack/update-go-mod-replace.sh
.PHONY: update-go-mod-replace
update-renovate-config:
./hack/sync-renovate-config-with-go-mod-replace.sh $(RENOVATE_CONFIG)
.PHONY: update-renovate-config
verify-renovate-config: tmp_dir :=$(shell mktemp -d)
verify-renovate-config:
cp $(RENOVATE_CONFIG) "$(tmp_dir)/renovate.json"
./hack/sync-renovate-config-with-go-mod-replace.sh "$(tmp_dir)/renovate.json"
$(diff) "$(tmp_dir)/renovate.json" $(RENOVATE_CONFIG) || (echo 'Renovate config is not up-to date. Please run `make update-renovate-config` to update it.' && false)
.PHONY: verify-renovate-config
update-in-tree-prometheus-operator-exports:
./hack/third-party/generate-in-tree-prometheus-operator-exports.sh ./pkg/thirdparty/github.com/prometheus-operator/prometheus-operator
.PHONY: update-in-tree-prometheus-operator-exports
verify-in-tree-prometheus-operator-exports: tmp_dir :=$(shell mktemp -d)
verify-in-tree-prometheus-operator-exports:
./hack/third-party/generate-in-tree-prometheus-operator-exports.sh "$(tmp_dir)"
$(diff) -r "$(tmp_dir)" ./pkg/thirdparty/github.com/prometheus-operator/prometheus-operator || (echo 'In-tree prometheus-operator exports are not up to date. Please run `make update-in-tree-prometheus-operator-exports` to update them.' && false)
.PHONY: verify-in-tree-prometheus-operator-exports
# $1 - config file path
define patch-config-monitoring
./hack/sync-config-with-monitoring-versions.sh "$(1)"
endef
# $1 - config file path
define patch-config-scylladb-test-versions
./hack/sync-config-with-scylladb-test-versions.sh "$(1)"
endef
update-config:
$(call patch-config-monitoring,./assets/config/config.yaml)
$(call patch-config-scylladb-test-versions,./assets/config/config.yaml)
.PHONY: update-config
verify-config: tmp_dir :=$(shell mktemp -d)
verify-config:
cp ./assets/config/config.yaml "$(tmp_dir)/config.yaml"
$(call patch-config-monitoring,"$(tmp_dir)/config.yaml")
$(call patch-config-scylladb-test-versions,"$(tmp_dir)/config.yaml")
$(diff) "$(tmp_dir)/config.yaml" ./assets/config/config.yaml || (echo 'Config is not up to date. Please run `make update-config` to update it.' && false)
.PHONY: verify-config
verify-e2e-suite-coverage:
./hack/verify-e2e-suite-coverage.sh
.PHONY: verify-e2e-suite-coverage
verify: verify-codegen verify-crds verify-helm-schemas verify-helm-charts verify-deploy verify-lint verify-helm-lint verify-links verify-examples verify-docs-api verify-monitoring verify-bundle verify-renovate-config verify-in-tree-prometheus-operator-exports verify-config verify-e2e-suite-coverage
.PHONY: verify
update: update-codegen update-crds update-helm-schemas update-helm-charts update-deploy update-examples update-docs-api update-monitoring update-bundle update-go-mod-replace update-renovate-config update-in-tree-prometheus-operator-exports update-config
.PHONY: update
test-unit:
$(GO) test $(GO_TEST_COUNT) $(GO_TEST_FLAGS) $(GO_TEST_EXTRA_FLAGS) $(GO_TEST_PACKAGES) $(if $(GO_TEST_ARGS)$(GO_TEST_EXTRA_ARGS),-args $(GO_TEST_ARGS) $(GO_TEST_EXTRA_ARGS))
.PHONY: test-unit
test-e2e:
$(GO) run ./cmd/scylla-operator-tests run $(GO_TEST_E2E_EXTRA_ARGS)
.PHONY: test-e2e
test: test-unit test-binary
.PHONY: test
test-binary: build
# Verify that the built binary runs and prints the expected output (including the exact commit hash):
@ test "$$(./scylla-operator version)" = 'GitCommit="$(GIT_COMMIT)"' || (echo "Built binary version output does not match the expected commit hash." && false)
.PHONY: test-binary
test-envtest:
ginkgo --tags=envtest -p './test/envtest/controllers/...'
help:
$(info The following make targets are available:)
@$(MAKE) -f $(firstword $(MAKEFILE_LIST)) --print-data-base --question no-such-target 2>&1 | grep -v 'no-such-target' | \
grep -v -e '^no-such-target' -e '^makefile' | \
awk '/^[^.%][-A-Za-z0-9_]*:/ { print substr($$1, 1, length($$1)-1) }' | sort -u
.PHONY: help
cert-manager:
kubectl apply -f examples/third-party/cert-manager.yaml
kubectl -n cert-manager wait --for=condition=ready pod -l app=cert-manager --timeout=60s
kubectl -n cert-manager wait --for=condition=ready pod -l app=cainjector --timeout=60s
kubectl -n cert-manager wait --for=condition=ready pod -l app=webhook --timeout=60s
.PHONY: cert-manager
image:
docker build . -t $(IMAGE_REF)
.PHONY: image
helm-build:
$(foreach chart,$(HELM_CHARTS),$(call package-helm,$(chart),$(HELM_BUILD_DIR),$(HELM_APP_VERSION),$(HELM_CHART_VERSION)))
.PHONY: helm-build
# Build Helm charts and publish them in Development GCS repo
helm-publish-dev: HELM_REPOSITORY=https://scylla-operator-charts-dev.storage.googleapis.com/$(HELM_CHANNEL)
helm-publish-dev: HELM_BUCKET=gs://scylla-operator-charts-dev/$(HELM_CHANNEL)
helm-publish-dev: HELM_MANIFEST_CACHE_CONTROL :=no-cache, no-store, must-revalidate
helm-publish-dev: helm-publish
.PHONY: helm-publish-dev
# Build Helm charts and publish them in GCS repo
helm-publish:
mkdir -p '$(HELM_LOCAL_REPO)'
$(GSUTIL) rsync -d '$(HELM_BUCKET)' '$(HELM_LOCAL_REPO)'
$(foreach chart,$(HELM_CHARTS),$(call package-helm,$(chart),$(HELM_LOCAL_REPO),$(HELM_APP_VERSION),$(HELM_CHART_VERSION)))
helm repo index '$(HELM_LOCAL_REPO)' --url '$(HELM_REPOSITORY)' --merge '$(HELM_LOCAL_REPO)/index.yaml'
$(GSUTIL) rsync -d '$(HELM_LOCAL_REPO)' '$(HELM_BUCKET)'
$(GSUTIL) setmeta -h 'Content-Type:text/yaml' -h 'Cache-Control: $(HELM_MANIFEST_CACHE_CONTROL)' '$(HELM_BUCKET)/index.yaml'
.PHONY: helm-publish
kind-setup:
CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/kind/cluster-setup.sh
.PHONY: kind-setup
kind-teardown:
CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/kind/cluster-teardown.sh
.PHONY: kind-teardown
test-e2e-kind: kind-setup
CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/kind/run-e2e-tests.sh
.PHONY: test-e2e-kind
test-e2e-kind-multi-datacenter: kind-setup
SO_SUITE=scylla-operator/conformance/multi-datacenter-parallel CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/kind/run-e2e-tests.sh
.PHONY: test-e2e-kind-multi-datacenter