Skip to content

chore: update kusion chart #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/kusion/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: kusion
version: 0.14.1
version: 0.14.2
type: application
appVersion: 0.14.0
description: Kusion - An Intent-Driven Platform Orchestrator
Expand Down
26 changes: 16 additions & 10 deletions charts/kusion/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kusion Chart

![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square) [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kusion)](https://artifacthub.io/packages/helm/kusionstack/kusion)
![Version: 0.14.2](https://img.shields.io/badge/Version-0.14.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square) [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kusion)](https://artifacthub.io/packages/helm/kusionstack/kusion)

Kusion - An Intent-Driven Platform Orchestrator

Expand All @@ -22,7 +22,13 @@ Kusion - An Intent-Driven Platform Orchestrator

## Installing the Chart

> Note: A valid kubeconfig configuration is required for Kusion to function properly. You must either use the installation script, provide your own kubeconfig in values.yaml, or set it through the --set parameter
> **Important:** Kusion requires a valid kubeconfig configuration to function properly. You can provide it via:
> - Installation script (recommended)
> - Custom values.yaml file
> - Helm --set parameter

> **Note:** Default kubeconfig path is `/var/run/secrets/kubernetes.io/kubeconfigs/`
> To use a different path, set `kubeconfig.kubeConfigVolumeMountPath` to your desired path.

To install Kusion, you have the following options:

Expand All @@ -46,9 +52,9 @@ Edit the [values file](values.yaml) to add your kubeconfig content
# Replace the content below with your actual kubeconfig
kubeconfig:
kubeConfigs:
kubeconfig0: |
kubeconfig-0: |
Please fill in your KubeConfig contents here.
kubeconfig1: |
kubeconfig-1: |
Please fill in your KubeConfig contents here.
```

Expand All @@ -63,16 +69,16 @@ helm install kusion-release ./kusion
First, you need to base64 encode your kubeconfig files.

```shell
KUBECONFIG_CONTENT1=$(base64 -w 0 /path/to/your/kubeconfig1)
KUBECONFIG_CONTENT2=$(base64 -w 0 /path/to/your/kubeconfig2)
KUBECONFIG_CONTENT1=$(cat /path/to/your/kubeconfig-1 | base64 | tr -d '\n')
KUBECONFIG_CONTENT2=$(cat /path/to/your/kubeconfig-2 | base64 | tr -d '\n')
```

Then you can use the following command to install the latest version of Kusion.

```shell
helm install kusion-release kusionstack/kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
--set kubeconfig.kubeConfigs.kubeconfig-0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig-1="$KUBECONFIG_CONTENT2"
```

You may also have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `port`, `replicas`, `database` etc.
Expand All @@ -85,8 +91,8 @@ helm install kusion-release kusionstack/kusion \
--set server.replicas=3 \
--set mysql.enabled=true \
--set mysql.database=kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
--set kubeconfig.kubeConfigs.kubeconfig-0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig-1="$KUBECONFIG_CONTENT2"
```

## Chart Parameters
Expand Down
24 changes: 15 additions & 9 deletions charts/kusion/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@

## Installing the Chart

> Note: A valid kubeconfig configuration is required for Kusion to function properly. You must either use the installation script, provide your own kubeconfig in values.yaml, or set it through the --set parameter
> **Important:** Kusion requires a valid kubeconfig configuration to function properly. You can provide it via:
> - Installation script (recommended)
> - Custom values.yaml file
> - Helm --set parameter

> **Note:** Default kubeconfig path is `/var/run/secrets/kubernetes.io/kubeconfigs/`
> To use a different path, set `kubeconfig.kubeConfigVolumeMountPath` to your desired path.

To install Kusion, you have the following options:

Expand All @@ -40,9 +46,9 @@ Edit the [values file](values.yaml) to add your kubeconfig content
# Replace the content below with your actual kubeconfig
kubeconfig:
kubeConfigs:
kubeconfig0: |
kubeconfig-0: |
Please fill in your KubeConfig contents here.
kubeconfig1: |
kubeconfig-1: |
Please fill in your KubeConfig contents here.
```

Expand All @@ -57,16 +63,16 @@ helm install kusion-release ./kusion
First, you need to base64 encode your kubeconfig files.

```shell
KUBECONFIG_CONTENT1=$(base64 -w 0 /path/to/your/kubeconfig1)
KUBECONFIG_CONTENT2=$(base64 -w 0 /path/to/your/kubeconfig2)
KUBECONFIG_CONTENT1=$(cat /path/to/your/kubeconfig-1 | base64 | tr -d '\n')
KUBECONFIG_CONTENT2=$(cat /path/to/your/kubeconfig-2 | base64 | tr -d '\n')
```

Then you can use the following command to install the latest version of Kusion.

```shell
helm install kusion-release kusionstack/kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
--set kubeconfig.kubeConfigs.kubeconfig-0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig-1="$KUBECONFIG_CONTENT2"
```

You may also have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `port`, `replicas`, `database` etc.
Expand All @@ -79,8 +85,8 @@ helm install kusion-release kusionstack/kusion \
--set server.replicas=3 \
--set mysql.enabled=true \
--set mysql.database=kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
--set kubeconfig.kubeConfigs.kubeconfig-0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig-1="$KUBECONFIG_CONTENT2"
```

## Chart Parameters
Expand Down
60 changes: 12 additions & 48 deletions charts/kusion/templates/post-run-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
spec:
backoffLimit: 5
template:
metadata:
name: "{{ .Release.Name }}"
Expand All @@ -30,57 +31,20 @@ spec:
command:
- /bin/sh
- -c
- >
echo "Calling Kusion API for Module Registration...";
- |
echo "Calling Kusion API for Module Registration..."

echo "Registering kam module...";
curl -X POST "${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
echo "Registering kam module..."
curl -X POST "http://${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
-H "Content-Type: application/json" \
-d '{"name":"kam","url":"oci://ghcr.io/kusionstack/kam"}';
-d '{"name":"kam","url":"oci://ghcr.io/kusionstack/kam","description":"The kam module represents a Kusion opinionated abstraction of the core concepts during application delivery.","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/app-configuration"}'

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/kam" \
echo "Registering service module..."
curl -X POST "http://${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
-H "Content-Type: application/json" \
-d '{"name":"kam","description":"The kam module represents a Kusion opinionated abstraction of the core concepts during application delivery."}';
-d '{"name":"service","url":"oci://ghcr.io/kusionstack/service","description":"The service module represents a kind of workload profile that describes how to run your application code.","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/workload/service"}'

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/kam" \
echo "Registering network module..."
curl -X POST "http://${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
-H "Content-Type: application/json" \
-d '{"name":"kam","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/app-configuration"}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/kam" \
-H "Content-Type: application/json" \
-d '{"name":"kam","url":"git://github.com/KusionStack/kam"}';

echo "Registering service module...";
curl -X POST "${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
-H "Content-Type: application/json" \
-d '{"name":"service","url":"oci://ghcr.io/kusionstack/service"}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/service" \
-H "Content-Type: application/json" \
-d '{"name":"service","description":"The service module represents a kind of workload profile that describes how to run your application code."}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/service" \
-H "Content-Type: application/json" \
-d '{"name":"service","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/workload/service"}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/service" \
-H "Content-Type: application/json" \
-d '{"name":"service","url":"oci://ghcr.io/kusionstack/service"}';

echo "Registering network module...";
curl -X POST "${KUSION_SERVER_ENDPOINT}/api/v1/modules" \
-H "Content-Type: application/json" \
-d '{"name":"network","url":"oci://ghcr.io/kusionstack/network"}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/network" \
-H "Content-Type: application/json" \
-d '{"name":"network","description":"The network module represents a network accessory of workload, typically containing exposed ports and a load balancer."}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/network" \
-H "Content-Type: application/json" \
-d '{"name":"network","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/network"}';

curl -X PUT "${KUSION_SERVER_ENDPOINT}/api/v1/modules/network" \
-H "Content-Type: application/json" \
-d '{"name":"network","url":"oci://ghcr.io/kusionstack/network"}';
backoffLimit: 10
-d '{"name":"network","url":"oci://ghcr.io/kusionstack/network","description":"The network module represents a network accessory of workload, typically containing exposed ports and a load balancer.","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/network"}'
4 changes: 2 additions & 2 deletions charts/kusion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ kubeconfig:
kubeConfigs: {}
# Example structure:
# kubeConfigs:
# kubeconfig0: |
# kubeconfig-0: |
# Please fill in your KubeConfig contents here.
# kubeconfig1: |
# kubeconfig-1: |
# Please fill in your KubeConfig contents here.
2 changes: 1 addition & 1 deletion scripts/install-kusion.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ for arg in "$@"; do
fi

# base64 encode
content=$(base64 -w 0 "$path")
content=$(cat "$path" | base64 | tr -d '\n')

# Build helm --set argument
KUBECONFIG_ARGS="${KUBECONFIG_ARGS} --set kubeconfig.kubeConfigs.${key}=${content}"
Expand Down
Loading