Skip to content

Commit

Permalink
fixed Helm
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyuanlu committed Sep 27, 2023
1 parent 3b98d01 commit e5d01fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml, bat}]
[*.{yaml,yml,bat}]
indent_size = 2

[*.md]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_IMAGE: shiyindaxiaojie/sentinel-dashboard
DOCKER_VERSION: 1.8.6
DOCKER_VERSION: v1.8.6
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,20 @@ java -Dserver.port=8080 \

### Docker 部署

调整 Maven 配置文件 `setiings.xml`,填写相关凭据。
````xml
<settings>
<profiles>
<profile>
<id>github</id>
<properties>
<docker.username>${env.DOCKER_USERNAME}</docker.username>
<docker.password>${env.DOCKER_PASSWORD}</docker.password>
<docker.image>${env.DOCKER_IMAGE}</docker.image>
</properties>
</profile>
</profiles>
</settings>
````
本项目使用了 Spring Boot 的镜像分层特性优化了镜像的构建效率,请确保正确安装了 Docker 工具,然后执行以下命令。

在项目根目录执行 `mvn -Pgithub -pl sentinel-dashboard jib:build -Djib.disableUpdateChecks=true` 打包为镜像。
```bash
docker build -f docker/Dockerfile -t sentinel-dashboard:{tag} .
```

### Helm 部署

进入 `helm` 目录,执行 `helm install -n sentinel-dashboard sentinel .` 安装,在 K8s 环境将自动创建 Sentinel 所需的资源文件。
以应用为中心,建议使用 Helm 统一管理所需部署的 K8s 资源描述文件,请参考以下命令完成应用的安装和卸载。

```bash
helm install sentinel-dashboard ./helm # 部署资源
helm uninstall sentinel-dashboard # 卸载资源
```

## 如何接入

Expand Down

0 comments on commit e5d01fb

Please sign in to comment.