-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
evelynwei
committed
Dec 5, 2024
1 parent
b8249a0
commit 0ffdba2
Showing
6 changed files
with
148 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Polaris Controller helm安装文档 | ||
|
||
简体中文 | [English](./README.md) | ||
|
||
本文档介绍如何使用 helm chart 安装 polaris-controller 服务。 | ||
|
||
## 准备工作 | ||
|
||
确保已经安装 k8s 集群,且安装了 helm。 | ||
在polaris-system命名空间下已经成功部署polaris server服务 | ||
(参考文档见: [helm部署北极星](https://github.com/polarismesh/polaris/tree/main/release/cluster/helm)) | ||
|
||
## 安装 | ||
### 初始化helm配置 | ||
确认`deploy/variables.txt`文件中的变量赋值符合预期,示例如下 | ||
```shell | ||
cd deploy | ||
$ cat variables.txt deploy -> main ? ! |• | ||
POLARIS_HOST:polaris.polaris-system | ||
CONTROLLER_VERSION:v1.7.1 | ||
SIDECAR_VERSION:v1.5.1 | ||
POLARIS_TOKEN:nu/0WRA4EqSR1FagrjRj0fZwPXuGlMpX+zCuWu4uMqy8xr1vRjisSbA25aAC3mtU8MeeRsKhQiDAynUR09I= | ||
ENVOY_VERSION:v1.26.2 | ||
CLUSTER_NAME:default | ||
JAVA_AGENT_INIT:v0.0.1% | ||
``` | ||
初始化helm项目的`values.yaml`文件 | ||
```shell | ||
sh init_helm.sh | ||
``` | ||
|
||
### 部署 | ||
使用`helm install ${release_name} .`命令安装,将 `${release_name}` 替换为您需要的 release 名。示例如下 | ||
```shell | ||
cd helm | ||
helm install polaris-controller . | ||
``` | ||
|
||
### 更新 | ||
使用`helm upgrade -i ${release_name} .`命令更新,将 `${release_name}` 替换为您需要的 release 名。示例如下 | ||
```shell | ||
helm upgrade -i polaris-controller . | ||
``` | ||
|
||
### 卸载 | ||
使用`helm uninstall `${release_name}``命令更新,将 `${release_name}` 替换为您需要的 release 名。示例如下 | ||
```shell | ||
$ helm uninstall polaris-controller | ||
``` | ||
|
||
## 配置 | ||
支持的配置可查看helm项目的`values.yaml`文件 | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Polaris Controller helm | ||
|
||
English | [简体中文](./README-zh.md) | ||
|
||
This page show how to get polaris-controller service started by helm chart。 | ||
|
||
## Prerequisites | ||
Make sure k8s cluster is installed and helm is installed. And the polaris-server is running in the polaris-system namespaces of k8s. | ||
(Guidance:[polaris installation by using helm](https://github.com/polarismesh/polaris/tree/main/release/cluster/helm)) | ||
|
||
## Installation | ||
### helm init | ||
Confirm that the variable assignments in the `deploy/variables.txt` file are as expected, the example is as follows | ||
```shell | ||
cd deploy | ||
$ cat variables.txt deploy -> main ? ! |• | ||
POLARIS_HOST:polaris.polaris-system | ||
CONTROLLER_VERSION:v1.7.1 | ||
SIDECAR_VERSION:v1.5.1 | ||
POLARIS_TOKEN:token | ||
ENVOY_VERSION:v1.26.2 | ||
CLUSTER_NAME:default | ||
JAVA_AGENT_INIT:v0.0.1% | ||
``` | ||
Initialize the `values.yaml` file of the helm project | ||
```shell | ||
sh init_helm.sh | ||
``` | ||
|
||
### install | ||
Use the `helm install ${release_name}.` command to install, replacing `${release_name}` with the release name you need. | ||
Examples are as follows | ||
```shell | ||
cd helm | ||
helm install polaris-controller . | ||
``` | ||
|
||
### update | ||
Use the `helm upgrade -i ${release_name} .` command to update and replace `${release_name}` with the release name you need. | ||
Examples are as follows | ||
```shell | ||
helm upgrade -i polaris-controller . | ||
``` | ||
|
||
### uninstall | ||
Use the `helm uninstall `${release_name}` command to update, replacing `${release_name}` with the release name you need. | ||
Examples are as follows | ||
```shell | ||
$ helm uninstall polaris-controller | ||
``` | ||
|
||
## Configuration | ||
Configs in `values.yaml` of helm will explain how to configure the service. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# preprocess the variables | ||
|
||
function replaceVar() { | ||
for file in $(ls */helm/values.yaml); do | ||
key="#$1#" | ||
echo "process replace file $file, key $key, value $2" | ||
if [ "$(uname)" == "Darwin" ]; then | ||
sed -i "" "s?$key?$2?g" $file | ||
else | ||
sed -i "s?$key?$2?g" $file | ||
fi | ||
done | ||
} | ||
|
||
varFile="variables.txt" | ||
if [ ! -f "$varFile" ]; then | ||
echo "variables.txt not exists" | ||
exit 1 | ||
fi | ||
|
||
export -f replaceVar | ||
|
||
cat $varFile | awk -F ':' '{print "replaceVar", $1, $2}' | "/bin/bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.6.0-alpha.1 | ||
v1.7.2 |