Skip to content

Commit

Permalink
Release ci (#25)
Browse files Browse the repository at this point in the history
* add license app to cloud. (labring#4196)

Signed-off-by: yy <lingdie.yy@outlook.com>

* feature(main): skip sealos.run rule (labring#4198)

* Update README (labring#4197)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>

* add cronjob app to cloud. (labring#4201)

Signed-off-by: yy <lingdie.yy@outlook.com>

* fix run init job. (labring#4202)

Signed-off-by: yy <lingdie.yy@outlook.com>

* feat service license (labring#4195)

* feat: license service

Signed-off-by: jingyang <3161362058@qq.com>

* done

* tempalte

Signed-off-by: jingyang <3161362058@qq.com>

* done

Signed-off-by: jingyang <3161362058@qq.com>

* done

Signed-off-by: jingyang <3161362058@qq.com>

* docker build

Signed-off-by: jingyang <3161362058@qq.com>

* done

Signed-off-by: jingyang <3161362058@qq.com>

* license yaml

Signed-off-by: jingyang <3161362058@qq.com>

* image

* fix type bg

* env

* add oss

Signed-off-by: jingyang <3161362058@qq.com>

* done

Signed-off-by: jingyang <3161362058@qq.com>

cluster done

Signed-off-by: jingyang <3161362058@qq.com>

done

Signed-off-by: jingyang <3161362058@qq.com>

cluster done

Signed-off-by: jingyang <3161362058@qq.com>

done cluster

Signed-off-by: jingyang <3161362058@qq.com>

done

Signed-off-by: jingyang <3161362058@qq.com>

* fix build

Signed-off-by: jingyang <3161362058@qq.com>

* fix oss && only zh

Signed-off-by: jingyang <3161362058@qq.com>

* feat checkout wechat

Signed-off-by: jingyang <3161362058@qq.com>

* fix ci

Signed-off-by: jingyang <3161362058@qq.com>

---------

Signed-off-by: jingyang <3161362058@qq.com>

* Docs: update "What is Sealos?" (labring#4200)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>

* refactor(main): unmount override container (labring#4161)

Signed-off-by: cuisongliu <cuisongliu@qq.com>

* feat: Create a demo plugin Monitor (labring#4184)

* feat: lens demo of web version

* chore: add & remove some packages

* fix: connect to desktop bug and change icon

* init: plugin Monitor init

* style: restore frontend/pnpm-workspace.yaml & pnpm-lock.yaml and create new ones in plugins/monitor

* restore: frontend/Makefile

* restore: frontend/pnpm-workspace.yaml

* restore

* feat:frontend license app (labring#4203)

* feat:frontend license app

Signed-off-by: jingyang <3161362058@qq.com>

* fix

Signed-off-by: jingyang <3161362058@qq.com>

* fix

* fix detail

Signed-off-by: jingyang <3161362058@qq.com>

---------

Signed-off-by: jingyang <3161362058@qq.com>

* Docs: update introduction (labring#4207)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>

* fix license db uri (labring#4211)

Signed-off-by: yy <lingdie.yy@outlook.com>

* update price (labring#4212)

* docs: Automated Changelog Update for v4.3.7 (labring#4210)

* 🤖 add release changelog using robot.

Signed-off-by: sealos-release-robot <sealos-release-robot@sealos.io>

* Update CHANGELOG.md

---------

Signed-off-by: sealos-release-robot <sealos-release-robot@sealos.io>
Co-authored-by: cuisongliu <cuisongliu@qq.com>

* 🤖 add release changelog using rebot. (labring#4213)

* add alt names. (labring#4214)

Signed-off-by: yy <lingdie.yy@outlook.com>

* Update the workflow to automatically update the website image after the image is built (labring#4209)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>

* fix(costcenter): fix unit & invoice amount (labring#4194)

* feat:docs add private cloud page (labring#4215)

* fix scripts (labring#4217)

* Fix database provider i18n. (labring#4216)

Signed-off-by: zzjin <tczzjin@gmail.com>

* fix user avator && url (labring#4218)

* fix user avator && url

Signed-off-by: jingyang <3161362058@qq.com>

* modify purchase page

Signed-off-by: jingyang <3161362058@qq.com>

* fix height

Signed-off-by: jingyang <3161362058@qq.com>

* fix docs

Signed-off-by: jingyang <3161362058@qq.com>

* fix params

* copy code

* license time

---------

Signed-off-by: jingyang <3161362058@qq.com>

* fix oss file name && docs footer (labring#4220)

* feat(frontend/desktop):support modify team limit (labring#4221)

* add acme resolver monitoring (labring#4223)

* feat:docs language-differentiated domain names (labring#4226)

* feat:standard cluster purchase process (labring#4225)

* feat:standard cluster purchase process

Signed-off-by: jingyang <3161362058@qq.com>

* fix cronjob

Signed-off-by: jingyang <3161362058@qq.com>

---------

Signed-off-by: jingyang <3161362058@qq.com>

* add cloud release ci.

Signed-off-by: yy <lingdie.yy@outlook.com>

---------

Signed-off-by: yy <lingdie.yy@outlook.com>
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
Signed-off-by: jingyang <3161362058@qq.com>
Signed-off-by: cuisongliu <cuisongliu@qq.com>
Signed-off-by: sealos-release-robot <sealos-release-robot@sealos.io>
Signed-off-by: zzjin <tczzjin@gmail.com>
Co-authored-by: cuisongliu <cuisongliu@qq.com>
Co-authored-by: Carson Yang <yangchuansheng33@gmail.com>
Co-authored-by: zhujingyang <72259332+zjy365@users.noreply.github.com>
Co-authored-by: Wishrem <97738578+Wishrem@users.noreply.github.com>
Co-authored-by: Jiahui <4543bxy@gmail.com>
Co-authored-by: sealos-release-robot <sealos-release-robot@sealos.io>
Co-authored-by: xudaotutou <13435638964@163.com>
Co-authored-by: zzjin <zzjin@users.noreply.github.com>
  • Loading branch information
9 people committed Nov 3, 2023
1 parent b868c75 commit ca5dfca
Show file tree
Hide file tree
Showing 462 changed files with 37,279 additions and 561 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cloud-release.yml
@@ -0,0 +1,53 @@
name: Release Cloud

on:
release:
types: [ published ]

env:
# Common versions
GO_VERSION: "1.20"
DEFAULT_OWNER: "labring"
TAG: ${{ github.event.release.tag_name }}

jobs:
save-sealos:
uses: ./.github/workflows/import-save-sealos.yml

release-controllers:
needs:
- save-sealos
uses: ./.github/workflows/controllers.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}

release-frontends:
needs:
- save-sealos
uses: ./.github/workflows/controllers.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}
uses: ./.github/workflows/frontend.yml

release-service:
needs:
- save-sealos
uses: ./.github/workflows/controllers.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}
uses: ./.github/workflows/services.yml

release-cloud:
needs:
- save-sealos
- release-controllers
- release-frontends
- release-service
uses: ./.github/workflows/cloud.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}
build_from: ${{ env.TAG }}
2 changes: 0 additions & 2 deletions .github/workflows/cloud.yml
@@ -1,8 +1,6 @@
name: Build Cloud Cluster image

on:
release:
types: [ published ]
workflow_run:
workflows: [ "Build Controllers image", "Build Frontend Image" ]
types:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/deploy-docs-preview.yml
Expand Up @@ -2,7 +2,7 @@ name: Preview Sealos Docs Site

on:
workflow_dispatch:
push:
pull_request_target:
branches: ["main"]
paths:
- "docs/**"
Expand All @@ -25,11 +25,18 @@ env:
jobs:
build:
name: Build

# The environment this job references
environment:
name: Preview
url: ${{ steps.vercel-action.outputs.preview-url }}

runs-on: ubuntu-latest

# Job outputs
outputs:
url: ${{ steps.vercel-action.outputs.preview-url }}

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -97,7 +104,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Write md
run: |
echo "# 🤖 Generated by deploy action" > report.md
echo "# 📘 Preview documentation website" > report.md
echo "[👀 Visit Preview](${{ needs.build.outputs.url }})" >> report.md
cat report.md
- name: Gh Rebot for Sealos
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/deploy-docs-site.yml
@@ -1,6 +1,7 @@
name: Deploy Sealos Docs Site

on:
workflow_dispatch:
push:
branches: ["main"]
paths:
Expand Down Expand Up @@ -64,19 +65,14 @@ jobs:
- name: Build with Docusaurus
run: ${{ steps.detect-package-manager.outputs.runner }} run build
working-directory: ${{ env.BUILD_PATH }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
# Push our generated site to Vercel
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
path: ${{ env.BUILD_PATH }}/build

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} #Required
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required
github-comment: false
vercel-args: '--prod'
working-directory: ${{ env.BUILD_PATH }}/build
17 changes: 15 additions & 2 deletions .github/workflows/docs-site-image.yml
Expand Up @@ -8,7 +8,7 @@ on:
- "docs/**"

jobs:
deploy:
build-docs-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -59,4 +59,17 @@ jobs:
file: ./docs/website/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

update-docs-image:
needs: build-docs-image
runs-on: ubuntu-latest
if: github.repository == 'labring/sealos'
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.SEALOS_TOP_KUBE_CONF }}
with:
args: rollout restart deployment sealos-site
19 changes: 19 additions & 0 deletions CHANGELOG/CHANGELOG-4.3.7.md
@@ -0,0 +1,19 @@
Welcome to the v4.3.7 release of Sealos!🎉🎉!



## Changelog
### Other work
* 311213aa175c71120f6f91ce616c74e8ab05661d: :bug: fix env merge for sealos run (#4144) (@cuisongliu)
* 5cd471632c42fd1535dcfe542c9faa148a7b4ec3: feature(main): support crun youki gvisor kata (#4189) (#4191) (#4192) (@sealos-ci-robot)
* 4057aacb494206704dcf23441bd0ec9d4e653235: refactor(main): fixed golang lint version (#4141) (#4142) (#4143) (@sealos-ci-robot)
* 579a0163baae48f4547b394530e8bc31196da8ef: refactor(main): skip success exec (#4162) (#4170) (#4175) (@sealos-ci-robot)
* f39b23394b9d06774cf096de7d342201d4b264ca: refactor(main): unmount override container (#4161) (#4208) (@cuisongliu)

**Full Changelog**: https://github.com/labring/sealos/compare/v4.3.7-rc1...v4.3.7

See [the CHANGELOG](https://github.com/labring/sealos/blob/main/CHANGELOG/CHANGELOG.md) for more details.

Your patronage towards Sealos is greatly appreciated 🎉🎉.

If you encounter any problems during its usage, please create an issue in the [GitHub repository](https://github.com/labring/sealos), we're committed to resolving your problem as soon as possible.
42 changes: 42 additions & 0 deletions CHANGELOG/CHANGELOG-5.0.0-beta1.md
@@ -0,0 +1,42 @@
Welcome to the v5.0.0-beta1 release of Sealos!🎉🎉!



## Changelog
### New Features
* c35222490838e9aeb22118ff9f3fd2b0961fdffc: feat: Create a demo plugin Monitor (#4184) (@Wishrem)
* 3bc6c3cb49bfcbb5706fe1afea71eb149dc2399c: feat: imporve sealos cloud install script (#4181) (@lingdie)
* fb52ae20aa9e82295d43a526a612e69df222503e: feat:frontend license app (#4203) (@zjy365)
### Bug fixes
* a3d7b2bd66db557a2e6f8bd4e09457f64e86453b: fix(costcenter): fix unit & invoice amount (#4185) (@xudaotutou)
### Other work
* 52a396ab6a83eaa652c3e8a1c26320a7bb96bbee: Docs: Update the company's information (#4193) (@yangchuansheng)
* 58058204c00f8adbc00cf30932e02ece934375c4: Docs: add ci workflow for building Sealos Docs Site Docker image (#4177) (@yangchuansheng)
* b6be5be640ae406639ccf2e3423923eb03a05069: Docs: add workflow for previwing docs site (#4186) (@yangchuansheng)
* 8f246bf2dca837760dfc741b33b0a8998352be53: Docs: auto copy i18n files to website folder (#4176) (@yangchuansheng)
* f37b27cd5cb6b2f94b2130480dc77d64fc9c331d: Docs: update "What is Sealos?" (#4200) (@yangchuansheng)
* 384bd8dd36c0c1171b575dfd39d4c17db222efb0: Docs: update introduction (#4207) (@yangchuansheng)
* 74b95f1a8fe063ec4a659beccd68a51affa36c9e: Fix typo for "Preview Sealos Docs Site" workflow (#4190) (@yangchuansheng)
* 961d01a364918bf603b5e99fdabee6aa0391a630: Update README (#4197) (@yangchuansheng)
* 2015389e3f5eb2c28d2eea132c0abec5f7cbb442: Update README.md (#4180) (@fanux)
* b868c75d7d12cb89798c6bc5b37e8702f05689c6: Update/pricing (#4182) (@bxy4543)
* 97bd6727a20d678389558d93c55735184a97b9df: add cronjob app to cloud. (#4201) (@lingdie)
* 5cee7fdd982054d140b89fae875430625405fb01: add license app to cloud. (#4196) (@lingdie)
* bd118edbe4bde0fd2f72e4123078048cd87c1b9b: change _ to - (#4183) (@lingdie)
* 2d55ae311c009377f966ff78115a2537a2a4e3d1: docs: Automated Changelog Update for v4.3.7 (#4210) (@sealos-release-robot)
* c726742f53c98aa38296585e3890eeb5816f54d8: feat service license (#4195) (@zjy365)
* 69ee7b309df8caaff6fbde59b7b5ad0440051ce9: feature(main): skip sealos.run rule (#4198) (@cuisongliu)
* 8476d8190de75fe13a46c34b5f4ca403b1a59b6e: feature(main): support crun youki gvisor kata (#4189) (@cuisongliu)
* 5c71c5498d3576cf5c2a64dc3c1e72ce92a32031: fix license db uri (#4211) (@lingdie)
* 1c91ef0b6f676522b60c4441b0c8d1dfecf76884: fix run init job. (#4202) (@lingdie)
* 4fed20a298b95f89782d84ad9349f456efdd0646: refactor(main): unmount override container (#4161) (@cuisongliu)
* 5878953036c4516e833c7016c42caeff25fb3905: update price (#4212) (@bxy4543)
* 8e7207f80872a47f2ea921d63b9737eff80c1118: 🤖 add release changelog using rebot. (#4171) (@sealos-release-robot)

**Full Changelog**: https://github.com/labring/sealos/compare/v5.0.0-alpha2...v5.0.0-beta1

See [the CHANGELOG](https://github.com/labring/sealos/blob/main/CHANGELOG/CHANGELOG.md) for more details.

Your patronage towards Sealos is greatly appreciated 🎉🎉.

If you encounter any problems during its usage, please create an issue in the [GitHub repository](https://github.com/labring/sealos), we're committed to resolving your problem as soon as possible.
2 changes: 2 additions & 0 deletions CHANGELOG/CHANGELOG.md
Expand Up @@ -2,13 +2,15 @@

All notable changes to this project will be documented in this file.

- [CHANGELOG-5.0.0-beta1.md](./CHANGELOG-5.0.0-beta1.md)
- [CHANGELOG-5.0.0-alpha2.md](./CHANGELOG-5.0.0-alpha2.md)
- [CHANGELOG-5.0.0-alpha1.md](./CHANGELOG-5.0.0-alpha1.md)
- [CHANGELOG-4.4.0-beta2.md](./CHANGELOG-4.4.0-beta2.md)
- [CHANGELOG-4.4.0-beta1.md](./CHANGELOG-4.4.0-beta1.md)
- [CHANGELOG-4.4.0-alpha3.md](./CHANGELOG-4.4.0-alpha3.md)
- [CHANGELOG-4.4.0-alpha1.md](./CHANGELOG-4.4.0-alpha1.md)
- [CHANGELOG-4.3.7-rc1.md](./CHANGELOG-4.3.7-rc1.md)
- [CHANGELOG-4.3.7.md](./CHANGELOG-4.3.7.md)
- [CHANGELOG-4.3.6.md](./CHANGELOG-4.3.6.md)
- [CHANGELOG-4.3.5.md](./CHANGELOG-4.3.5.md)
- [CHANGELOG-4.3.4.md](./CHANGELOG-4.3.4.md)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -62,14 +62,14 @@ Sealos['siːləs] is a cloud operating system distribution based on the Kubernet

## 💡 Core features

- 🚀 **Application Management**: Efficient deployment of any distributed applications with public internet accessibility.
- 🚀 **Application Management**: Easy management and quick release of publicly accessible distributed applications in the app store.
- 🗄️ **Database Management**: Create high-availability databases in seconds, offering support for MySQL, PostgreSQL, MongoDB, and Redis.
- 📬 **Support for Message Queues**: Catering to a variety of message queues such as Kafka, RocketMQ, and RabbitMQ.
- 🌥️ **Cloud Universality**: Equally effective in both public and private cloud, enabling a seamless transition of traditional applications to the cloud.

## 🌟 Advantages

- 💰 **Resource Efficiency & Cost Reduction**: Pay exclusively for the containers. The automatic scaling feature fundamentally tackles resource wastage, thus offering substantial cost benefits.
- 🌐 **High Universality & Ease of Use**: Users can concentrate solely on their operations without the distraction of external complexities. Regardless of one's knowledge level of Kubernetes, Sealos remains user-friendly.
- 💰 **Efficient & Economical**: Pay solely for the containers you utilize; automatic scaling prevents resource squandering and substantially reduces costs.
- 🌐 **High Universality & Ease of Use**: Concentrate on your core business activities without worrying about system complexities; negligible learning costs involved.
- 🛡️ **Agility & Security**: The distinctive multi-tenancy sharing model ensures both effective resource segmentation and collaboration, all under a secure framework.


Expand Down
32 changes: 16 additions & 16 deletions README_zh.md
Expand Up @@ -17,7 +17,7 @@
[![](https://img.shields.io/docker/pulls/labring/kubernetes)](https://hub.docker.com/r/labring/kubernetes)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flabring%2Fsealos.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Flabring%2Fsealos?ref=badge_shield)
[![codecov](https://codecov.io/gh/labring/sealos/branch/main/graph/badge.svg?token=e41ZDcj06N)](https://codecov.io/gh/labring/sealos)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.io)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.run)
[![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/project/labring/sealos?ref=badge_small)

<br />
Expand All @@ -29,7 +29,7 @@
https://github.com/labring/sealos/assets/82700206/b1f8a25a-55cf-4d15-a47b-38cf7d507134

<p align="center">
<a href="https://sealos.io/zh-Hans/docs/Intro">文档</a> |
<a href="https://sealos.run/zh-Hans/docs/Intro">文档</a> |
<a href="./README.md">English</a> |
<a href="https://github.com/orgs/labring/projects/4/views/9">发展规划</a>
</p>
Expand All @@ -41,16 +41,16 @@ Sealos 是一款以 Kubernetes 为内核的**云操作系统发行版**。它以

[在线使用](https://cloud.sealos.io)

* [在 Sealos 上 30 秒内轻松部署 Nginx](https://sealos.io/docs/quick-start/app-deployments/use-app-launchpad)
* [在 Sealos 上 30 秒启动 mysql/pgsql/mongo 高可用数据库](https://sealos.io/docs/quick-start/app-deployments/install-db-with-database)
* [在 Sealos 上 运行 WordPress](https://sealos.io/docs/examples/blog-platform/install-wordpress)
* [在 Sealos 上 运行 Uptime Kuma 拨测系统](https://sealos.io/docs/examples/dial-testing-system/install-uptime-kuma)
* [在 Sealos 上 运行低代码平台](https://sealos.io/docs/category/low-code-platform)
* [在 Sealos 上 运行搭建聊天应用](https://sealos.io/docs/examples/social-communication/install-tailchat)
* [在 Sealos 上 30 秒内轻松部署 Nginx](https://sealos.run/zh-Hans/docs/quick-start/app-deployments/use-app-launchpad)
* [在 Sealos 上 30 秒启动 mysql/pgsql/mongo 高可用数据库](https://sealos.run/zh-Hans/docs/quick-start/app-deployments/install-db-with-database)
* [在 Sealos 上 运行 WordPress](https://sealos.run/zh-Hans/docs/examples/blog-platform/install-wordpress)
* [在 Sealos 上 运行 Uptime Kuma 拨测系统](https://sealos.run/zh-Hans/docs/examples/dial-testing-system/install-uptime-kuma)
* [在 Sealos 上 运行低代码平台](https://sealos.run/zh-Hans/docs/category/low-code-platform)
* [在 Sealos 上 运行搭建聊天应用](https://sealos.run/zh-Hans/docs/examples/social-communication/install-tailchat)

![](/docs/4.0/img/app-launchpad-zh.png)

🔍 您可以通过以下的屏幕截图进一步了解 Sealos,关于 Sealos 更为详细的介绍与说明,请参阅 [什么是 Sealos](https://sealos.io/docs/Intro)
🔍 您可以通过以下的屏幕截图进一步了解 Sealos,关于 Sealos 更为详细的介绍与说明,请参阅 [什么是 Sealos](https://sealos.run/zh-Hans/docs/Intro)

<div align="center">

Expand All @@ -64,20 +64,20 @@ Sealos 是一款以 Kubernetes 为内核的**云操作系统发行版**。它以

## 💡 核心功能

- **应用管理**快速部署具有公网访问能力的任意分布式应用
- **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。
- **消息队列支持**支持多种消息队列,包含 Kafka、RocketMQ 和 RabbitMQ 等
- 🚀 **应用管理**在应用商店中轻松管理并快速发布可公网访问的分布式应用
- 🗄️ **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。
- 🌥️ **公私一致**即是公有云也是私有云,支持传统应用无缝迁移到云环境

## 🌟 优势

- **节省资源,降低开销**只需为容器付费,自动伸缩功能从根本上解决了资源浪费的问题,可以节省大量的成本
- **通用性强,无心智负担**用户只需专注于自己的业务,无需被其他无关的复杂性所困扰。无论用户对 Kubernetes 的掌握程度如何,都可以轻松使用 Sealos
- **灵活 & 安全**其独特的多租户共享机制,能在保障安全的前提下实现资源的有效隔离和协作
- 💰 **高效 & 经济**仅需为容器付费,自动伸缩杜绝资源浪费,大幅度节省成本
- 🌐 **通用性强,无心智负担**专注于业务本身,无需担心复杂性,几乎没有学习成本
- 🛡️ **灵活 & 安全**多租户共享机制在确保安全的同时,实现资源隔离与高效协作


## 🏘️ 社区与支持

- 🌐 访问 [Sealos官网](https://sealos.io/) 获取完整的文档和实用链接。
- 🌐 访问 [Sealos官网](https://sealos.run/) 获取完整的文档和实用链接。

- 📱 扫码加入社区微信交流群👇

Expand Down
29 changes: 29 additions & 0 deletions controllers/pkg/resources/named.go
Expand Up @@ -3,6 +3,8 @@ package resources
import (
"strings"

corev1 "k8s.io/api/core/v1"

sealos_networkmanager "github.com/dinoallo/sealos-networkmanager-protoapi"

"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -30,6 +32,7 @@ const (
TerminalIDLabelKey = "TerminalID"
AppLabelKey = "app"
JobNameLabelKey = "job-name"
ACMEChallengeKey = "acme.cert-manager.io/http01-solver"
KubeBlocksBackUpName = "kubeblocks-backup-data"
)

Expand Down Expand Up @@ -59,13 +62,39 @@ func NewResourceNamed(cr client.Object) *ResourceNamed {
case cr.GetName() == KubeBlocksBackUpName:
p._type = JOB
p._name = KubeBlocksBackUpName
case labels[ACMEChallengeKey] != "":
p._type = APP
p._name = getACMEResolverName(cr)
default:
p._type = OTHER
p._name = ""
}
return p
}

const (
acmesolver = "acmesolver"
acmesolverContainerArgsDomainPrefix = "--domain="
)

func getACMEResolverName(obj client.Object) string {
pod, ok := obj.(*corev1.Pod)
if !ok {
return ""
}
for _, container := range pod.Spec.Containers {
if container.Name != acmesolver {
continue
}
for _, arg := range container.Args {
if strings.HasPrefix(arg, acmesolverContainerArgsDomainPrefix) {
return acmesolver + "-" + strings.TrimPrefix(arg, acmesolverContainerArgsDomainPrefix)
}
}
}
return pod.Name
}

func (p *ResourceNamed) Type() uint8 {
return AppType[p._type]
}
Expand Down

0 comments on commit ca5dfca

Please sign in to comment.