Skip to content
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
Comment thread
elliotxx marked this conversation as resolved.
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
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.

![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)
Comment thread
elliotxx marked this conversation as resolved.
![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)
Comment thread
elliotxx marked this conversation as resolved.

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)
Comment thread
elliotxx marked this conversation as resolved.
> - Custom values.yaml file
> - Helm --set parameter

> **Note:** Default kubeconfig path is `/var/run/secrets/kubernetes.io/kubeconfigs/`
Comment thread
elliotxx marked this conversation as resolved.
> 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:
Comment thread
elliotxx marked this conversation as resolved.
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
Comment thread
elliotxx marked this conversation as resolved.
KUBECONFIG_CONTENT1=$(base64 -w 0 /path/to/your/kubeconfig1)
Comment thread
elliotxx marked this conversation as resolved.
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.
Comment thread
elliotxx marked this conversation as resolved.

Comment thread
elliotxx marked this conversation as resolved.
```shell
helm install kusion-release kusionstack/kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
Comment thread
elliotxx marked this conversation as resolved.
--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"
Comment thread
elliotxx marked this conversation as resolved.
```

## Chart Parameters
Comment thread
elliotxx marked this conversation as resolved.
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)
Comment thread
elliotxx marked this conversation as resolved.
> - 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: |
Comment thread
elliotxx marked this conversation as resolved.
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.
Comment thread
elliotxx marked this conversation as resolved.

Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
```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')
```

Comment thread
elliotxx marked this conversation as resolved.
Then you can use the following command to install the latest version of Kusion.
Comment thread
elliotxx marked this conversation as resolved.

```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" \
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
--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
- >
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
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" \
Comment thread
elliotxx marked this conversation as resolved.
-H "Content-Type: application/json" \
-d '{"name":"kam","doc":"https://www.kusionstack.io/docs/reference/modules/developer-schemas/app-configuration"}';
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.

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

Comment thread
elliotxx marked this conversation as resolved.
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"}';

Comment thread
elliotxx marked this conversation as resolved.
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
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.

# base64 encode
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
content=$(base64 -w 0 "$path")
content=$(cat "$path" | base64 | tr -d '\n')
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.
Comment thread
elliotxx marked this conversation as resolved.

# Build helm --set argument
Comment thread
elliotxx marked this conversation as resolved.
KUBECONFIG_ARGS="${KUBECONFIG_ARGS} --set kubeconfig.kubeConfigs.${key}=${content}"
Expand Down