You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/10/13 07:56:36 UTC

[camel-k] branch main updated (4d092ef5c -> b7e631ecb)

This is an automated email from the ASF dual-hosted git repository.

tsato pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


    from 4d092ef5c Regen Helm charts
     new 75cc695b1 Refactors the kustomize release sub-directory into a script
     new dba36a864 Adds a help rule to the install Makefile
     new b7e631ecb #2758: Adds documentation on use of kustomize as installation tool

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |   2 +-
 docs/modules/ROOT/nav.adoc                         |   1 +
 .../pages/installation/advanced/kustomize.adoc     | 100 ++++++++++++++++++
 .../ROOT/pages/installation/installation.adoc      |   6 ++
 install/Makefile                                   | 112 +++++++++++++--------
 install/config                                     |   1 +
 install/example/kustomization.yaml                 |   2 +-
 install/operator/kustomization.yaml                |   2 +-
 install/platform/kustomization.yaml                |   8 +-
 install/release/Makefile                           |  60 -----------
 install/script/help.sh                             |  12 +++
 install/setup-cluster/kustomization.yaml           |   4 +-
 install/setup/kustomization.yaml                   |   2 +-
 script/Makefile                                    |   5 +
 script/check_platform.sh                           |  37 ++++---
 script/release_kustomize.sh                        |  74 ++++++++++++++
 16 files changed, 304 insertions(+), 124 deletions(-)
 create mode 100644 docs/modules/ROOT/pages/installation/advanced/kustomize.adoc
 create mode 120000 install/config
 delete mode 100644 install/release/Makefile
 create mode 100755 install/script/help.sh
 create mode 100755 script/release_kustomize.sh


[camel-k] 02/03: Adds a help rule to the install Makefile

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit dba36a864d35a45ead9c5e5151a449ee669599f8
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Wed Oct 5 18:11:49 2022 +0100

    Adds a help rule to the install Makefile
    
    * Prints each rule's description and parameters by walking the
      install/Makefile
    
    * Quietens needless kustomize messages that might cause needless
      confusion to user's trying the install
---
 install/Makefile       | 110 ++++++++++++++++++++++++++++++-------------------
 install/script/help.sh |  12 ++++++
 2 files changed, 80 insertions(+), 42 deletions(-)

diff --git a/install/Makefile b/install/Makefile
index a84e6273f..6854f83b2 100644
--- a/install/Makefile
+++ b/install/Makefile
@@ -109,15 +109,15 @@ endef
 #
 define add-remove-kind-patch
 	@(cd $(1) && \
-		$(KUSTOMIZE) edit $(2) patch --path $(3) --kind $(4))
+		$(KUSTOMIZE) edit $(2) patch --path $(3) --kind $(4) &> /dev/null)
 endef
 
 #
 # Macro for adding / removing the prometheus resources for monitoring
 #
 define add-remove-operator-monitoring
-	cd $(1) && \
-		$(KUSTOMIZE) edit $(2) resource ../$(CONFIG)/prometheus
+	@(cd $(1) && \
+		$(KUSTOMIZE) edit $(2) resource ../$(CONFIG)/prometheus &> /dev/null)
 endef
 
 .PHONY: have-platform check_admin setup-cluster .setup-kubernetes .setup-openshift setup
@@ -165,19 +165,23 @@ ifneq ($(CRD_SUPPORT),OK)
 	$(error *** CRD API FAILURE: $(CRD_SUPPORT) ****)
 endif
 
+#---
+#
+#@ setup-cluster
 #
-# Setup the cluster installation by installing crds and cluster roles.
+#== Setup the cluster installation by installing crds and cluster roles.
 #
 # Will either call setup-cluster-openshift (then setup-cluster-kubernetes) or
 # setup-cluster-kubernetes depending on the identity of the cluster
 #
-# Cluster-admin privileges are required.
+#=== Cluster-admin privileges are required.
 #
-# PARAMETERS:
-#   NAMESPACE: Sets the namespace for the resources
-#   PLATFORM:  Override the discovered platform, if required
-#   DRY_RUN:     true - Prints the resources to be applied instead of applying them
+#* PARAMETERS:
+#** NAMESPACE: Sets the namespace for the resources
+#** PLATFORM:  Override the discovered platform, if required
+#** DRY_RUN:   If 'true', prints the resources to be applied instead of applying them
 #
+#---
 setup-cluster: check-admin check-crd-api-support have-platform kustomize kubectl
 # Set the namespace in the setup-cluster kustomization yaml
 	@$(call set-kustomize-namespace,$@)
@@ -200,18 +204,22 @@ else
 		sed 's/$(PLACEHOLDER)/$(NAMESPACE)/'
 endif
 
+#---
 #
-# Setup the installation by installing roles and granting
-# privileges for the installing operator.
+#@ setup
 #
-# Cluster-admin privileges are required.
+#== Setup the installation by installing roles and granting privileges for the installing operator.
 #
-# PARAMETERS:
-#   NAMESPACE: Sets the namespace for the resources
-#   GLOBAL:    Converts all roles & bindings to cluster-level [true|false]
-#   PLATFORM:  Override the discovered platform, if required
-#   DRY_RUN:     true - Prints the resources to be applied instead of applying them
+#=== Calls setup-cluster
+#=== Cluster-admin privileges are required.
 #
+#* PARAMETERS:
+#** NAMESPACE: Sets the namespace for the resources
+#** GLOBAL:    Converts all roles & bindings to cluster-level [true|false]
+#** PLATFORM:  Override the discovered platform, if required
+#** DRY_RUN:     If 'true', prints the resources to be applied instead of applying them
+#
+#---
 setup: setup-cluster
 # Set the namespace in the setup kustomization yaml
 	@$(call set-kustomize-namespace,$@)
@@ -262,24 +270,28 @@ endif
 .operator-can-monitor: kubectl
 	@output=$$(kubectl get crd prometheusrules.monitoring.coreos.com 2>&1) || (echo "****" && echo "**** ERROR: Montoring not available as Prometheus CRDs not installed in cluster ****" && echo "****"; exit 1)
 
+#---
+#
+#@ operator
 #
-# Install the operator deployment and related resources
+#== Install the operator deployment and related resources
 #
-# Cluster-admin privileges are required.
+#=== Cluster-admin privileges are required.
 #
-# PARAMETERS:
-#   NAMESPACE:          Set the namespace to install the operator into
-#   PLATFORM:           Override the discovered platform, if required
-#   GLOBAL:             Sets the operator to watch all namespaces for custom resources [true|false]
-#   CUSTOM_IMAGE:       Set a custom operator image name
-#   CUSTOM_VERSION:     Set a custom operator image version/tag
-#   ALWAYS_PULL_IMAGES: Sets whether to always pull the operator image [true|false]
-#   MONITORING:         Adds the prometheus monitoring resources
-#   MONITORING_PORT:    Set a custom monitoring port
-#   HEALTH_PORT:        Set a custom health port
-#   LOGGING_LEVEL:      Set the level of logging [info|debug]
-#   DRY_RUN:            Prints the resources to be applied instead of applying them
+#* PARAMETERS:
+#** NAMESPACE:          Set the namespace to install the operator into
+#** PLATFORM:           Override the discovered platform, if required
+#** GLOBAL:             Sets the operator to watch all namespaces for custom resources [true|false]
+#** CUSTOM_IMAGE:       Set a custom operator image name
+#** CUSTOM_VERSION:     Set a custom operator image version/tag
+#** ALWAYS_PULL_IMAGES: Sets whether to always pull the operator image [true|false]
+#** MONITORING:         Adds the prometheus monitoring resources
+#** MONITORING_PORT:    Set a custom monitoring port
+#** HEALTH_PORT:        Set a custom health port
+#** LOGGING_LEVEL:      Set the level of logging [info|debug]
+#** DRY_RUN:            Prints the resources to be applied instead of applying them
 #
+#---
 operator: check-admin have-platform check-crd-api-support kustomize kubectl .operator-port-patch .operator-log-level-patch
 ifeq ($(MONITORING), true)
 	@$(MAKE) -s .operator-can-monitor
@@ -337,16 +349,20 @@ endif
 .platform-openshift-patch:
 	@sed -i 's/.*profile:.*/  profile: OpenShift/' $(SAMPLES)/$(INT_PLATFORM_PATCH).$(YAML)
 
+#---
 #
-# Install the integration platform
+#@ platform
 #
-# Cluster-admin privileges are required.
+#== Install the integration platform
 #
-# PARAMETERS:
-#   NAMESPACE: Set the namespace to install the operator into
-#   PLATFORM:  Override the discovered platform, if required
-#   DRY_RUN:   Prints the resources to be applied instead of applying them [true,false]
+#=== Cluster-admin privileges are required.
 #
+#* PARAMETERS:
+#** NAMESPACE: Set the namespace to install the operator into
+#** PLATFORM:  Override the discovered platform, if required
+#** DRY_RUN:   Prints the resources to be applied instead of applying them [true,false]
+#
+#---
 platform: have-platform kustomize kubectl
 # Cannot be a dependency as PLATFORM could contain 'ERROR: '
 	@$(MAKE) .platform-$(PLATFORM)-patch
@@ -360,14 +376,18 @@ endif
 
 .PHONY: example
 
+#---
+#
+#@ example
 #
-# Installs the example integration
+#== Installs the example integration
 #
-# PARAMETERS:
-#   NAMESPACE: Set the namespace to install the example into
-#   PLATFORM:  Override the discovered platform, if required
-#   DRY_RUN:   Prints the resources to be applied instead of applying them [true, false]
+#* PARAMETERS:
+#** NAMESPACE: Set the namespace to install the example into
+#** PLATFORM:  Override the discovered platform, if required
+#** DRY_RUN:   Prints the resources to be applied instead of applying them [true, false]
 #
+#---
 example: kubectl
 # Set the namespace in the setup kustomization yaml
 	@$(call set-kustomize-namespace,$@)
@@ -376,3 +396,9 @@ ifeq ($(DRY_RUN), false)
 else
 	@$(KUSTOMIZE) build $(KOPTIONS) $@
 endif
+
+.DEFAULT_GOAL := help
+.PHONY: help
+help: ## Show this help screen.
+	@#./script/help.sh $(MAKEFILE_LIST)
+	@awk 'BEGIN { printf "\nUsage: make \033[31m<PARAM1=val1 PARAM2=val2>\033[0m \033[36m<target>\033[0m\n"; printf "\nAvailable targets are:\n" } /^#@/ { printf "\033[36m%-15s\033[0m", $$2; subdesc=0; next } /^#===/ { printf "%-14s \033[32m%s\033[0m\n", " ", substr($$0, 5); subdesc=1; next } /^#==/ { printf "\033[0m%s\033[0m\n\n", substr($$0, 4); next } /^#\*\*/ { printf "%-14s \033[31m%s\033[0m\n", " ", substr($$0, 4); next } /^#\*/ && (subdesc == 1) { printf "\n"; next } /^#\-\-\-/ { pri [...]
diff --git a/install/script/help.sh b/install/script/help.sh
new file mode 100755
index 000000000..a38fa0bee
--- /dev/null
+++ b/install/script/help.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+awk 'BEGIN {
+      printf "\nUsage: make \033[31m<PARAM1=val1 PARAM2=val2>\033[0m \033[36m<target>\033[0m\n"
+      printf "\nAvailable targets are:\n"
+    }
+    /^#@/ { printf "\033[36m%-15s\033[0m", $2; subdesc=0; next }
+    /^#===/ { printf "%-14s \033[32m%s\033[0m\n", " ", substr($0, 5); subdesc=1; next }
+    /^#==/ { printf "\033[0m%s\033[0m\n\n", substr($0, 4); next }
+    /^#\*\*/ { printf "%-14s \033[31m%s\033[0m\n", " ", substr($0, 4); next }
+    /^#\*/ && (subdesc == 1) { printf "\n"; next }
+    /^#\-\-\-/ { printf "\n"; next }' ${1}


[camel-k] 03/03: #2758: Adds documentation on use of kustomize as installation tool

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit b7e631ecb7dbda2c900bc6a45fd67f3be51cc24c
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Wed Oct 5 18:13:08 2022 +0100

    #2758: Adds documentation on use of kustomize as installation tool
---
 docs/modules/ROOT/nav.adoc                         |   1 +
 .../pages/installation/advanced/kustomize.adoc     | 100 +++++++++++++++++++++
 .../ROOT/pages/installation/installation.adoc      |   6 ++
 3 files changed, 107 insertions(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index a58d73f31..a6a368f3d 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -19,6 +19,7 @@
 *** xref:installation/advanced/knative.adoc[Knative Sinks]
 *** xref:installation/advanced/resources.adoc[Resource management]
 *** xref:installation/advanced/multi.adoc[Multiple Operators]
+*** xref:installation/advanced/kustomize.adoc[Install Using Kustomize]
 * Command Line Interface
 ** xref:cli/cli.adoc[Kamel CLI]
 ** xref:cli/file-based-config.adoc[File-based Config]
diff --git a/docs/modules/ROOT/pages/installation/advanced/kustomize.adoc b/docs/modules/ROOT/pages/installation/advanced/kustomize.adoc
new file mode 100644
index 000000000..634f5554a
--- /dev/null
+++ b/docs/modules/ROOT/pages/installation/advanced/kustomize.adoc
@@ -0,0 +1,100 @@
+[[kustomize]]
+= Installing with Kustomize
+
+https://kustomize.io[Kustomize] provides a declarative approach to the configuration customization of a
+Camel-K installation. Kustomize works either with a standalone executable or as a built-in to ``kubectl``.
+
+== File Location
+
+The https://github.com/apache/camel-k/tree/main/install[install] directory provides the configuration
+files for use with Kustomize. The following sub-directories are named to describe the purpose of their
+respective kustomization:
+
+* *setup-cluster*: install the cluster-level resources, inc. the ClusterResourceDefinitions
+* *setup*: install the roles and permissions required by the camel-k operator into the current namespace
+* *operator*: install the camel-k operator into the current namespace of a cluster
+* *platform*: install an instance of the camel-k integration-platform into the current namespace of a cluster
+* *example*: install an example integration into the current namespace of a cluster
+
+== Using kubectl
+
+The kustomization resources can be applied directly to a cluster using ``kubectl``, eg.
+ `kubectl -k setup-cluster`
+
+Due to its declarative nature, it is expected that the configuration files would be edited to suit the
+custom implementation. For example, when creating an integration-platform:
+
+* ``kustomization.yaml`` references configuration in ``config/samples/patch-integration-platform.yaml``
+* Edit this file according to installation requirements
+* Apply the resources by executing ``kubectl -k platform``
+
+== Using the Makefile
+
+For convenience, a Makefile is included in the install directory, providing a frontend interface for
+the most common installation procedures. By incorporating environment variables, it is able to update
+some of the configuration automatically before applying it to the cluster using ``kubectl``.
+
+The environment variable ``DRY_RUN`` can be used with a value of ``true`` to only display the prepared
+resources, allowing the user to check the prospective installation.
+
+A recent version of ``make`` is a pre-requisite and a familiarity with using
+https://www.gnu.org/software/make/manual/make.html[Makefiles] would be beneficial.
+
+The Makefile rules are described by executing ``make`` or ``make help``, eg.
+
+....
+Usage: make <PARAM1=val1 PARAM2=val2> <target>
+
+Available targets are:
+
+setup-cluster   Setup the cluster installation by installing crds and cluster roles.
+
+                Cluster-admin privileges are required.
+
+                NAMESPACE: Sets the namespace for the resources
+                PLATFORM:  Override the discovered platform, if required
+                DRY_RUN:   If 'true', prints the resources to be applied instead of applying them
+
+
+setup           Setup the installation by installing roles and granting privileges for the installing operator.
+
+                Calls setup-cluster
+                Cluster-admin privileges are required.
+
+                NAMESPACE: Sets the namespace for the resources
+                GLOBAL:    Converts all roles & bindings to cluster-level [true|false]
+                PLATFORM:  Override the discovered platform, if required
+                DRY_RUN:     If 'true', prints the resources to be applied instead of applying them
+
+operator        Install the operator deployment and related resources
+
+                Cluster-admin privileges are required.
+
+                NAMESPACE:          Set the namespace to install the operator into
+                PLATFORM:           Override the discovered platform, if required
+                GLOBAL:             Sets the operator to watch all namespaces for custom resources [true|false]
+                CUSTOM_IMAGE:       Set a custom operator image name
+                CUSTOM_VERSION:     Set a custom operator image version/tag
+                ALWAYS_PULL_IMAGES: Sets whether to always pull the operator image [true|false]
+                MONITORING:         Adds the prometheus monitoring resources
+                MONITORING_PORT:    Set a custom monitoring port
+                HEALTH_PORT:        Set a custom health port
+                LOGGING_LEVEL:      Set the level of logging [info|debug]
+                DRY_RUN:            Prints the resources to be applied instead of applying them
+
+
+platform        Install the integration platform
+
+                Cluster-admin privileges are required.
+
+                NAMESPACE: Set the namespace to install the operator into
+                PLATFORM:  Override the discovered platform, if required
+                DRY_RUN:   Prints the resources to be applied instead of applying them [true,false]
+
+
+example         Installs the example integration
+
+                NAMESPACE: Set the namespace to install the example into
+                PLATFORM:  Override the discovered platform, if required
+                DRY_RUN:   Prints the resources to be applied instead of applying them [true, false]
+....
diff --git a/docs/modules/ROOT/pages/installation/installation.adoc b/docs/modules/ROOT/pages/installation/installation.adoc
index 672e02377..38a4448f7 100644
--- a/docs/modules/ROOT/pages/installation/installation.adoc
+++ b/docs/modules/ROOT/pages/installation/installation.adoc
@@ -52,6 +52,12 @@ You're now ready to xref:running/running.adoc[run some integrations].
 Camel K is also available in Helm Hub for installation.
 Follow the instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K] page for more information.
 
+[[kustomize]]
+== Installation via Kustomize
+
+Camel K can be installed using https://kustomize.io[Kustomize], providing an interface for configuring more advanced features.
+Please go to xref:installation/advanced/kustomize.adoc[this page] for more information.
+
 [[advanced]]
 == Advanced configuration
 


[camel-k] 01/03: Refactors the kustomize release sub-directory into a script

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 75cc695b1db1efdf195735c697da2915e8dad5f7
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Wed Jul 27 10:21:07 2022 +0100

    Refactors the kustomize release sub-directory into a script
    
    * Intention was to provide a version of the source that only
      includes the kustomize install/config files rather than the user
      cloning the whole repository.
    
    * Migrates the release from a sub-directory to a rule in the main
      Makefile that fires off the release_kustomize.sh script
    
    * To avoid changing level paths for the config directory (../..), adds
      a symlink into the install directory which is at the same level as
      it would be in the release archive.
---
 .gitignore                               |  2 +-
 install/Makefile                         |  2 +-
 install/config                           |  1 +
 install/example/kustomization.yaml       |  2 +-
 install/operator/kustomization.yaml      |  2 +-
 install/platform/kustomization.yaml      |  8 +++-
 install/release/Makefile                 | 60 --------------------------
 install/setup-cluster/kustomization.yaml |  4 +-
 install/setup/kustomization.yaml         |  2 +-
 script/Makefile                          |  5 +++
 script/check_platform.sh                 | 37 ++++++++++------
 script/release_kustomize.sh              | 74 ++++++++++++++++++++++++++++++++
 12 files changed, 117 insertions(+), 82 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1702b92a4..14fbc3c0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,4 +166,4 @@ config/**/*.gen.tmpl
 config/**/*.gen.yaml
 config/**/*.gen.json
 
-release/*-installer*
+*-installer*
diff --git a/install/Makefile b/install/Makefile
index e0c497908..a84e6273f 100644
--- a/install/Makefile
+++ b/install/Makefile
@@ -51,7 +51,7 @@ HEALTH_PORT ?= 8081
 # Operator Logging Level: string [info, debug, 0, 1]
 LOGGING_LEVEL ?= info
 
-CONFIG := ../config
+CONFIG := config
 MANAGER := $(CONFIG)/manager
 SAMPLES := $(CONFIG)/samples
 RBAC := $(CONFIG)/rbac
diff --git a/install/config b/install/config
new file mode 120000
index 000000000..3ca249e06
--- /dev/null
+++ b/install/config
@@ -0,0 +1 @@
+../config
\ No newline at end of file
diff --git a/install/example/kustomization.yaml b/install/example/kustomization.yaml
index 6c0d51d85..6b9541ac7 100644
--- a/install/example/kustomization.yaml
+++ b/install/example/kustomization.yaml
@@ -18,4 +18,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-- ../../config/samples/bases/camel_v1_integration.yaml
+- ../config/samples/bases/camel_v1_integration.yaml
diff --git a/install/operator/kustomization.yaml b/install/operator/kustomization.yaml
index 3b5d1f1e0..e9412ac08 100644
--- a/install/operator/kustomization.yaml
+++ b/install/operator/kustomization.yaml
@@ -43,4 +43,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-- ../../config/manager
+- ../config/manager
diff --git a/install/platform/kustomization.yaml b/install/platform/kustomization.yaml
index 7102db801..b425aeb51 100644
--- a/install/platform/kustomization.yaml
+++ b/install/platform/kustomization.yaml
@@ -15,10 +15,16 @@
 # limitations under the License.
 # ---------------------------------------------------------------------------
 
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
 #
 # * patch-integration-platform.yaml
 # customizes the integration platform custom resource
 # Edit the patch manually to add required configuration
 #
 resources:
-- ../../config/samples/bases/camel_v1_integrationplatform.yaml
+- ../config/samples/bases/camel_v1_integrationplatform.yaml
+
+patchesStrategicMerge:
+- ../config/samples/patch-integration-platform.yaml
diff --git a/install/release/Makefile b/install/release/Makefile
deleted file mode 100644
index c35ba2a9a..000000000
--- a/install/release/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Include the main camel-k Makefile containing
-# basic common recipes like kustomize and vars
-# like VERSION
-#
-
-.PHONY: $(SUBDIRS)
-
-INSTALLDIR := $(RELEASE_NAME)-installer
-CONFIG := ../../config
-INSTALL := ../../install
-CMDUTIL := cmd/util
-
-RELEASE := $(CONFIG) $(INSTALL)
-
-default: release
-
-check-vars:
-ifndef RELEASE_VERSION
-	$(error RELEASE_VERSION is not set)
-endif
-ifndef RELEASE_NAME
-	$(error RELEASE_NAME is not set)
-endif
-
-create:
-	#@ Make a new build directory
-	@mkdir -p $(INSTALLDIR)
-	#@ Copy directories into build directory
-	@for rel in $(RELEASE); do \
-		relname=$$(basename $$rel); \
-		for dir in `find $$rel -mindepth 1 -maxdepth 1 \( ! -iname "*release*" \)`; do \
-			mkdir -p "$(INSTALLDIR)/$$relname"; \
-			cp -rfL $$dir $(INSTALLDIR)/$$relname/; \
-		done \
-	done
-	#@ Copy the platform-check go source since its built and run during install
-	@mkdir -p $(INSTALLDIR)/$(CMDUTIL) && \
-		cp -rf ../../$(CMDUTIL)/platform-check $(INSTALLDIR)/$(CMDUTIL)/
-
-release: check-vars create
-	#@tar zcvf $(INSTALLDIR)-$(RELEASE_VERSION).tar.gz $(INSTALLDIR)
-
-clean:
-	@rm -rf *-installer *.tar.gz
diff --git a/install/setup-cluster/kustomization.yaml b/install/setup-cluster/kustomization.yaml
index 88d4747cb..cfce7838b 100644
--- a/install/setup-cluster/kustomization.yaml
+++ b/install/setup-cluster/kustomization.yaml
@@ -18,5 +18,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-- ../../config/crd
-- ../../config/rbac/user-cluster-role.yaml
+- ../config/crd
+- ../config/rbac/user-cluster-role.yaml
diff --git a/install/setup/kustomization.yaml b/install/setup/kustomization.yaml
index 9b3c34e6f..c10dfd653 100644
--- a/install/setup/kustomization.yaml
+++ b/install/setup/kustomization.yaml
@@ -18,4 +18,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-- ../../config/rbac
+- ../config/rbac
diff --git a/script/Makefile b/script/Makefile
index 89d4ebca5..1f5c56cad 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -499,6 +499,11 @@ release-nightly: clean codegen set-module-version set-version build-resources bu
 release-helm:
 	./script/release_helm.sh
 
+release-kustomize:
+	RELEASE_VERSION=$(CUSTOM_VERSION) \
+	RELEASE_NAME=$(PACKAGE) \
+	./script/release_kustomize.sh
+
 install-crc:
 	./script/install_crc.sh $(CUSTOM_VERSION)
 install-minikube:
diff --git a/script/check_platform.sh b/script/check_platform.sh
index 2b43f18d9..f3afc3b4e 100755
--- a/script/check_platform.sh
+++ b/script/check_platform.sh
@@ -15,9 +15,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+location=$(dirname $0)
+rootdir=$location/../
+cmdutil="./cmd/util"
+check_binary="./platform-check"
+
 check_platform() {
 	set +e
-  echo $(./platform-check)
+  echo $(${check_binary})
 	set -e
 }
 
@@ -40,23 +45,27 @@ is_binary_available() {
   echo "ERROR: No '${client}' binary found in path."
 }
 
-location=$(dirname $0)
-rootdir=$location/../
-
 cd $rootdir
-if [ -d "./cmd/util/platform-check" ]; then
+if [ -d "${cmdutil}/platform-check" ]; then
+
+	if [ -f "${check_binary}" ]; then
+		#
+		# Avoid compiling again if binary already exists
+		#
+		go_result=$(check_platform)
+	else
+		hasgo=$(is_binary_available "go")
+		if [ "${hasgo}" == "OK" ]; then
+			go build ${cmdutil}/platform-check/
+			if [ $? == 0 ]; then
+				go_result=$(check_platform)
+			else
+				go_result="ERROR: failed to build platform-check binary"
+			fi
 
-	hasgo=$(is_binary_available "go")
-	if [ "${hasgo}" == "OK" ]; then
-		go build ./cmd/util/platform-check/
-		if [ $? == 0 ]; then
-			go_result=$(check_platform)
 		else
-			go_result="ERROR: failed to build platform-check binary"
+			go_result="ERROR: cannot build platform-check"
 		fi
-
-	else
-		go_result="ERROR: cannot build platform-check"
 	fi
 
 else
diff --git a/script/release_kustomize.sh b/script/release_kustomize.sh
new file mode 100755
index 000000000..7f842420e
--- /dev/null
+++ b/script/release_kustomize.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+location=$(dirname $0)
+rootdir=$(realpath ${location}/..)
+configdir="config"
+installdir="install"
+cmdutildir="cmd/util" # make cmd a hidden directory
+
+check_env_var() {
+  if [ -z "${2}" ]; then
+    echo "Error: ${1} env var not defined"
+    exit 1
+  fi
+}
+
+check_env_var "RELEASE_VERSION" ${RELEASE_VERSION}
+check_env_var "RELEASE_NAME" ${RELEASE_NAME}
+
+pushd ${rootdir}
+
+releasedir="${RELEASE_NAME}-${RELEASE_VERSION}-installer"
+zipname="${RELEASE_NAME}-${RELEASE_VERSION}-installer.zip"
+
+if [ -d "${releasedir}" ]; then
+  rm -rf "${releasedir}"
+fi
+mkdir -p ${releasedir}
+
+#
+# Copies contents of install and converts softlinks
+# to target files.
+#
+cp -rfL "${installdir}"/* "${releasedir}/"
+
+#
+# Copy the platform-check go source since its built and run during install
+#
+mkdir -p "${releasedir}/.${cmdutildir}/"
+cp -rf "${cmdutildir}/platform-check" "${releasedir}/.${cmdutildir}/"
+
+#
+# Update location of cmd to point to hidden directory version
+#
+sed -i 's~^cmdutil=.*~cmdutil=\"./.cmd/util\"~' ${releasedir}/script/check_platform.sh
+
+#
+# Copy the config directory
+#
+cp -rfL "${configdir}" "${releasedir}/"
+
+#
+# Zip up the release
+#
+if [ -f "${zipname}" ]; then
+  rm -f "${zipname}"
+fi
+zip -r "${zipname}" "${releasedir}" && rm -rf "${releasedir}"