Skip to content

Commit

Permalink
chore: Updates to deploy Makefiles
Browse files Browse the repository at this point in the history
* Fixes formatting on help

* Adds CUSTOM_GATEWAY_VERSION var in case the gateway image tag is not the
  same as the main image tag during testing
  • Loading branch information
phantomjinx committed Nov 11, 2024
1 parent 15d3be7 commit 2885364
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ NGINX_DOCKERFILE=Dockerfile-nginx
CUSTOM_IMAGE ?= $(IMAGE_NAME)
CUSTOM_GATEWAY_IMAGE ?= $(GATEWAY_IMAGE_NAME)
CUSTOM_VERSION ?= $(VERSION)
CUSTOM_GATEWAY_VERSION ?= $(VERSION)

RELEASE_GIT_REMOTE := origin
GIT_COMMIT := $(shell if [ -d .git ]; then git rev-list -1 HEAD; else echo "$(CUSTOM_VERSION)"; fi)
Expand Down Expand Up @@ -124,10 +125,10 @@ image-push: image

image-gateway:
@echo "####### Building Hawtio Online Gateway container image..."
docker build -t $(CUSTOM_GATEWAY_IMAGE):$(CUSTOM_VERSION) -f Dockerfile-gateway .
docker build -t $(CUSTOM_GATEWAY_IMAGE):$(CUSTOM_GATEWAY_VERSION) -f Dockerfile-gateway .

image-gateway-push: image-gateway
docker push $(CUSTOM_GATEWAY_IMAGE):$(CUSTOM_VERSION)
docker push $(CUSTOM_GATEWAY_IMAGE):$(CUSTOM_GATEWAY_VERSION)

get-image:
@echo $(CUSTOM_IMAGE)
Expand Down
41 changes: 21 additions & 20 deletions deploy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,16 @@ endif
#=== Calls kubectl
#
#* PARAMETERS:
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ]
#** MODE: Set the mode of installation [ cluster | namespace ]
#** NAMESPACE: Set the namespace for the resources
#** HAWTCONFIG: Set whether to use configmap as hawtconfig.json [ true | false ] (true by default)
#** CUSTOM_IMAGE: Set a custom image to install from
#** CUSTOM_GATEWAY_IMAGE: Set a custom gateway image to install from
#** CUSTOM_VERSION: Set a custom version to install from
#** OS_CONSOLE_URL: Set the location URL of the openshift console (only used in 'openshift' mode)
#** DRY_RUN: Print the resources to be applied instead of applying them [ true | false ]
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ]
#** MODE: Set the mode of installation [ cluster | namespace ]
#** NAMESPACE: Set the namespace for the resources
#** HAWTCONFIG: Set whether to use configmap as hawtconfig.json [ true | false ] (true by default)
#** CUSTOM_IMAGE: Set a custom image to install from
#** CUSTOM_GATEWAY_IMAGE: Set a custom gateway image to install from
#** CUSTOM_VERSION: Set a custom version to install from
#** CUSTOM_GATEWAY_VERSION: Set a custom gateway version to install from
#** OS_CONSOLE_URL: Set the location URL of the openshift console (only used in 'openshift' mode)
#** DRY_RUN: Print the resources to be applied instead of applying them [ true | false ]
#
#---
install: kustomize kubectl
Expand Down Expand Up @@ -224,8 +225,8 @@ endif
#=== Calls check-admin
#
#* PARAMETERS:
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ] - must be openshift as not applicable to kubernetes
#** NAMESPACE: Set the namespace for the secret
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ] - must be openshift not applicable to kubernetes
#** NAMESPACE: Set the namespace for the secret
#
#---
generate-proxying: check-admin
Expand All @@ -243,8 +244,8 @@ endif
#=== Calls check-admin
#
#* PARAMETERS:
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ] - must be kubernetes as not applicable to openshift
#** NAMESPACE: Set the namespace for the secret
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ] - must be kubernetes not applicable to openshift
#** NAMESPACE: Set the namespace for the secret
#
#---
generate-serving: check-admin
Expand All @@ -262,8 +263,8 @@ endif
#=== Calls check-admin
#
#* PARAMETERS:
#** CLUSTER_TYPE: Set the cluster type - must be openshift as not applicable to kubernetes
#** MODE: Set the mode of installation [ cluster | namespace ]
#** CLUSTER_TYPE: Set the cluster type - must be openshift as not applicable to kubernetes
#** MODE: Set the mode of installation [ cluster | namespace ]
#
#---
cluster-auth-client: check-admin
Expand All @@ -286,11 +287,11 @@ endif
#=== Cluster-admin privileges are required.
#
#* PARAMETERS:
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ]
#** MODE: Set the mode of installation [ cluster | namespace ]
#** NAMESPACE: Set the namespace to uninstall the resources from
#** UNINSTALL_ALL: Uninstall all resources including crds and cluster roles installed by setup-cluster [true|false]
#** DRY_RUN: Print the resources to be applied instead of applying them [true|false]
#** CLUSTER_TYPE: Set the cluster type to install on [ openshift | k8s ]
#** MODE: Set the mode of installation [ cluster | namespace ]
#** NAMESPACE: Set the namespace to uninstall the resources from
#** UNINSTALL_ALL: Uninstall all resources including crds and cluster roles installed by setup-cluster [true|false]
#** DRY_RUN: Print the resources to be applied instead of applying them [true|false]
#
#---
uninstall: kubectl kustomize
Expand Down

0 comments on commit 2885364

Please sign in to comment.