diff --git a/console-web/app/(auth)/auth/login/page.tsx b/console-web/app/(auth)/auth/login/page.tsx index b8e1b45..8afae02 100755 --- a/console-web/app/(auth)/auth/login/page.tsx +++ b/console-web/app/(auth)/auth/login/page.tsx @@ -101,8 +101,7 @@ export default function LoginPage() {

{t("Run the following command to generate a token:")}

-                  {`kubectl create token rustfs-operator \\
-  -n rustfs-system \\
+                  {`kubectl -n rustfs-system create token rustfs-operator-console \\
   --duration=24h`}
                 

{t("Paste the token above to sign in.")}

diff --git a/deploy/rustfs-operator/README.md b/deploy/rustfs-operator/README.md index 16adc46..fbcfb83 100755 --- a/deploy/rustfs-operator/README.md +++ b/deploy/rustfs-operator/README.md @@ -362,7 +362,8 @@ kubectl -n rustfs-system create token rustfs-operator-console --duration=24h ``` Paste the printed token into the Console login form. Use the namespace and -ServiceAccount name from your Helm release if they differ from the defaults. +ServiceAccount name from your Helm release if they differ from the defaults; +the Helm install notes print the exact command for the deployed release. ## Verifying the Installation diff --git a/deploy/rustfs-operator/templates/NOTES.txt b/deploy/rustfs-operator/templates/NOTES.txt index b53563e..614126e 100755 --- a/deploy/rustfs-operator/templates/NOTES.txt +++ b/deploy/rustfs-operator/templates/NOTES.txt @@ -32,4 +32,20 @@ To view Tenant resources: kubectl get tenants --all-namespaces +{{ if .Values.console.enabled }} +To log in to the Operator Console, create a short-lived token for the chart-managed Console ServiceAccount: + + kubectl -n {{ include "rustfs-operator.namespace" . }} create token {{ include "rustfs-operator.consoleServiceAccountName" . }} --duration=24h + +{{ if .Values.console.frontend.enabled }} +To open the legacy split Console frontend locally: + + kubectl -n {{ include "rustfs-operator.namespace" . }} port-forward svc/{{ include "rustfs-operator.fullname" . }}-console-frontend 18080:{{ .Values.console.frontend.service.port }} +{{ else }} +To open the Operator Console locally: + + kubectl -n {{ include "rustfs-operator.namespace" . }} port-forward svc/{{ include "rustfs-operator.fullname" . }}-console 19090:{{ .Values.console.service.port }} +{{ end }} + +{{ end }} For more information, visit: {{ .Chart.Home }} diff --git a/docs/operator-user-guide.md b/docs/operator-user-guide.md index caa4b2e..bbf1356 100644 --- a/docs/operator-user-guide.md +++ b/docs/operator-user-guide.md @@ -666,6 +666,8 @@ kubectl -n rustfs-system create token rustfs-operator-console --duration=24h ``` Paste the token into the login form. The Console stores the validated token in an encrypted session cookie. +If your Helm release uses a custom namespace or `console.serviceAccount.name`, +use the command printed in the Helm install notes. For local port-forward testing: diff --git a/docs/operator-user-guide.zh-CN.md b/docs/operator-user-guide.zh-CN.md index f45a1be..279d36e 100644 --- a/docs/operator-user-guide.zh-CN.md +++ b/docs/operator-user-guide.zh-CN.md @@ -668,6 +668,7 @@ kubectl -n rustfs-system create token rustfs-operator-console --duration=24h ``` 将 token 粘贴到 Console 登录页。Console 会把验证后的 token 存入加密 session cookie。 +如果 Helm release 使用了自定义 namespace 或 `console.serviceAccount.name`,请以 Helm 安装提示中输出的命令为准。 本地 port-forward 调试: