Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Jun 6, 2024
1 parent e4db384 commit 343f6f4
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 18 deletions.
3 changes: 3 additions & 0 deletions MAINTAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ To release a new version, please follow the steps below:
* Do the same things with `types`, `controller` and `plugins`.
* Remove the `go.work` file.
* Update the version in the `manifests/charts/*/Chart.yaml`.
* Change the version in the documentation, including:
* quick_start.md
* installation.md
(TBD)

## Upgrade components
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/htnn-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 4 additions & 2 deletions manifests/charts/htnn-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# htnn-controller

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.1](https://img.shields.io/badge/AppVersion-0.2.1-informational?style=flat-square)
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.1](https://img.shields.io/badge/AppVersion-0.2.1-informational?style=flat-square)

A Helm chart for HTNN controller

Expand All @@ -12,9 +12,11 @@ To install the chart with the release `htnn-controller`:
helm repo add htnn https://mosn.github.io/htnn
helm repo update

helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace --wait --debug
helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace
```

For more information like how to configure and troubleshoot, please refer to the [Installation Guide](https://github.com/mosn/htnn/blob/main/site/content/en/docs/getting-started/installation.md).

## Uninstall

To uninstall the Helm release `htnn-controller`:
Expand Down
4 changes: 3 additions & 1 deletion manifests/charts/htnn-controller/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ To install the chart with the release `htnn-controller`:
helm repo add htnn https://mosn.github.io/htnn
helm repo update

helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace --wait --debug
helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace
```

For more information like how to configure and troubleshoot, please refer to the [Installation Guide](https://github.com/mosn/htnn/blob/main/site/content/en/docs/getting-started/installation.md).

## Uninstall

To uninstall the Helm release `htnn-controller`:
Expand Down
4 changes: 3 additions & 1 deletion manifests/charts/htnn-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ istiod:
revision: ""
pilot:
# FIXME: use the released image once we have a release
image: ghcr.io/mosn/htnn-controller:dev
hub: ghcr.io/mosn
image: htnn-controller
tag: dev
env:
PILOT_SCOPE_GATEWAY_TO_NAMESPACE: "true"
PILOT_ENABLE_HTNN: "true"
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/htnn-gateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
18 changes: 16 additions & 2 deletions manifests/charts/htnn-gateway/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# htnn-gateway

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.1](https://img.shields.io/badge/AppVersion-0.2.1-informational?style=flat-square)
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.1](https://img.shields.io/badge/AppVersion-0.2.1-informational?style=flat-square)

A Helm chart for HTNN data plane running as gateway

Expand All @@ -12,9 +12,23 @@ To install the chart with the release `htnn-gateway`:
helm repo add htnn https://mosn.github.io/htnn
helm repo update

helm install htnn-gateway htnn/htnn-gateway --namespace istio-system --create-namespace --wait --debug
helm install htnn-gateway htnn/htnn-gateway --namespace istio-system --create-namespace
```

For more information like how to configure and troubleshoot, please refer to the [Installation Guide](https://github.com/mosn/htnn/blob/main/site/content/en/docs/getting-started/installation.md).

### `image: auto` Information

The image used by the chart, `auto`, may be unintuitive.
This exists because the pod spec will be automatically populated at runtime, using the same mechanism as [Sidecar Injection](istio.io/latest/docs/setup/additional-setup/sidecar-injection).
This allows the same configurations and lifecycle to apply to gateways as sidecars.

Note: this does mean two things:

1. the namespace the gateway is deployed in must not have the `istio-injection=disabled` label.
See [Controlling the injection policy](https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#controlling-the-injection-policy) for more info.
2. the gateway must be installed after `htnn/htnn-controller` is installed so that the pod spec can be injected.

## Uninstall

To uninstall the Helm release `htnn-gateway`:
Expand Down
16 changes: 15 additions & 1 deletion manifests/charts/htnn-gateway/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@ To install the chart with the release `htnn-gateway`:
helm repo add htnn https://mosn.github.io/htnn
helm repo update

helm install htnn-gateway htnn/htnn-gateway --namespace istio-system --create-namespace --wait --debug
helm install htnn-gateway htnn/htnn-gateway --namespace istio-system --create-namespace
```

For more information like how to configure and troubleshoot, please refer to the [Installation Guide](https://github.com/mosn/htnn/blob/main/site/content/en/docs/getting-started/installation.md).

### `image: auto` Information

The image used by the chart, `auto`, may be unintuitive.
This exists because the pod spec will be automatically populated at runtime, using the same mechanism as [Sidecar Injection](istio.io/latest/docs/setup/additional-setup/sidecar-injection).
This allows the same configurations and lifecycle to apply to gateways as sidecars.

Note: this does mean two things:

1. the namespace the gateway is deployed in must not have the `istio-injection=disabled` label.
See [Controlling the injection policy](https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#controlling-the-injection-policy) for more info.
2. the gateway must be installed after `htnn/htnn-controller` is installed so that the pod spec can be injected.

## Uninstall

To uninstall the Helm release `htnn-gateway`:
Expand Down
10 changes: 10 additions & 0 deletions site/content/en/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Where `$package_name` can be:
* `htnn-controller`: control plane component
* `htnn-gateway`: data plane component

Note that the pod spec of `htnn-gateway` will be automatically populated at runtime, using the same mechanism as [Sidecar Injection](istio.io/latest/docs/setup/additional-setup/sidecar-injection).

This does mean two things:

1. the namespace the `htnn-gateway` is deployed in must not have the `istio-injection=disabled` label.
See [Controlling the injection policy](https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#controlling-the-injection-policy) for more info.
2. the `htnn-gateway` must be installed after `htnn-controller` is installed so that the pod spec can be injected.

If you set up the k8s environment with `kind`, the `helm install ... htnn/htnn-gateway --wait` will fail because `kind` doesn't support LoadBalancer service by default. You can use `kubectl wait --timeout=5m -n istio-system deployment/istio-ingressgateway --for=condition=Available` to indicate if the installation is finished.

### Configuration

We can use Helm's [Value files](https://helm.sh/docs/chart_template_guide/values_files/) to configure the default values of the Helm Chart. For example:
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/getting-started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ helm repo update
1. Install the control plane component:

```shell
$ helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace --wait
$ helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace --debug --wait
NAME: htnn-controller
LAST DEPLOYED: Wed May 29 18:42:18 2024
NAMESPACE: istio-system
Expand All @@ -40,7 +40,7 @@ REVISION: 1
TEST SUITE: None
```

Here we have not used the `--wait` parameter, instead, we used the `kubectl wait` command to wait for the `istio-ingressgateway` deployment to complete. Because kind does not support LoadBalancer type of Service by default, the ExternalIP for Service `istio-ingressgateway` will remain in `Pending` status. This does not affect our hands-on experience. If you're interested in this, refer to the [kind official documentation](https://kind.sigs.k8s.io/docs/user/loadbalancer/) and consider installing metallb.
Here we have not used the `--wait` parameter, instead, we used the `kubectl wait` command to wait for the `istio-ingressgateway` deployment to complete. Because `kind` does not support LoadBalancer type of Service by default, the ExternalIP for Service `istio-ingressgateway` will remain in `Pending` status. This does not affect our hands-on experience. If you're interested in this, refer to the [kind official documentation](https://kind.sigs.k8s.io/docs/user/loadbalancer/) and consider installing metallb.

## Configuring Routes

Expand Down
23 changes: 18 additions & 5 deletions site/content/zh-hans/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,29 @@ helm repo update

### 安装

安装命令
控制面安装命令

```shell
$ helm install $package_name htnn/$package_name --namespace istio-system --create-namespace --wait
helm install htnn-controller htnn/htnn-controller \
--set istiod.pilot.hub=m.daocloud.io/ghcr.io/mosn \
--set istiod.global.proxy.image=m.daocloud.io/ghcr.io/mosn/htnn-proxy:dev \
--namespace istio-system --create-namespace --debug --wait
```

其中 `$package_name` 可以是
数据面安装命令

* `htnn-controller`:控制面组件
* `htnn-gateway`:数据面组件
```shell
helm install htnn-gateway htnn/htnn-gateway --namespace istio-system --create-namespace --debug --wait
```

请注意,`htnn-gateway` 的 pod spec 将在运行时自动填充,使用与 [Sidecar 注入](istio.io/latest/docs/setup/additional-setup/sidecar-injection) 相同的机制。

这意味着两件事:

1. 部署 `htnn-gateway` 的命名空间不能有 `istio-injection=disabled` 标签。有关更多信息,请参见 [控制注入策略](https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#controlling-the-injection-policy)
2. 必须在安装 `htnn-controller` 之后安装 `htnn-gateway`,以便可以注入 pod spec。

如果使用 `kind` 设置 k8s 环境,`helm install ... htnn/htnn-gateway --wait` 会失败,因为 `kind` 默认不支持 LoadBalancer service。可以使用 `kubectl wait --timeout=5m -n istio-system deployment/istio-ingressgateway --for=condition=Available` 来指示安装是否完成。

### 配置

Expand Down
7 changes: 5 additions & 2 deletions site/content/zh-hans/docs/getting-started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ helm repo update
1. 安装控制面组件:

```shell
$ helm install htnn-controller htnn/htnn-controller --namespace istio-system --create-namespace --wait
$ helm install htnn-controller htnn/htnn-controller \
--set istiod.pilot.hub=m.daocloud.io/ghcr.io/mosn \
--set istiod.global.proxy.image=m.daocloud.io/ghcr.io/mosn/htnn-proxy:dev \
--namespace istio-system --create-namespace --debug --wait

NAME: htnn-controller
LAST DEPLOYED: Wed May 29 18:42:18 2024
Expand All @@ -42,7 +45,7 @@ REVISION: 1
TEST SUITE: None
```

这里我们没有使用 `--wait` 参数,而是使用 `kubectl wait` 命令等待 `istio-ingressgateway` 部署完成。因为 kind 默认不支持 LoadBalancer 类型的 Service,所以 Service `istio-ingressgateway` 的 ExternalIP 会一直处于 `Pending` 状态。这不影响我们的上手体验。如果你对此感兴趣,可以参考 [kind 官方文档](https://kind.sigs.k8s.io/docs/user/loadbalancer/) 以及安装 metallb。
这里我们没有使用 `--wait` 参数,而是使用 `kubectl wait` 命令等待 `istio-ingressgateway` 部署完成。因为 `kind` 默认不支持 LoadBalancer 类型的 Service,所以 Service `istio-ingressgateway` 的 ExternalIP 会一直处于 `Pending` 状态。这不影响我们的上手体验。如果你对此感兴趣,可以参考 [kind 官方文档](https://kind.sigs.k8s.io/docs/user/loadbalancer/) 以及安装 metallb。

## 配置路由

Expand Down

0 comments on commit 343f6f4

Please sign in to comment.