@@ -29,11 +29,11 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
2929#
3030# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
3131# alice.cern/operator-bundle:$VERSION and alice.cern/operator-catalog:$VERSION.
32- IMAGE_TAG_BASE ?= teom /aliecs
32+ IMAGE_TAG_BASE ?= gitlab-registry.cern.ch/aliceo2group/dockerfiles /aliecs
3333
3434# BUNDLE_IMG defines the image:tag used for the bundle.
3535# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
36- BUNDLE_IMG ?= $(IMAGE_TAG_BASE ) - bundle:v$(VERSION )
36+ BUNDLE_IMG ?= $(IMAGE_TAG_BASE ) / bundle:v$(VERSION )
3737
3838# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command
3939BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION ) $(BUNDLE_METADATA_OPTS )
5151OPERATOR_SDK_VERSION ?= unknown
5252
5353# Image URL to use all building/pushing image targets
54- TASK_IMG ?= docker.io/teom/ aliecs- task-manager:latest
55- ENVIRONMENT_IMG ?= docker.io/teom/ aliecs- environment-manager:latest
54+ TASK_IMG ?= gitlab-registry.cern.ch/aliceo2group/dockerfiles/ aliecs/ task-manager:latest
55+ ENVIRONMENT_IMG ?= gitlab-registry.cern.ch/aliceo2group/dockerfiles/ aliecs/ environment-manager:latest
5656# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5757ENVTEST_K8S_VERSION = 1.27.1
5858
@@ -98,11 +98,11 @@ help: ## Display this help.
9898
9999.PHONY : manifests
100100manifests : controller-gen # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
101- # Note that the option maxDescLen=0 was added in the default scaffold in order to sort out the issue
102- # Too long: must have at most 262144 bytes. By using kubectl apply to create / update resources an annotation
103- # is created by K8s API to store the latest version of the resource ( kubectl.kubernetes.io/last-applied-configuration).
104- # However, it has a size limit and if the CRD is too big with so many long descriptions as this one it will cause the failure.
105- $(CONTROLLER_GEN ) rbac :roleName=manager-role crd:maxDescLen=0 webhook paths="./..." output:crd:artifacts:config=config/crd/bases
101+ # Note that the option maxDescLen=0 was added in the default scaffold in order to sort out the issue
102+ # Too long: must have at most 262144 bytes. By using kubectl apply to create / update resources an annotation
103+ # is created by K8s API to store the latest version of the resource ( kubectl.kubernetes.io/last-applied-configuration).
104+ # However, it has a size limit and if the CRD is too big with so many long descriptions as this one it will cause the failure.
105+ $(CONTROLLER_GEN ) rbac:roleName=manager-role crd:maxDescLen=0 webhook paths=" ./..." output:crd:artifacts:config=config/crd/bases
106106
107107# .PHONY: manifests
108108# manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
@@ -207,12 +207,20 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
207207 $(KUSTOMIZE ) build config/crd | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
208208
209209.PHONY : deploy
210- deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
211- cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
212- $(KUSTOMIZE ) build config/default | $(KUBECTL ) apply -f - --server-side
210+ deploy : deploy-task deploy-environment # # Deploy both controllers to the K8s cluster specified in ~/.kube/config.
211+
212+ .PHONY : deploy-task
213+ deploy-task : manifests kustomize # # Deploy task controller to the K8s cluster specified in ~/.kube/config.
214+ cd config/task && $(KUSTOMIZE ) edit set image task-manager=${TASK_IMG}
215+ $(KUSTOMIZE ) build config/task | $(KUBECTL ) apply -f - --server-side
216+
217+ .PHONY : deploy-environment
218+ deploy-environment : manifests kustomize # # Deploy environment controller to the K8s cluster specified in ~/.kube/config.
219+ cd config/environment && $(KUSTOMIZE ) edit set image environment-manager=${ENVIRONMENT_IMG}
220+ $(KUSTOMIZE ) build config/environment | $(KUBECTL ) apply -f - --server-side
213221
214222.PHONY : undeploy
215- undeploy : # # Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
223+ undeploy : # # Undeploy both controllers from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
216224 $(KUSTOMIZE ) build config/default | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
217225
218226# #@ Build Dependencies
@@ -272,7 +280,8 @@ endif
272280.PHONY : bundle
273281bundle : manifests kustomize operator-sdk # # Generate bundle manifests and metadata, then validate generated files.
274282 $(OPERATOR_SDK ) generate kustomize manifests -q
275- cd config/manager && $(KUSTOMIZE ) edit set image controller=$(IMG )
283+ cd config/manager && $(KUSTOMIZE ) edit set image task-manager=$(TASK_IMG )
284+ cd config/manager && $(KUSTOMIZE ) edit set image environment-manager=$(ENVIRONMENT_IMG )
276285 $(KUSTOMIZE ) build config/manifests | $(OPERATOR_SDK ) generate bundle $(BUNDLE_GEN_FLAGS )
277286 $(OPERATOR_SDK ) bundle validate ./bundle
278287
@@ -306,7 +315,7 @@ endif
306315BUNDLE_IMGS ?= $(BUNDLE_IMG )
307316
308317# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0).
309- CATALOG_IMG ?= $(IMAGE_TAG_BASE ) - catalog:v$(VERSION )
318+ CATALOG_IMG ?= $(IMAGE_TAG_BASE ) / catalog:v$(VERSION )
310319
311320# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image.
312321ifneq ($(origin CATALOG_BASE_IMG ) , undefined)
0 commit comments