-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
2621 lines (2319 loc) · 124 KB
/
Makefile
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
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# general
SHELL := /bin/bash
OKD ?= false
OPERATOR_NAMESPACE ?= openstack-operators
NAMESPACE ?= openstack
PASSWORD ?= 12345678
SECRET ?= osp-secret
LIBVIRT_SECRET ?= libvirt-secret
OUT ?= ${PWD}/out
TIMEOUT ?= 300s
BAREMETAL_TIMEOUT ?= 20m
DBSERVICE ?= galera
ifeq ($(DBSERVICE), galera)
DBSERVICE_CONTAINER = openstack-galera-0
else
DBSERVICE_CONTAINER = mariadb-openstack
endif
METADATA_SHARED_SECRET ?= 1234567842
HEAT_AUTH_ENCRYPTION_KEY ?= 767c3ed056cbaa3b9dfedb8c6f825bf0
OPENSTACK_K8S_BRANCH ?= main
OPENSTACK_K8S_TAG ?= latest
# Use Red Hat operators from OpenShift Marketplace
REDHAT_OPERATORS ?= false
ifeq ($(REDHAT_OPERATORS), true)
OPERATOR_CHANNEL ?= stable-v1.0
OPERATOR_SOURCE ?= redhat-operators
OPERATOR_SOURCE_NAMESPACE ?= openshift-marketplace
endif
# Barbican encryption key should be a random 32-byte string that is base64
# encoded. e.g. head --bytes=32 /dev/urandom | base64
BARBICAN_SIMPLE_CRYPTO_ENCRYPTION_KEY ?= sEFmdFjDUqRM2VemYslV5yGNWjokioJXsg8Nrlc3drU=
# Allows overriding the cleanup command used in *_cleanup targets.
# Useful in CI, to allow injectin kustomization in each operator CR directory
# before the resource gets deployed. If it's not possible to inject Kustomizations/CRs
# in the CR dir if a call to each deploy target cleans the CR dir.
CLEANUP_DIR_CMD ?= rm -Rf
# When cloning operator's repo, enables the checkout from commit hash
# that is referenced in openstack-operator's go.mod. Note that openstack-opearator
# code can exist in OPERATOR_BASE_DIR/openstack-operator path, otherwise it will
# be also cloned from OPENSTACK_REPO/OPENSTACK_BRANCH.
CHECKOUT_FROM_OPENSTACK_REF ?= false
# network isolation
NETWORK_ISOLATION ?= true
NETWORK_ISOLATION_USE_DEFAULT_NETWORK ?= true
NETWORK_ISOLATION_IPV4 ?= true
NETWORK_ISOLATION_IPV6 ?= false
NETWORK_MTU ?= 1500
NETWORK_VLAN_START ?= 20
NETWORK_VLAN_STEP ?= 1
NETWORK_ISOLATION_IPV4_ADDRESS ?= 172.16.1.1/24
NETWORK_ISOLATION_IPV6_ADDRESS ?= fd00:aaaa::1/64
# This creates a macvlan on the host network namespace on top of the storage VLAN
# to allow host to/from pod network communication on the same host using that VLAN.
# An example when this is useful is when using Cinder Volume with LVM + iSCSI
# without using the host's IP address.
NETWORK_STORAGE_MACVLAN ?=
# are we deploying to microshift
MICROSHIFT ?= 0
# operators gets cloned here
OPERATOR_BASE_DIR ?= ${OUT}/operator
# storage (used by some operators)
STORAGE_CLASS ?= "local-storage"
CRC_STORAGE_RETRIES ?= 3
LVMS_CR ?= 1
# options to pass in all targets that use git clone
GIT_CLONE_OPTS ?=
# set to 3 to use a 3-node galera sample
GALERA_REPLICAS ?=
# OpenStack Operator
OPENSTACK_IMG ?= quay.io/openstack-k8s-operators/openstack-operator-index:${OPENSTACK_K8S_TAG}
OPENSTACK_REPO ?= https://github.com/openstack-k8s-operators/openstack-operator.git
OPENSTACK_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
OPENSTACK_COMMIT_HASH ?=
ifeq ($(NETWORK_ISOLATION), true)
ifeq ($(DBSERVICE), galera)
OPENSTACK_CTLPLANE ?= $(if $(findstring 3,$(GALERA_REPLICAS)),config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml,config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation.yaml)
else
OPENSTACK_CTLPLANE ?= config/samples/core_v1beta1_openstackcontrolplane_network_isolation.yaml
endif
else
ifeq ($(DBSERVICE), galera)
OPENSTACK_CTLPLANE ?= $(if $(findstring 3,$(GALERA_REPLICAS)),config/samples/core_v1beta1_openstackcontrolplane_galera_3replicas.yaml,config/samples/core_v1beta1_openstackcontrolplane_galera.yaml)
else
OPENSTACK_CTLPLANE ?= config/samples/core_v1beta1_openstackcontrolplane.yaml
endif
endif
OPENSTACK_CR ?= ${OPERATOR_BASE_DIR}/openstack-operator/${OPENSTACK_CTLPLANE}
OPENSTACK_BUNDLE_IMG ?= quay.io/openstack-k8s-operators/openstack-operator-bundle:${OPENSTACK_K8S_TAG}
OPENSTACK_STORAGE_BUNDLE_IMG ?= quay.io/openstack-k8s-operators/openstack-operator-storage-bundle:${OPENSTACK_K8S_TAG}
OPENSTACK_CRDS_DIR ?= openstack_crds
OPENSTACK_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/openstack-operator/kuttl-test.yaml
OPENSTACK_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/openstack-operator/tests/kuttl/tests
OPENSTACK_KUTTL_NAMESPACE ?= openstack-kuttl-tests
# Infra Operator
INFRA_IMG ?= quay.io/openstack-k8s-operators/infra-operator-index:${OPENSTACK_K8S_TAG}
INFRA_REPO ?= https://github.com/openstack-k8s-operators/infra-operator.git
INFRA_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
INFRA_COMMIT_HASH ?=
INFRA_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/infra-operator/kuttl-test.yaml
INFRA_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/infra-operator/tests/kuttl/tests
INFRA_KUTTL_NAMESPACE ?= infra-kuttl-tests
# DNS
# DNS_IMG ?= (this is unused because this is part of infra operator)
DNSMASQ ?= config/samples/network_v1beta1_dnsmasq.yaml
DNSDATA ?= config/samples/network_v1beta1_dnsdata.yaml
DNSMASQ_CR ?= ${OPERATOR_BASE_DIR}/infra-operator/${DNSMASQ}
DNSDATA_CR ?= ${OPERATOR_BASE_DIR}/infra-operator/${DNSDATA}
DNS_DEPL_IMG ?= unused
# NetConfig
NETCONFIG ?= config/samples/network_v1beta1_netconfig.yaml
NETCONFIG_CR ?= ${OPERATOR_BASE_DIR}/infra-operator/${NETCONFIG}
NETCONFIG_DEPL_IMG ?= unused
# Memcached
# MEMCACHED_IMG ?= (this is unused because this is part of infra operator)
MEMCACHED ?= config/samples/memcached_v1beta1_memcached.yaml
MEMCACHED_CR ?= ${OPERATOR_BASE_DIR}/infra-operator/${MEMCACHED}
MEMCACHED_DEPL_IMG ?= unused
# Keystone
KEYSTONE_IMG ?= quay.io/openstack-k8s-operators/keystone-operator-index:${OPENSTACK_K8S_TAG}
KEYSTONE_REPO ?= https://github.com/openstack-k8s-operators/keystone-operator.git
KEYSTONE_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
KEYSTONE_COMMMIT_HASH ?=
KEYSTONEAPI ?= config/samples/keystone_v1beta1_keystoneapi.yaml
KEYSTONEAPI_CR ?= ${OPERATOR_BASE_DIR}/keystone-operator/${KEYSTONEAPI}
KEYSTONEAPI_DEPL_IMG ?= unused
KEYSTONE_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/keystone-operator/kuttl-test.yaml
KEYSTONE_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/keystone-operator/tests/kuttl/tests
KEYSTONE_KUTTL_NAMESPACE ?= keystone-kuttl-tests
# Barbican
BARBICAN_IMG ?= quay.io/openstack-k8s-operators/barbican-operator-index:latest
BARBICAN_REPO ?= https://github.com/openstack-k8s-operators/barbican-operator.git
BARBICAN_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
BARBICAN_COMMIT_HASH ?=
BARBICAN ?= config/samples/barbican_v1beta1_barbican.yaml
BARBICAN_CR ?= ${OPERATOR_BASE_DIR}/barbican-operator/${BARBICAN}
BARBICAN_DEPL_IMG ?= unused
BARBICAN_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/barbican-operator/kuttl-test.yaml
BARBICAN_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/barbican-operator/tests/kuttl/tests
BARBICAN_KUTTL_NAMESPACE ?= barbican-kuttl-tests
# Mariadb
MARIADB_IMG ?= quay.io/openstack-k8s-operators/mariadb-operator-index:${OPENSTACK_K8S_TAG}
MARIADB_REPO ?= https://github.com/openstack-k8s-operators/mariadb-operator.git
MARIADB_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
MARIADB_COMMIT_HASH ?=
ifeq ($(DBSERVICE), galera)
MARIADB ?= config/samples/mariadb_v1beta1_galera.yaml
else
MARIADB ?= config/samples/mariadb_v1beta1_mariadb.yaml
endif
MARIADB_CR ?= ${OPERATOR_BASE_DIR}/mariadb-operator/${MARIADB}
MARIADB_DEPL_IMG ?= unused
MARIADB_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/mariadb-operator/kuttl-test.yaml
MARIADB_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/mariadb-operator/tests/kuttl/tests
MARIADB_KUTTL_NAMESPACE ?= mariadb-kuttl-tests
# Placement
PLACEMENT_IMG ?= quay.io/openstack-k8s-operators/placement-operator-index:${OPENSTACK_K8S_TAG}
PLACEMENT_REPO ?= https://github.com/openstack-k8s-operators/placement-operator.git
PLACEMENT_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
PLACEMENT_COMMIT_HASH ?=
PLACEMENTAPI ?= config/samples/placement_v1beta1_placementapi.yaml
PLACEMENTAPI_CR ?= ${OPERATOR_BASE_DIR}/placement-operator/${PLACEMENTAPI}
PLACEMENTAPI_DEPL_IMG ?= unused
PLACEMENT_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/placement-operator/kuttl-test.yaml
PLACEMENT_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/placement-operator/tests/kuttl/tests
PLACEMENT_KUTTL_NAMESPACE ?= placement-kuttl-tests
# Sir Glancealot
GLANCE_IMG ?= quay.io/openstack-k8s-operators/glance-operator-index:${OPENSTACK_K8S_TAG}
GLANCE_REPO ?= https://github.com/openstack-k8s-operators/glance-operator.git
GLANCE_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
GLANCE_COMMIT_HASH ?=
GLANCE ?= config/samples/glance_v1beta1_glance.yaml
GLANCE_CR ?= ${OPERATOR_BASE_DIR}/glance-operator/${GLANCE}
GLANCEAPI_DEPL_IMG ?= unused
GLANCE_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/glance-operator/kuttl-test.yaml
GLANCE_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/glance-operator/test/kuttl/tests
GLANCE_KUTTL_NAMESPACE ?= glance-kuttl-tests
# Ovn
OVN_IMG ?= quay.io/openstack-k8s-operators/ovn-operator-index:${OPENSTACK_K8S_TAG}
OVN_REPO ?= https://github.com/openstack-k8s-operators/ovn-operator.git
OVN_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
OVN_COMMIT_HASH ?=
OVNDBS ?= config/samples/ovn_v1beta1_ovndbcluster.yaml
OVNDBS_CR ?= ${OPERATOR_BASE_DIR}/ovn-operator/${OVNDBS}
OVNNORTHD ?= config/samples/ovn_v1beta1_ovnnorthd.yaml
OVNNORTHD_CR ?= ${OPERATOR_BASE_DIR}/ovn-operator/${OVNNORTHD}
OVNCONTROLLER ?= config/samples/ovn_v1beta1_ovncontroller.yaml
OVNCONTROLLER_CR ?= ${OPERATOR_BASE_DIR}/ovn-operator/${OVNCONTROLLER}
OVNCONTROLLER_NMAP ?= ${NETWORK_ISOLATION}
# TODO: Image customizations for all OVN services
OVN_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/ovn-operator/kuttl-test.yaml
OVN_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/ovn-operator/tests/kuttl/tests
OVN_KUTTL_NAMESPACE ?= ovn-kuttl-tests
# Neutron
NEUTRON_IMG ?= quay.io/openstack-k8s-operators/neutron-operator-index:${OPENSTACK_K8S_TAG}
NEUTRON_REPO ?= https://github.com/openstack-k8s-operators/neutron-operator.git
NEUTRON_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
NEUTRON_COMMIT_HASH ?=
NEUTRONAPI ?= config/samples/neutron_v1beta1_neutronapi.yaml
NEUTRONAPI_CR ?= ${OPERATOR_BASE_DIR}/neutron-operator/${NEUTRONAPI}
NEUTRONAPI_DEPL_IMG ?= unused
# TODO: Do we need interfaces to customize images for the other services ?
NEUTRON_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/neutron-operator/kuttl-test.yaml
NEUTRON_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/neutron-operator/test/kuttl/tests
NEUTRON_KUTTL_NAMESPACE ?= neutron-kuttl-tests
# Controlplane Neutron custom Configuration
OPENSTACK_NEUTRON_CUSTOM_CONF ?=
# BGP
NETWORK_BGP ?= false
BGP_OVN_ROUTING ?= false
BGP_ASN ?= 64999
BGP_PEER_ASN ?= 64999
BGP_LEAF_1 ?= 100.65.4.1
BGP_LEAF_2 ?= 100.64.4.1
BGP_SOURCE_IP ?= 172.30.4.2
BGP_SOURCE_IP6 ?= f00d:f00d:f00d:f00d:f00d:f00d:f00d:42
NNCP_BGP_1_INTERFACE ?= enp7s0
NNCP_BGP_2_INTERFACE ?= enp8s0
NNCP_BGP_1_IP_ADDRESS ?= 100.65.4.2
NNCP_BGP_2_IP_ADDRESS ?= 100.64.4.2
# Cinder
CINDER_IMG ?= quay.io/openstack-k8s-operators/cinder-operator-index:${OPENSTACK_K8S_TAG}
CINDER_REPO ?= https://github.com/openstack-k8s-operators/cinder-operator.git
CINDER_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
CINDER_COMMIT_HASH ?=
CINDER ?= config/samples/cinder_v1beta1_cinder.yaml
CINDER_CR ?= ${OPERATOR_BASE_DIR}/cinder-operator/${CINDER}
CINDERAPI_DEPL_IMG ?= unused
CINDERBKP_DEPL_IMG ?= unused
CINDERSCH_DEPL_IMG ?= unused
CINDERVOL_DEPL_IMG ?= unused
CINDER_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/cinder-operator/kuttl-test.yaml
CINDER_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/cinder-operator/test/kuttl/tests
CINDER_KUTTL_NAMESPACE ?= cinder-kuttl-tests
# RabbitMQ
RABBITMQ_IMG ?= quay.io/openstack-k8s-operators/rabbitmq-cluster-operator-index:${OPENSTACK_K8S_TAG}
RABBITMQ_REPO ?= https://github.com/openstack-k8s-operators/rabbitmq-cluster-operator.git
RABBITMQ_BRANCH ?= patches
RABBITMQ_COMMIT_HASH ?=
RABBITMQ ?= docs/examples/default-security-context/rabbitmq.yaml
RABBITMQ_CR ?= ${OPERATOR_BASE_DIR}/rabbitmq-operator/${RABBITMQ}
RABBITMQ_DEPL_IMG ?= unused
# Ironic
IRONIC_IMG ?= quay.io/openstack-k8s-operators/ironic-operator-index:${OPENSTACK_K8S_TAG}
IRONIC_REPO ?= https://github.com/openstack-k8s-operators/ironic-operator.git
IRONIC_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
IRONIC_COMMIT_HASH ?=
IRONIC ?= config/samples/ironic_v1beta1_ironic.yaml
IRONIC_CR ?= ${OPERATOR_BASE_DIR}/ironic-operator/${IRONIC}
IRONICAPI_DEPL_IMG ?= unused
IRONICCON_DEPL_IMG ?= unused
IRONICPXE_DEPL_IMG ?= unused
IRONICINS_DEPL_IMG ?= unused
IRONICNAG_DEPL_IMG ?= unused
IRONIC_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/ironic-operator/kuttl-test.yaml
IRONIC_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/ironic-operator/tests/kuttl/tests
IRONIC_KUTTL_NAMESPACE ?= ironic-kuttl-tests
# Octavia
OCTAVIA_IMG ?= quay.io/openstack-k8s-operators/octavia-operator-index:${OPENSTACK_K8S_TAG}
OCTAVIA_REPO ?= https://github.com/openstack-k8s-operators/octavia-operator.git
OCTAVIA_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
OCTAVIA_COMMIT_HASH ?=
OCTAVIA ?= config/samples/octavia_v1beta1_octavia.yaml
OCTAVIA_CR ?= ${OPERATOR_BASE_DIR}/octavia-operator/${OCTAVIA}
# TODO: Image custom izations for all Octavia services
OCTAVIA_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/octavia-operator/kuttl-test.yaml
OCTAVIA_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/octavia-operator/tests/kuttl/tests
OCTAVIA_KUTTL_NAMESPACE ?= octavia-kuttl-tests
# Designate
DESIGNATE_IMG ?= quay.io/openstack-k8s-operators/designate-operator-index:${OPENSTACK_K8S_TAG}
DESIGNATE_REPO ?= https://github.com/openstack-k8s-operators/designate-operator.git
DESIGNATE_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
DESIGNATE_COMMIT_HASH ?=
DESIGNATE ?= config/samples/designate_v1beta1_designate.yaml
DESIGNATE_CR ?= ${OPERATOR_BASE_DIR}/designate-operator/${DESIGNATE}
DESIGNATE_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/designate-operator/kuttl-test.yaml
DESIGNATE_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/designate-operator/tests/kuttl/tests
DESIGNATE_KUTTL_NAMESPACE ?= designate-kuttl-tests
# Nova
NOVA_IMG ?= quay.io/openstack-k8s-operators/nova-operator-index:${OPENSTACK_K8S_TAG}
NOVA_REPO ?= https://github.com/openstack-k8s-operators/nova-operator.git
NOVA_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
NOVA_COMMIT_HASH ?=
# NOTE(gibi): We intentionally not using the default nova sample here
# as that would require two RabbitMQCluster to be deployed which a) is not what
# the make rabbitmq_deploy target does ii) required extra resource in the dev
# environment.
NOVA ?= config/samples/nova_v1beta1_nova_collapsed_cell.yaml
NOVA_CR ?= ${OPERATOR_BASE_DIR}/nova-operator/${NOVA}
# TODO: Image customizations for all Nova services
# Horizon
HORIZON_IMG ?= quay.io/openstack-k8s-operators/horizon-operator-index:${OPENSTACK_K8S_TAG}
HORIZON_REPO ?= https://github.com/openstack-k8s-operators/horizon-operator.git
HORIZON_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
HORIZON_COMMIT_HASH ?=
HORIZON ?= config/samples/horizon_v1beta1_horizon.yaml
HORIZON_CR ?= ${OPERATOR_BASE_DIR}/horizon-operator/${HORIZON}
HORIZON_DEPL_IMG ?= unused
HORIZON_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/horizon-operator/kuttl-test.yaml
HORIZON_KUTTL_NAMESPACE ?= horizon-kuttl-tests
HORIZON_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/horizon-operator/tests/kuttl/tests
# Heat
HEAT_IMG ?= quay.io/openstack-k8s-operators/heat-operator-index:${OPENSTACK_K8S_TAG}
HEAT_REPO ?= https://github.com/openstack-k8s-operators/heat-operator.git
HEAT_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
HEAT_COMMIT_HASH ?=
HEAT ?= config/samples/heat_v1beta1_heat.yaml
HEAT_CR ?= ${OPERATOR_BASE_DIR}/heat-operator/${HEAT}
HEATAPI_DEPL_IMG ?= unused
HEATCFNAPI_DEPL_IMG ?= unused
HEATENGINE_DEPL_IMG ?= unused
HEAT_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/heat-operator/kuttl-test.yaml
HEAT_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/heat-operator/tests/kuttl/tests
HEAT_KUTTL_NAMESPACE ?= heat-kuttl-tests
# AnsibleEE
ANSIBLEEE_IMG ?= quay.io/openstack-k8s-operators/openstack-ansibleee-operator-index:${OPENSTACK_K8S_TAG}
ANSIBLEEE_REPO ?= https://github.com/openstack-k8s-operators/openstack-ansibleee-operator
ANSIBLEEE_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
ANSIBLEE_COMMIT_HASH ?=
ANSIBLEEE ?= config/samples/_v1beta1_ansibleee.yaml
ANSIBLEEE_CR ?= ${OPERATOR_BASE_DIR}/openstack-ansibleee-operator/${ANSIBLEEE}
ANSIBLEEE_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/openstack-ansibleee-operator/kuttl-test.yaml
ANSIBLEEE_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/openstack-ansibleee-operator/tests/kuttl/tests
ANSIBLEEE_KUTTL_NAMESPACE ?= ansibleee-kuttl-tests
# Baremetal Operator
BAREMETAL_IMG ?= quay.io/openstack-k8s-operators/openstack-baremetal-operator-index:${OPENSTACK_K8S_TAG}
BAREMETAL_REPO ?= https://github.com/openstack-k8s-operators/openstack-baremetal-operator.git
BAREMETAL_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
BAREMETAL_COMMIT_HASH ?=
BMH_NAMESPACE ?= ${NAMESPACE}
BAREMETAL_OS_CONTAINER_IMG ?=
# Dataplane Operator
DATAPLANE_TIMEOUT ?= 30m
ifeq ($(NETWORK_BGP), true)
ifeq ($(BGP_OVN_ROUTING), true)
DATAPLANE_KUSTOMIZE_SCENARIO ?= bgp_ovn_cluster
else
DATAPLANE_KUSTOMIZE_SCENARIO ?= bgp
endif
else
DATAPLANE_KUSTOMIZE_SCENARIO ?= preprovisioned
endif
DATAPLANE_ANSIBLE_SECRET ?=dataplane-ansible-ssh-private-key-secret
DATAPLANE_ANSIBLE_USER ?=
ifeq ($(NETWORK_ISOLATION_USE_DEFAULT_NETWORK), true)
DATAPLANE_COMPUTE_IP ?=192.168.122.100
DATAPLANE_NETWORKER_IP ?=192.168.122.200
DATAPLANE_SSHD_ALLOWED_RANGES ?=['192.168.122.0/24']
DATAPLANE_DEFAULT_GW ?= 192.168.122.1
else
DATAPLANE_COMPUTE_IP ?=172.16.1.100
DATAPLANE_NETWORKER_IP ?=172.16.1.200
DATAPLANE_SSHD_ALLOWED_RANGES ?=['172.16.1.0/24']
DATAPLANE_DEFAULT_GW ?= 172.16.1.1
endif
DATAPLANE_TOTAL_NODES ?=1
DATAPLANE_GROWVOLS_ARGS ?=/=8GB /tmp=1GB /home=1GB /var=100%
DATAPLANE_TOTAL_NETWORKER_NODES ?=1
DATAPLANE_RUNNER_IMG ?=
DATAPLANE_NETWORK_INTERFACE_NAME ?=eth0
DATAPLANE_NTP_SERVER ?=pool.ntp.org
DATAPLANE_REGISTRY_URL ?=quay.io/podified-antelope-centos9
DATAPLANE_CONTAINER_TAG ?=current-podified
DATAPLANE_CONTAINER_PREFIX ?=openstack
BM_CTLPLANE_INTERFACE ?= enp1s0
BM_ROOT_PASSWORD ?=
GENERATE_SSH_KEYS ?= true
DATAPLANE_EXTRA_NOVA_CONFIG_FILE ?= /dev/null
DATAPLANE_SERVER_ROLE ?= compute
DATAPLANE_TLS_ENABLED ?= true
DATAPLANE_NOVA_NFS_PATH ?=
# Manila
MANILA_IMG ?= quay.io/openstack-k8s-operators/manila-operator-index:${OPENSTACK_K8S_TAG}
MANILA_REPO ?= https://github.com/openstack-k8s-operators/manila-operator.git
MANILA_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
MANILA_COMMIT_HASH ?=
MANILA ?= config/samples/manila_v1beta1_manila.yaml
MANILA_CR ?= ${OPERATOR_BASE_DIR}/manila-operator/${MANILA}
MANILAAPI_DEPL_IMG ?= unused
MANILASCH_DEPL_IMG ?= unused
MANILASHARE_DEPL_IMG ?= unused
MANILA_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/manila-operator/kuttl-test.yaml
MANILA_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/manila-operator/test/kuttl/tests
MANILA_KUTTL_NAMESPACE ?= manila-kuttl-tests
# Ceph
CEPH_IMG ?= quay.io/ceph/demo:latest-reef
CEPH_REPO ?= https://github.com/rook/rook.git
CEPH_BRANCH ?= release-1.15
CEPH_CRDS ?= ${OPERATOR_BASE_DIR}/rook/deploy/examples/crds.yaml
CEPH_COMMON ?= ${OPERATOR_BASE_DIR}/rook/deploy/examples/common.yaml
CEPH_OP ?= ${OPERATOR_BASE_DIR}/rook/deploy/examples/operator-openshift.yaml
CEPH_CR ?= ${OPERATOR_BASE_DIR}/rook/deploy/examples/cluster-test.yaml
CEPH_CLIENT ?= ${OPERATOR_BASE_DIR}/rook/deploy/examples/toolbox.yaml
# NNstate
NMSTATE_NAMESPACE ?= openshift-nmstate
NMSTATE_OPERATOR_GROUP ?= openshift-nmstate-tn6k8
NMSTATE_SUBSCRIPTION ?= kubernetes-nmstate-operator
INSTALL_NMSTATE ?= true
# NNCP
NNCP_NODES ?=
NNCP_INTERFACE ?= enp6s0
NNCP_BRIDGE ?= ospbr
NNCP_TIMEOUT ?= 240s
NNCP_CLEANUP_TIMEOUT ?= 120s
NNCP_CTLPLANE_IP_ADDRESS_SUFFIX ?=10
ifeq ($(NETWORK_ISOLATION_USE_DEFAULT_NETWORK), true)
NNCP_CTLPLANE_IP_ADDRESS_PREFIX ?=192.168.122
NNCP_GATEWAY ?=192.168.122.1
NNCP_DNS_SERVER ?=192.168.122.1
else
NNCP_CTLPLANE_IP_ADDRESS_PREFIX ?=172.16.1
NNCP_GATEWAY ?=172.16.1.1
NNCP_DNS_SERVER ?=172.16.1.1
endif
NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX ?=fd00:aaaa::
NNCP_CTLPLANE_IPV6_ADDRESS_SUFFIX ?=10
NNCP_GATEWAY_IPV6 ?=fd00:aaaa::1
NNCP_DNS_SERVER_IPV6 ?=fd00:aaaa::1
NNCP_ADDITIONAL_HOST_ROUTES ?=
NNCP_RETRIES ?= 5
# MetalLB
ifeq ($(NETWORK_ISOLATION_USE_DEFAULT_NETWORK), true)
METALLB_POOL ?=192.168.122.80-192.168.122.90
else
METALLB_POOL ?=172.16.1.80-172.16.1.90
endif
METALLB_IPV6_POOL ?=$(NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX)80-$(NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX)90
# Telemetry
TELEMETRY_IMG ?= quay.io/openstack-k8s-operators/telemetry-operator-index:${OPENSTACK_K8S_TAG}
TELEMETRY_REPO ?= https://github.com/openstack-k8s-operators/telemetry-operator.git
TELEMETRY_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
TELEMETRY_COMMIT_HASH ?=
TELEMETRY ?= config/samples/telemetry_v1beta1_telemetry.yaml
TELEMETRY_CR ?= ${OPERATOR_BASE_DIR}/telemetry-operator/${TELEMETRY}
CEILOMETER_CENTRAL_DEPL_IMG ?= unused
CEILOMETER_NOTIFICATION_DEPL_IMG ?= unused
SG_CORE_DEPL_IMG ?= unused
TELEMETRY_KUTTL_BASEDIR ?= ${OPERATOR_BASE_DIR}/telemetry-operator
TELEMETRY_KUTTL_RELPATH ?= tests/kuttl/suites
TELEMETRY_KUTTL_CONF ?= ${TELEMETRY_KUTTL_BASEDIR}/kuttl-test.yaml
TELEMETRY_KUTTL_NAMESPACE ?= telemetry-kuttl-tests
# BMO
BMO_REPO ?= https://github.com/metal3-io/baremetal-operator
BMO_BRANCH ?= release-0.6
BMO_COMMIT_HASH ?=
BMO_PROVISIONING_INTERFACE ?=
ifeq ($(NETWORK_ISOLATION_USE_DEFAULT_NETWORK), true)
BMO_IRONIC_HOST ?= 192.168.122.10
else
BMO_IRONIC_HOST ?= 172.16.1.10
endif
BMO_SETUP_ROUTE_REPLACE ?= true
# Swift
SWIFT_IMG ?= quay.io/openstack-k8s-operators/swift-operator-index:${OPENSTACK_K8S_TAG}
SWIFT_REPO ?= https://github.com/openstack-k8s-operators/swift-operator.git
SWIFT_BRANCH ?= ${OPENSTACK_K8S_BRANCH}
SWIFT_COMMIT_HASH ?=
SWIFT ?= config/samples/swift_v1beta1_swift.yaml
SWIFT_CR ?= ${OPERATOR_BASE_DIR}/swift-operator/${SWIFT}
SWIFT_KUTTL_CONF ?= ${OPERATOR_BASE_DIR}/swift-operator/kuttl-test.yaml
SWIFT_KUTTL_DIR ?= ${OPERATOR_BASE_DIR}/swift-operator/tests/kuttl/tests
SWIFT_KUTTL_NAMESPACE ?= swift-kuttl-tests
# CertManager
CERTMANAGER_TIMEOUT ?= 300s
INSTALL_CERT_MANAGER ?= true
# target vars for generic operator install info 1: target name , 2: operator name
define vars
${1}: export NAMESPACE=${NAMESPACE}
${1}: export OPERATOR_NAMESPACE=${OPERATOR_NAMESPACE}
${1}: export SECRET=${SECRET}
${1}: export PASSWORD=${PASSWORD}
${1}: export METADATA_SHARED_SECRET=${METADATA_SHARED_SECRET}
${1}: export HEAT_AUTH_ENCRYPTION_KEY=${HEAT_AUTH_ENCRYPTION_KEY}
${1}: export BARBICAN_SIMPLE_CRYPTO_ENCRYPTION_KEY=${BARBICAN_SIMPLE_CRYPTO_ENCRYPTION_KEY}
${1}: export LIBVIRT_SECRET=${LIBVIRT_SECRET}
${1}: export STORAGE_CLASS=${STORAGE_CLASS}
${1}: export OUT=${OUT}
${1}: export CLEANUP_DIR_CMD=${CLEANUP_DIR_CMD}
${1}: export OPERATOR_NAME=${2}
${1}: export OPERATOR_BASE_DIR=${OPERATOR_BASE_DIR}
${1}: export OPERATOR_DIR=${OUT}/${OPERATOR_NAMESPACE}/${2}/op
${1}: export DEPLOY_DIR=${OUT}/${NAMESPACE}/${2}/cr
${1}: export DEPLOY_DIR_EDPM_NETWORKER=${OUT}/${NAMESPACE}/${2}/networker_cr
${1}: export OPENSTACK_REPO=${OPENSTACK_REPO}
${1}: export OPENSTACK_BRANCH=${OPENSTACK_BRANCH}
${1}: export OPENSTACK_COMMIT_HASH=${OPENSTACK_COMMIT_HASH}
${1}: export GIT_CLONE_OPTS=${GIT_CLONE_OPTS}
${1}: export CHECKOUT_FROM_OPENSTACK_REF=${CHECKOUT_FROM_OPENSTACK_REF}
${1}: export TIMEOUT=$(TIMEOUT)
${1}: export OPERATOR_CHANNEL=$(OPERATOR_CHANNEL)
${1}: export OPERATOR_SOURCE=$(OPERATOR_SOURCE)
${1}: export OPERATOR_SOURCE_NAMESPACE=$(OPERATOR_SOURCE_NAMESPACE)
endef
.PHONY: all
all: operator_namespace keystone mariadb placement neutron
##@ General
# The help target prints out all targets with their descriptions organized
# beneath their categories. The categories are represented by '##@' and the
# target descriptions by '##'. The awk commands is responsible for reading the
# entire set of makefiles included in this invocation, looking for lines of the
# file as xyz: ## something, and then pretty-format the target and help. Then,
# if there's a line with ##@ something, that gets pretty-printed as a category.
# More info on the usage of ANSI control characters for terminal formatting:
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
# More info on the awk command:
# http://linuxcommand.org/lc3_adv_awk.php
.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: cleanup
cleanup: heat_cleanup horizon_cleanup nova_cleanup octavia_cleanup designate_cleanup neutron_cleanup ovn_cleanup ironic_cleanup cinder_cleanup glance_cleanup placement_cleanup swift_cleanup barbican_cleanup keystone_cleanup mariadb_cleanup telemetry_cleanup ansibleee_cleanup rabbitmq_cleanup infra_cleanup manila_cleanup metallb_cleanup ## Delete all operators
.PHONY: deploy_cleanup
deploy_cleanup: manila_deploy_cleanup heat_deploy_cleanup horizon_deploy_cleanup nova_deploy_cleanup octavia_deploy_cleanup designate_deploy_cleanup neutron_deploy_cleanup ovn_deploy_cleanup ironic_deploy_cleanup cinder_deploy_cleanup glance_deploy_cleanup placement_deploy_cleanup swift_deploy_cleanup barbican_deploy_cleanup keystone_deploy_cleanup mariadb_deploy_cleanup telemetry_deploy_cleanup memcached_deploy_cleanup rabbitmq_deploy_cleanup ## Delete all OpenStack service objects
.PHONY: wait
wait: ## wait for an operator's controller-manager pod to be ready (requires OPERATOR_NAME to be explicitly passed!)
$(eval $(call vars,$@,$(value OPERATOR_NAME)))
bash scripts/operator-wait.sh
##@ CRC
.PHONY: crc_storage
crc_storage: namespace ## initialize local storage PVs in CRC vm
$(eval $(call vars,$@))
bash scripts/create-pv.sh
bash scripts/gen-crc-pv-kustomize.sh
oc apply -f ${OUT}/crc/storage.yaml
.PHONY: crc_storage_cleanup
crc_storage_cleanup: namespace ## cleanup local storage PVs in CRC vm
$(eval $(call vars,$@))
bash scripts/cleanup-crc-pv.sh
if oc get sc ${STORAGE_CLASS}; then oc delete sc ${STORAGE_CLASS}; fi
bash scripts/delete-pv.sh
.PHONY: crc_storage_release
crc_storage_release: namespace ## make available the "Released" local storage PVs in CRC vm
$(eval $(call vars,$@))
bash scripts/release-crc-pv.sh
.PHONY: crc_storage_with_retries
crc_storage_with_retries: ## initialize local storage PVs with retries
$(eval $(call vars,$@))
bash scripts/retry_make_crc_storage.sh $(CRC_STORAGE_RETRIES)
.PHONY: crc_storage_cleanup_with_retries
crc_storage_cleanup_with_retries: ## cleanup local storage PVs with retries
$(eval $(call vars,$@))
bash scripts/retry_make_crc_storage_cleanup.sh $(CRC_STORAGE_RETRIES)
##@ OPERATOR_NAMESPACE
.PHONY: operator_namespace
operator_namespace: export NAMESPACE=${OPERATOR_NAMESPACE}
operator_namespace: ## creates the namespace specified via OPERATOR_NAMESPACE env var (defaults to openstack-operators)
$(eval $(call vars,$@))
bash scripts/gen-namespace.sh
oc apply -f ${OUT}/${OPERATOR_NAMESPACE}/namespace.yaml
timeout $(TIMEOUT) bash -c "while ! (oc get project.v1.project.openshift.io ${OPERATOR_NAMESPACE}); do sleep 1; done"
ifeq ($(MICROSHIFT) ,0)
oc project ${OPERATOR_NAMESPACE}
else
oc config set-context --current --namespace=${OPERATOR_NAMESPACE}
oc adm policy add-scc-to-user privileged -z default --namespace ${OPERATOR_NAMESPACE}
endif
##@ NAMESPACE
.PHONY: namespace
namespace: ## creates the namespace specified via NAMESPACE env var (defaults to openstack)
$(eval $(call vars,$@))
bash scripts/gen-namespace.sh
oc apply -f ${OUT}/${NAMESPACE}/namespace.yaml
timeout $(TIMEOUT) bash -c "while ! (oc get project.v1.project.openshift.io ${NAMESPACE}); do sleep 1; done"
ifeq ($(MICROSHIFT) ,0)
oc project ${NAMESPACE}
else
oc config set-context --current --namespace=${NAMESPACE}
oc adm policy add-scc-to-user privileged -z default --namespace ${NAMESPACE}
endif
.PHONY: namespace_cleanup
namespace_cleanup: ## deletes the namespace specified via NAMESPACE env var, also runs cleanup for all services to cleanup the namespace prior delete it.
$(eval $(call vars,$@))
make keystone_cleanup
make mariadb_cleanup
oc delete project ${NAMESPACE}
${CLEANUP_DIR_CMD} ${OUT}/${NAMESPACE}
##@ SERVICE INPUT
.PHONY: input
input: namespace ## creates required secret/CM, used by the services as input
$(eval $(call vars,$@))
bash scripts/gen-input-kustomize.sh
oc get secret/${SECRET} || oc kustomize ${OUT}/${NAMESPACE}/input | oc apply -f -
.PHONY: input_cleanup
input_cleanup: ## deletes the secret/CM, used by the services as input
oc kustomize ${OUT}/${NAMESPACE}/input | oc delete --ignore-not-found=true -f -
${CLEANUP_DIR_CMD} ${OUT}/${NAMESPACE}/input
##@ CRC BMO SETUP
.PHONY: crc_bmo_setup
crc_bmo_setup: export IRONIC_HOST_IP=${BMO_IRONIC_HOST}
crc_bmo_setup: export REPO=${BMO_REPO}
crc_bmo_setup: export BRANCH=${BMO_BRANCH}
crc_bmo_setup: export HASH=${BMO_COMMIT_HASH}
crc_bmo_setup: crc_bmo_cleanup
crc_bmo_setup: $(if $(findstring true,$(INSTALL_CERT_MANAGER)), certmanager)
$(eval $(call vars,$@))
mkdir -p ${OPERATOR_BASE_DIR}
bash -c "CHECKOUT_FROM_OPENSTACK_REF=false OPERATOR_NAME=baremetal scripts/clone-operator-repo.sh"
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i -e '$$aIRONIC_IP=${BMO_IRONIC_HOST}' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i 's/eth2/${BMO_PROVISIONING_INTERFACE}/g' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i 's/ENDPOINT\=http/ENDPOINT\=https/g' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i 's/172.22.0.2\:/${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}.10\:/g' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i 's/172.22.0.1\:/${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}.11\:/g' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && sed -i 's/172.22.0./${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}./g' ironic-deployment/default/ironic_bmo_configmap.env config/default/ironic.env && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && yq 'del(.spec.template.spec.containers[] | select(.name == "ironic-dnsmasq"))' -i ironic-deployment/base/ironic.yaml && popd
pushd ${OPERATOR_BASE_DIR}/baremetal-operator && make generate manifests && bash tools/deploy.sh -bitm && popd
ifeq ($(BMO_SETUP_ROUTE_REPLACE), true)
sudo ip route replace 192.168.126.0/24 dev virbr0
endif
oc patch deployment/baremetal-operator-controller-manager \
-n baremetal-operator-system --type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "quay.io/metal3-io/baremetal-operator:${BMO_BRANCH}"}]'
## Hack to add required scc
oc adm policy add-scc-to-user privileged system:serviceaccount:baremetal-operator-system:baremetal-operator-controller-manager
oc adm policy add-scc-to-user privileged system:serviceaccount:baremetal-operator-system:default
##@ CRC BMO CLEANUP
.PHONY: crc_bmo_cleanup
crc_bmo_cleanup:
oc kustomize ${OPERATOR_BASE_DIR}/baremetal-operator/ironic-deployment/default | oc delete --ignore-not-found=true -f -
oc kustomize ${OPERATOR_BASE_DIR}/baremetal-operator/config | oc delete --ignore-not-found=true -f -
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/baremetal-operator
BMO_CRDS=$(shell oc get crds | grep metal3.io)
ifeq (,$(findstring baremetalhosts.metal3.io, ${BMO_CRDS}))
BMO_SETUP ?= true
endif
##@ OPENSTACK
OPENSTACK_PREP_DEPS := validate_marketplace
OPENSTACK_PREP_NMSTATE_DEPS := $(if $(findstring true,$(INSTALL_NMSTATE)), nmstate nncp_with_retries, nncp_with_retries)
OPENSTACK_PREP_DEPS += $(if $(findstring true,$(INSTALL_CERT_MANAGER)), certmanager)
OPENSTACK_PREP_DEPS += $(if $(findstring true,$(NETWORK_ISOLATION)), ${OPENSTACK_PREP_NMSTATE_DEPS} netattach metallb metallb_config)
OPENSTACK_PREP_DEPS += $(if $(findstring true,$(NETWORK_BGP)), ${OPENSTACK_PREP_NMSTATE_DEPS} netattach metallb metallb_config)
OPENSTACK_PREP_DEPS += $(if $(findstring true,$(BMO_SETUP)), crc_bmo_setup)
.PHONY: openstack_prep
openstack_prep: export IMAGE=${OPENSTACK_IMG}
openstack_prep: $(OPENSTACK_PREP_DEPS) ## creates the files to install the operator using olm
$(eval $(call vars,$@,openstack))
bash scripts/gen-olm.sh
.PHONY: openstack
openstack: openstack_prep operator_namespace ## installs the operator, also runs the prep step. Set OPENSTACK_IMG for custom image.
$(eval $(call vars,$@,openstack))
oc apply -f ${OPERATOR_DIR}
.PHONY: openstack_wait
openstack_wait: openstack ## waits openstack CSV to succeed.
$(eval $(call vars,$@,openstack))
timeout $(TIMEOUT) bash -c 'until $$(oc get csv -l operators.coreos.com/openstack-operator.openstack-operators -n ${OPERATOR_NAMESPACE} | grep -q Succeeded); do sleep 1; done'
.PHONY: openstack_cleanup
openstack_cleanup: operator_namespace## deletes the operator, but does not cleanup the service resources
$(eval $(call vars,$@,openstack))
${CLEANUP_DIR_CMD} ${OPERATOR_DIR}
oc delete subscription --all=true
oc delete csv --all=true
oc delete catalogsource --all=true
test -d ${OPERATOR_BASE_DIR}/baremetal-operator && make crc_bmo_cleanup || true
.PHONY: openstack_repo
openstack_repo: export REPO=${OPENSTACK_REPO}
openstack_repo: export BRANCH=${OPENSTACK_BRANCH}
openstack_repo: export HASH=${OPENSTACK_COMMIT_HASH}
openstack_repo: ## clones the openstack-operator repo
$(eval $(call vars,$@,openstack))
mkdir -p ${OPERATOR_BASE_DIR} ${OPERATOR_DIR} ${DEPLOY_DIR}
bash -c "CHECKOUT_FROM_OPENSTACK_REF=false scripts/clone-operator-repo.sh"
.PHONY: openstack_deploy_prep
openstack_deploy_prep: export KIND=OpenStackControlPlane
openstack_deploy_prep: export OVN_NICMAPPING=${OVNCONTROLLER_NMAP}
openstack_deploy_prep: export NEUTRON_CUSTOM_CONF=${DEPLOY_DIR}/neutron-custom-conf.patch
openstack_deploy_prep: export BRIDGE_NAME=${NNCP_BRIDGE}
openstack_deploy_prep: export CTLPLANE_IP_ADDRESS_PREFIX=${NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX}
ifeq ($(NETWORK_ISOLATION_IPV4), true)
openstack_deploy_prep: export IPV4_ENABLED=true
endif
ifeq ($(NETWORK_ISOLATION_IPV6), true)
openstack_deploy_prep: export IPV6_ENABLED=true
openstack_deploy_prep: export CTLPLANE_IPV6_ADDRESS_PREFIX=${NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX}
openstack_deploy_prep: export CTLPLANE_IPV6_ADDRESS_SUFFIX=${NNCP_CTLPLANE_IPV6_ADDRESS_SUFFIX}
openstack_deploy_prep: export CTLPLANE_IPV6_DNS_SERVER=${NNCP_DNS_SERVER_IPV6}
endif
openstack_deploy_prep: openstack_deploy_cleanup openstack_repo ## prepares the CR to install the service based on the service sample file OPENSTACK
$(eval $(call vars,$@,openstack))
cp ${OPENSTACK_CR} ${DEPLOY_DIR}
ifneq (${OPENSTACK_NEUTRON_CUSTOM_CONF},)
cp ${OPENSTACK_NEUTRON_CUSTOM_CONF} ${NEUTRON_CUSTOM_CONF}
endif
ifeq ($(NETWORK_ISOLATION_USE_DEFAULT_NETWORK), false)
sed -i 's/192.168.122/${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}/g' ${DEPLOY_DIR}/$(notdir ${OPENSTACK_CR})
endif
bash scripts/gen-service-kustomize.sh
.PHONY: openstack_deploy
openstack_deploy: input openstack_deploy_prep netconfig_deploy ## installs the service instance using kustomize. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,openstack))
make wait
bash scripts/operator-deploy-resources.sh
.PHONY: openstack_wait_deploy
openstack_wait_deploy: openstack_deploy ## waits for ctlplane readiness. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,openstack))
oc kustomize ${DEPLOY_DIR} | oc wait --for condition=Ready --timeout=$(TIMEOUT) -f -
.PHONY: openstack_deploy_cleanup
openstack_deploy_cleanup: namespace netconfig_deploy_cleanup ## cleans up the service instance, Does not affect the operator.
$(eval $(call vars,$@,openstack))
oc kustomize ${DEPLOY_DIR} | oc delete --ignore-not-found=true -f - || true
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/openstack-operator ${DEPLOY_DIR}
.PHONY: openstack_update_run
openstack_update_run:
$(eval $(call vars,$@,openstack))
bash scripts/openstack-update.sh
.PHONY: edpm_deploy_generate_keys
edpm_deploy_generate_keys:
$(eval $(call vars,$@,dataplane))
devsetup/scripts/gen-ansibleee-ssh-key.sh
bash scripts/gen-edpm-nova-migration-ssh-key.sh
ifneq (${EDPM_ROOT_PASSWORD},)
bash scripts/gen-edpm-bmset-password-secret.sh
endif
.PHONY: edpm_patch_ansible_runner_image
edpm_patch_ansible_runner_image:
$(eval $(call vars,$@,dataplane))
oc patch $(shell oc get csv -n ${OPERATOR_NAMESPACE} -o name | grep openstack-operator) \
-n ${OPERATOR_NAMESPACE} --type='json' \
-p='[{"op":"replace", "path":"/spec/install/spec/deployments/0/spec/template/spec/containers/1/env/1", "value": {"name": "RELATED_IMAGE_ANSIBLEEE_IMAGE_URL_DEFAULT", "value": "${DATAPLANE_RUNNER_IMG}"}}]'
.PHONY: edpm_deploy_prep
edpm_deploy_prep: export KIND=OpenStackDataPlaneNodeSet
edpm_deploy_prep: export EDPM_ANSIBLE_SECRET=${DATAPLANE_ANSIBLE_SECRET}
edpm_deploy_prep: export EDPM_ANSIBLE_USER=${DATAPLANE_ANSIBLE_USER}
edpm_deploy_prep: export EDPM_NODE_IP=${DATAPLANE_COMPUTE_IP}
edpm_deploy_prep: export EDPM_TOTAL_NODES=${DATAPLANE_TOTAL_NODES}
edpm_deploy_prep: export EDPM_NETWORK_INTERFACE_NAME=${DATAPLANE_NETWORK_INTERFACE_NAME}
edpm_deploy_prep: export CTLPLANE_IP_ADDRESS_PREFIX=${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}
edpm_deploy_prep: export EDPM_SSHD_ALLOWED_RANGES=${DATAPLANE_SSHD_ALLOWED_RANGES}
edpm_deploy_prep: export EDPM_NTP_SERVER=${DATAPLANE_NTP_SERVER}
edpm_deploy_prep: export EDPM_REGISTRY_URL=${DATAPLANE_REGISTRY_URL}
edpm_deploy_prep: export EDPM_CONTAINER_TAG=${DATAPLANE_CONTAINER_TAG}
edpm_deploy_prep: export EDPM_CONTAINER_PREFIX=${DATAPLANE_CONTAINER_PREFIX}
edpm_deploy_prep: export EDPM_EXTRA_NOVA_CONFIG_FILE=${DEPLOY_DIR}/25-nova-extra.conf
edpm_deploy_prep: export EDPM_DEPLOY_DIR=${DEPLOY_DIR}
edpm_deploy_prep: export EDPM_SERVER_ROLE=${DATAPLANE_SERVER_ROLE}
edpm_deploy_prep: export REPO=${OPENSTACK_REPO}
edpm_deploy_prep: export BRANCH=${OPENSTACK_BRANCH}
edpm_deploy_prep: export HASH=${OPENSTACK_COMMIT_HASH}
edpm_deploy_prep: export EDPM_TLS_ENABLED=${DATAPLANE_TLS_ENABLED}
edpm_deploy_prep: export EDPM_NOVA_NFS_PATH=${DATAPLANE_NOVA_NFS_PATH}
ifeq ($(NETWORK_BGP), true)
ifeq ($(BGP_OVN_ROUTING), true)
edpm_deploy_prep: export BGP=ovn
else
edpm_deploy_prep: export BGP=kernel
endif
endif
edpm_deploy_prep: edpm_deploy_cleanup openstack_repo ## prepares the CR to install the data plane
$(eval $(call vars,$@,dataplane))
mkdir -p ${DEPLOY_DIR}
cp ${DATAPLANE_EXTRA_NOVA_CONFIG_FILE} ${EDPM_EXTRA_NOVA_CONFIG_FILE}
oc apply -f devsetup/edpm/config/ansible-ee-env.yaml
oc kustomize --load-restrictor LoadRestrictionsNone ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/dataplane/${DATAPLANE_KUSTOMIZE_SCENARIO} > ${DEPLOY_DIR}/dataplane.yaml
bash scripts/gen-edpm-kustomize.sh
ifeq ($(GENERATE_SSH_KEYS), true)
make edpm_deploy_generate_keys
endif
oc apply -f devsetup/edpm/services
.PHONY: edpm_deploy_cleanup
edpm_deploy_cleanup: namespace ## cleans up the edpm instance, Does not affect the operator.
$(eval $(call vars,$@,dataplane))
oc kustomize ${DEPLOY_DIR} | oc delete --ignore-not-found=true -f -
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/openstack-operator ${DEPLOY_DIR}
bash scripts/cleanup-edpm_deploy.sh
.PHONY: edpm_deploy
edpm_deploy: input edpm_deploy_prep ## installs the dataplane instance using kustomize. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,dataplane))
ifneq ($(DATAPLANE_RUNNER_IMG),)
make edpm_patch_ansible_runner_image
endif
oc kustomize ${DEPLOY_DIR} | oc apply -f -
.PHONY: edpm_deploy_baremetal_prep
edpm_deploy_baremetal_prep: export KIND=OpenStackDataPlaneNodeSet
edpm_deploy_baremetal_prep: export EDPM_ANSIBLE_SECRET=${DATAPLANE_ANSIBLE_SECRET}
edpm_deploy_baremetal_prep: export EDPM_ANSIBLE_USER=${DATAPLANE_ANSIBLE_USER}
edpm_deploy_baremetal_prep: export EDPM_BMH_NAMESPACE=${BMH_NAMESPACE}
edpm_deploy_baremetal_prep: export EDPM_OS_CONTAINER_IMG=${BAREMETAL_OS_CONTAINER_IMG}
edpm_deploy_baremetal_prep: export EDPM_PROVISIONING_INTERFACE=${BMO_PROVISIONING_INTERFACE}
edpm_deploy_baremetal_prep: export EDPM_CTLPLANE_INTERFACE=${BM_CTLPLANE_INTERFACE}
edpm_deploy_baremetal_prep: export EDPM_TOTAL_NODES=${DATAPLANE_TOTAL_NODES}
edpm_deploy_baremetal_prep: export EDPM_SSHD_ALLOWED_RANGES=${DATAPLANE_SSHD_ALLOWED_RANGES}
edpm_deploy_baremetal_prep: export EDPM_NTP_SERVER=${DATAPLANE_NTP_SERVER}
edpm_deploy_baremetal_prep: export EDPM_REGISTRY_URL=${DATAPLANE_REGISTRY_URL}
edpm_deploy_baremetal_prep: export EDPM_CONTAINER_TAG=${DATAPLANE_CONTAINER_TAG}
edpm_deploy_baremetal_prep: export EDPM_CONTAINER_PREFIX=${DATAPLANE_CONTAINER_PREFIX}
edpm_deploy_baremetal_prep: export EDPM_GROWVOLS_ARGS=${DATAPLANE_GROWVOLS_ARGS}
edpm_deploy_baremetal_prep: export REPO=${OPENSTACK_REPO}
edpm_deploy_baremetal_prep: export BRANCH=${OPENSTACK_BRANCH}
edpm_deploy_baremetal_prep: export HASH=${OPENSTACK_COMMIT_HASH}
edpm_deploy_baremetal_prep: export DATAPLANE_KUSTOMIZE_SCENARIO=baremetal
edpm_deploy_baremetal_prep: export EDPM_ROOT_PASSWORD=${BM_ROOT_PASSWORD}
edpm_deploy_baremetal_prep: export EDPM_EXTRA_NOVA_CONFIG_FILE=${DEPLOY_DIR}/25-nova-extra.conf
edpm_deploy_baremetal_prep: export EDPM_SERVER_ROLE=compute
edpm_deploy_baremetal_prep: edpm_deploy_cleanup openstack_repo ## prepares the CR to install the data plane
$(eval $(call vars,$@,dataplane))
mkdir -p ${DEPLOY_DIR}
cp ${DATAPLANE_EXTRA_NOVA_CONFIG_FILE} ${EDPM_EXTRA_NOVA_CONFIG_FILE}
oc apply -f devsetup/edpm/config/ansible-ee-env.yaml
oc kustomize --load-restrictor LoadRestrictionsNone ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/dataplane/${DATAPLANE_KUSTOMIZE_SCENARIO} > ${DEPLOY_DIR}/dataplane.yaml
bash scripts/gen-edpm-baremetal-kustomize.sh
ifeq ($(GENERATE_SSH_KEYS), true)
make edpm_deploy_generate_keys
endif
oc apply -f devsetup/edpm/services
.PHONY: edpm_deploy_baremetal
edpm_deploy_baremetal: input edpm_deploy_baremetal_prep ## installs the dataplane instance using kustomize. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,dataplane))
ifneq ($(DATAPLANE_RUNNER_IMG),)
make edpm_patch_ansible_runner_image
endif
oc kustomize ${DEPLOY_DIR} | oc apply -f -
.PHONY: edpm_wait_deploy_baremetal
edpm_wait_deploy_baremetal: edpm_deploy_baremetal ## waits for dataplane readiness. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,dataplane))
oc kustomize ${DEPLOY_DIR} | yq '. | select(.kind == "OpenStackDataPlaneNodeSet"), select(.kind == "OpenStackDataPlaneDeployment")' | oc wait --for condition=Ready --timeout=$(BAREMETAL_TIMEOUT) -f -
$(MAKE) edpm_nova_discover_hosts
.PHONY: edpm_wait_deploy
edpm_wait_deploy: edpm_deploy ## waits for dataplane readiness. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,dataplane))
oc kustomize ${DEPLOY_DIR} | yq '. | select(.kind == "OpenStackDataPlaneNodeSet"), select(.kind == "OpenStackDataPlaneDeployment")' | oc wait --for condition=Ready --timeout=$(DATAPLANE_TIMEOUT) -f -
$(MAKE) edpm_nova_discover_hosts
.PHONY: edpm_register_dns
edpm_register_dns: dns_deploy_prep ## register edpm nodes in dns as dnsdata
$(eval $(call vars,$@,infra))
oc apply -f ${DEPLOY_DIR}/network_v1beta1_dnsdata.yaml # TODO (mschuppert): register edpm nodes in DNS can be removed after full IPAM integration
.PHONY: edpm_nova_discover_hosts
edpm_nova_discover_hosts: ## trigger manual compute host discovery in nova
oc rsh nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verbose
.PHONY: openstack_crds
openstack_crds: namespace openstack_deploy_prep ## installs all openstack CRDs. Useful for infrastructure dev
OPENSTACK_BUNDLE_IMG=${OPENSTACK_BUNDLE_IMG} OUT=${OUT} OPENSTACK_CRDS_DIR=${OPENSTACK_CRDS_DIR} OPERATOR_BASE_DIR=${OPERATOR_BASE_DIR} bash scripts/openstack-crds.sh
.PHONY: edpm_deploy_networker_prep
edpm_deploy_networker_prep: export KIND=OpenStackDataPlaneNodeSet
edpm_deploy_networker_prep: export EDPM_ANSIBLE_SECRET=${DATAPLANE_ANSIBLE_SECRET}
edpm_deploy_networker_prep: export EDPM_ANSIBLE_USER=${DATAPLANE_ANSIBLE_USER}
edpm_deploy_networker_prep: export EDPM_NODE_IP=${DATAPLANE_NETWORKER_IP}
edpm_deploy_networker_prep: export EDPM_TOTAL_NODES=${DATAPLANE_TOTAL_NETWORKER_NODES}
edpm_deploy_networker_prep: export OPENSTACK_RUNNER_IMG=${DATAPLANE_RUNNER_IMG}
edpm_deploy_networker_prep: export EDPM_NETWORK_INTERFACE_NAME=${DATAPLANE_NETWORK_INTERFACE_NAME}
edpm_deploy_networker_prep: export CTLPLANE_IP_ADDRESS_PREFIX=${NNCP_CTLPLANE_IP_ADDRESS_PREFIX}
edpm_deploy_networker_prep: export EDPM_SSHD_ALLOWED_RANGES=${DATAPLANE_SSHD_ALLOWED_RANGES}
edpm_deploy_networker_prep: export EDPM_NTP_SERVER=${DATAPLANE_NTP_SERVER}
edpm_deploy_networker_prep: export EDPM_REGISTRY_URL=${DATAPLANE_REGISTRY_URL}
edpm_deploy_networker_prep: export EDPM_CONTAINER_TAG=${DATAPLANE_CONTAINER_TAG}
edpm_deploy_networker_prep: export EDPM_CONTAINER_PREFIX=${DATAPLANE_CONTAINER_PREFIX}
edpm_deploy_networker_prep: export EDPM_DEPLOY_DIR=${DEPLOY_DIR_EDPM_NETWORKER}
edpm_deploy_networker_prep: export EDPM_IP_ADDRESS_OFFSET=200
edpm_deploy_networker_prep: export EDPM_SERVER_ROLE=networker
edpm_deploy_networker_prep: export REPO=${OPENSTACK_REPO}
edpm_deploy_networker_prep: export BRANCH=${OPENSTACK_BRANCH}
edpm_deploy_networker_prep: export HASH=${OPENSTACK_COMMIT_HASH}
edpm_deploy_networker_prep: export DATAPLANE_KUSTOMIZE_SCENARIO=networker
ifeq ($(NETWORK_BGP), true)
ifeq ($(BGP_OVN_ROUTING), true)
edpm_deploy_networker_prep: export BGP=ovn
else
edpm_deploy_networker_prep: export BGP=kernel
endif
endif
edpm_deploy_networker_prep: edpm_deploy_networker_cleanup openstack_repo ## prepares the CR to install the data plane
echo "START PREP"
$(eval $(call vars,$@,dataplane))
mkdir -p ${DEPLOY_DIR_EDPM_NETWORKER}
oc apply -f devsetup/edpm/config/ansible-ee-env.yaml
oc kustomize --load-restrictor LoadRestrictionsNone ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/dataplane/${DATAPLANE_KUSTOMIZE_SCENARIO} > ${DEPLOY_DIR_EDPM_NETWORKER}/dataplane.yaml
bash scripts/gen-edpm-kustomize.sh
ifeq ($(GENERATE_SSH_KEYS), true)
make edpm_deploy_generate_keys
endif
.PHONY: edpm_deploy_networker_cleanup
edpm_deploy_networker_cleanup: namespace ## cleans up the edpm instance, Does not affect the operator.
echo "START CLEANUP"
$(eval $(call vars,$@,dataplane))
oc kustomize ${DEPLOY_DIR_EDPM_NETWORKER} | oc delete --ignore-not-found=true -f -
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/openstack-operator ${DEPLOY_DIR_EDPM_NETWORKER}
echo "CLEANUP DONE"
.PHONY: edpm_deploy_networker
edpm_deploy_networker: input edpm_deploy_networker_prep ## installs the dataplane instance using kustomize. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.
$(eval $(call vars,$@,dataplane))
oc apply -f ${OPERATOR_BASE_DIR}/${OPERATOR_NAME}-operator/config/services
ifneq ($(DATAPLANE_RUNNER_IMG),)
make edpm_patch_ansible_runner_image
endif
oc kustomize ${DEPLOY_DIR_EDPM_NETWORKER} | oc apply -f -
##@ INFRA
.PHONY: infra_prep
infra_prep: export IMAGE=${INFRA_IMG}
infra_prep: ## creates the files to install the operator using olm
$(eval $(call vars,$@,infra))
bash scripts/gen-olm.sh
.PHONY: infra
infra: operator_namespace infra_prep ## installs the operator, also runs the prep step. Set INFRA_IMG for custom image.
$(eval $(call vars,$@,infra))
oc apply -f ${OPERATOR_DIR}
.PHONY: infra_cleanup
infra_cleanup: ## deletes the operator, but does not cleanup the service resources
$(eval $(call vars,$@,infra))
bash scripts/operator-cleanup.sh
${CLEANUP_DIR_CMD} ${OPERATOR_DIR}
##@ DNS
.PHONY: dns_deploy_prep
dns_deploy_prep: export KIND=DNSMasq