From 15451ea2f09290b1f92ae62f226996655c5c3320 Mon Sep 17 00:00:00 2001
From: zhujingyang <72259332+zjy365@users.noreply.github.com>
Date: Mon, 10 Jul 2023 09:59:57 +0800
Subject: [PATCH 1/5] fix: desktop open app & add number of notifications
(#3478)
Signed-off-by: zhu jing yang <3161362058@qq.com>
---
.../components/background/index.module.scss | 12 --
.../src/components/background/index.tsx | 19 ++--
.../src/components/user_menu/index.tsx | 104 +++++++++++-------
frontend/desktop/src/pages/index.tsx | 70 ++++++------
frontend/desktop/src/stores/app.ts | 26 +++--
5 files changed, 125 insertions(+), 106 deletions(-)
delete mode 100644 frontend/desktop/src/components/background/index.module.scss
diff --git a/frontend/desktop/src/components/background/index.module.scss b/frontend/desktop/src/components/background/index.module.scss
deleted file mode 100644
index 3bfd047c0ce..00000000000
--- a/frontend/desktop/src/components/background/index.module.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.background {
- position: absolute;
- top: 0;
- left: 0;
- z-index: -10;
- min-width: 100vw;
- min-height: 100vh;
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center;
- transition: all 0.2s ease;
-}
diff --git a/frontend/desktop/src/components/background/index.tsx b/frontend/desktop/src/components/background/index.tsx
index 28d1927df07..402b69ecd5b 100644
--- a/frontend/desktop/src/components/background/index.tsx
+++ b/frontend/desktop/src/components/background/index.tsx
@@ -1,13 +1,16 @@
-import React from 'react';
-import styles from './index.module.scss';
+import { Img } from '@chakra-ui/react';
export const Background = () => {
return (
-
+
);
};
diff --git a/frontend/desktop/src/components/user_menu/index.tsx b/frontend/desktop/src/components/user_menu/index.tsx
index f42f725e336..62889a95e44 100644
--- a/frontend/desktop/src/components/user_menu/index.tsx
+++ b/frontend/desktop/src/components/user_menu/index.tsx
@@ -2,10 +2,16 @@ import Account from '@/components/account';
import Notification from '@/components/notification';
import useSessionStore from '@/stores/session';
import { Box, Flex, Image, useDisclosure } from '@chakra-ui/react';
+import { i18n } from 'next-i18next';
import { useState } from 'react';
-import Iconfont from '../iconfont';
import LangSelect from '../LangSelect';
-import { i18n } from 'next-i18next';
+import Iconfont from '../iconfont';
+
+enum UserMenuKeys {
+ LangSelect,
+ Notification,
+ Account
+}
export default function Index() {
const [notificationAmount, setNotificationAmount] = useState(0);
@@ -14,40 +20,57 @@ export default function Index() {
const switchLangDisclosure = useDisclosure();
const userInfo = useSessionStore((state) => state.getSession());
if (!userInfo) return null;
- const buttonList: { click?: () => void, button: JSX.Element, content: JSX.Element }[] = [
+ const buttonList: {
+ click?: () => void;
+ button: JSX.Element;
+ content: JSX.Element;
+ key: UserMenuKeys;
+ }[] = [
{
- button: ,
+ key: UserMenuKeys.LangSelect,
+ button: (
+
+ ),
click: () => switchLangDisclosure.onOpen(),
content:
},
{
- button: ,
+ key: UserMenuKeys.Notification,
+ button: (
+
+ ),
click: () => showDisclosure.onOpen(),
- content: setNotificationAmount(amount)}
- />
- }, {
- button: ,
+ content: (
+ setNotificationAmount(amount)}
+ />
+ )
+ },
+ {
+ key: UserMenuKeys.Account,
+ button: (
+
+ ),
click: () => accountDisclosure.onOpen(),
- content:
+ content:
}
- ]
+ ];
return (
- {
- buttonList.map((item, index) => (<> (
+
-
- {item.button}
-
+ {item.button}
{item.content}
+ {item.key === UserMenuKeys.Notification && notificationAmount > 0 && (
+
+ )}
- >
- ))
- }
+ ))}
);
}
diff --git a/frontend/desktop/src/pages/index.tsx b/frontend/desktop/src/pages/index.tsx
index d047c7aa338..30cf8de25a9 100644
--- a/frontend/desktop/src/pages/index.tsx
+++ b/frontend/desktop/src/pages/index.tsx
@@ -16,9 +16,9 @@ interface IMoreAppsContext {
}
export const MoreAppsContext = createContext(null);
export const RechargeEnabledContext = createContext(false);
-export default function Home({rechargeEnabled}: {rechargeEnabled: boolean}) {
+export default function Home({ rechargeEnabled }: { rechargeEnabled: boolean }) {
const router = useRouter();
- const isUpdate = useSessionStore(s => s.newUser)
+ const isUpdate = useSessionStore((s) => s.newUser);
const { colorMode, toggleColorMode } = useColorMode();
const isUserLogin = useSessionStore((s) => s.isUserLogin);
const init = useAppStore((state) => state.init);
@@ -29,36 +29,37 @@ export default function Home({rechargeEnabled}: {rechargeEnabled: boolean}) {
}, [colorMode, toggleColorMode]);
const [showMoreApps, setShowMoreApps] = useState(false);
useEffect(() => {
-
const { query } = router;
const is_login = isUserLogin();
if (!isUpdate || !is_login) {
- let param = decodeURIComponent(query?.openapp as string||"")
- let [openApp, appQuery] = param.split('?',1)
- if (openApp && typeof appQuery === 'string') setAutoLaunch(openApp, {raw: appQuery})
- router.replace(destination)
+ let param = decodeURIComponent((query?.openapp as string) || '');
+ const firstQuestionMarkIndex = param.indexOf('?');
+ const openApp = param.substring(0, firstQuestionMarkIndex);
+ const appQuery = param.substring(firstQuestionMarkIndex + 1);
+ if (openApp && typeof appQuery === 'string') setAutoLaunch(openApp, { raw: appQuery });
+ router.replace(destination);
} else {
- init()
- .then((state) => {
- let appQuery = ''
- let appkey = ''
- if(!state.autolaunch) {
- let param = decodeURIComponent(query?.openapp as string||"")
- let [openapp, _appQuery] = param.split('?',2)
- if (!openapp || typeof _appQuery !== 'string') return
- appQuery = _appQuery
- appkey = openapp
- } else {
- appQuery = state.autolaunch
- }
- const app = state.installedApps.find((item) => item.key === appkey);
- if (!app) return
- state
- .openApp(app, { raw:appQuery })
- .then(() => {
- state.cancelAutoLaunch()
- })
- })
+ init().then((state) => {
+ let appQuery = '';
+ let appkey = '';
+ if (!state.autolaunch) {
+ let param = decodeURIComponent((query?.openapp as string) || '');
+ const firstQuestionMarkIndex = param.indexOf('?');
+ const openapp = param.substring(0, firstQuestionMarkIndex);
+ const _appQuery = param.substring(firstQuestionMarkIndex + 1);
+ if (!openapp || typeof _appQuery !== 'string') return;
+ appQuery = _appQuery;
+ appkey = openapp;
+ } else {
+ appkey = state.autolaunch;
+ appQuery = state.launchQuery.raw;
+ }
+ const app = state.installedApps.find((item) => item.key === appkey);
+ if (!app) return;
+ state.openApp(app, { raw: appQuery }).then(() => {
+ state.cancelAutoLaunch();
+ });
+ });
}
}, [router, isUserLogin, init, isUpdate, setAutoLaunch]);
@@ -69,7 +70,7 @@ export default function Home({rechargeEnabled}: {rechargeEnabled: boolean}) {
- RechargeEnabledContext.Provider>
+
);
@@ -77,16 +78,11 @@ export default function Home({rechargeEnabled}: {rechargeEnabled: boolean}) {
export async function getServerSideProps({ req, res, locales }: any) {
const local = req?.cookies?.NEXT_LOCALE || 'en';
-
+
return {
props: {
- ...(await serverSideTranslations(
- local,
- undefined,
- null,
- locales || []
- )),
- rechargeEnabled: enableRecharge()
+ ...(await serverSideTranslations(local, undefined, null, locales || [])),
+ rechargeEnabled: enableRecharge()
}
};
}
diff --git a/frontend/desktop/src/stores/app.ts b/frontend/desktop/src/stores/app.ts
index 8d3d4bbbf4b..d96a5adc0a2 100644
--- a/frontend/desktop/src/stores/app.ts
+++ b/frontend/desktop/src/stores/app.ts
@@ -64,7 +64,7 @@ const useAppStore = create()(
currentAppPid: -1,
maxZIndex: 0,
launchQuery: {},
- autolaunch: "",
+ autolaunch: '',
runner: new AppStateManager([]),
init: async () => {
const res = await request('/api/desktop/getInstalledApps');
@@ -73,7 +73,7 @@ const useAppStore = create()(
state.runner.loadApps(state.installedApps.map((app) => app.key));
state.maxZIndex = 0;
});
- return get()
+ return get();
},
// should use pid to close app, but it don't support multi same app process now
closeAppById: (pid: number) => {
@@ -147,7 +147,7 @@ const useAppStore = create()(
const { query, raw } = _query;
if (query) _app.data.url = formatUrl(_app.data.url, query);
else if (raw) {
- _app.data.url += `?${raw}`
+ _app.data.url += `?${raw}`;
}
}
@@ -197,16 +197,18 @@ const useAppStore = create()(
state.autolaunch = '';
state.launchQuery = {};
});
- },
- })), {
- name: 'app',
- partialize(state) {
- return {
- launchQuery: state.launchQuery,
- autolaunch: state.autolaunch,
}
- },
- })
+ })),
+ {
+ name: 'app',
+ partialize(state) {
+ return {
+ launchQuery: state.launchQuery,
+ autolaunch: state.autolaunch
+ };
+ }
+ }
+ )
)
);
From 0c00b99f2be5e186c606657a74fea9f0f0b4f5f9 Mon Sep 17 00:00:00 2001
From: cuisongliu
Date: Mon, 10 Jul 2023 11:58:39 +0800
Subject: [PATCH 2/5] build(main): dev to latest (#3482)
Signed-off-by: cuisongliu
---
.github/workflows/ci-patch-image.yml | 2 +-
.github/workflows/cloud.yml | 4 ++--
.github/workflows/controllers.yml | 5 ++---
.github/workflows/frontend.yml | 5 ++---
.github/workflows/services.yml | 5 ++---
.github/workflows/webhooks.yml | 2 +-
controllers/account/Makefile | 2 +-
.../account/config/default/manager_auth_proxy_patch.yaml | 4 ++--
controllers/account/deploy/manifests/deploy.yaml | 2 +-
controllers/app/Makefile | 2 +-
controllers/app/deploy/manifests/deploy.yaml | 2 +-
controllers/cloud/deploy/manifests/deploy.yaml.tmpl | 2 +-
controllers/cluster/Makefile | 2 +-
controllers/cluster/deploy/manifests/deploy.yaml | 2 +-
controllers/db/adminer/Makefile | 2 +-
controllers/db/adminer/deploy/README.md | 4 ++--
controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl | 2 +-
controllers/db/bytebase/deploy/README.md | 4 ++--
controllers/db/bytebase/deploy/manifests/deploy.yaml.tmpl | 2 +-
controllers/imagehub/Makefile | 2 +-
controllers/imagehub/deploy/manifests/deploy.yaml | 2 +-
controllers/infra/Makefile | 2 +-
controllers/infra/deploy/README.md | 2 +-
controllers/infra/deploy/manifests/deploy.yaml | 2 +-
controllers/metering/Makefile | 2 +-
controllers/metering/deploy/manifests/deploy.yaml | 2 +-
controllers/resources/Makefile | 2 +-
controllers/resources/config/manager/manager.yaml | 2 +-
controllers/resources/deploy/README.md | 4 ++--
controllers/resources/deploy/manifests/deploy-manager.yaml | 4 ++--
controllers/resources/metering/Makefile | 4 ++--
controllers/resources/metering/deploy/manifests/deploy.yaml | 4 ++--
controllers/terminal/Makefile | 2 +-
controllers/terminal/deploy/README.md | 4 ++--
controllers/terminal/deploy/manifests/deploy.yaml.tmpl | 2 +-
controllers/user/Makefile | 2 +-
controllers/user/deploy/README.md | 4 ++--
controllers/user/deploy/manifests/deploy.yaml.tmpl | 2 +-
deploy/cloud-deprecated/README.md | 4 ++--
deploy/cloud/README.md | 4 ++--
frontend/desktop/deploy/README.md | 6 +++---
frontend/desktop/deploy/manifests/deploy.yaml.tmpl | 4 ++--
frontend/providers/adminer/deploy/manifests/deploy.yaml | 4 ++--
.../applaunchpad/deploy/manifests/deploy.yaml.tmpl | 4 ++--
frontend/providers/bytebase/deploy/manifests/deploy.yaml | 4 ++--
.../providers/costcenter/deploy/manifests/deploy.yaml.tmpl | 4 ++--
.../providers/dbprovider/deploy/manifests/deploy.yaml.tmpl | 2 +-
frontend/providers/imagehub/deploy/manifests/deploy.yaml | 4 ++--
.../providers/terminal/deploy/manifests/deploy.yaml.tmpl | 4 ++--
frontend/static-cdn/Makefile | 2 +-
frontend/static-cdn/deploy/manifest.yaml | 4 ++--
service/auth/Makefile | 2 +-
service/auth/deploy/README.md | 4 ++--
service/auth/deploy/manifests/deploy.yaml | 2 +-
service/hub/Makefile | 4 ++--
service/hub/deploy/manifests/deploy.yaml | 4 ++--
service/payment/Makefile | 2 +-
webhooks/whitelist/Makefile | 2 +-
webhooks/whitelist/deploy/manifests/deploy.yaml | 2 +-
59 files changed, 87 insertions(+), 90 deletions(-)
diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml
index e40570bace2..da65c6f31d8 100755
--- a/.github/workflows/ci-patch-image.yml
+++ b/.github/workflows/ci-patch-image.yml
@@ -172,7 +172,7 @@ jobs:
- name: Prepare
id: prepare
run: |
- TAG=dev
+ TAG=latest
echo tag_name=${GIT_COMMIT_SHORT_SHA} >> $GITHUB_OUTPUT
- name: Renew issue and Sync Images
uses: labring/gh-rebot@v0.0.6
diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml
index 6472056707a..b2e97d47421 100644
--- a/.github/workflows/cloud.yml
+++ b/.github/workflows/cloud.yml
@@ -11,8 +11,8 @@ on:
type: boolean
default: false
push_image_tag:
- description: 'Push all-in-one image tag, default is dev'
- default: 'dev'
+ description: 'Push all-in-one image tag, default is latest'
+ default: 'latest'
required: false
type: string
build_from:
diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml
index f1a7c4bf9c9..bfd744c97d1 100644
--- a/.github/workflows/controllers.yml
+++ b/.github/workflows/controllers.yml
@@ -12,7 +12,7 @@ on:
default: false
push_image_tag:
description: "Push image tag"
- default: "dev"
+ default: "latest"
required: false
type: string
push:
@@ -155,7 +155,6 @@ jobs:
ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- type=raw,value=dev,enable=true
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
- name: build (and publish) ${{ matrix.module.name }} main image
@@ -229,7 +228,7 @@ jobs:
- name: Mutate image tag in deploy files
working-directory: controllers/${{ matrix.module.path }}/deploy
run: |
- OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:dev
+ OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:latest
NEW_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.new_docker_repo }}:${{ steps.prepare.outputs.tag_name }}
sudo sed -i "s;${OLD_DOCKER_IMAGE_NAME};${NEW_DOCKER_IMAGE_NAME};" manifests/*
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 3851972baa5..543a2e45440 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -12,7 +12,7 @@ on:
default: false
push_image_tag:
description: "Push image tag"
- default: "dev"
+ default: "latest"
required: false
type: string
push:
@@ -87,7 +87,6 @@ jobs:
ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- type=raw,value=dev,enable=true
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
- name: Set up QEMU
@@ -160,7 +159,7 @@ jobs:
run: |
tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}")
echo old_docker_repo=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
- echo old_docker_image=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend:dev >> $GITHUB_OUTPUT
+ echo old_docker_image=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend:latest >> $GITHUB_OUTPUT
echo new_docker_repo=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
echo new_docker_image=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend:${tag_name} >> $GITHUB_OUTPUT
echo cluster_repo=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml
index 67b0016b4f8..6aa3c968ac1 100644
--- a/.github/workflows/services.yml
+++ b/.github/workflows/services.yml
@@ -13,7 +13,7 @@ on:
default: false
push_image_tag:
description: 'Push image tag'
- default: 'dev'
+ default: 'latest'
required: false
type: string
push:
@@ -144,7 +144,6 @@ jobs:
ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module }}-service
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- type=raw,value=dev,enable=true
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
- name: build (and publish) ${{ matrix.module }} main image
@@ -212,7 +211,7 @@ jobs:
- name: Mutate image tag in deploy files
working-directory: service/${{ matrix.module }}/deploy
run: |
- OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:dev
+ OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:latest
NEW_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.new_docker_repo }}:${{ steps.prepare.outputs.tag_name }}
sed -i "s;${OLD_DOCKER_IMAGE_NAME};${NEW_DOCKER_IMAGE_NAME};" manifests/*
diff --git a/.github/workflows/webhooks.yml b/.github/workflows/webhooks.yml
index 9e05597eead..22abba8ce58 100644
--- a/.github/workflows/webhooks.yml
+++ b/.github/workflows/webhooks.yml
@@ -99,7 +99,7 @@ jobs:
- name: Prepare
id: prepare
run: |
- TAG=dev
+ TAG=latest
echo tag_name=${TAG} >> $GITHUB_OUTPUT
- # Add support for more platforms with QEMU (optional)
diff --git a/controllers/account/Makefile b/controllers/account/Makefile
index 911fbaa412a..664eeef941e 100644
--- a/controllers/account/Makefile
+++ b/controllers/account/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-account-controller:dev
+IMG ?= ghcr.io/labring/sealos-account-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
diff --git a/controllers/account/config/default/manager_auth_proxy_patch.yaml b/controllers/account/config/default/manager_auth_proxy_patch.yaml
index 445e8c12e64..736f293b1f8 100644
--- a/controllers/account/config/default/manager_auth_proxy_patch.yaml
+++ b/controllers/account/config/default/manager_auth_proxy_patch.yaml
@@ -65,9 +65,9 @@ spec:
value: "604800"
- name: DebtDetectionCycleSeconds
value: "300"
- image: ghcr.io/labring/sealos-account-controller:dev
+ image: ghcr.io/labring/sealos-account-controller:latest
imagePullPolicy: Always
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
- - "--leader-elect"
\ No newline at end of file
+ - "--leader-elect"
diff --git a/controllers/account/deploy/manifests/deploy.yaml b/controllers/account/deploy/manifests/deploy.yaml
index bbe9e710e15..6a16854344e 100644
--- a/controllers/account/deploy/manifests/deploy.yaml
+++ b/controllers/account/deploy/manifests/deploy.yaml
@@ -1156,7 +1156,7 @@ spec:
envFrom:
- secretRef:
name: payment-secret
- image: ghcr.io/labring/sealos-account-controller:dev
+ image: ghcr.io/labring/sealos-account-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/app/Makefile b/controllers/app/Makefile
index f6c1fb43d8d..2b6fa300400 100644
--- a/controllers/app/Makefile
+++ b/controllers/app/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-app-controller:dev
+IMG ?= ghcr.io/labring/sealos-app-controller:latest
TARGETARCH ?= amd64
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
diff --git a/controllers/app/deploy/manifests/deploy.yaml b/controllers/app/deploy/manifests/deploy.yaml
index d87ddef99fc..ccc5ee5cedf 100644
--- a/controllers/app/deploy/manifests/deploy.yaml
+++ b/controllers/app/deploy/manifests/deploy.yaml
@@ -406,7 +406,7 @@ spec:
- --leader-elect
command:
- /manager
- image: ghcr.io/labring/sealos-app-controller:dev
+ image: ghcr.io/labring/sealos-app-controller:latest
livenessProbe:
httpGet:
path: /healthz
diff --git a/controllers/cloud/deploy/manifests/deploy.yaml.tmpl b/controllers/cloud/deploy/manifests/deploy.yaml.tmpl
index ffad23906f4..37cd3719580 100644
--- a/controllers/cloud/deploy/manifests/deploy.yaml.tmpl
+++ b/controllers/cloud/deploy/manifests/deploy.yaml.tmpl
@@ -601,7 +601,7 @@ spec:
env:
- name: CAN_CONNECT_TO_EXTERNAL_NETWORK
value: '{{ .canConnectToExternalNetwork }}'
- image: ghcr.io/labring/sealos-cloud-controller:dev
+ image: ghcr.io/labring/sealos-cloud-controller:latest
livenessProbe:
httpGet:
path: /healthz
diff --git a/controllers/cluster/Makefile b/controllers/cluster/Makefile
index a6d19ee03f7..53c0ab9b558 100644
--- a/controllers/cluster/Makefile
+++ b/controllers/cluster/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-cluster-controller:dev
+IMG ?= ghcr.io/labring/sealos-cluster-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.2
diff --git a/controllers/cluster/deploy/manifests/deploy.yaml b/controllers/cluster/deploy/manifests/deploy.yaml
index 9c4adf77d6d..09a8fad0144 100644
--- a/controllers/cluster/deploy/manifests/deploy.yaml
+++ b/controllers/cluster/deploy/manifests/deploy.yaml
@@ -443,7 +443,7 @@ spec:
- --leader-elect
command:
- /manager
- image: ghcr.io/labring/sealos-cluster-controller:dev
+ image: ghcr.io/labring/sealos-cluster-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/db/adminer/Makefile b/controllers/db/adminer/Makefile
index 408d74bfc23..e737a02db07 100644
--- a/controllers/db/adminer/Makefile
+++ b/controllers/db/adminer/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-db-adminer-controller:dev
+IMG ?= ghcr.io/labring/sealos-db-adminer-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1
diff --git a/controllers/db/adminer/deploy/README.md b/controllers/db/adminer/deploy/README.md
index e859a7466d1..21d85ff0496 100644
--- a/controllers/db/adminer/deploy/README.md
+++ b/controllers/db/adminer/deploy/README.md
@@ -1,11 +1,11 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-db-adminer-controller:dev -f Dockerfile .
+sealos build -t docker.io/labring/sealos-db-adminer-controller:latest -f Dockerfile .
```
### How to run
```shell
-sealos run docker.io/labring/sealos-db-adminer-controller:dev
+sealos run docker.io/labring/sealos-db-adminer-controller:latest
```
diff --git a/controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl b/controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl
index 789ee770435..f0ccd70157d 100644
--- a/controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl
+++ b/controllers/db/adminer/deploy/manifests/deploy.yaml.tmpl
@@ -397,7 +397,7 @@ spec:
value: {{ .wildcardCertSecretName }}
- name: SECRET_NAMESPACE
value: {{ .wildcardCertSecretNamespace }}
- image: ghcr.io/labring/sealos-db-adminer-controller:dev
+ image: ghcr.io/labring/sealos-db-adminer-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/db/bytebase/deploy/README.md b/controllers/db/bytebase/deploy/README.md
index 6273b4aa626..a276fca9668 100644
--- a/controllers/db/bytebase/deploy/README.md
+++ b/controllers/db/bytebase/deploy/README.md
@@ -1,11 +1,11 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-db-bytebase-controller:dev -f Dockerfile .
+sealos build -t docker.io/labring/sealos-db-bytebase-controller:latest -f Dockerfile .
```
### How to run
```shell
-sealos run docker.io/labring/sealos-db-bytebase-controller:dev
+sealos run docker.io/labring/sealos-db-bytebase-controller:latest
```
diff --git a/controllers/db/bytebase/deploy/manifests/deploy.yaml.tmpl b/controllers/db/bytebase/deploy/manifests/deploy.yaml.tmpl
index 7fd784d18f1..cc677b5c65e 100644
--- a/controllers/db/bytebase/deploy/manifests/deploy.yaml.tmpl
+++ b/controllers/db/bytebase/deploy/manifests/deploy.yaml.tmpl
@@ -512,7 +512,7 @@ spec:
- --leader-elect
command:
- /manager
- image: ghcr.io/labring/sealos-db-bytebase-controller:dev
+ image: ghcr.io/labring/sealos-db-bytebase-controller:latest
livenessProbe:
httpGet:
path: /healthz
diff --git a/controllers/imagehub/Makefile b/controllers/imagehub/Makefile
index 1d5211ae9f5..1845d085c06 100644
--- a/controllers/imagehub/Makefile
+++ b/controllers/imagehub/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-imagehub-controller:dev
+IMG ?= ghcr.io/labring/sealos-imagehub-controller:latest
TARGETARCH ?= amd64
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
diff --git a/controllers/imagehub/deploy/manifests/deploy.yaml b/controllers/imagehub/deploy/manifests/deploy.yaml
index a31185e9af7..53436334fd3 100644
--- a/controllers/imagehub/deploy/manifests/deploy.yaml
+++ b/controllers/imagehub/deploy/manifests/deploy.yaml
@@ -867,7 +867,7 @@ spec:
- --leader-elect
command:
- /manager
- image: ghcr.io/labring/sealos-imagehub-controller:dev
+ image: ghcr.io/labring/sealos-imagehub-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/infra/Makefile b/controllers/infra/Makefile
index 13104fc2aa8..2c3641867f7 100644
--- a/controllers/infra/Makefile
+++ b/controllers/infra/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-infra-controller:dev
+IMG ?= ghcr.io/labring/sealos-infra-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1
diff --git a/controllers/infra/deploy/README.md b/controllers/infra/deploy/README.md
index 31ff012b770..146f528b2e2 100644
--- a/controllers/infra/deploy/README.md
+++ b/controllers/infra/deploy/README.md
@@ -21,7 +21,7 @@ data:
### 部署方式
```
-sealos run docker.io/labring/sealos-account-controller:dev
+sealos run docker.io/labring/sealos-account-controller:latest
```
diff --git a/controllers/infra/deploy/manifests/deploy.yaml b/controllers/infra/deploy/manifests/deploy.yaml
index 1e7b3bf03fa..d0e31481352 100644
--- a/controllers/infra/deploy/manifests/deploy.yaml
+++ b/controllers/infra/deploy/manifests/deploy.yaml
@@ -603,7 +603,7 @@ spec:
envFrom:
- secretRef:
name: infra-secret
- image: ghcr.io/labring/sealos-infra-controller:dev
+ image: ghcr.io/labring/sealos-infra-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/metering/Makefile b/controllers/metering/Makefile
index d14891e2535..9de4a33417f 100644
--- a/controllers/metering/Makefile
+++ b/controllers/metering/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-metering-controller:dev
+IMG ?= ghcr.io/labring/sealos-metering-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
diff --git a/controllers/metering/deploy/manifests/deploy.yaml b/controllers/metering/deploy/manifests/deploy.yaml
index 6705a62a5cd..4a06da73952 100644
--- a/controllers/metering/deploy/manifests/deploy.yaml
+++ b/controllers/metering/deploy/manifests/deploy.yaml
@@ -567,7 +567,7 @@ spec:
envFrom:
- configMapRef:
name: metering-manager-configmap
- image: ghcr.io/labring/sealos-metering-controller:dev
+ image: ghcr.io/labring/sealos-metering-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/resources/Makefile b/controllers/resources/Makefile
index efe48ccc6e4..e269b09ed11 100644
--- a/controllers/resources/Makefile
+++ b/controllers/resources/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-resources-controller:dev
+IMG ?= ghcr.io/labring/sealos-resources-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
diff --git a/controllers/resources/config/manager/manager.yaml b/controllers/resources/config/manager/manager.yaml
index f5a43fadc6d..15c51ae20ea 100644
--- a/controllers/resources/config/manager/manager.yaml
+++ b/controllers/resources/config/manager/manager.yaml
@@ -35,7 +35,7 @@ spec:
secretKeyRef:
name: mongo-secret
key: MONGO_URI
- image: ghcr.io/labring/sealos-resources-controller:dev
+ image: ghcr.io/labring/sealos-resources-controller:latest
imagePullPolicy: Always
name: manager
securityContext:
diff --git a/controllers/resources/deploy/README.md b/controllers/resources/deploy/README.md
index 5795f2c734c..91839d26b2d 100644
--- a/controllers/resources/deploy/README.md
+++ b/controllers/resources/deploy/README.md
@@ -2,7 +2,7 @@
```shell
# 需要传入完整的包含username passwd的mongo uri来创建secret:
-sealos run ghcr.io/labring/sealos-cloud-resources-controller:dev --env MONGO_URI="mongodb://username:passwd@ip:port/sealos-resources?authSource=admin"
+sealos run ghcr.io/labring/sealos-cloud-resources-controller:latest --env MONGO_URI="mongodb://username:passwd@ip:port/sealos-resources?authSource=admin"
```
-> 目前默认使用mongodb作为存储: sealos-resources 为数据库名
\ No newline at end of file
+> 目前默认使用mongodb作为存储: sealos-resources 为数据库名
diff --git a/controllers/resources/deploy/manifests/deploy-manager.yaml b/controllers/resources/deploy/manifests/deploy-manager.yaml
index c833ff77e32..148e91c7b37 100644
--- a/controllers/resources/deploy/manifests/deploy-manager.yaml
+++ b/controllers/resources/deploy/manifests/deploy-manager.yaml
@@ -55,7 +55,7 @@ spec:
secretKeyRef:
key: MONGO_URI
name: mongo-secret
- image: ghcr.io/labring/sealos-resources-controller:dev
+ image: ghcr.io/labring/sealos-resources-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -82,4 +82,4 @@ spec:
securityContext:
runAsNonRoot: true
serviceAccountName: resources-controller-manager
- terminationGracePeriodSeconds: 10
\ No newline at end of file
+ terminationGracePeriodSeconds: 10
diff --git a/controllers/resources/metering/Makefile b/controllers/resources/metering/Makefile
index 28050140de3..3b8f9bd0aad 100644
--- a/controllers/resources/metering/Makefile
+++ b/controllers/resources/metering/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-resources-controller:dev
+IMG ?= ghcr.io/labring/sealos-resources-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
@@ -47,4 +47,4 @@ endif
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
- mkdir -p $(LOCALBIN)
\ No newline at end of file
+ mkdir -p $(LOCALBIN)
diff --git a/controllers/resources/metering/deploy/manifests/deploy.yaml b/controllers/resources/metering/deploy/manifests/deploy.yaml
index 7cf4e6b6711..a0309b872e5 100644
--- a/controllers/resources/metering/deploy/manifests/deploy.yaml
+++ b/controllers/resources/metering/deploy/manifests/deploy.yaml
@@ -23,7 +23,7 @@ spec:
control-plane: metering-manager
spec:
containers:
- - image: ghcr.io/labring/sealos-resources-metering-controller:dev
+ - image: ghcr.io/labring/sealos-resources-metering-controller:latest
name: resource-metering
command:
- "/manager"
@@ -49,4 +49,4 @@ spec:
secretKeyRef:
name: mongo-secret
key: MONGO_URI
- imagePullPolicy: Always
\ No newline at end of file
+ imagePullPolicy: Always
diff --git a/controllers/terminal/Makefile b/controllers/terminal/Makefile
index 0b1baddbf96..6b550bdaa42 100644
--- a/controllers/terminal/Makefile
+++ b/controllers/terminal/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-terminal-controller:dev
+IMG ?= ghcr.io/labring/sealos-terminal-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1
diff --git a/controllers/terminal/deploy/README.md b/controllers/terminal/deploy/README.md
index 567ca6f20c8..9353208a2bc 100644
--- a/controllers/terminal/deploy/README.md
+++ b/controllers/terminal/deploy/README.md
@@ -1,11 +1,11 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-terminal-controller:dev -f Dockerfile .
+sealos build -t docker.io/labring/sealos-terminal-controller:latest -f Dockerfile .
```
### How to run
```shell
-sealos run docker.io/labring/sealos-terminal-controller:dev
+sealos run docker.io/labring/sealos-terminal-controller:latest
```
diff --git a/controllers/terminal/deploy/manifests/deploy.yaml.tmpl b/controllers/terminal/deploy/manifests/deploy.yaml.tmpl
index df2416ef551..5c09f55b04f 100644
--- a/controllers/terminal/deploy/manifests/deploy.yaml.tmpl
+++ b/controllers/terminal/deploy/manifests/deploy.yaml.tmpl
@@ -447,7 +447,7 @@ spec:
value: {{ .wildcardCertSecretName }}
- name: SECRET_NAMESPACE
value: {{ .wildcardCertSecretNamespace }}
- image: ghcr.io/labring/sealos-terminal-controller:dev
+ image: ghcr.io/labring/sealos-terminal-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/controllers/user/Makefile b/controllers/user/Makefile
index e315fcecff2..26a51b48df2 100644
--- a/controllers/user/Makefile
+++ b/controllers/user/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-user-controller:dev
+IMG ?= ghcr.io/labring/sealos-user-controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1
diff --git a/controllers/user/deploy/README.md b/controllers/user/deploy/README.md
index c859ddb81dd..f0851852963 100644
--- a/controllers/user/deploy/README.md
+++ b/controllers/user/deploy/README.md
@@ -1,11 +1,11 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-user-controller:dev -f Dockerfile .
+sealos build -t docker.io/labring/sealos-user-controller:latest -f Dockerfile .
```
### How to run
```shell
-sealos run docker.io/labring/sealos-user-controller:dev
+sealos run docker.io/labring/sealos-user-controller:latest
```
diff --git a/controllers/user/deploy/manifests/deploy.yaml.tmpl b/controllers/user/deploy/manifests/deploy.yaml.tmpl
index d1c5599eee3..4f18a350a3d 100644
--- a/controllers/user/deploy/manifests/deploy.yaml.tmpl
+++ b/controllers/user/deploy/manifests/deploy.yaml.tmpl
@@ -341,7 +341,7 @@ spec:
value: {{ .cloudDomain }}
- name: SEALOS_CLOUD_PORT
value: "{{ .cloudPort }}"
- image: ghcr.io/labring/sealos-user-controller:dev
+ image: ghcr.io/labring/sealos-user-controller:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
diff --git a/deploy/cloud-deprecated/README.md b/deploy/cloud-deprecated/README.md
index 96b8d643140..e77ec3037f2 100644
--- a/deploy/cloud-deprecated/README.md
+++ b/deploy/cloud-deprecated/README.md
@@ -17,7 +17,7 @@ metadata:
name: secret
spec:
path: manifests/tls-secret.yaml
- match: ghcr.io/labring/sealos-cloud:dev
+ match: ghcr.io/labring/sealos-cloud:latest
strategy: merge
data: |
data:
@@ -27,5 +27,5 @@ spec:
### run sealos cloud cluster image
```shell
-sealos run ghcr.io/labring/sealos-cloud:dev --config-file tls-secret.yaml --env cloudDomain="cloud.example.com"
+sealos run ghcr.io/labring/sealos-cloud:latest --config-file tls-secret.yaml --env cloudDomain="cloud.example.com"
```
diff --git a/deploy/cloud/README.md b/deploy/cloud/README.md
index 74e35265ad1..c7a7a8e9d03 100644
--- a/deploy/cloud/README.md
+++ b/deploy/cloud/README.md
@@ -80,7 +80,7 @@ metadata:
name: secret
spec:
path: manifests/tls-secret.yaml
- match: docker.io/labring/sealos-cloud:dev
+ match: docker.io/labring/sealos-cloud:latest
strategy: merge
data: |
data:
@@ -91,5 +91,5 @@ spec:
------
## run sealos cloud cluster image
```shell
-sealos run docker.io/labring/sealos-cloud:dev --env cloudDomain="cloud.example.com" --config-file tls-secret.yaml
+sealos run docker.io/labring/sealos-cloud:latest --env cloudDomain="cloud.example.com" --config-file tls-secret.yaml
```
diff --git a/frontend/desktop/deploy/README.md b/frontend/desktop/deploy/README.md
index f714da6ab89..21f386f4726 100644
--- a/frontend/desktop/deploy/README.md
+++ b/frontend/desktop/deploy/README.md
@@ -1,7 +1,7 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-cloud-desktop:dev -f Kubefile .
+sealos build -t docker.io/labring/sealos-cloud-desktop:latest -f Kubefile .
```
### Env
@@ -30,7 +30,7 @@ metadata:
name: secret
spec:
path: manifests/secret.yaml
- match: docker.io/labring/sealos-cloud-desktop:dev
+ match: docker.io/labring/sealos-cloud-desktop:latest
strategy: merge
data: |
data:
@@ -48,6 +48,6 @@ sealos run \
--env cloudDomain="cloud.sealos.io" \
--env wildcardCertSecretName="wildcard-cert" \
--env passwordEnabled="true" \
- docker.io/labring/sealos-cloud-desktop:dev \
+ docker.io/labring/sealos-cloud-desktop:latest \
--config-file desktop-config.yaml
```
diff --git a/frontend/desktop/deploy/manifests/deploy.yaml.tmpl b/frontend/desktop/deploy/manifests/deploy.yaml.tmpl
index cfb4bba3467..95e73b1ebaf 100644
--- a/frontend/desktop/deploy/manifests/deploy.yaml.tmpl
+++ b/frontend/desktop/deploy/manifests/deploy.yaml.tmpl
@@ -155,7 +155,7 @@ spec:
capabilities:
drop:
- "ALL"
- image: ghcr.io/labring/sealos-desktop-frontend:dev
+ image: ghcr.io/labring/sealos-desktop-frontend:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- name: desktop-frontend-volume
@@ -171,4 +171,4 @@ spec:
volumes:
- name: desktop-frontend-volume
configMap:
- name: desktop-frontend-config
\ No newline at end of file
+ name: desktop-frontend-config
diff --git a/frontend/providers/adminer/deploy/manifests/deploy.yaml b/frontend/providers/adminer/deploy/manifests/deploy.yaml
index 6ed528b1959..951212c89f5 100644
--- a/frontend/providers/adminer/deploy/manifests/deploy.yaml
+++ b/frontend/providers/adminer/deploy/manifests/deploy.yaml
@@ -50,7 +50,7 @@ spec:
drop:
- "ALL"
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-adminer-frontend:dev
+ image: ghcr.io/labring/sealos-adminer-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: adminer-frontend-volume
@@ -75,4 +75,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: adminer-frontend
\ No newline at end of file
+ app: adminer-frontend
diff --git a/frontend/providers/applaunchpad/deploy/manifests/deploy.yaml.tmpl b/frontend/providers/applaunchpad/deploy/manifests/deploy.yaml.tmpl
index 9d68ef9dc2b..dd378e4ff85 100644
--- a/frontend/providers/applaunchpad/deploy/manifests/deploy.yaml.tmpl
+++ b/frontend/providers/applaunchpad/deploy/manifests/deploy.yaml.tmpl
@@ -57,7 +57,7 @@ spec:
cpu: 10m
memory: 128Mi
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-applaunchpad-frontend:dev
+ image: ghcr.io/labring/sealos-applaunchpad-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: applaunchpad-frontend-volume
@@ -82,4 +82,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: applaunchpad-frontend
\ No newline at end of file
+ app: applaunchpad-frontend
diff --git a/frontend/providers/bytebase/deploy/manifests/deploy.yaml b/frontend/providers/bytebase/deploy/manifests/deploy.yaml
index baaef4838dc..b4d962d9fd7 100644
--- a/frontend/providers/bytebase/deploy/manifests/deploy.yaml
+++ b/frontend/providers/bytebase/deploy/manifests/deploy.yaml
@@ -50,7 +50,7 @@ spec:
drop:
- "ALL"
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-bytebase-frontend:dev
+ image: ghcr.io/labring/sealos-bytebase-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: bytebase-frontend-volume
@@ -75,4 +75,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: bytebase-frontend
\ No newline at end of file
+ app: bytebase-frontend
diff --git a/frontend/providers/costcenter/deploy/manifests/deploy.yaml.tmpl b/frontend/providers/costcenter/deploy/manifests/deploy.yaml.tmpl
index 7c9077be1ec..a0b35cbf4d8 100644
--- a/frontend/providers/costcenter/deploy/manifests/deploy.yaml.tmpl
+++ b/frontend/providers/costcenter/deploy/manifests/deploy.yaml.tmpl
@@ -55,7 +55,7 @@ spec:
drop:
- "ALL"
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-costcenter-frontend:dev
+ image: ghcr.io/labring/sealos-costcenter-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: costcenter-frontend-volume
@@ -80,4 +80,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: costcenter-frontend
\ No newline at end of file
+ app: costcenter-frontend
diff --git a/frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl b/frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl
index d252cb25a7f..d0153f7fd5e 100644
--- a/frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl
+++ b/frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl
@@ -55,7 +55,7 @@ spec:
cpu: 10m
memory: 128Mi
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-dbprovider-frontend:dev
+ image: ghcr.io/labring/sealos-dbprovider-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: dbprovider-frontend-volume
diff --git a/frontend/providers/imagehub/deploy/manifests/deploy.yaml b/frontend/providers/imagehub/deploy/manifests/deploy.yaml
index 43af0377405..e2359bcfe97 100644
--- a/frontend/providers/imagehub/deploy/manifests/deploy.yaml
+++ b/frontend/providers/imagehub/deploy/manifests/deploy.yaml
@@ -52,7 +52,7 @@ spec:
drop:
- "ALL"
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-imagehub-frontend:dev
+ image: ghcr.io/labring/sealos-imagehub-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: imagehub-frontend-volume
@@ -77,4 +77,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: imagehub-frontend
\ No newline at end of file
+ app: imagehub-frontend
diff --git a/frontend/providers/terminal/deploy/manifests/deploy.yaml.tmpl b/frontend/providers/terminal/deploy/manifests/deploy.yaml.tmpl
index e9014b77ac1..1fdb72b0904 100644
--- a/frontend/providers/terminal/deploy/manifests/deploy.yaml.tmpl
+++ b/frontend/providers/terminal/deploy/manifests/deploy.yaml.tmpl
@@ -55,7 +55,7 @@ spec:
- name: SITE
value: {{ .cloudDomain }}
# do not modify this image, it is used for CI/CD
- image: ghcr.io/labring/sealos-terminal-frontend:dev
+ image: ghcr.io/labring/sealos-terminal-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: terminal-frontend-volume
@@ -80,4 +80,4 @@ spec:
protocol: TCP
targetPort: 3000
selector:
- app: terminal-frontend
\ No newline at end of file
+ app: terminal-frontend
diff --git a/frontend/static-cdn/Makefile b/frontend/static-cdn/Makefile
index fc5753ee65e..cb9efb48f6a 100644
--- a/frontend/static-cdn/Makefile
+++ b/frontend/static-cdn/Makefile
@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
-# IMG ?= ghcr.io/labring/sealos-desktop-static-cdn:dev
+# IMG ?= ghcr.io/labring/sealos-desktop-static-cdn:latest
IMG ?= fanux/static-cdn:v0.0.1
##@ General
diff --git a/frontend/static-cdn/deploy/manifest.yaml b/frontend/static-cdn/deploy/manifest.yaml
index 272312a2b57..b7834fc3819 100644
--- a/frontend/static-cdn/deploy/manifest.yaml
+++ b/frontend/static-cdn/deploy/manifest.yaml
@@ -55,7 +55,7 @@ spec:
capabilities:
drop:
- "ALL"
- # image: ghcr.io/labring/sealos-desktop-static-cdn:dev
+ # image: ghcr.io/labring/sealos-desktop-static-cdn:latest
image: fanux/static-cdn:v0.0.1
ports:
- containerPort: 8080
@@ -91,4 +91,4 @@ spec:
tls:
- hosts:
- cdn.cloud.sealos.io
- secretName: wildcard-cloud-sealos-io-cert
\ No newline at end of file
+ secretName: wildcard-cloud-sealos-io-cert
diff --git a/service/auth/Makefile b/service/auth/Makefile
index 38e1e60103d..4d49233537c 100644
--- a/service/auth/Makefile
+++ b/service/auth/Makefile
@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-auth-service:dev
+IMG ?= ghcr.io/labring/sealos-auth-service:latest
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
diff --git a/service/auth/deploy/README.md b/service/auth/deploy/README.md
index 673e9a476c7..d42322478e1 100644
--- a/service/auth/deploy/README.md
+++ b/service/auth/deploy/README.md
@@ -1,7 +1,7 @@
### How to build image
```shell
-sealos build -t docker.io/labring/sealos-auth-service:dev -f Kubefile .
+sealos build -t docker.io/labring/sealos-auth-service:latest -f Kubefile .
```
### Env
@@ -23,5 +23,5 @@ sealos run
--env callbackUrl="https://cloud.sealos.io/login/callback"
--env ssoEndpoint="https://login.cloud.sealos.io"
--env casdoorMysqlRootPassword="c2VhbG9zcHdk"
- docker.io/labring/sealos-auth-service:dev
+ docker.io/labring/sealos-auth-service:latest
```
diff --git a/service/auth/deploy/manifests/deploy.yaml b/service/auth/deploy/manifests/deploy.yaml
index f9f34c38d5f..8204f838be7 100644
--- a/service/auth/deploy/manifests/deploy.yaml
+++ b/service/auth/deploy/manifests/deploy.yaml
@@ -274,7 +274,7 @@ spec:
control-plane: service-manager
spec:
containers:
- - image: ghcr.io/labring/sealos-auth-service:dev
+ - image: ghcr.io/labring/sealos-auth-service:latest
imagePullPolicy: Always
livenessProbe:
initialDelaySeconds: 15
diff --git a/service/hub/Makefile b/service/hub/Makefile
index 436533c0339..e7115d252d4 100644
--- a/service/hub/Makefile
+++ b/service/hub/Makefile
@@ -1,4 +1,4 @@
-IMG ?= labring/sealos-hub-service:dev
+IMG ?= labring/sealos-hub-service:latest
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
@@ -52,4 +52,4 @@ docker-build: build
.PHONY: docker-push
docker-push:
- docker push $(IMG)
\ No newline at end of file
+ docker push $(IMG)
diff --git a/service/hub/deploy/manifests/deploy.yaml b/service/hub/deploy/manifests/deploy.yaml
index 45ef6b5570b..d9526240f41 100644
--- a/service/hub/deploy/manifests/deploy.yaml
+++ b/service/hub/deploy/manifests/deploy.yaml
@@ -156,7 +156,7 @@ spec:
serviceAccountName: hub-service-anonymous
containers:
- name: hub-service-server
- image: lingdie/sealos-hub-service:dev
+ image: lingdie/sealos-hub-service:latest
ports:
- containerPort: 5001
args:
@@ -188,4 +188,4 @@ spec:
protocol: TCP
targetPort: 5001
selector:
- app: hub-service
\ No newline at end of file
+ app: hub-service
diff --git a/service/payment/Makefile b/service/payment/Makefile
index 6d896d9bc62..c659ba251c9 100644
--- a/service/payment/Makefile
+++ b/service/payment/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-payment-service:dev
+IMG ?= ghcr.io/labring/sealos-payment-service:latest
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
diff --git a/webhooks/whitelist/Makefile b/webhooks/whitelist/Makefile
index 9bf9e3acfb8..6e5d61ce970 100644
--- a/webhooks/whitelist/Makefile
+++ b/webhooks/whitelist/Makefile
@@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
-IMG ?= ghcr.io/labring/sealos-whitelist-webhook:dev
+IMG ?= ghcr.io/labring/sealos-whitelist-webhook:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.2
diff --git a/webhooks/whitelist/deploy/manifests/deploy.yaml b/webhooks/whitelist/deploy/manifests/deploy.yaml
index d57610497f0..01398682b70 100644
--- a/webhooks/whitelist/deploy/manifests/deploy.yaml
+++ b/webhooks/whitelist/deploy/manifests/deploy.yaml
@@ -303,7 +303,7 @@ spec:
- --leader-elect
command:
- /manager
- image: ghcr.io/labring/sealos-whitelist-webhook:dev
+ image: ghcr.io/labring/sealos-whitelist-webhook:latest
livenessProbe:
httpGet:
path: /healthz
From 288c4f85895cf6e81b0dc3604e7db3548c3da3af Mon Sep 17 00:00:00 2001
From: yy <56745951+lingdie@users.noreply.github.com>
Date: Mon, 10 Jul 2023 15:36:09 +0800
Subject: [PATCH 3/5] update sealos cloud deploy docs. (#3483)
---
.github/workflows/cloud.yml | 10 +--
controllers/terminal/deploy/Kubefile | 2 +-
controllers/user/deploy/Kubefile | 2 +-
deploy/cloud/Kubefile | 2 +-
deploy/cloud/README.md | 62 ++++++++++++-------
deploy/cloud/etc/sealos/desktop-config.yaml | 2 +-
deploy/cloud/init.sh | 28 ++++-----
deploy/cloud/scripts/init.sh | 2 +-
frontend/desktop/deploy/Kubefile | 2 +-
frontend/desktop/deploy/README.md | 2 +-
.../providers/applaunchpad/deploy/Kubefile | 2 +-
frontend/providers/bytebase/deploy/Kubefile | 2 +-
frontend/providers/costcenter/deploy/Kubefile | 2 +-
frontend/providers/dbprovider/deploy/Kubefile | 2 +-
frontend/providers/imagehub/deploy/Kubefile | 2 +-
frontend/providers/terminal/deploy/Kubefile | 2 +-
service/auth/deploy/Kubefile | 2 +-
17 files changed, 73 insertions(+), 55 deletions(-)
diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml
index b2e97d47421..eb57b64088f 100644
--- a/.github/workflows/cloud.yml
+++ b/.github/workflows/cloud.yml
@@ -16,8 +16,8 @@ on:
required: false
type: string
build_from:
- description: 'Build all-in-one image from components image tag, default is nightly'
- default: 'nightly'
+ description: 'Build all-in-one image from components image tag, default is latest'
+ default: 'latest'
required: false
type: string
push:
@@ -90,9 +90,9 @@ jobs:
- name: Build sealos cloud cluster image
working-directory: deploy/cloud
run: |
- [ -z "${{ inputs.build_from }}" ] && BuildFromTag="nightly" || BuildFromTag="${{ inputs.build_from }}"; echo "BuildFromTag=${BuildFromTag}"
- sed -i "s#nightly#${BuildFromTag}#g" init.sh
- sed -i "s#nightly#${BuildFromTag}#g" etc/sealos/desktop-config.yaml
+ [ -z "${{ inputs.build_from }}" ] && BuildFromTag="latest" || BuildFromTag="${{ inputs.build_from }}"; echo "BuildFromTag=${BuildFromTag}"
+ sed -i "s#latest#${BuildFromTag}#g" init.sh
+ sed -i "s#latest#${BuildFromTag}#g" etc/sealos/desktop-config.yaml
sudo bash init.sh
sudo sealos build -t ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }} -f Kubefile
sudo sealos push ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }}
diff --git a/controllers/terminal/deploy/Kubefile b/controllers/terminal/deploy/Kubefile
index 4d8d3f73041..c10a1450968 100644
--- a/controllers/terminal/deploy/Kubefile
+++ b/controllers/terminal/deploy/Kubefile
@@ -6,7 +6,7 @@ COPY registry registry
COPY manifests manifests
ENV userNamespace="user-system"
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV wildcardCertSecretName="wildcard-cert"
ENV wildcardCertSecretNamespace="sealos-system"
diff --git a/controllers/user/deploy/Kubefile b/controllers/user/deploy/Kubefile
index fd5707c672b..9974de3ef6f 100644
--- a/controllers/user/deploy/Kubefile
+++ b/controllers/user/deploy/Kubefile
@@ -5,7 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.io"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV cloudPort="6443"
CMD ["kubectl apply -f manifests/deploy.yaml","kubectl delete -f manifests/rbac.yaml --ignore-not-found=true","kubectl delete crd usergroups.user.sealos.io --ignore-not-found=true","kubectl delete crd usergroupbindings.user.sealos.io --ignore-not-found=true"]
diff --git a/deploy/cloud/Kubefile b/deploy/cloud/Kubefile
index 308826cddd4..80e5eca7781 100644
--- a/deploy/cloud/Kubefile
+++ b/deploy/cloud/Kubefile
@@ -4,6 +4,6 @@ COPY etc etc
COPY scripts scripts
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
CMD ["bash scripts/init.sh"]
diff --git a/deploy/cloud/README.md b/deploy/cloud/README.md
index c7a7a8e9d03..993f8e73830 100644
--- a/deploy/cloud/README.md
+++ b/deploy/cloud/README.md
@@ -1,11 +1,15 @@
# Sealos cloud cluster image
--------
## prepare
-1. A cloud domain and dns to your k8s cluster. Suppose your domain name is `cloud.example.io`.
-2. A TLS cert that resolves `cloud.example.io` and `*.cloud.example.io`
+### DNS setup
+A cloud domain and dns to your k8s cluster. Suppose your domain name is `127.0.0.1.nip.io` by using [nip.io](https://nip.io/).
+You need change the ip `127.0.0.1` to your real ip if you need access your cluster from outside or use other dns service.
+### TLS setup
+You need a TLS cert that resolves `127.0.0.1.nip.io` and `*.127.0.0.1.nip.io`.
+
+#### Using acme.sh with alidns
Here is one way to get a TLS cert by using acme.sh with alidns.
1. install [acme.sh](https://github.com/acmesh-official/acme.sh)
@@ -16,7 +20,7 @@ Here is one way to get a TLS cert by using acme.sh with alidns.
export Ali_Key=""
export Ali_Secret=""
- acme.sh --issue --dns dns_ali -d "cloud.example.io" -d "*.cloud.example.io"
+ acme.sh --issue --dns dns_ali -d "127.0.0.1.nip.io" -d "*.127.0.0.1.nip.io"
```
4. base64 encode your cert and key, and save the output which will be used in the next step
@@ -27,23 +31,33 @@ Here is one way to get a TLS cert by using acme.sh with alidns.
Other dns api please read: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
-### kubernetes cluster
+#### Using self-signed cert
+We provide a self-signed cert for you to test by default if you didn't provide a cert. You can replace it with your own cert.
+
+### Kubernetes cluster
+Please read sealos doc to create a kubernetes cluster: https://sealos.io/en/docs/lifecycle-management/quick-start/installation
+
```shell
-sealos gen labring/kubernetes:v1.25.6 \
- labring/helm:v3.8.2 \
- labring/calico:v3.24.1 \
- labring/cert-manager:v1.8.0 \
- labring/openebs:v3.4.0 \
- labring/kubernetes-reflector:v7.0.151 \
- --masters 172.16.236.195 > Clusterfile
+sealos gen labring/kubernetes:v1.25.6\
+ labring/helm:v3.12.0\
+ labring/calico:v3.24.1\
+ labring/cert-manager:v1.8.0\
+ labring/openebs:v3.4.0\
+ labring/kubernetes-reflector:v7.0.151\
+ labring/zot:v1.4.3\
+ labring/kubeblocks:v0.5.3\
+ --env policy=anonymousPolicy\
+ --masters 10.140.0.16 > Clusterfile
sealos apply -f Clusterfile
```
-Note: if you want to change pod cidr, please edit the Clusterfile before run `sealos apply`
+Note: if you want to change pod cidr, please edit the `Clusterfile` before run `sealos apply`
-### ingress-nginx
-create `ingress-nginx-config.yaml` file
+### Ingress-nginx
+We use ingress-nginx to expose our services. You can install ingress-nginx by using sealos:
+
+Create `ingress-nginx-config.yaml` file
```yaml
# ingress-nginx-config.yaml
apiVersion: apps.sealos.io/v1beta1
@@ -63,14 +77,17 @@ spec:
strategy: merge
```
-install ingress-nginx and switch to NodePort mode
+Install ingress-nginx and switch to NodePort mode
+
```shell
sealos run docker.io/labring/ingress-nginx:v1.5.1 --config-file ingress-nginx-config.yaml
```
-### save your cert file to a sealos config file
+### Save your cert file to a sealos config file
+
+You can skip this step if you use the self-signed cert that we provide by default.
-#### please make sure spec.match is the same as the image you want to run and ths registry name such as ghcr.io/docker.io
+Please make sure `spec.match` is the same as the image you want to run and the registry name such as ghcr.io/docker.io can
```yaml
# tls-secret.yaml
@@ -84,12 +101,13 @@ spec:
strategy: merge
data: |
data:
- tls.crt:
- tls.key:
+ tls.crt:
+ tls.key:
```
-------
## run sealos cloud cluster image
```shell
-sealos run docker.io/labring/sealos-cloud:latest --env cloudDomain="cloud.example.com" --config-file tls-secret.yaml
+sealos run docker.io/labring/sealos-cloud:latest\
+ --env cloudDomain="127.0.0.1.nip.io"\
+ --config-file tls-secret.yaml
```
diff --git a/deploy/cloud/etc/sealos/desktop-config.yaml b/deploy/cloud/etc/sealos/desktop-config.yaml
index 6ec039f3458..2bf7c5d3629 100644
--- a/deploy/cloud/etc/sealos/desktop-config.yaml
+++ b/deploy/cloud/etc/sealos/desktop-config.yaml
@@ -5,7 +5,7 @@ metadata:
spec:
path: manifests/secret.yaml
# do not modify this image, it's used by ci.
- match: ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
+ match: ghcr.io/labring/sealos-cloud-desktop-frontend:latest
strategy: merge
data: |
data:
diff --git a/deploy/cloud/init.sh b/deploy/cloud/init.sh
index 07562c6efea..390d65e09ea 100644
--- a/deploy/cloud/init.sh
+++ b/deploy/cloud/init.sh
@@ -1,19 +1,19 @@
#!/bin/bash
mkdir -p tars
-sealos pull ghcr.io/labring/sealos-cloud-user-controller:nightly
-sealos pull ghcr.io/labring/sealos-cloud-terminal-controller:nightly
-sealos pull ghcr.io/labring/sealos-cloud-app-controller:nightly
-sealos pull ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
-sealos pull ghcr.io/labring/sealos-cloud-terminal-frontend:nightly
-sealos pull ghcr.io/labring/sealos-cloud-applaunchpad-frontend:nightly
-sealos pull ghcr.io/labring/sealos-cloud-dbprovider-frontend:nightly
+sealos pull ghcr.io/labring/sealos-cloud-user-controller:latest
+sealos pull ghcr.io/labring/sealos-cloud-terminal-controller:latest
+sealos pull ghcr.io/labring/sealos-cloud-app-controller:latest
+sealos pull ghcr.io/labring/sealos-cloud-desktop-frontend:latest
+sealos pull ghcr.io/labring/sealos-cloud-terminal-frontend:latest
+sealos pull ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest
+sealos pull ghcr.io/labring/sealos-cloud-dbprovider-frontend:latest
-sealos save -o tars/user.tar ghcr.io/labring/sealos-cloud-user-controller:nightly
-sealos save -o tars/terminal.tar ghcr.io/labring/sealos-cloud-terminal-controller:nightly
-sealos save -o tars/app.tar ghcr.io/labring/sealos-cloud-app-controller:nightly
-sealos save -o tars/frontend-desktop.tar ghcr.io/labring/sealos-cloud-desktop-frontend:nightly
-sealos save -o tars/frontend-terminal.tar ghcr.io/labring/sealos-cloud-terminal-frontend:nightly
-sealos save -o tars/frontend-applaunchpad.tar ghcr.io/labring/sealos-cloud-applaunchpad-frontend:nightly
-sealos save -o tars/frontend-dbprovider.tar ghcr.io/labring/sealos-cloud-dbprovider-frontend:nightly
+sealos save -o tars/user.tar ghcr.io/labring/sealos-cloud-user-controller:latest
+sealos save -o tars/terminal.tar ghcr.io/labring/sealos-cloud-terminal-controller:latest
+sealos save -o tars/app.tar ghcr.io/labring/sealos-cloud-app-controller:latest
+sealos save -o tars/frontend-desktop.tar ghcr.io/labring/sealos-cloud-desktop-frontend:latest
+sealos save -o tars/frontend-terminal.tar ghcr.io/labring/sealos-cloud-terminal-frontend:latest
+sealos save -o tars/frontend-applaunchpad.tar ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest
+sealos save -o tars/frontend-dbprovider.tar ghcr.io/labring/sealos-cloud-dbprovider-frontend:latest
diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh
index d00808b34b2..e151e81b2fd 100644
--- a/deploy/cloud/scripts/init.sh
+++ b/deploy/cloud/scripts/init.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-cloudDomain="cloud.io"
+cloudDomain="127.0.0.1.nip.io"
tlsCrtPlaceholder=""
tlsKeyPlaceholder=""
mongodb_uri=""
diff --git a/frontend/desktop/deploy/Kubefile b/frontend/desktop/deploy/Kubefile
index 649079ffe1e..cfb49d9fe15 100644
--- a/frontend/desktop/deploy/Kubefile
+++ b/frontend/desktop/deploy/Kubefile
@@ -4,7 +4,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV certSecretName="wildcard-cert"
ENV passWordEnabled="false"
ENV githubEnabled="false"
diff --git a/frontend/desktop/deploy/README.md b/frontend/desktop/deploy/README.md
index 21f386f4726..3f4712eefbc 100644
--- a/frontend/desktop/deploy/README.md
+++ b/frontend/desktop/deploy/README.md
@@ -45,7 +45,7 @@ spec:
```shell
sealos run \
- --env cloudDomain="cloud.sealos.io" \
+ --env cloudDomain="127.0.0.1.nip.io" \
--env wildcardCertSecretName="wildcard-cert" \
--env passwordEnabled="true" \
docker.io/labring/sealos-cloud-desktop:latest \
diff --git a/frontend/providers/applaunchpad/deploy/Kubefile b/frontend/providers/applaunchpad/deploy/Kubefile
index 561ccc82b9b..3131d3ee1b7 100644
--- a/frontend/providers/applaunchpad/deploy/Kubefile
+++ b/frontend/providers/applaunchpad/deploy/Kubefile
@@ -5,7 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV ingressSecret="wildcard-cert"
CMD ["kubectl apply -f manifests"]
diff --git a/frontend/providers/bytebase/deploy/Kubefile b/frontend/providers/bytebase/deploy/Kubefile
index 2a063a7281e..376e6184351 100644
--- a/frontend/providers/bytebase/deploy/Kubefile
+++ b/frontend/providers/bytebase/deploy/Kubefile
@@ -5,7 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV certSecretName="wildcard-cert"
CMD ["kubectl apply -f manifests"]
diff --git a/frontend/providers/costcenter/deploy/Kubefile b/frontend/providers/costcenter/deploy/Kubefile
index c299e1fec23..bc5a23b2d0d 100644
--- a/frontend/providers/costcenter/deploy/Kubefile
+++ b/frontend/providers/costcenter/deploy/Kubefile
@@ -6,7 +6,7 @@ COPY registry registry
COPY manifests manifests
ENV certSecretName="wildcard-cert"
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV transferEnabled="true"
ENV rechargeEnabled="true"
diff --git a/frontend/providers/dbprovider/deploy/Kubefile b/frontend/providers/dbprovider/deploy/Kubefile
index 2a063a7281e..376e6184351 100644
--- a/frontend/providers/dbprovider/deploy/Kubefile
+++ b/frontend/providers/dbprovider/deploy/Kubefile
@@ -5,7 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV certSecretName="wildcard-cert"
CMD ["kubectl apply -f manifests"]
diff --git a/frontend/providers/imagehub/deploy/Kubefile b/frontend/providers/imagehub/deploy/Kubefile
index 2a063a7281e..376e6184351 100644
--- a/frontend/providers/imagehub/deploy/Kubefile
+++ b/frontend/providers/imagehub/deploy/Kubefile
@@ -5,7 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV certSecretName="wildcard-cert"
CMD ["kubectl apply -f manifests"]
diff --git a/frontend/providers/terminal/deploy/Kubefile b/frontend/providers/terminal/deploy/Kubefile
index ae68f6fb3f4..40d90f39e6f 100644
--- a/frontend/providers/terminal/deploy/Kubefile
+++ b/frontend/providers/terminal/deploy/Kubefile
@@ -6,7 +6,7 @@ COPY registry registry
COPY manifests manifests
ENV certSecretName="wildcard-cert"
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV ttydImage="docker.io/labring/docker-terminal:1.20.4-6"
diff --git a/service/auth/deploy/Kubefile b/service/auth/deploy/Kubefile
index a9f5bac995b..77a0f1e22a0 100644
--- a/service/auth/deploy/Kubefile
+++ b/service/auth/deploy/Kubefile
@@ -5,7 +5,7 @@ COPY registry registry
COPY manifests manifests
COPY scripts scripts
-ENV cloudDomain="cloud.example.com"
+ENV cloudDomain="127.0.0.1.nip.io"
ENV certSecretName="wildcard-cert"
ENV callbackUrl="cloud.example.com/login/callback"
ENV ssoEndpoint="login.cloud.example.com"
From 157090942f20ca9cab226f12444ab385c54c9f92 Mon Sep 17 00:00:00 2001
From: Jiahui <4543bxy@gmail.com>
Date: Mon, 10 Jul 2023 18:03:38 +0800
Subject: [PATCH 4/5] fix account cause error (#3485)
---
.../account/controllers/account_controller.go | 8 ++++--
.../controllers/account_controller_test.go | 25 ++++++++++---------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/controllers/account/controllers/account_controller.go b/controllers/account/controllers/account_controller.go
index d9b09fb8ef7..beb101335ce 100644
--- a/controllers/account/controllers/account_controller.go
+++ b/controllers/account/controllers/account_controller.go
@@ -212,7 +212,10 @@ func (r *AccountReconciler) syncAccount(ctx context.Context, name, accountNamesp
if err := r.syncRoleAndRoleBinding(ctx, name, userNamespace); err != nil {
return nil, fmt.Errorf("sync role and rolebinding failed: %v", err)
}
-
+ err := r.initBalance(&account)
+ if err != nil {
+ return nil, fmt.Errorf("sync init balance failed: %v", err)
+ }
// add account balance when account is new user
stringAmount := os.Getenv(NEWACCOUNTAMOUNTENV)
if stringAmount == "" {
@@ -497,6 +500,7 @@ const (
Threshold3 = 1999 * BaseUnit
Threshold4 = 4999 * BaseUnit
Threshold5 = 19999 * BaseUnit
+ Ratio0 int64 = 0
Ratio1 int64 = 10
Ratio2 int64 = 15
Ratio3 int64 = 20
@@ -508,7 +512,7 @@ func giveGift(amount int64) int64 {
var ratio int64
switch {
case amount < Threshold1:
- return 0
+ ratio = Ratio0
case amount < Threshold2:
ratio = Ratio1
case amount < Threshold3:
diff --git a/controllers/account/controllers/account_controller_test.go b/controllers/account/controllers/account_controller_test.go
index 9d86b3be240..e667b266273 100644
--- a/controllers/account/controllers/account_controller_test.go
+++ b/controllers/account/controllers/account_controller_test.go
@@ -29,18 +29,19 @@ func Test_giveGift(t *testing.T) {
want int64
}{
// [1-298] -> 0%, [299-598] -> 10%, [599-1998] -> 15%, [1999-4998] -> 20%, [4999-19998] -> 25%, [19999+] -> 30%
- {name: "0% less than 299", args: args{amount: 100 * BaseUnit}, want: 0},
- {name: "10% between 299 and 599", args: args{amount: 299 * BaseUnit}, want: 29_900_000},
- {name: "10% between 299 and 599", args: args{amount: 300 * BaseUnit}, want: 30_000_000},
- {name: "15% between 599 and 1999", args: args{amount: 599 * BaseUnit}, want: 89_850_000},
- {name: "15% between 599 and 1999", args: args{amount: 600 * BaseUnit}, want: 90_000_000},
- {name: "20% between 1999 and 4999", args: args{amount: 1999 * BaseUnit}, want: 399_800_000},
- {name: "20% between 1999 and 4999", args: args{amount: 2000 * BaseUnit}, want: 400_000_000},
- {name: "25% between 4999 and 19999", args: args{amount: 4999 * BaseUnit}, want: 1249_750_000},
- {name: "25% between 4999 and 19999", args: args{amount: 5000 * BaseUnit}, want: 1250_000_000},
- {name: "30% more than 19999", args: args{amount: 19999 * BaseUnit}, want: 5999_700_000},
- {name: "30% more than 19999", args: args{amount: 20000 * BaseUnit}, want: 6000_000_000},
- {name: "30% more than 19999", args: args{amount: 99999 * BaseUnit}, want: 29999_700_000},
+ {name: "0% less than 299", args: args{amount: 100 * BaseUnit}, want: 0 + 100*BaseUnit},
+ {name: "10% between 299 and 599", args: args{amount: 299 * BaseUnit}, want: 29_900_000 + 299*BaseUnit},
+ {name: "10% between 299 and 599", args: args{amount: 300 * BaseUnit}, want: 30_000_000 + 300*BaseUnit},
+ {name: "15% between 599 and 1999", args: args{amount: 599 * BaseUnit}, want: 89_850_000 + 599*BaseUnit},
+ {name: "15% between 599 and 1999", args: args{amount: 600 * BaseUnit}, want: 90_000_000 + 600*BaseUnit},
+ {name: "20% between 1999 and 4999", args: args{amount: 1999 * BaseUnit}, want: 399_800_000 + 1999*BaseUnit},
+ {name: "20% between 1999 and 4999", args: args{amount: 2000 * BaseUnit}, want: 400_000_000 + 2000*BaseUnit},
+ {name: "25% between 4999 and 19999", args: args{amount: 4999 * BaseUnit}, want: 1249_750_000 + 4999*BaseUnit},
+ {name: "25% between 4999 and 19999", args: args{amount: 5000 * BaseUnit}, want: 1250_000_000 + 5000*BaseUnit},
+ {name: "30% more than 19999", args: args{amount: 19999 * BaseUnit}, want: 5999_700_000 + 19999*BaseUnit},
+ {name: "30% more than 19999", args: args{amount: 20000 * BaseUnit}, want: 6000_000_000 + 20000*BaseUnit},
+ {name: "30% more than 19999", args: args{amount: 99999 * BaseUnit}, want: 29999_700_000 + 99999*BaseUnit},
+ {"0% less than 299", args{amount: 1 * BaseUnit}, 1 * BaseUnit},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
From 7df69f23cf520b0d171e7223f1fe4f1cb7487750 Mon Sep 17 00:00:00 2001
From: yy <56745951+lingdie@users.noreply.github.com>
Date: Mon, 10 Jul 2023 18:07:24 +0800
Subject: [PATCH 5/5] feat: add latest cluster image and update deploy docs.
(#3484)
* update sealos cloud deploy docs.
* fix tls gen and add latest cluster image.
---
.github/workflows/cloud.yml | 6 ++++
.github/workflows/controllers.yml | 34 ++++++++++++++-----
.github/workflows/frontend.yml | 26 +++++++++++---
deploy/cloud/README.md | 15 ++++----
deploy/cloud/scripts/init.sh | 2 +-
.../terminal/deploy/images/shim/imagelist | 1 -
6 files changed, 62 insertions(+), 22 deletions(-)
delete mode 100644 frontend/providers/terminal/deploy/images/shim/imagelist
diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml
index eb57b64088f..696285b5a71 100644
--- a/.github/workflows/cloud.yml
+++ b/.github/workflows/cloud.yml
@@ -3,6 +3,10 @@ name: Build Cloud Cluster image
on:
release:
types: [ published ]
+ workflow_run:
+ workflows: [ "Build Controllers image", "Build Frontend Image" ]
+ types:
+ - completed
workflow_dispatch:
inputs:
push_image:
@@ -95,7 +99,9 @@ jobs:
sed -i "s#latest#${BuildFromTag}#g" etc/sealos/desktop-config.yaml
sudo bash init.sh
sudo sealos build -t ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }} -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.repo }}:latest -f Kubefile
sudo sealos push ${{ steps.prepare.outputs.repo }}:${{ steps.prepare.outputs.tag_name }}
+ sudo sealos push ${{ steps.prepare.outputs.repo }}:latest
# todo: build multi-arch images
diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml
index bfd744c97d1..78d992e5a06 100644
--- a/.github/workflows/controllers.yml
+++ b/.github/workflows/controllers.yml
@@ -210,10 +210,12 @@ jobs:
- name: Prepare
id: prepare
run: |
- bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}"
+ tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}")
echo old_docker_repo=ghcr.io/labring/sealos-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT
echo new_docker_repo=ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT
echo cluster_repo=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT
+ echo cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller:${tag_name} >> $GITHUB_OUTPUT
+ echo latest_cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller:latest >> $GITHUB_OUTPUT
- name: Download sealos
uses: actions/download-artifact@v3
@@ -240,22 +242,38 @@ jobs:
- name: Build ${{ matrix.module.name }}-controller cluster image
working-directory: controllers/${{ matrix.module.path }}/deploy
run: |
- CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_repo }}:${{ steps.prepare.outputs.tag_name }}
- sudo sealos build -t ${CLUSTER_IMAGE_NAME}-amd64 --platform linux/amd64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-amd64 --platform linux/amd64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-amd64 --platform linux/amd64 -f Kubefile
# delete old registry cache
sudo rm -rf registry
- sudo sealos build -t ${CLUSTER_IMAGE_NAME}-arm64 --platform linux/arm64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-arm64 --platform linux/arm64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-arm64 --platform linux/arm64 -f Kubefile
- name: Manifest Cluster Images
# if push to master, then patch images to ghcr.io
run: |
- CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_repo }}:${{ steps.prepare.outputs.tag_name }}
sudo sealos images
- bash docker/patch/manifest-cluster-images.sh $CLUSTER_IMAGE_NAME
+ bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.cluster_image }}
+ bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.latest_cluster_image }}
env:
OWNER: ${{ github.repository_owner }}
- - name: Renew issue and Sync Images
+ - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.cluster_image }}
+ uses: labring/gh-rebot@v0.0.6
+ if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
+ with:
+ version: v0.0.8-rc1
+ env:
+ GH_TOKEN: "${{ secrets.GH_PAT }}"
+ SEALOS_TYPE: "issue_renew"
+ SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
+ SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
+ SEALOS_ISSUE_LABEL: "dayly-report"
+ SEALOS_ISSUE_TYPE: "day"
+ SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
+ SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.cluster_image }}"
+
+ - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.latest_cluster_image }}
uses: labring/gh-rebot@v0.0.6
if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
with:
@@ -268,4 +286,4 @@ jobs:
SEALOS_ISSUE_LABEL: "dayly-report"
SEALOS_ISSUE_TYPE: "day"
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
- SEALOS_COMMENT_BODY: "/imagesync ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller:${{ steps.prepare.outputs.tag_name }}"
+ SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}"
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 543a2e45440..7d262c178fa 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -164,6 +164,7 @@ jobs:
echo new_docker_image=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend:${tag_name} >> $GITHUB_OUTPUT
echo cluster_repo=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
echo cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend:${tag_name} >> $GITHUB_OUTPUT
+ echo latest_cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend:latest >> $GITHUB_OUTPUT
- name: Download sealos
uses: actions/download-artifact@v3
@@ -185,19 +186,21 @@ jobs:
run: |
sudo sed -i "s;${{ steps.prepare.outputs.old_docker_image }};${{ steps.prepare.outputs.new_docker_image }};" manifests/*
sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-amd64 --platform linux/amd64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-amd64 --platform linux/amd64 -f Kubefile
# delete old registry cache
sudo rm -rf registry
sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-arm64 --platform linux/arm64 -f Kubefile
+ sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-arm64 --platform linux/arm64 -f Kubefile
- name: Manifest Cluster Images
run: |
- CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_image }}
sudo sealos images
- bash docker/patch/manifest-cluster-images.sh $CLUSTER_IMAGE_NAME
+ bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.cluster_image }}
+ bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.latest_cluster_image }}
env:
OWNER: ${{ github.repository_owner }}
- - name: Renew issue and Sync Images
+ - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.cluster_image }}
uses: labring/gh-rebot@v0.0.6
if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
with:
@@ -210,4 +213,19 @@ jobs:
SEALOS_ISSUE_LABEL: "dayly-report"
SEALOS_ISSUE_TYPE: "day"
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
- SEALOS_COMMENT_BODY: "/imagesync ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend:${{ steps.prepare.outputs.tag_name }}"
+ SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.cluster_image }}"
+
+ - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.latest_cluster_image }}
+ uses: labring/gh-rebot@v0.0.6
+ if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
+ with:
+ version: v0.0.8-rc1
+ env:
+ GH_TOKEN: "${{ secrets.GH_PAT }}"
+ SEALOS_TYPE: "issue_renew"
+ SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
+ SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
+ SEALOS_ISSUE_LABEL: "dayly-report"
+ SEALOS_ISSUE_TYPE: "day"
+ SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
+ SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}"
diff --git a/deploy/cloud/README.md b/deploy/cloud/README.md
index 993f8e73830..cea2dd50df2 100644
--- a/deploy/cloud/README.md
+++ b/deploy/cloud/README.md
@@ -22,11 +22,10 @@ Here is one way to get a TLS cert by using acme.sh with alidns.
acme.sh --issue --dns dns_ali -d "127.0.0.1.nip.io" -d "*.127.0.0.1.nip.io"
```
-
4. base64 encode your cert and key, and save the output which will be used in the next step
```shell
- base64 -w 0 ~/.acme.sh/${}/fullchain.cer
- base64 -w 0 ~/.acme.sh/${}/${}.key
+ base64 -w 0 ~/.acme.sh/${}/fullchain.cer
+ base64 -w 0 ~/.acme.sh/${}/${}.key
```
Other dns api please read: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
@@ -34,7 +33,7 @@ Other dns api please read: https://github.com/acmesh-official/acme.sh/wiki/dnsap
#### Using self-signed cert
We provide a self-signed cert for you to test by default if you didn't provide a cert. You can replace it with your own cert.
-### Kubernetes cluster
+### Kubernetes Setup
Please read sealos doc to create a kubernetes cluster: https://sealos.io/en/docs/lifecycle-management/quick-start/installation
```shell
@@ -54,7 +53,7 @@ sealos apply -f Clusterfile
Note: if you want to change pod cidr, please edit the `Clusterfile` before run `sealos apply`
-### Ingress-nginx
+### Ingress-nginx setup
We use ingress-nginx to expose our services. You can install ingress-nginx by using sealos:
Create `ingress-nginx-config.yaml` file
@@ -83,9 +82,10 @@ Install ingress-nginx and switch to NodePort mode
sealos run docker.io/labring/ingress-nginx:v1.5.1 --config-file ingress-nginx-config.yaml
```
-### Save your cert file to a sealos config file
+## run sealos cloud cluster image
-You can skip this step if you use the self-signed cert that we provide by default.
+### Generate TLS config file
+You can skip this step if you use the self-signed cert that we provide by default.
Please make sure `spec.match` is the same as the image you want to run and the registry name such as ghcr.io/docker.io can
@@ -105,7 +105,6 @@ spec:
tls.key:
```
-## run sealos cloud cluster image
```shell
sealos run docker.io/labring/sealos-cloud:latest\
--env cloudDomain="127.0.0.1.nip.io"\
diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh
index e151e81b2fd..5d0dec7eccc 100644
--- a/deploy/cloud/scripts/init.sh
+++ b/deploy/cloud/scripts/init.sh
@@ -19,7 +19,7 @@ function mock_tls {
fi
mkdir -p etc/tls
- openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout etc/tls/tls.key -out etc/tls/tls.crt -subj "/CN=$1" -addext "subjectAltName=DNS:*.$1" > /dev/null
+ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout etc/tls/tls.key -out etc/tls/tls.crt -subj "/CN=$1" -addext "subjectAltName=DNS:$1,DNS:*.$1" >/dev/null 2>&1
sed -i -e "s;$tlsCrtPlaceholder;$(base64 -w 0 etc/tls/tls.crt);" -e "s;$tlsKeyPlaceholder;$(base64 -w 0 etc/tls/tls.key);" manifests/tls-secret.yaml
}
diff --git a/frontend/providers/terminal/deploy/images/shim/imagelist b/frontend/providers/terminal/deploy/images/shim/imagelist
deleted file mode 100644
index faaf53793fd..00000000000
--- a/frontend/providers/terminal/deploy/images/shim/imagelist
+++ /dev/null
@@ -1 +0,0 @@
-docker.io/labring/docker-terminal:1.20.4-6
\ No newline at end of file