This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new ff2cb2bb610 kie-issues#240: Create Helm Chart to install KIE Sandbox
and its related services (#2103)
ff2cb2bb610 is described below
commit ff2cb2bb610e32076b8e3246a69557f6484194f8
Author: Thiago Lugli <[email protected]>
AuthorDate: Fri Dec 29 16:01:43 2023 -0300
kie-issues#240: Create Helm Chart to install KIE Sandbox and its related
services (#2103)
Co-authored-by: Rodrigo Antunes <[email protected]>
---
.../Jenkinsfile.kie-sandbox-helm-charts | 123 +++++++++++++
.ci/kie-tools-ci-build.Dockerfile | 4 +
.github/actions/setup-env/action.yml | 10 +
.vscode/extensions.json | 2 +-
.vscode/settings.json | 3 +
packages/kie-sandbox-helm-chart/LICENSE | 201 ++++++++++++++++++++
packages/kie-sandbox-helm-chart/README.md | 203 +++++++++++++++++++++
packages/kie-sandbox-helm-chart/env/index.js | 51 ++++++
packages/kie-sandbox-helm-chart/install.js | 54 ++++++
packages/kie-sandbox-helm-chart/package.json | 42 +++++
packages/kie-sandbox-helm-chart/src/.helmignore | 0
packages/kie-sandbox-helm-chart/src/Chart.lock | 12 ++
packages/kie-sandbox-helm-chart/src/Chart.yaml | 13 ++
packages/kie-sandbox-helm-chart/src/README.md | 57 ++++++
.../src/charts/cors_proxy/Chart.yaml | 6 +
.../src/charts/cors_proxy/README.md | 24 +++
.../src/charts/cors_proxy/templates/_helpers.tpl | 40 ++++
.../cors_proxy/templates/deployment.yaml.helm | 61 +++++++
.../src/charts/cors_proxy/templates/hpa.yaml.helm | 28 +++
.../charts/cors_proxy/templates/ingress.yaml.helm | 61 +++++++
.../charts/cors_proxy/templates/route.yaml.helm | 25 +++
.../charts/cors_proxy/templates/service.yaml.helm | 18 ++
.../cors_proxy/templates/serviceaccount.yaml.helm | 12 ++
.../src/charts/cors_proxy/values.yaml | 88 +++++++++
.../src/charts/extended_services/Chart.yaml | 6 +
.../src/charts/extended_services/README.md | 24 +++
.../extended_services/templates/_helpers.tpl | 40 ++++
.../templates/deployment.yaml.helm | 61 +++++++
.../extended_services/templates/hpa.yaml.helm | 28 +++
.../extended_services/templates/ingress.yaml.helm | 61 +++++++
.../extended_services/templates/route.yaml.helm | 25 +++
.../extended_services/templates/service.yaml.helm | 18 ++
.../templates/serviceaccount.yaml.helm | 12 ++
.../src/charts/extended_services/values.yaml | 88 +++++++++
.../src/charts/kie_sandbox/Chart.yaml | 6 +
.../src/charts/kie_sandbox/README.md | 25 +++
.../src/charts/kie_sandbox/templates/_helpers.tpl | 40 ++++
.../kie_sandbox/templates/deployment.yaml.helm | 65 +++++++
.../src/charts/kie_sandbox/templates/hpa.yaml.helm | 28 +++
.../charts/kie_sandbox/templates/ingress.yaml.helm | 61 +++++++
.../charts/kie_sandbox/templates/route.yaml.helm | 25 +++
.../charts/kie_sandbox/templates/service.yaml.helm | 18 ++
.../kie_sandbox/templates/serviceaccount.yaml.helm | 12 ++
.../kie_sandbox/tests/test-connection.yaml.helm | 15 ++
.../src/charts/kie_sandbox/values.yaml | 90 +++++++++
.../kie-sandbox-helm-chart/src/templates/NOTES.txt | 147 +++++++++++++++
.../src/templates/_helpers.tpl | 50 +++++
.../src/values-minikube-nginx.yaml | 46 +++++
.../src/values-openshift.yaml | 26 +++
packages/kie-sandbox-helm-chart/src/values.yaml | 10 +
pnpm-lock.yaml | 28 +++
repo/graph.dot | 4 +
repo/graph.json | 9 +
.../check_required_preinstalled_cli_commands.mjs | 1 +
scripts/run-script-if/src/bin.ts | 6 +-
55 files changed, 2209 insertions(+), 4 deletions(-)
diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-charts
b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-charts
new file mode 100644
index 00000000000..50731b81b55
--- /dev/null
+++ b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-charts
@@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+pipeline {
+ agent {
+ docker {
+ image 'quay.io/kie-tools/kie-tools-ci-build:latest'
+ args '--shm-size=2g --privileged --group-add docker'
+ }
+ }
+
+ options {
+ timeout(time: 60, unit: 'MINUTES')
+ }
+
+ parameters {
+ booleanParam(description: 'Dry run', name: 'DRY_RUN', defaultValue:
true)
+ string(description: 'Tag', name: 'TAG', defaultValue: '0.0.0')
+ string(description: 'Base Ref', name: 'BASE_REF')
+ }
+
+ environment {
+ KIE_TOOLS_BUILD__runLinters = 'false'
+ KIE_TOOLS_BUILD__runTests = 'false'
+ KIE_TOOLS_BUILD__runEndToEndTests = 'false'
+ KIE_TOOLS_BUILD__buildContainerImages = 'true'
+
+ DOCKER_CONFIG = "${WORKSPACE}/.docker"
+
+ PNPM_FILTER_STRING = '-F @kie-tools/kie-sandbox-helm-chart...'
+ }
+
+ stages {
+ stage('Load local shared scripts') {
+ steps {
+ script {
+ pipelineVars = load
'.ci/jenkins/shared-scripts/pipelineVars.groovy'
+ buildUtils = load
'.ci/jenkins/shared-scripts/buildUtils.groovy'
+ githubUtils = load
'.ci/jenkins/shared-scripts/githubUtils.groovy'
+ dockerUtils = load
'.ci/jenkins/shared-scripts/dockerUtils.groovy'
+ }
+ }
+ }
+
+ stage('Start required services for build and tests (DinD, Xvfb,
Fluxbox)') {
+ steps {
+ script {
+ buildUtils.startRequiredServices()
+ }
+ }
+ }
+
+ stage('Clean workspace before build') {
+ steps {
+ cleanWs(deleteDirs: true, disableDeferredWipeout: true)
+ }
+ }
+
+ stage('Checkout kie-tools') {
+ steps {
+ dir('kie-tools') {
+ script {
+ githubUtils.checkoutRepo(
+
"http://github.com/${pipelineVars.githubRepositorySlug}.git",
+ "${params.BASE_REF}",
+ "${pipelineVars.kieToolsBotGithubCredentialsId}"
+ )
+ }
+ }
+ }
+ }
+
+ stage('Setup PNPM') {
+ steps {
+ dir('kie-tools') {
+ script {
+ buildUtils.setupPnpm()
+ }
+ }
+ }
+ }
+
+ stage('PNPM Bootstrap') {
+ steps {
+ dir('kie-tools') {
+ script {
+ buildUtils.pnpmBootstrap("${env.PNPM_FILTER_STRING}")
+ }
+ }
+ }
+ }
+
+ stage('Build') {
+ steps {
+ dir('kie-tools') {
+ script {
+ buildUtils.pnpmBuild("${env.PNPM_FILTER_STRING}")
+ }
+ }
+ }
+ }
+
+ }
+
+ post {
+ always {
+ cleanWs(deleteDirs: true)
+ }
+ }
+}
diff --git a/.ci/kie-tools-ci-build.Dockerfile
b/.ci/kie-tools-ci-build.Dockerfile
index 42199dd9968..2ea895e2939 100644
--- a/.ci/kie-tools-ci-build.Dockerfile
+++ b/.ci/kie-tools-ci-build.Dockerfile
@@ -101,6 +101,10 @@ RUN wget
https://github.com/github/codeql-action/releases/latest/download/codeql
RUN wget
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
-P /tmp && \
sudo tar -C /usr/bin/ -xvzf /tmp/openshift-client-linux.tar.gz oc && rm
/tmp/openshift-client-linux.tar.gz
+# Helm CLI setup
+RUN wget https://get.helm.sh/helm-v3.13.3-linux-amd64.tar.gz -P /tmp && \
+ sudo tar -C /usr/bin/ -zxvf /tmp/helm-v3.13.3-linux-amd64.tar.gz
linux-amd64/helm --strip-components 1 && rm /tmp/helm-v3.13.3-linux-amd64.tar.gz
+
# Env vars
ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
ENV DISPLAY=":99"
diff --git a/.github/actions/setup-env/action.yml
b/.github/actions/setup-env/action.yml
index 35797869003..9c0fabc18ac 100644
--- a/.github/actions/setup-env/action.yml
+++ b/.github/actions/setup-env/action.yml
@@ -97,6 +97,16 @@ runs:
colima start --memory 4 --network-address --verbose
# QEMU is reinstalled due to this bug:
https://github.com/lima-vm/lima/issues/1742
+ - name: "Setup Helm (Ubuntu)"
+ if: runner.os == 'Linux'
+ shell: bash
+ env:
+ HELM_VERSION: "v3.13.3"
+ run: |
+ echo "STEP: Install Helm (Ubuntu only)"
+ sudo wget -q https://get.helm.sh/helm-$HELM_VERSION-linux-amd64.tar.gz
-O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm
+ sudo chmod +x /usr/local/bin/helm
+
- name: "Setup network timeout"
shell: bash
run: |
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index d7df89c9cd0..bbd3dc616f1 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,3 +1,3 @@
{
- "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
+ "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint",
"ms-kubernetes-tools.vscode-kubernetes-tools"]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 4d243048e5b..b50f3a61569 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,8 @@
{
"eslint.options": {
"overrideConfigFile": "packages/eslint/.eslintrc.js"
+ },
+ "files.associations": {
+ "*.yaml.helm": "helm"
}
}
diff --git a/packages/kie-sandbox-helm-chart/LICENSE
b/packages/kie-sandbox-helm-chart/LICENSE
new file mode 100644
index 00000000000..261eeb9e9f8
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/packages/kie-sandbox-helm-chart/README.md
b/packages/kie-sandbox-helm-chart/README.md
new file mode 100644
index 00000000000..34200a381a5
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/README.md
@@ -0,0 +1,203 @@
+# KIE Sandbox Helm Chart
+
+This chart can be used to deploy KIE Sandbox image on a
[Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh)
package manager.
+
+## Additional requirements
+
+- Podman (for Linux)
+- Docker (for macOS)
+- Minikube
+
+## Components
+
+- KIE Sandbox: main application
+- Extended Services: powers the DMN Runner and validator
+- CORS Proxy: intended to be used to solve CORS issues
+
+## Installing the Chart
+
+### Default install
+
+To install the chart with the release name `kie-sandbox`:
+
+```console
+$ helm install kie-sandbox ./src
+```
+
+Following message should be displayed on your console.
+
+```console
+NAME: kie-sandbox
+LAST DEPLOYED: Wed Nov 29 17:09:04 2023
+NAMESPACE: default
+STATUS: deployed
+REVISION: 1
+NOTES:
+In order to get KIE sandbox running you need to run these commands:
+
+1. Run the following commands in a separate terminal to port-forward CORS
Proxy component:
+ export POD_NAME=$(kubectl get pods --namespace default -l
"app.kubernetes.io/name=kie_sandbox,app.kubernetes.io/component=cors-proxy,app.kubernetes.io/instance=kie-sandbox"
-o jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o
jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "CORS Proxy URL: http://127.0.0.1:8081"
+ kubectl --namespace default port-forward $POD_NAME 8081:$CONTAINER_PORT
+
+2. Run the following commands in a separate terminal to port-forward Extendend
Services component:
+ export POD_NAME=$(kubectl get pods --namespace default -l
"app.kubernetes.io/name=kie_sandbox,app.kubernetes.io/component=extended-services,app.kubernetes.io/instance=kie-sandbox"
-o jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o
jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Extended Services URL: http://127.0.0.1:21345"
+ kubectl --namespace default port-forward $POD_NAME 21345:$CONTAINER_PORT
+
+3. Run the following commands in a separate terminal to port-forward Sanxbox
component and get the application URL:
+ export POD_NAME=$(kubectl get pods --namespace default -l
"app.kubernetes.io/name=kie_sandbox,app.kubernetes.io/component=kie-sandbox,app.kubernetes.io/instance=kie-sandbox"
-o jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o
jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "KIE Sandbox URL http://127.0.0.1:8080"
+ kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
+```
+
+Run above commands to forward container ports to your system ports. After
this, KIE Sandbox should be accessible via http://127.0.0.1:8080
+
+### Minikube install
+
+To install the chart with the release name `kie-sandbox`:
+
+```console
+$ helm install kie-sandbox ./src --values ./src/values-minikube-nginx.yaml
+```
+
+Following message should be displayed on your console.
+
+```console
+NAME: kie-sandbox
+LAST DEPLOYED: Wed Nov 29 17:09:04 2023
+NAMESPACE: default
+STATUS: deployed
+REVISION: 1
+NOTES:
+You may need to add the above hostnames to your /etc/hosts file, mapping them
to your minikube ip.
+
+Run the following commands:
+ export MINIKUBE_IP=$(minikube ip)
+ echo "\n# Minikube KIE Sandbox Helm Chart hostnames" | sudo tee -a /etc/hosts
+ echo "$MINIKUBE_IP cors-proxy.local" | sudo tee -a /etc/hosts
+ echo "$MINIKUBE_IP extended-services.local" | sudo tee -a /etc/hosts
+ echo "$MINIKUBE_IP kie-sandbox.local" | sudo tee -a /etc/hosts
+
+```
+
+Run above commands to add the custom hostnames to you hosts file. After this,
KIE Sandbox should be accessible via http://kie-sandbox.local
+
+### OpenShift install
+
+First, you may need to get the default OpenShift domain for your routes with
this command:
+
+```console
+$ oc get ingresses.config cluster --output jsonpath={.spec.domain}
+```
+
+If you don't have access rigths to this config, try creating a dummy Route
resource and checking its domain.
+
+To install the chart with the release name `kie-sandbox`:
+
+```console
+$ helm install kie-sandbox ./src --values ./src/values-openshift.yaml --set
global.ocpRouteDomain=<YOUR_OCP_ROUTE_DOMAIN>
+```
+
+Following message should be displayed on your console.
+
+```console
+NAME: kie-sandbox
+LAST DEPLOYED: Wed Nov 29 17:09:04 2023
+NAMESPACE: default
+STATUS: deployed
+REVISION: 1
+NOTES:
+1. CORS Proxy available at:
+ https://cors-proxy.<YOUR_OCP_ROUTE_DOMAIN>
+2. Extended Services available at:
+ https://extended-services.<YOUR_OCP_ROUTE_DOMAIN>
+3. KIE Sandbox available at:
+ https://kie-sandbox.<YOUR_OCP_ROUTE_DOMAIN>
+```
+
+No need to run any commands. KIE Sandbox should be accessible via
https://kie-sandbox.<YOUR_OCP_ROUTE_DOMAIN>
+
+## Uninstalling the Chart
+
+To uninstall the `kie-sandbox` deployment:
+
+```console
+$ helm uninstall kie-sandbox
+```
+
+## Passing Environmental variables
+
+This chart uses default environmental variables from `values.yaml` file. We
can override those by passing it from command line.
+
+```console
+$ helm install kie-sandbox ./src --set image.repository=quay.io
+```
+
+## Configuration
+
+The following table lists the configurable parameters of the KIE Sandbox chart
and their default values.
+
+<details>
+ <summary markdown="span">How to update this list?</summary>
+ <ul>
+ <li>Install <a
href="https://github.com/norwoodj/helm-docs">norwoodj/helm-docs</a>;</li>
+ <li>
+ Run the following commands:
+<pre>
+$ cd src
+$ helm-docs --document-dependency-values=true --chart-search-root=.
+</pre>
+ </li>
+ <li>
+ Run the install script.
+ </li>
+ </ul>
+</details>
+
+<!-- CHART_VALUES_README -->
+
+| Key | Type | Default
| Description
|
+| ---------------------------------- | ------ |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------
|
+| global.ingressSource | string | `""`
| Which ingress
source is being used (none/"minikube"/"openshift") Obs.: For NOTES generation
only |
+| global.openshiftRouteDomain | string | `""`
| If using
OpenShift Routes, set the Route domain
|
+| fullnameOverride | string | `""`
| Overrides
charts full name
|
+| nameOverride | string | `""`
| Overrides
charts name
|
+| cors_proxy.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| CORS Proxy HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| cors_proxy.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| cors_proxy.image | object |
`{"account":"kie-tools","name":"cors-proxy-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the CORS Proxy image
|
+| cors_proxy.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling CORS Proxy image
|
+| cors_proxy.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| CORS Proxy Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| cors_proxy.name | string | `"cors-proxy"`
| The CORS Proxy
application name
|
+| cors_proxy.nameOverride | string | `""`
| Overrides
charts name
|
+| cors_proxy.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"cors-proxy.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}`
| CORS Proxy OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| cors_proxy.service | object |
`{"nodePort":"","port":8080,"type":"ClusterIP"}`
| CORS Proxy Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| cors_proxy.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| CORS Proxy ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+| extended_services.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| Extended Services HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| extended_services.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| extended_services.image | object |
`{"account":"kie-tools","name":"kie-sandbox-extended-services-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source configuration for the
Extended Services image
|
+| extended_services.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling Extended Services image
|
+| extended_services.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| Extended Services Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| extended_services.name | string | `"extended-services"`
| The Extended
Services application name
|
+| extended_services.nameOverride | string | `""`
| Overrides
charts name
|
+| extended_services.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"extended-services.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` |
Extended Services OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| extended_services.service | object |
`{"nodePort":"","port":21345,"type":"ClusterIP"}`
| Extended Services Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| extended_services.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| Extended Services ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+| kie_sandbox.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| KIE Sandbox HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| kie_sandbox.env | list |
`[{"name":"KIE_SANDBOX_EXTENDED_SERVICES_URL","value":"http://127.0.0.1:21345\""},{"name":"KIE_SANDBOX_CORS_PROXY_URL","value":"http://127.0.0.1:8081"}]`
| Env variables for KIE Sandbox deployment
|
+| kie_sandbox.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| kie_sandbox.image | object |
`{"account":"kie-tools","name":"kie-sandbox-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the KIE Sandbox image
|
+| kie_sandbox.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling KIE Sandbox image
|
+| kie_sandbox.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"kie-sandbox.domain.com","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| KIE Sandbox Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| kie_sandbox.name | string | `"kie-sandbox"`
| The KIE
Sandbox application name
|
+| kie_sandbox.nameOverride | string | `""`
| Overrides
charts name
|
+| kie_sandbox.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"kie-sandbox.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}`
| KIE Sandbox OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| kie_sandbox.service | object |
`{"nodePort":"","port":8080,"type":"ClusterIP"}`
| KIE Sandbox Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| kie_sandbox.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| KIE Sandbox ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+
+---
+
+Autogenerated from chart metadata using [helm-docs
v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
diff --git a/packages/kie-sandbox-helm-chart/env/index.js
b/packages/kie-sandbox-helm-chart/env/index.js
new file mode 100644
index 00000000000..a9a6c163fad
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/env/index.js
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+const { varsWithName, getOrDefault, composeEnv } =
require("@kie-tools-scripts/build-env");
+
+module.exports = composeEnv([require("@kie-tools/root-env/env")], {
+ vars: varsWithName({
+ KIE_SANDBOX_HELM_CHART__registry: {
+ default: "quay.io",
+ description: "",
+ },
+ KIE_SANDBOX_HELM_CHART__account: {
+ default: "kie-tools",
+ description: "",
+ },
+ KIE_SANDBOX_HELM_CHART__name: {
+ default: "kie-sandbox",
+ description: "",
+ },
+ KIE_SANDBOX_HELM_CHART__tag: {
+ default: require("../package.json").version,
+ description: "",
+ },
+ }),
+ get env() {
+ return {
+ kieSandboxHelmChart: {
+ registry: getOrDefault(this.vars.KIE_SANDBOX_HELM_CHART__registry),
+ account: getOrDefault(this.vars.KIE_SANDBOX_HELM_CHART__account),
+ name: getOrDefault(this.vars.KIE_SANDBOX_HELM_CHART__name),
+ tag: getOrDefault(this.vars.KIE_SANDBOX_HELM_CHART__tag),
+ },
+ };
+ },
+});
diff --git a/packages/kie-sandbox-helm-chart/install.js
b/packages/kie-sandbox-helm-chart/install.js
new file mode 100644
index 00000000000..dd0eb1ce6c2
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/install.js
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+const buildEnv = require("./env");
+const yaml = require("js-yaml");
+const fs = require("fs");
+
+// Set version for the Chart (and its dependencies) and Subcharts
+const files = [
+ "src/Chart.yaml",
+ "src/charts/extended_services/Chart.yaml",
+ "src/charts/cors_proxy/Chart.yaml",
+ "src/charts/kie_sandbox/Chart.yaml",
+];
+files.forEach((file) => {
+ const doc = yaml.load(fs.readFileSync(file, "utf8"));
+ doc.version = buildEnv.env.kieSandboxHelmChart.tag;
+ doc.appVersion = buildEnv.env.kieSandboxHelmChart.tag;
+ if (doc.dependencies) {
+ doc.dependencies = doc.dependencies.map((dep) => {
+ if (["extended_services", "cors_proxy",
"kie_sandbox"].includes(dep.name)) {
+ return { ...dep, version: buildEnv.env.kieSandboxHelmChart.tag };
+ }
+ return dep;
+ });
+ }
+ console.log(doc);
+ fs.writeFileSync(file, yaml.dump(doc), "utf8");
+});
+
+// Update Values table on README
+const readme = fs.readFileSync("./README.md").toString();
+const chartReadme = fs.readFileSync("./src/README.md").toString();
+const chartReadmeSections = chartReadme.split("## Values");
+const readmeSections = readme.split("<!-- CHART_VALUES_README -->");
+readmeSections[1] = chartReadmeSections[1];
+const newContent = readmeSections.join("<!-- CHART_VALUES_README -->");
+fs.writeFileSync("./README.md", newContent);
diff --git a/packages/kie-sandbox-helm-chart/package.json
b/packages/kie-sandbox-helm-chart/package.json
new file mode 100644
index 00000000000..f9797f18ad4
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/package.json
@@ -0,0 +1,42 @@
+{
+ "private": true,
+ "name": "@kie-tools/kie-sandbox-helm-chart",
+ "version": "0.0.0",
+ "description": "",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/kiegroup/kie-tools",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/kiegroup/kie-tools.git"
+ },
+ "bugs": {
+ "url": "https://github.com/kiegroup/kie-tools/issues"
+ },
+ "scripts": {
+ "build:prod": "run-script-os",
+ "build:prod:linux:darwin": "pnpm cleanup && run-script-if --bool $([
$(command -v helm) ] && echo true || echo false) --then \"helm package -u -d
./dist ./src\"",
+ "build:prod:win32": "pnpm cleanup && run-script-if --bool
\"$([bool](Get-Command helm -errorAction SilentlyContinue))\" --then \"helm
package -u -d ./dist ./src\"",
+ "cleanup": "rimraf Chart.lock && rimraf dist",
+ "helm:delete": "helm delete kie-sandbox-helm-chart",
+ "helm:install": "pnpm cleanup && helm install --dependency-update
kie-sandbox-helm-chart ./src",
+ "install": "node install.js"
+ },
+ "dependencies": {
+ "@kie-tools/cors-proxy-image": "workspace:*",
+ "@kie-tools/kie-sandbox-extended-services-image": "workspace:*",
+ "@kie-tools/kie-sandbox-image": "workspace:*"
+ },
+ "devDependencies": {
+ "@kie-tools/root-env": "workspace:*",
+ "js-yaml": "^4.1.0",
+ "prettier": "^2.8.8",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "helm",
+ "node"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/packages/kie-sandbox-helm-chart/src/.helmignore
b/packages/kie-sandbox-helm-chart/src/.helmignore
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/packages/kie-sandbox-helm-chart/src/Chart.lock
b/packages/kie-sandbox-helm-chart/src/Chart.lock
new file mode 100644
index 00000000000..9a322380e27
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/Chart.lock
@@ -0,0 +1,12 @@
+dependencies:
+- name: cors_proxy
+ repository: ""
+ version: 0.0.0
+- name: extended_services
+ repository: ""
+ version: 0.0.0
+- name: kie_sandbox
+ repository: ""
+ version: 0.0.0
+digest: sha256:ee1b087ee299c43fb848d512e5b4c97f914dc2f6d3bd45294f64b7d06006a84f
+generated: "2023-12-20T20:56:48.318416177-03:00"
diff --git a/packages/kie-sandbox-helm-chart/src/Chart.yaml
b/packages/kie-sandbox-helm-chart/src/Chart.yaml
new file mode 100644
index 00000000000..9e307dd33fe
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/Chart.yaml
@@ -0,0 +1,13 @@
+apiVersion: v2
+name: kie_sandbox_helm_chart
+description: A Helm chart to deploy KIE Sandbox and related services on
Kubernetes
+type: application
+version: 0.0.0
+appVersion: 0.0.0
+dependencies:
+ - name: cors_proxy
+ version: 0.0.0
+ - name: extended_services
+ version: 0.0.0
+ - name: kie_sandbox
+ version: 0.0.0
diff --git a/packages/kie-sandbox-helm-chart/src/README.md
b/packages/kie-sandbox-helm-chart/src/README.md
new file mode 100644
index 00000000000..173fa85ec4c
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/README.md
@@ -0,0 +1,57 @@
+# kie_sandbox_helm_chart
+
+


+
+A Helm chart to deploy KIE Sandbox and related services on Kubernetes
+
+## Requirements
+
+| Repository | Name | Version |
+| ---------- | ----------------- | ------- |
+| | cors_proxy | 0.0.0 |
+| | extended_services | 0.0.0 |
+| | kie_sandbox | 0.0.0 |
+
+## Values
+
+| Key | Type | Default
| Description
|
+| ---------------------------------- | ------ |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------
|
+| global.ingressSource | string | `""`
| Which ingress
source is being used (none/"minikube"/"openshift") Obs.: For NOTES generation
only |
+| global.openshiftRouteDomain | string | `""`
| If using
OpenShift Routes, set the Route domain
|
+| fullnameOverride | string | `""`
| Overrides
charts full name
|
+| nameOverride | string | `""`
| Overrides
charts name
|
+| cors_proxy.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| CORS Proxy HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| cors_proxy.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| cors_proxy.image | object |
`{"account":"kie-tools","name":"cors-proxy-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the CORS Proxy image
|
+| cors_proxy.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling CORS Proxy image
|
+| cors_proxy.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| CORS Proxy Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| cors_proxy.name | string | `"cors-proxy"`
| The CORS Proxy
application name
|
+| cors_proxy.nameOverride | string | `""`
| Overrides
charts name
|
+| cors_proxy.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"cors-proxy.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}`
| CORS Proxy OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| cors_proxy.service | object |
`{"nodePort":"","port":8080,"type":"ClusterIP"}`
| CORS Proxy Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| cors_proxy.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| CORS Proxy ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+| extended_services.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| Extended Services HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| extended_services.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| extended_services.image | object |
`{"account":"kie-tools","name":"kie-sandbox-extended-services-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source configuration for the
Extended Services image
|
+| extended_services.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling Extended Services image
|
+| extended_services.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| Extended Services Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| extended_services.name | string | `"extended-services"`
| The Extended
Services application name
|
+| extended_services.nameOverride | string | `""`
| Overrides
charts name
|
+| extended_services.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"extended-services.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` |
Extended Services OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| extended_services.service | object |
`{"nodePort":"","port":21345,"type":"ClusterIP"}`
| Extended Services Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| extended_services.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| Extended Services ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+| kie_sandbox.autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| KIE Sandbox HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| kie_sandbox.env | list |
`[{"name":"KIE_SANDBOX_EXTENDED_SERVICES_URL","value":"http://127.0.0.1:21345\""},{"name":"KIE_SANDBOX_CORS_PROXY_URL","value":"http://127.0.0.1:8081"}]`
| Env variables for KIE Sandbox deployment
|
+| kie_sandbox.fullnameOverride | string | `""`
| Overrides
charts full name
|
+| kie_sandbox.image | object |
`{"account":"kie-tools","name":"kie-sandbox-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the KIE Sandbox image
|
+| kie_sandbox.imagePullSecrets | list | `[]`
| Pull secrets
used when pulling KIE Sandbox image
|
+| kie_sandbox.ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"kie-sandbox.domain.com","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| KIE Sandbox Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| kie_sandbox.name | string | `"kie-sandbox"`
| The KIE
Sandbox application name
|
+| kie_sandbox.nameOverride | string | `""`
| Overrides
charts name
|
+| kie_sandbox.openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"kie-sandbox.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}`
| KIE Sandbox OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| kie_sandbox.service | object |
`{"nodePort":"","port":8080,"type":"ClusterIP"}`
| KIE Sandbox Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| kie_sandbox.serviceAccount | object |
`{"annotations":{},"create":true,"name":""}`
| KIE Sandbox ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+
+---
+
+Autogenerated from chart metadata using [helm-docs
v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
diff --git a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/Chart.yaml
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/Chart.yaml
new file mode 100644
index 00000000000..f64f22f370f
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: cors_proxy
+description: A Helm chart to deploy CORS Proxy on Kubernetes
+type: application
+version: 0.0.0
+appVersion: 0.0.0
diff --git a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/README.md
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/README.md
new file mode 100644
index 00000000000..03ec6aca104
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/README.md
@@ -0,0 +1,24 @@
+# cors_proxy
+
+


+
+A Helm chart to deploy CORS Proxy on Kubernetes
+
+## Values
+
+| Key | Type | Default
| Description
|
+| ---------------- | ------ |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------
|
+| autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
|
CORS Proxy HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| fullnameOverride | string | `""`
| Overrides charts full name
|
+| image | object |
`{"account":"kie-tools","name":"cors-proxy-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the CORS Proxy image
|
+| imagePullSecrets | list | `[]`
| Pull secrets used when pulling CORS
Proxy image
|
+| ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| CORS Proxy Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| name | string | `"cors-proxy"`
| The CORS Proxy application name
|
+| nameOverride | string | `""`
| Overrides charts name
|
+| openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"cors-proxy.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` |
CORS Proxy OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| service | object | `{"nodePort":"","port":8080,"type":"ClusterIP"}`
| CORS Proxy Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| serviceAccount | object | `{"annotations":{},"create":true,"name":""}`
| CORS Proxy ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+
+---
+
+Autogenerated from chart metadata using [helm-docs
v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/_helpers.tpl
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/_helpers.tpl
new file mode 100644
index 00000000000..472688e8f0b
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/_helpers.tpl
@@ -0,0 +1,40 @@
+{{/*
+Create a fully qualified cors-proxy name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+*/}}
+{{- define "cors_proxy.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name .Values.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+These can be overriden by the base chart.
+*/}}
+{{- define "selectorLabels" -}}
+{{- end -}}
+{{- define "labels" -}}
+{{- end -}}
+
+{{- define "cors_proxy.selectorLabels" -}}
+app.kubernetes.io/component: {{ .Values.name | quote }}
+{{ include "selectorLabels" . }}
+{{- end -}}
+
+{{- define "cors_proxy.labels" -}}
+{{ include "cors_proxy.selectorLabels" . }}
+{{ include "labels" . }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the cors-proxy component
+*/}}
+{{- define "cors_proxy.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "cors_proxy.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/deployment.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/deployment.yaml.helm
new file mode 100644
index 00000000000..3143186e614
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/deployment.yaml.helm
@@ -0,0 +1,61 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "cors_proxy.fullname" . }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "cors_proxy.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "cors_proxy.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "cors_proxy.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Values.name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.registry }}/{{ .Values.image.account }}/{{
.Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.port }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /ping
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /ping
+ port: http
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/hpa.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/hpa.yaml.helm
new file mode 100644
index 00000000000..cfa63a7e7ed
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/hpa.yaml.helm
@@ -0,0 +1,28 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "cors_proxy.fullname" . }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "cors_proxy.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{
.Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{
.Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/ingress.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/ingress.yaml.helm
new file mode 100644
index 00000000000..9eb8cfd15a2
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/ingress.yaml.helm
@@ -0,0 +1,61 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "cors_proxy.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations
"kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class"
.Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0"
$.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0"
$.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/route.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/route.yaml.helm
new file mode 100644
index 00000000000..97c828f3241
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/route.yaml.helm
@@ -0,0 +1,25 @@
+{{- if and (.Capabilities.APIVersions.Has "route.openshift.io/v1/Route")
(.Values.openshiftRoute.enabled) -}}
+{{- $fullName := include "cors_proxy.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+kind: Route
+apiVersion: route.openshift.io/v1
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+ {{- with .Values.openshiftRoute.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ host: {{ tpl .Values.openshiftRoute.host . | quote }}
+ to:
+ name: {{ $fullName }}
+ kind: Service
+ port:
+ targetPort: {{ $svcPort }}
+ {{- with .Values.openshiftRoute.tls }}
+ tls:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/service.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/service.yaml.helm
new file mode 100644
index 00000000000..59ee70b7bf5
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/service.yaml.helm
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "cors_proxy.fullname" . }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ {{- if (and (eq .Values.service.type "NodePort")) }}
+ nodePort: {{ .Values.service.nodePort }}
+ {{- end }}
+ selector:
+ {{- include "cors_proxy.selectorLabels" . | nindent 4 }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/serviceaccount.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/serviceaccount.yaml.helm
new file mode 100644
index 00000000000..0f564d4a68d
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/templates/serviceaccount.yaml.helm
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "cors_proxy.serviceAccountName" . }}
+ labels:
+ {{- include "cors_proxy.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/values.yaml
b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/values.yaml
new file mode 100644
index 00000000000..66ca1f86796
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/cors_proxy/values.yaml
@@ -0,0 +1,88 @@
+# CORS Proxy component
+# -- The CORS Proxy application name
+name: cors-proxy
+
+# @ignored
+replicaCount: 1
+
+# -- Image source configuration for the CORS Proxy image
+image:
+ registry: quay.io
+ account: kie-tools
+ name: cors-proxy-image
+ pullPolicy: IfNotPresent
+ tag: "latest"
+
+# -- Pull secrets used when pulling CORS Proxy image
+imagePullSecrets: []
+
+# -- Overrides charts name
+nameOverride: ""
+# -- Overrides charts full name
+fullnameOverride: ""
+
+# -- CORS Proxy ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
+serviceAccount:
+ create: true
+ annotations: {}
+ name: ""
+
+# @ignored
+podAnnotations: {}
+
+# @ignored
+podSecurityContext: {}
+
+# @ignored
+securityContext: {}
+
+# -- CORS Proxy Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
+service:
+ type: ClusterIP
+ port: 8080
+ nodePort: ""
+
+# -- CORS Proxy Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ hosts:
+ - host: chart-example.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+# -- CORS Proxy OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
+openshiftRoute:
+ enabled: false
+ annotations: {}
+ host: cors-proxy.{{ .Values.global.openshiftRouteDomain }}
+ tls:
+ termination: edge
+ insecureEdgeTerminationPolicy: None
+
+# @ignored
+resources: {}
+
+# -- CORS Proxy HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
+
+# @ignored
+nodeSelector: {}
+
+# @ignored
+tolerations: []
+
+# @ignored
+affinity: {}
+
+# @ignored
+global:
+ openshiftRouteDomain: ocp-example.com
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/Chart.yaml
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/Chart.yaml
new file mode 100644
index 00000000000..fc21534e2e5
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/extended_services/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: extended_services
+description: A Helm chart to deploy Extended Services on Kubernetes
+type: application
+version: 0.0.0
+appVersion: 0.0.0
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/README.md
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/README.md
new file mode 100644
index 00000000000..4a74345723d
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/extended_services/README.md
@@ -0,0 +1,24 @@
+# extended_services
+
+


+
+A Helm chart to deploy Extended Services on Kubernetes
+
+## Values
+
+| Key | Type | Default
| Description
|
+| ---------------- | ------ |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------
|
+| autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| Extended Services HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| fullnameOverride | string | `""`
| Overrides charts full name
|
+| image | object |
`{"account":"kie-tools","name":"kie-sandbox-extended-services-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source configuration for the
Extended Services image
|
+| imagePullSecrets | list | `[]`
| Pull secrets used when pulling
Extended Services image
|
+| ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| Extended Services Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| name | string | `"extended-services"`
| The Extended Services
application name
|
+| nameOverride | string | `""`
| Overrides charts name
|
+| openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"extended-services.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` |
Extended Services OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| service | object |
`{"nodePort":"","port":21345,"type":"ClusterIP"}`
| Extended Services Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| serviceAccount | object | `{"annotations":{},"create":true,"name":""}`
| Extended Services ServiceAccount
configuration (https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+
+---
+
+Autogenerated from chart metadata using [helm-docs
v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/_helpers.tpl
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/_helpers.tpl
new file mode 100644
index 00000000000..6cf1d2e85f8
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/_helpers.tpl
@@ -0,0 +1,40 @@
+{{/*
+Create a fully qualified extended-services name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+*/}}
+{{- define "extended_services.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name .Values.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+These can be overriden by the base chart.
+*/}}
+{{- define "selectorLabels" -}}
+{{- end -}}
+{{- define "labels" -}}
+{{- end -}}
+
+{{- define "extended_services.selectorLabels" -}}
+app.kubernetes.io/component: {{ .Values.name | quote }}
+{{ include "selectorLabels" . }}
+{{- end -}}
+
+{{- define "extended_services.labels" -}}
+{{ include "extended_services.selectorLabels" . }}
+{{ include "labels" . }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the extended-services
component
+*/}}
+{{- define "extended_services.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "extended_services.fullname" .)
.Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/deployment.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/deployment.yaml.helm
new file mode 100644
index 00000000000..92f48930ee9
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/deployment.yaml.helm
@@ -0,0 +1,61 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "extended_services.fullname" . }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "extended_services.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "extended_services.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "extended_services.serviceAccountName" .
}}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Values.name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.registry }}/{{ .Values.image.account }}/{{
.Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.port }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/hpa.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/hpa.yaml.helm
new file mode 100644
index 00000000000..596cf1dab84
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/hpa.yaml.helm
@@ -0,0 +1,28 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "extended_services.fullname" . }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "extended_services.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{
.Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{
.Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/ingress.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/ingress.yaml.helm
new file mode 100644
index 00000000000..f42ba4cfc07
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/ingress.yaml.helm
@@ -0,0 +1,61 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "extended_services.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations
"kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class"
.Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0"
$.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0"
$.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/route.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/route.yaml.helm
new file mode 100644
index 00000000000..938b97dbf08
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/route.yaml.helm
@@ -0,0 +1,25 @@
+{{- if and (.Capabilities.APIVersions.Has "route.openshift.io/v1/Route")
(.Values.openshiftRoute.enabled) -}}
+{{- $fullName := include "extended_services.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+kind: Route
+apiVersion: route.openshift.io/v1
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+ {{- with .Values.openshiftRoute.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ host: {{ tpl .Values.openshiftRoute.host . | quote }}
+ to:
+ name: {{ $fullName }}
+ kind: Service
+ port:
+ targetPort: {{ $svcPort }}
+ {{- with .Values.openshiftRoute.tls }}
+ tls:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/service.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/service.yaml.helm
new file mode 100644
index 00000000000..17c1335f8e1
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/service.yaml.helm
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "extended_services.fullname" . }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ {{- if (and (eq .Values.service.type "NodePort")) }}
+ nodePort: {{ .Values.service.nodePort }}
+ {{- end }}
+ selector:
+ {{- include "extended_services.selectorLabels" . | nindent 4 }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/serviceaccount.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/serviceaccount.yaml.helm
new file mode 100644
index 00000000000..7452d69002f
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/templates/serviceaccount.yaml.helm
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "extended_services.serviceAccountName" . }}
+ labels:
+ {{- include "extended_services.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/extended_services/values.yaml
b/packages/kie-sandbox-helm-chart/src/charts/extended_services/values.yaml
new file mode 100644
index 00000000000..347f44984ab
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/extended_services/values.yaml
@@ -0,0 +1,88 @@
+# Extended services component
+# -- The Extended Services application name
+name: extended-services
+
+# @ignored
+replicaCount: 1
+
+# -- Image source configuration for the Extended Services image
+image:
+ registry: quay.io
+ account: kie-tools
+ name: kie-sandbox-extended-services-image
+ pullPolicy: IfNotPresent
+ tag: "latest"
+
+# -- Pull secrets used when pulling Extended Services image
+imagePullSecrets: []
+
+# -- Overrides charts name
+nameOverride: ""
+# -- Overrides charts full name
+fullnameOverride: ""
+
+# -- Extended Services ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
+serviceAccount:
+ create: true
+ annotations: {}
+ name: ""
+
+# @ignored
+podAnnotations: {}
+
+# @ignored
+podSecurityContext: {}
+
+# @ignored
+securityContext: {}
+
+# -- Extended Services Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
+service:
+ type: ClusterIP
+ port: 21345
+ nodePort: ""
+
+# -- Extended Services Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ hosts:
+ - host: chart-example.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+# -- Extended Services OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
+openshiftRoute:
+ enabled: false
+ annotations: {}
+ host: extended-services.{{ .Values.global.openshiftRouteDomain }}
+ tls:
+ termination: edge
+ insecureEdgeTerminationPolicy: None
+
+# @ignored
+resources: {}
+
+# -- Extended Services HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
+
+# @ignored
+nodeSelector: {}
+
+# @ignored
+tolerations: []
+
+# @ignored
+affinity: {}
+
+# @ignored
+global:
+ openshiftRouteDomain: ocp-example.com
diff --git a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/Chart.yaml
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/Chart.yaml
new file mode 100644
index 00000000000..c7576350be0
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: kie_sandbox
+description: A Helm chart to deploy KIE Sandbox on Kubernetes
+type: application
+version: 0.0.0
+appVersion: 0.0.0
diff --git a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/README.md
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/README.md
new file mode 100644
index 00000000000..30e97150143
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/README.md
@@ -0,0 +1,25 @@
+# kie_sandbox
+
+


+
+A Helm chart to deploy KIE Sandbox on Kubernetes
+
+## Values
+
+| Key | Type | Default
| Description
|
+| ---------------- | ------ |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------
|
+| autoscaling | object |
`{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}`
| KIE Sandbox HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
|
+| env | list |
`[{"name":"KIE_SANDBOX_EXTENDED_SERVICES_URL","value":"http://127.0.0.1:21345\""},{"name":"KIE_SANDBOX_CORS_PROXY_URL","value":"http://127.0.0.1:8081"}]`
| Env variables for KIE Sandbox deployment
|
+| fullnameOverride | string | `""`
| Overrides charts full name
|
+| image | object |
`{"account":"kie-tools","name":"kie-sandbox-image","pullPolicy":"IfNotPresent","registry":"quay.io","tag":"latest"}`
| Image source
configuration for the KIE Sandbox image
|
+| imagePullSecrets | list | `[]`
| Pull secrets used when pulling KIE
Sandbox image
|
+| ingress | object |
`{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"kie-sandbox.domain.com","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}`
| KIE Sandbox Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
+| name | string | `"kie-sandbox"`
| The KIE Sandbox application name
|
+| nameOverride | string | `""`
| Overrides charts name
|
+| openshiftRoute | object |
`{"annotations":{},"enabled":false,"host":"kie-sandbox.{{
.Values.global.openshiftRouteDomain
}}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | KIE
Sandbox OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
|
+| service | object | `{"nodePort":"","port":8080,"type":"ClusterIP"}`
| KIE Sandbox Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
|
+| serviceAccount | object | `{"annotations":{},"create":true,"name":""}`
| KIE Sandbox ServiceAccount
configuration (https://kubernetes.io/docs/concepts/security/service-accounts/)
|
+
+---
+
+Autogenerated from chart metadata using [helm-docs
v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/_helpers.tpl
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/_helpers.tpl
new file mode 100644
index 00000000000..bdf04b86fa1
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/_helpers.tpl
@@ -0,0 +1,40 @@
+{{/*
+Create a fully qualified sandbox name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+*/}}
+{{- define "kie_sandbox.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name .Values.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+These can be overriden by the base chart.
+*/}}
+{{- define "selectorLabels" -}}
+{{- end -}}
+{{- define "labels" -}}
+{{- end -}}
+
+{{- define "kie_sandbox.selectorLabels" -}}
+app.kubernetes.io/component: {{ .Values.name | quote }}
+{{ include "selectorLabels" . }}
+{{- end -}}
+
+{{- define "kie_sandbox.labels" -}}
+{{ include "kie_sandbox.selectorLabels" . }}
+{{ include "labels" . }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the sandbox component
+*/}}
+{{- define "kie_sandbox.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "kie_sandbox.fullname" .) .Values.serviceAccount.name
}}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/deployment.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/deployment.yaml.helm
new file mode 100644
index 00000000000..c663e88490a
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/deployment.yaml.helm
@@ -0,0 +1,65 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "kie_sandbox.fullname" . }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "kie_sandbox.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "kie_sandbox.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "kie_sandbox.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Values.name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.registry }}/{{ .Values.image.account }}/{{
.Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- with .Values.env }}
+ env:
+ {{- tpl (toYaml .) $ | nindent 12 }}
+ {{- end }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.port }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/hpa.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/hpa.yaml.helm
new file mode 100644
index 00000000000..e09618354de
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/hpa.yaml.helm
@@ -0,0 +1,28 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "kie_sandbox.fullname" . }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "kie_sandbox.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{
.Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{
.Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/ingress.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/ingress.yaml.helm
new file mode 100644
index 00000000000..e83bb792838
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/ingress.yaml.helm
@@ -0,0 +1,61 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "kie_sandbox.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations
"kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class"
.Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0"
$.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0"
$.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/route.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/route.yaml.helm
new file mode 100644
index 00000000000..f3750c75f0d
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/route.yaml.helm
@@ -0,0 +1,25 @@
+{{- if and (.Capabilities.APIVersions.Has "route.openshift.io/v1/Route")
(.Values.openshiftRoute.enabled) -}}
+{{- $fullName := include "kie_sandbox.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+kind: Route
+apiVersion: route.openshift.io/v1
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+ {{- with .Values.openshiftRoute.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ host: {{ tpl .Values.openshiftRoute.host . | quote }}
+ to:
+ name: {{ $fullName }}
+ kind: Service
+ port:
+ targetPort: {{ $svcPort }}
+ {{- with .Values.openshiftRoute.tls }}
+ tls:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/service.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/service.yaml.helm
new file mode 100644
index 00000000000..2469a960962
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/service.yaml.helm
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "kie_sandbox.fullname" . }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ {{- if (and (eq .Values.service.type "NodePort")) }}
+ nodePort: {{ .Values.service.nodePort }}
+ {{- end }}
+ selector:
+ {{- include "kie_sandbox.selectorLabels" . | nindent 4 }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/serviceaccount.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/serviceaccount.yaml.helm
new file mode 100644
index 00000000000..737f5636534
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/templates/serviceaccount.yaml.helm
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "kie_sandbox.serviceAccountName" . }}
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git
a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/tests/test-connection.yaml.helm
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/tests/test-connection.yaml.helm
new file mode 100644
index 00000000000..770f922c0ba
--- /dev/null
+++
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/tests/test-connection.yaml.helm
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Pod
+metadata:
+ name: "{{ include "kie_sandbox.fullname" . }}-test-connection"
+ labels:
+ {{- include "kie_sandbox.labels" . | nindent 4 }}
+ annotations:
+ "helm.sh/hook": test
+spec:
+ containers:
+ - name: wget
+ image: busybox
+ command: ['wget']
+ args: ['{{ include "kie_sandbox.fullname" . }}:{{ .Values.service.port
}}']
+ restartPolicy: Never
diff --git a/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/values.yaml
b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/values.yaml
new file mode 100644
index 00000000000..718416d0513
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/charts/kie_sandbox/values.yaml
@@ -0,0 +1,90 @@
+# KIE Sandbox application
+# -- The KIE Sandbox application name
+name: kie-sandbox
+
+# -- Env variables for KIE Sandbox deployment
+env:
+ - name: "KIE_SANDBOX_EXTENDED_SERVICES_URL"
+ value: http://127.0.0.1:21345"
+ - name: "KIE_SANDBOX_CORS_PROXY_URL"
+ value: "http://127.0.0.1:8081"
+
+# @ignored
+replicaCount: 1
+
+# -- Image source configuration for the KIE Sandbox image
+image:
+ registry: quay.io
+ account: kie-tools
+ name: kie-sandbox-image
+ tag: "latest"
+ pullPolicy: IfNotPresent
+
+# -- Pull secrets used when pulling KIE Sandbox image
+imagePullSecrets: []
+
+# -- Overrides charts name
+nameOverride: ""
+# -- Overrides charts full name
+fullnameOverride: ""
+
+# -- KIE Sandbox ServiceAccount configuration
(https://kubernetes.io/docs/concepts/security/service-accounts/)
+serviceAccount:
+ create: true
+ annotations: {}
+ name: ""
+
+# @ignored
+podAnnotations: {}
+
+# @ignored
+podSecurityContext: {}
+
+# @ignored
+securityContext: {}
+
+# -- KIE Sandbox Service configuration
(https://kubernetes.io/docs/concepts/services-networking/service/)
+service:
+ type: ClusterIP
+ port: 8080
+ nodePort: ""
+
+# -- KIE Sandbox Ingress configuration
(https://kubernetes.io/docs/concepts/services-networking/ingress/)
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ hosts:
+ - host: kie-sandbox.domain.com
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+# -- KIE Sandbox OpenShift Route configuration
(https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html)
+openshiftRoute:
+ enabled: false
+ annotations: {}
+ host: kie-sandbox.{{ .Values.global.openshiftRouteDomain }}
+ tls:
+ termination: edge
+ insecureEdgeTerminationPolicy: None
+
+# @ignored
+resources: {}
+
+# -- KIE Sandbox HorizontalPodAutoscaler configuration
(https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+
+# @ignored
+nodeSelector: {}
+
+# @ignored
+tolerations: []
+
+# @ignored
+affinity: {}
diff --git a/packages/kie-sandbox-helm-chart/src/templates/NOTES.txt
b/packages/kie-sandbox-helm-chart/src/templates/NOTES.txt
new file mode 100644
index 00000000000..f54620d6311
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/templates/NOTES.txt
@@ -0,0 +1,147 @@
+{{- if not .Values.global.ingressSource }}
+
+In order to get KIE Sandbox running you need to run these commands:
+
+{{- if .Values.cors_proxy.ingress.enabled }}
+
+1. CORS Proxy available at:
+{{- range $host := .Values.cors_proxy.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.cors_proxy.ingress.tls }}s{{ end }}://{{ $host.host }}{{
.path }}
+ {{- end }}
+{{- end }}
+{{- else }}
+
+1. Run the following commands in a separate terminal to port-forward CORS
Proxy component:
+{{- if contains "NodePort" .Values.cors_proxy.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o
jsonpath="{.spec.ports[0].nodePort}" services {{ include "cors_proxy.fullname"
.Subcharts.cors_proxy }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o
jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.cors_proxy.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "cors_proxy.fullname"
.Subcharts.cors_proxy }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "cors_proxy.fullname" .Subcharts.cors_proxy }} --template "{{"{{ range
(index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.cors_proxy.service.port }}
+{{- else if contains "ClusterIP" .Values.cors_proxy.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "name" . }},app.kubernetes.io/component={{
.Values.cors_proxy.name }},app.kubernetes.io/instance={{ .Release.Name }}" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }}
$POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "CORS Proxy URL: http://127.0.0.1:8081"
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME
8081:$CONTAINER_PORT
+{{- end }}
+{{- end }}
+
+{{- if .Values.extended_services.ingress.enabled }}
+
+2. Extended Services available at:
+{{- range $host := .Values.extended_services.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.extended_services.ingress.tls }}s{{ end }}://{{
$host.host }}{{ .path }}
+ {{- end }}
+{{- end }}
+{{- else }}
+
+2. Run the following commands in a separate terminal to port-forward Extendend
Services component:
+{{- if contains "NodePort" .Values.extended_services.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o
jsonpath="{.spec.ports[0].nodePort}" services {{ include
"extended_services.fullname" .Subcharts.extended_services }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o
jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.extended_services.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "extended_services.fullname"
.Subcharts.extended_services }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "extended_services.fullname" .Subcharts.extended_services }} --template
"{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.extended_services.service.port }}
+{{- else if contains "ClusterIP" .Values.extended_services.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "name" . }},app.kubernetes.io/component={{
.Values.extended_services.name }},app.kubernetes.io/instance={{ .Release.Name
}}" -o jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }}
$POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Extended Services URL: http://127.0.0.1:21345"
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME
21345:$CONTAINER_PORT
+{{- end }}
+{{- end }}
+
+{{- if .Values.kie_sandbox.ingress.enabled }}
+
+3. KIE Sandbox available at:
+{{- range $host := .Values.kie_sandbox.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.kie_sandbox.ingress.tls }}s{{ end }}://{{ $host.host }}{{
.path }}
+ {{- end }}
+{{- end }}
+{{- else }}
+
+3. Run the following commands in a separate terminal to port-forward Sanxbox
component and get the application URL:
+{{- if contains "NodePort" .Values.kie_sandbox.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o
jsonpath="{.spec.ports[0].nodePort}" services {{ include "kie_sandbox.fullname"
. }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o
jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.kie_sandbox.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "kie_sandbox.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "kie_sandbox.fullname" . }} --template "{{"{{ range (index
.status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.kie_sandbox.service.port }}
+{{- else if contains "ClusterIP" .Values.kie_sandbox.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "name" . }},app.kubernetes.io/component={{
.Values.kie_sandbox.name }},app.kubernetes.io/instance={{ .Release.Name }}" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }}
$POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "KIE Sandbox URL http://127.0.0.1:8080"
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME
8080:$CONTAINER_PORT
+{{- end }}
+{{- end }}
+
+{{- else if eq .Values.global.ingressSource "minikube" }}
+
+You may need to add the above hostnames to your /etc/hosts file, mapping them
to your minikube ip.
+
+Run the following commands:
+ export MINIKUBE_IP=$(minikube ip)
+ echo "\n# Minikube KIE Sandbox Helm Chart hostnames" | sudo tee -a /etc/hosts
+{{- range $host := .Values.cors_proxy.ingress.hosts }}
+ {{- range .paths }}
+ echo "$MINIKUBE_IP {{ $host.host }}" | sudo tee -a /etc/hosts
+ {{- end }}
+{{- end }}
+{{- range $host := .Values.extended_services.ingress.hosts }}
+ {{- range .paths }}
+ echo "$MINIKUBE_IP {{ $host.host }}" | sudo tee -a /etc/hosts
+ {{- end }}
+{{- end }}
+{{- range $host := .Values.kie_sandbox.ingress.hosts }}
+ {{- range .paths }}
+ echo "$MINIKUBE_IP {{ $host.host }}" | sudo tee -a /etc/hosts
+ {{- end }}
+{{- end }}
+
+{{- else if eq .Values.global.ingressSource "openshift" }}
+
+1. CORS Proxy available at:
+ http{{ if .Values.cors_proxy.openshiftRoute.tls }}s{{ end }}://{{ tpl
.Values.cors_proxy.openshiftRoute.host . }}
+2. Extended Services available at:
+ http{{ if $.Values.extended_services.openshiftRoute.tls }}s{{ end }}://{{
tpl .Values.extended_services.openshiftRoute.host . }}
+3. KIE Sandbox available at:
+ http{{ if $.Values.kie_sandbox.openshiftRoute.tls }}s{{ end }}://{{ tpl
.Values.kie_sandbox.openshiftRoute.host . }}
+
+{{- else }}
+{{- if .Values.cors_proxy.ingress.enabled }}
+1. CORS Proxy available at:
+{{- range $host := .Values.cors_proxy.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.cors_proxy.ingress.tls }}s{{ end }}://{{ $host.host }}{{
.path }}
+ {{- end }}
+{{- end }}
+{{- end }}
+{{- if .Values.extended_services.ingress.enabled }}
+2. Extended Services available at:
+{{- range $host := .Values.extended_services.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.extended_services.ingress.tls }}s{{ end }}://{{
$host.host }}{{ .path }}
+ {{- end }}
+{{- end }}
+{{- end }}
+{{- if .Values.kie_sandbox.ingress.enabled }}
+3. KIE Sandbox available at:
+{{- range $host := .Values.kie_sandbox.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.kie_sandbox.ingress.tls }}s{{ end }}://{{ $host.host }}{{
.path }}
+ {{- end }}
+{{- end }}
+{{- end }}
+
+{{- end }}
diff --git a/packages/kie-sandbox-helm-chart/src/templates/_helpers.tpl
b/packages/kie-sandbox-helm-chart/src/templates/_helpers.tpl
new file mode 100644
index 00000000000..eed8b86c38c
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/templates/_helpers.tpl
@@ -0,0 +1,50 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+*/}}
+{{- define "fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 |
trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "labels" -}}
+helm.sh/chart: {{ include "chart" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+app.kubernetes.io/part-of: {{ include "name" . }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "selectorLabels" -}}
+app.kubernetes.io/name: {{ include "name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
diff --git a/packages/kie-sandbox-helm-chart/src/values-minikube-nginx.yaml
b/packages/kie-sandbox-helm-chart/src/values-minikube-nginx.yaml
new file mode 100644
index 00000000000..ca7dddb3f05
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/values-minikube-nginx.yaml
@@ -0,0 +1,46 @@
+# KIE Sandbox application
+kie_sandbox:
+ env:
+ - name: "KIE_SANDBOX_EXTENDED_SERVICES_URL"
+ value: "http://extended-services.local"
+ - name: "KIE_SANDBOX_CORS_PROXY_URL"
+ value: "http://cors-proxy.local"
+ ingress:
+ enabled: true
+ className: nginx
+ annotations: {}
+ hosts:
+ - host: kie-sandbox.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+# Cors Proxy component
+cors_proxy:
+ ingress:
+ enabled: true
+ className: nginx
+ annotations: {}
+ hosts:
+ - host: cors-proxy.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+# Extended services component
+extended_services:
+ ingress:
+ enabled: true
+ className: nginx
+ annotations: {}
+ hosts:
+ - host: extended-services.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+
+global:
+ ingressSource: "minikube"
diff --git a/packages/kie-sandbox-helm-chart/src/values-openshift.yaml
b/packages/kie-sandbox-helm-chart/src/values-openshift.yaml
new file mode 100644
index 00000000000..0940eed6c96
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/values-openshift.yaml
@@ -0,0 +1,26 @@
+# KIE Sandbox application
+kie_sandbox:
+ env:
+ - name: "KIE_SANDBOX_EXTENDED_SERVICES_URL"
+ value: "https://extended-services.{{ .Values.global.openshiftRouteDomain
}}"
+ - name: "KIE_SANDBOX_CORS_PROXY_URL"
+ value: "https://cors-proxy.{{ .Values.global.openshiftRouteDomain }}"
+ openshiftRoute:
+ enabled: true
+ host: kie-sandbox.{{ .Values.global.openshiftRouteDomain }}
+
+# Cors Proxy component
+cors_proxy:
+ openshiftRoute:
+ enabled: true
+ host: cors-proxy.{{ .Values.global.openshiftRouteDomain }}
+
+# Extended services component
+extended_services:
+ openshiftRoute:
+ enabled: true
+ host: extended-services.{{ .Values.global.openshiftRouteDomain }}
+
+global:
+ ingressSource: "openshift"
+ openshiftRouteDomain: ocp-example.com
diff --git a/packages/kie-sandbox-helm-chart/src/values.yaml
b/packages/kie-sandbox-helm-chart/src/values.yaml
new file mode 100644
index 00000000000..62a7263a2da
--- /dev/null
+++ b/packages/kie-sandbox-helm-chart/src/values.yaml
@@ -0,0 +1,10 @@
+# -- Overrides charts name
+nameOverride: ""
+# -- Overrides charts full name
+fullnameOverride: ""
+
+global:
+ # -- Which ingress source is being used (none/"minikube"/"openshift") Obs.:
For NOTES generation only
+ ingressSource: ""
+ # -- If using OpenShift Routes, set the Route domain
+ openshiftRouteDomain: ""
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a6f26238845..78dad24b0e3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5829,6 +5829,34 @@ importers:
specifier: ^4.6.2
version: 4.8.4
+ packages/kie-sandbox-helm-chart:
+ dependencies:
+ "@kie-tools/cors-proxy-image":
+ specifier: workspace:*
+ version: link:../cors-proxy-image
+ "@kie-tools/kie-sandbox-extended-services-image":
+ specifier: workspace:*
+ version: link:../kie-sandbox-extended-services-image
+ "@kie-tools/kie-sandbox-image":
+ specifier: workspace:*
+ version: link:../kie-sandbox-image
+ devDependencies:
+ "@kie-tools/root-env":
+ specifier: workspace:*
+ version: link:../root-env
+ js-yaml:
+ specifier: ^4.1.0
+ version: 4.1.0
+ prettier:
+ specifier: ^2.8.8
+ version: 2.8.8
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
packages/kie-sandbox-image:
dependencies:
"@kie-tools/image-env-to-json":
diff --git a/repo/graph.dot b/repo/graph.dot
index e2b498f9053..c226fcc687a 100644
--- a/repo/graph.dot
+++ b/repo/graph.dot
@@ -115,6 +115,7 @@ digraph G {
"@kie-tools/kie-sandbox-extended-services-image" [ color = "black",
fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/kie-sandbox-image" [ color = "black", fontcolor = "black", style
= "dashed, rounded" ];
"@kie-tools/kie-sandbox-fs" [ color = "blue", fontcolor = "blue", style =
"rounded" ];
+ "@kie-tools/kie-sandbox-helm-chart" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
"@kie-tools/online-editor" [ color = "black", fontcolor = "black", style =
"dashed, rounded" ];
"@kie-tools/kn-plugin-workflow" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
"@kie-tools-core/kubernetes-bridge" [ color = "purple", fontcolor =
"purple", style = "rounded" ];
@@ -353,6 +354,9 @@ digraph G {
"@kie-tools/kie-sandbox-extended-services-image" ->
"@kie-tools/image-builder" [ style = "dashed", color = "black" ];
"@kie-tools/kie-sandbox-fs" -> "@kie-tools/root-env" [ style = "dashed",
color = "blue" ];
"@kie-tools/kie-sandbox-fs" -> "@kie-tools/tsconfig" [ style = "dashed",
color = "blue" ];
+ "@kie-tools/kie-sandbox-helm-chart" -> "@kie-tools/cors-proxy-image" [ style
= "solid", color = "black" ];
+ "@kie-tools/kie-sandbox-helm-chart" ->
"@kie-tools/kie-sandbox-extended-services-image" [ style = "solid", color =
"black" ];
+ "@kie-tools/kie-sandbox-helm-chart" -> "@kie-tools/kie-sandbox-image" [
style = "solid", color = "black" ];
"@kie-tools/kie-sandbox-image" -> "@kie-tools/image-env-to-json" [ style =
"solid", color = "black" ];
"@kie-tools/kie-sandbox-image" -> "@kie-tools/online-editor" [ style =
"solid", color = "black" ];
"@kie-tools/kie-sandbox-image" -> "@kie-tools/image-builder" [ style =
"dashed", color = "black" ];
diff --git a/repo/graph.json b/repo/graph.json
index 55a54b65e16..274f76a6da0 100644
--- a/repo/graph.json
+++ b/repo/graph.json
@@ -122,6 +122,7 @@
{ "id": "@kie-tools/kie-sandbox-extended-services-image" },
{ "id": "@kie-tools/kie-sandbox-image" },
{ "id": "@kie-tools/online-editor" },
+ { "id": "@kie-tools/kie-sandbox-helm-chart" },
{ "id": "@kie-tools-core/kubernetes-bridge" },
{ "id": "@kie-tools/unitables-dmn" },
{ "id": "@kie-tools/kn-plugin-workflow" },
@@ -747,6 +748,13 @@
{ "source": "@kie-tools/online-editor", "target":
"@kie-tools/cors-proxy", "weight": 1 },
{ "source": "@kie-tools/online-editor", "target":
"@kie-tools/extended-services", "weight": 1 },
{ "source": "@kie-tools/online-editor", "target":
"@kie-tools/stunner-editors", "weight": 1 },
+ { "source": "@kie-tools/kie-sandbox-helm-chart", "target":
"@kie-tools/cors-proxy-image", "weight": 1 },
+ {
+ "source": "@kie-tools/kie-sandbox-helm-chart",
+ "target": "@kie-tools/kie-sandbox-extended-services-image",
+ "weight": 1
+ },
+ { "source": "@kie-tools/kie-sandbox-helm-chart", "target":
"@kie-tools/kie-sandbox-image", "weight": 1 },
{ "source": "@kie-tools-core/kubernetes-bridge", "target":
"@kie-tools/cors-proxy-api", "weight": 1 },
{ "source": "@kie-tools/unitables-dmn", "target":
"@kie-tools/unitables", "weight": 1 },
{ "source": "@kie-tools/kn-plugin-workflow", "target":
"@kie-tools/root-env", "weight": 1 },
@@ -1028,6 +1036,7 @@
["@kie-tools/kie-sandbox-distribution",
"packages/kie-sandbox-distribution"],
["@kie-tools/kie-sandbox-extended-services-image",
"packages/kie-sandbox-extended-services-image"],
["@kie-tools/kie-sandbox-fs", "packages/kie-sandbox-fs"],
+ ["@kie-tools/kie-sandbox-helm-chart", "packages/kie-sandbox-helm-chart"],
["@kie-tools/kie-sandbox-image", "packages/kie-sandbox-image"],
["@kie-tools/kn-plugin-workflow", "packages/kn-plugin-workflow"],
["@kie-tools-core/kubernetes-bridge", "packages/kubernetes-bridge"],
diff --git a/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
b/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
index 7e690b9048f..fa5500b9286 100755
--- a/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
+++ b/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
@@ -30,6 +30,7 @@ const argsByCommand = new Map([
["mvn", ["-v"]],
["go", ["version"]],
["make", ["-v"]],
+ ["helm", ["version"]],
]);
async function main() {
diff --git a/scripts/run-script-if/src/bin.ts b/scripts/run-script-if/src/bin.ts
index bbac1d72e10..fa99da4dba6 100644
--- a/scripts/run-script-if/src/bin.ts
+++ b/scripts/run-script-if/src/bin.ts
@@ -142,7 +142,7 @@ $ run-script-if --bool "$(my-custom-command --isEnabled)"
--then "echo 'Hello'"
const boolStringConditions = argv.bool.map(evalBoolStringArg);
const operator = argv.operator;
- let conditions = [];
+ const conditions = [];
if (operator === "and") {
boolStringConditions.length &&
conditions.push(boolStringConditions.every((boolStringCondition) =>
boolStringCondition === argv.eq));
@@ -200,7 +200,7 @@ $ run-script-if --bool "$(my-custom-command --isEnabled)"
--then "echo 'Hello'"
throw e;
})
.finally(async () => {
- let finallyCommands = argv.finally;
+ const finallyCommands = argv.finally;
if (finallyCommands.length <= 0) {
return;
}
@@ -216,7 +216,7 @@ function evalBoolStringArg(boolArg: never | string |
number) {
let ret;
if (process.platform === "win32" && boolArg && typeof boolArg === "string"
&& boolArg.startsWith("$")) {
const output = spawnSync(boolArg, [], { stdio: "pipe", ...shell() });
- ret = String(output.stdout).trim();
+ ret = String(output.stdout).trim().toLowerCase();
} else {
ret = boolArg;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]