Compare commits

...
6 Commits
Author SHA1 Message Date
Andy Lee 270977f884 feat: use prime logo when server-flavor is prime
Signed-off-by: Andy Lee <andy.lee@suse.com>
2026-09-15 16:20:05 +08:00
Andy Lee 50b4cf5248 feat: add rancher k3k addon UI page (#1137)
* feat: add k3k addon UI

Signed-off-by: Andy Lee <andy.lee@suse.com>

* feat: add rancher-k3k addon UI

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: copilot review

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: copilot review

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: remove k3k edit page

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: k3k addon description

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
2026-09-14 15:46:14 +08:00
Siva Kanakala cba37194b6 fix: preserve per-volume storage class when editing image-sourced volumes and fallback to the image StorageClass for new volumes (#1144)
Signed-off-by: Siva Kanakala <siva.kanakala@suse.com>
2026-09-10 13:08:53 +08:00
renovate[bot] bbe0c4643f deps: update dependency qs to v6.16.0 [security] (#1134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-07 13:56:15 +08:00
marcelofukumoto 00584f1d19 chore(deps): bump @rancher/shell to 3.0.13 (#1130)
Clears 26 of the 54 open Dependabot alerts (axios, dompurify, serve-static, and
drops vulnerable send / @tootallnate/once copies).

3.0.13 ships the flat-config ESLint 10 toolchain, so lint now routes through the
@rancher/shell launcher (keeping the legacy .eslintrc on ESLint 7); a prelint step
installs an ESLint-7-compatible eslint-plugin-jest into the isolated toolchain.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
2026-09-04 10:36:52 +02:00
Tim SerongandVolker Theile 4fa6470343 feat: LHv2: graduate from "Experimental" to "Preview" (#1129)
In Harvester v1.9.0, we're moving LHv2 from "Experimental" to "Preview",
so I've added a new preview label to the settings interface.  I figure
given Experimental had the "error" color, I should make "Preview" use
the warning color, to make it a bit less alarming :-)

Related-to: https://github.com/harvester/harvester/issues/9960

Signed-off-by: Tim Serong <tserong@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
2026-09-01 11:30:38 +10:00
15 changed files with 1924 additions and 1390 deletions

No files matched your search

+7 -5
View File
@@ -7,7 +7,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/plugin-transform-class-static-block": "7.29.7", "@babel/plugin-transform-class-static-block": "7.29.7",
"@rancher/shell": "3.0.12-rc.7", "@rancher/shell": "3.0.13",
"@vue-flow/background": "^1.3.0", "@vue-flow/background": "^1.3.0",
"@vue-flow/controls": "^1.1.1", "@vue-flow/controls": "^1.1.1",
"@vue-flow/core": "^1.33.5", "@vue-flow/core": "^1.33.5",
@@ -39,7 +39,7 @@
"merge": "2.1.1", "merge": "2.1.1",
"node-forge": "1.4.0", "node-forge": "1.4.0",
"nth-check": "2.1.1", "nth-check": "2.1.1",
"qs": "6.15.3", "qs": "6.16.0",
"roarr": "7.21.7", "roarr": "7.21.7",
"semver": "7.8.5", "semver": "7.8.5",
"@vue/cli-service/html-webpack-plugin": "^5.0.0" "@vue/cli-service/html-webpack-plugin": "^5.0.0"
@@ -48,15 +48,17 @@
"dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve", "dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve",
"build": "./node_modules/.bin/vue-cli-service build", "build": "./node_modules/.bin/vue-cli-service build",
"clean": "./node_modules/@rancher/shell/scripts/clean", "clean": "./node_modules/@rancher/shell/scripts/clean",
"lint": "./node_modules/.bin/eslint --max-warnings 0 --ext .js,.ts,.vue .", "lint": "./node_modules/@rancher/shell/scripts/lint --max-warnings 0 --ext .js,.ts,.vue .",
"lint:fix": "./node_modules/.bin/eslint --fix --max-warnings 0 --ext .js,.ts,.vue .", "lint:fix": "./node_modules/@rancher/shell/scripts/lint --fix --max-warnings 0 --ext .js,.ts,.vue .",
"build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh", "build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh",
"serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs", "serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
"publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish", "publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
"parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name", "parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name",
"commitlint": "commitlint --edit", "commitlint": "commitlint --edit",
"prepare": "husky", "prepare": "husky",
"agents:generate": "./scripts/generate-agent-and-persona-mds.sh" "agents:generate": "./scripts/generate-agent-and-persona-mds.sh",
"prelint": "npm --prefix node_modules/@rancher/shell/eslint-legacy install eslint-plugin-jest@^24 --no-save --no-audit --no-fund --legacy-peer-deps --loglevel=error",
"prelint:fix": "npm --prefix node_modules/@rancher/shell/eslint-legacy install eslint-plugin-jest@^24 --no-save --no-audit --no-fund --legacy-peer-deps --loglevel=error"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/load": "^19.8.1", "@commitlint/load": "^19.8.1",
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="3326" height="324" data-surface="transparent" viewBox="0 0 3326.24 324.48"><path fill="#30ba78" d="M535.12 100.88c-3.04 2-7.12 2-10.16 0-4.96-3.28-5.44-10.24-1.44-14.24a9.08 9.08 0 0 1 13.04 0c4 4 3.52 10.88-1.44 14.24m14.48-20.16c5.76 24.64-16.32 46.72-40.96 40.96-12.56-2.96-22.48-12.88-25.44-25.44-5.76-24.56 16.32-46.72 40.96-40.96 12.56 2.96 22.48 12.88 25.44 25.36M383.92 213.12c2.8 4.08 5.12 7.92 6.48 11.84.88 2.8 2.08 6.4 4.88 7.92l.48.24c5.04 1.84 17.92 1.52 17.92 1.52h23.76c2 0 19.84 0 19.44-2-2.16-9.52-13.2-11.28-21.6-16.24-7.76-4.64-15.04-9.84-18.4-18.88-1.76-4.64-.72-15.36 2.32-19.28 2.16-2.8 5.36-4.72 8.88-5.44 3.84-.8 7.76-.08 11.6.24 4.72.48 9.36 1.36 14.08 1.92 9.12 1.2 18.24 1.68 27.44 1.44 15.12-.4 30.24-2.8 44.56-7.68 10-3.36 19.84-7.92 28.32-14.24 9.68-7.2 7.12-6.48-2.64-5.52-11.76 1.2-23.6 1.36-35.36.72-10.96-.64-21.84-1.92-31.76-7.04-7.84-4-14.56-8.08-20.72-14.32-.96-.96-1.52-3.68.16-5.44 1.68-1.68 5.12-.72 6.24.16 10.8 9.04 26.96 16.48 43.68 17.28 9.04.48 17.84.64 26.88.24 4.48-.24 11.36-.16 15.84-.24 2.32 0 8.72.64 9.92-1.84.4-.72.32-1.52.32-2.4-1.36-36.16-4-76.96-41.84-94.24-28.24-12.88-70.56-32.88-88.4-41.2-4.16-2-8.96 1.12-8.96 5.76 0 12.08.64 29.44.64 45.2-8.56-8.72-22.96-14.24-34-19.28-12.48-5.76-25.36-10.56-38.48-14.64-26.4-8.16-53.76-13.2-81.2-15.92-31.12-3.12-62.88-1.6-93.52 4.72C130.32 16.96 80.64 41.28 42.96 76.8 19.52 98.56 1.36 129.6.16 161.04c-1.76 44.56 10.72 68.48 33.68 93.12 36.56 39.28 115.28 44.8 147.12-1.84 14.32-20.96 17.44-49.44 7.04-72.56-10.4-23.2-34.32-39.92-59.68-40.8-19.68-.64-40.64 9.36-48.16 27.6-5.76 13.92-2.48 31.04 8 41.84 4.08 4.24 9.6 7.68 15.68 6.32 3.52-.8 6.56-3.44 7.04-7.12.8-5.36-3.84-8.8-6.72-12.88-5.2-7.36-4.16-18.48 2.32-24.72 5.44-5.28 13.6-6.88 21.2-6.88 7.12 0 14.32 1.28 20.48 4.88 8.64 5.04 14.32 14.32 16.32 24.08 5.92 29.28-17.84 53.04-50.08 54.88-16.48.96-33.28-3.36-46.16-13.68-32.56-26.24-40.56-79.84-3.28-108.48 35.36-27.2 80-20.16 106.32-6.08 21.04 11.28 36.8 29.76 48.64 50.24 6 10.24 11.04 21.04 15.76 31.92 4.56 10.48 8.8 21.04 17.84 28.72 6 5.12 13.44 4.88 21.36 4.88h45.04c6.08 0 4.64-4.08 2-6.8-6-6.08-14.56-7.44-22.48-9.68-18.16-4.96-16.32-29.04-11.28-29.04 16.24 0 16.72.48 30.96.32 20.48-.32 26.72-1.44 42.72 4.48 8.56 3.2 16.8 11.52 22.16 19.2"/><path fill="#ffffff" d="M717.92 232.96c48.64 0 81.6-27.84 81.6-70.72 0-80.96-112.64-49.28-112.64-97.92 0-18.88 15.36-31.04 38.72-31.04 17.28 0 30.08 6.72 43.2 19.84l24.96-24.96C778.72 11.2 754.72 0 725.92 0c-47.04 0-78.08 26.56-78.08 68.16 0 77.44 111.68 48.32 111.68 99.84 0 18.88-15.04 31.68-40.32 31.68-18.88 0-34.88-7.36-52.16-24.96l-24.32 24.32c17.28 20.48 41.6 33.92 75.2 33.92m203.2 0c52.48 0 87.04-27.2 87.04-81.92V4.48H968.8v143.36c0 32.64-18.88 48.64-47.68 48.64s-47.36-16-47.36-48.64V4.48H834.4v146.56c0 54.72 33.92 81.92 86.72 81.92m195.2 0c48.64 0 81.6-27.84 81.6-70.72 0-80.96-112.64-49.28-112.64-97.92 0-18.88 15.36-31.04 38.72-31.04 17.28 0 30.08 6.72 43.2 19.84l24.96-24.96C1177.12 11.2 1153.12 0 1124.32 0c-47.04 0-78.08 26.56-78.08 68.16 0 77.44 111.68 48.32 111.68 99.84 0 18.88-15.04 31.68-40.32 31.68-18.88 0-34.88-7.36-52.16-24.96l-24.32 24.32c17.28 20.48 41.6 33.92 75.2 33.92m153.6-4.48h109.12v-35.84h-96c-6.4 0-11.52-5.12-11.52-11.52v-48h100.8V98.88h-100.8V51.84c0-6.4 5.12-11.52 11.52-11.52h96V4.48h-109.12c-21.76 0-37.12 15.68-37.12 37.44v149.12c0 21.76 15.36 37.44 37.12 37.44m293.12 0h29.12l83.52-224h-29.12l-68.8 189.76-69.12-189.76h-28.8zm145.6-187.84h28.8V3.52h-28.8zm1.6 187.84h25.6V74.56h-55.68v22.4h30.08zm73.92 0h25.92v-91.2c0-25.6 14.72-37.76 39.68-37.76h15.04v-25.6h-13.12c-18.88 0-34.88 5.76-42.56 25.28V74.56h-24.96zm163.52 0h23.68V206.4H1948c-9.6 0-17.28-7.36-17.28-17.28V96.96h40.64v-22.4h-40.64V36.48h-25.6v38.08h-27.84v22.4h27.84v90.56c0 29.76 21.44 40.96 42.56 40.96m115.52 3.2c16 0 37.44-6.08 50.24-26.24v23.04h23.04V74.56h-25.6v87.04c0 31.04-19.52 46.4-42.56 46.4-22.4 0-38.72-11.2-38.72-44.16V74.56h-25.92v93.76c0 44.16 25.28 63.36 59.52 63.36m167.36 0c21.44 0 37.44-6.4 46.72-18.56l.32 15.36h23.04c-.64-16.64-.96-33.6-.96-50.56v-49.28c0-38.08-24.32-57.28-60.48-57.28-23.36 0-47.36 8.32-61.12 24l12.16 18.24c12.16-12.8 31.04-18.88 47.68-18.88 22.08 0 36.16 9.92 36.16 35.2v19.2c-9.6-6.72-23.36-10.56-40.32-10.56-34.88 0-61.12 20.16-61.12 47.04 0 27.2 22.72 46.08 57.92 46.08m6.72-19.52c-23.68 0-38.4-11.2-38.4-26.56 0-15.68 14.72-26.24 38.08-26.24 23.68 0 37.44 10.56 37.44 26.24s-13.76 26.56-37.12 26.56m150.08 16.32h16V206.4h-14.72c-9.6 0-16.96-7.04-16.96-16.96V-5.12h-54.08v22.08h28.16v172.16c0 24 16.64 39.36 41.6 39.36m52.48-187.84h28.8V3.52h-28.8zm1.6 187.84h25.6V74.56h-55.68v22.4h30.08zm61.44 0h116.8v-22.72h-86.08l84.8-110.4v-20.8h-114.56V97.6h82.88l-83.84 110.72zm198.4 3.2c21.44 0 37.44-6.4 46.72-18.56l.32 15.36h23.04c-.64-16.64-.96-33.6-.96-50.56v-49.28c0-38.08-24.32-57.28-60.48-57.28-23.36 0-47.36 8.32-61.12 24l12.16 18.24c12.16-12.8 31.04-18.88 47.68-18.88 22.08 0 36.16 9.92 36.16 35.2v19.2c-9.6-6.72-23.36-10.56-40.32-10.56-3Line truncated

After

Width:  |  Height:  |  Size: 5.8 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="3326" height="324" data-surface="transparent" viewBox="0 0 3326.24 324.48"><path fill="#30ba78" d="M535.12 100.88c-3.04 2-7.12 2-10.16 0-4.96-3.28-5.44-10.24-1.44-14.24a9.08 9.08 0 0 1 13.04 0c4 4 3.52 10.88-1.44 14.24m14.48-20.16c5.76 24.64-16.32 46.72-40.96 40.96-12.56-2.96-22.48-12.88-25.44-25.44-5.76-24.56 16.32-46.72 40.96-40.96 12.56 2.96 22.48 12.88 25.44 25.36M383.92 213.12c2.8 4.08 5.12 7.92 6.48 11.84.88 2.8 2.08 6.4 4.88 7.92l.48.24c5.04 1.84 17.92 1.52 17.92 1.52h23.76c2 0 19.84 0 19.44-2-2.16-9.52-13.2-11.28-21.6-16.24-7.76-4.64-15.04-9.84-18.4-18.88-1.76-4.64-.72-15.36 2.32-19.28 2.16-2.8 5.36-4.72 8.88-5.44 3.84-.8 7.76-.08 11.6.24 4.72.48 9.36 1.36 14.08 1.92 9.12 1.2 18.24 1.68 27.44 1.44 15.12-.4 30.24-2.8 44.56-7.68 10-3.36 19.84-7.92 28.32-14.24 9.68-7.2 7.12-6.48-2.64-5.52-11.76 1.2-23.6 1.36-35.36.72-10.96-.64-21.84-1.92-31.76-7.04-7.84-4-14.56-8.08-20.72-14.32-.96-.96-1.52-3.68.16-5.44 1.68-1.68 5.12-.72 6.24.16 10.8 9.04 26.96 16.48 43.68 17.28 9.04.48 17.84.64 26.88.24 4.48-.24 11.36-.16 15.84-.24 2.32 0 8.72.64 9.92-1.84.4-.72.32-1.52.32-2.4-1.36-36.16-4-76.96-41.84-94.24-28.24-12.88-70.56-32.88-88.4-41.2-4.16-2-8.96 1.12-8.96 5.76 0 12.08.64 29.44.64 45.2-8.56-8.72-22.96-14.24-34-19.28-12.48-5.76-25.36-10.56-38.48-14.64-26.4-8.16-53.76-13.2-81.2-15.92-31.12-3.12-62.88-1.6-93.52 4.72C130.32 16.96 80.64 41.28 42.96 76.8 19.52 98.56 1.36 129.6.16 161.04c-1.76 44.56 10.72 68.48 33.68 93.12 36.56 39.28 115.28 44.8 147.12-1.84 14.32-20.96 17.44-49.44 7.04-72.56-10.4-23.2-34.32-39.92-59.68-40.8-19.68-.64-40.64 9.36-48.16 27.6-5.76 13.92-2.48 31.04 8 41.84 4.08 4.24 9.6 7.68 15.68 6.32 3.52-.8 6.56-3.44 7.04-7.12.8-5.36-3.84-8.8-6.72-12.88-5.2-7.36-4.16-18.48 2.32-24.72 5.44-5.28 13.6-6.88 21.2-6.88 7.12 0 14.32 1.28 20.48 4.88 8.64 5.04 14.32 14.32 16.32 24.08 5.92 29.28-17.84 53.04-50.08 54.88-16.48.96-33.28-3.36-46.16-13.68-32.56-26.24-40.56-79.84-3.28-108.48 35.36-27.2 80-20.16 106.32-6.08 21.04 11.28 36.8 29.76 48.64 50.24 6 10.24 11.04 21.04 15.76 31.92 4.56 10.48 8.8 21.04 17.84 28.72 6 5.12 13.44 4.88 21.36 4.88h45.04c6.08 0 4.64-4.08 2-6.8-6-6.08-14.56-7.44-22.48-9.68-18.16-4.96-16.32-29.04-11.28-29.04 16.24 0 16.72.48 30.96.32 20.48-.32 26.72-1.44 42.72 4.48 8.56 3.2 16.8 11.52 22.16 19.2"/><path fill="#0c322c" d="M717.92 232.96c48.64 0 81.6-27.84 81.6-70.72 0-80.96-112.64-49.28-112.64-97.92 0-18.88 15.36-31.04 38.72-31.04 17.28 0 30.08 6.72 43.2 19.84l24.96-24.96C778.72 11.2 754.72 0 725.92 0c-47.04 0-78.08 26.56-78.08 68.16 0 77.44 111.68 48.32 111.68 99.84 0 18.88-15.04 31.68-40.32 31.68-18.88 0-34.88-7.36-52.16-24.96l-24.32 24.32c17.28 20.48 41.6 33.92 75.2 33.92m203.2 0c52.48 0 87.04-27.2 87.04-81.92V4.48H968.8v143.36c0 32.64-18.88 48.64-47.68 48.64s-47.36-16-47.36-48.64V4.48H834.4v146.56c0 54.72 33.92 81.92 86.72 81.92m195.2 0c48.64 0 81.6-27.84 81.6-70.72 0-80.96-112.64-49.28-112.64-97.92 0-18.88 15.36-31.04 38.72-31.04 17.28 0 30.08 6.72 43.2 19.84l24.96-24.96C1177.12 11.2 1153.12 0 1124.32 0c-47.04 0-78.08 26.56-78.08 68.16 0 77.44 111.68 48.32 111.68 99.84 0 18.88-15.04 31.68-40.32 31.68-18.88 0-34.88-7.36-52.16-24.96l-24.32 24.32c17.28 20.48 41.6 33.92 75.2 33.92m153.6-4.48h109.12v-35.84h-96c-6.4 0-11.52-5.12-11.52-11.52v-48h100.8V98.88h-100.8V51.84c0-6.4 5.12-11.52 11.52-11.52h96V4.48h-109.12c-21.76 0-37.12 15.68-37.12 37.44v149.12c0 21.76 15.36 37.44 37.12 37.44m293.12 0h29.12l83.52-224h-29.12l-68.8 189.76-69.12-189.76h-28.8zm145.6-187.84h28.8V3.52h-28.8zm1.6 187.84h25.6V74.56h-55.68v22.4h30.08zm73.92 0h25.92v-91.2c0-25.6 14.72-37.76 39.68-37.76h15.04v-25.6h-13.12c-18.88 0-34.88 5.76-42.56 25.28V74.56h-24.96zm163.52 0h23.68V206.4H1948c-9.6 0-17.28-7.36-17.28-17.28V96.96h40.64v-22.4h-40.64V36.48h-25.6v38.08h-27.84v22.4h27.84v90.56c0 29.76 21.44 40.96 42.56 40.96m115.52 3.2c16 0 37.44-6.08 50.24-26.24v23.04h23.04V74.56h-25.6v87.04c0 31.04-19.52 46.4-42.56 46.4-22.4 0-38.72-11.2-38.72-44.16V74.56h-25.92v93.76c0 44.16 25.28 63.36 59.52 63.36m167.36 0c21.44 0 37.44-6.4 46.72-18.56l.32 15.36h23.04c-.64-16.64-.96-33.6-.96-50.56v-49.28c0-38.08-24.32-57.28-60.48-57.28-23.36 0-47.36 8.32-61.12 24l12.16 18.24c12.16-12.8 31.04-18.88 47.68-18.88 22.08 0 36.16 9.92 36.16 35.2v19.2c-9.6-6.72-23.36-10.56-40.32-10.56-34.88 0-61.12 20.16-61.12 47.04 0 27.2 22.72 46.08 57.92 46.08m6.72-19.52c-23.68 0-38.4-11.2-38.4-26.56 0-15.68 14.72-26.24 38.08-26.24 23.68 0 37.44 10.56 37.44 26.24s-13.76 26.56-37.12 26.56m150.08 16.32h16V206.4h-14.72c-9.6 0-16.96-7.04-16.96-16.96V-5.12h-54.08v22.08h28.16v172.16c0 24 16.64 39.36 41.6 39.36m52.48-187.84h28.8V3.52h-28.8zm1.6 187.84h25.6V74.56h-55.68v22.4h30.08zm61.44 0h116.8v-22.72h-86.08l84.8-110.4v-20.8h-114.56V97.6h82.88l-83.84 110.72zm198.4 3.2c21.44 0 37.44-6.4 46.72-18.56l.32 15.36h23.04c-.64-16.64-.96-33.6-.96-50.56v-49.28c0-38.08-24.32-57.28-60.48-57.28-23.36 0-47.36 8.32-61.12 24l12.16 18.24c12.16-12.8 31.04-18.88 47.68-18.88 22.08 0 36.16 9.92 36.16 35.2v19.2c-9.6-6.72-23.36-10.56-40.32-10.56-3Line truncated

After

Width:  |  Height:  |  Size: 5.8 KiB

+20 -14
View File
@@ -53,7 +53,7 @@ export default {
}; };
}, },
computed: { ...mapGetters({ t: 'i18n/t' }) }, computed: { ...mapGetters({ t: 'i18n/t', isHarvesterPrime: 'harvester-common/isHarvesterPrime' }) },
watch: { watch: {
settings: { settings: {
@@ -231,14 +231,21 @@ export default {
v-if="setting.customized" v-if="setting.customized"
class="modified" class="modified"
> >
Modified {{ t('advancedSettings.tags.modified.label') }}
</span> </span>
<span <span
v-if="setting.experimental" v-if="setting.experimental"
v-clean-tooltip="t('advancedSettings.experimental')" v-clean-tooltip="t('advancedSettings.tags.experimental.description')"
class="experimental" class="experimental"
> >
Experimental {{ t('advancedSettings.tags.experimental.label') }}
</span>
<span
v-if="setting.preview"
v-clean-tooltip="t('advancedSettings.tags.preview.description')"
class="preview"
>
{{ t('advancedSettings.tags.preview.label') }}
</span> </span>
</h1> </h1>
<h2 v-clean-html="t(setting.description, getDocLinkParams(setting) || {}, true)"> <h2 v-clean-html="t(setting.description, getDocLinkParams(setting) || {}, true)">
@@ -262,7 +269,8 @@ export default {
v-if="!setting.hide" v-if="!setting.hide"
class="settings-value" class="settings-value"
> >
<pre v-if="setting.kind === 'json'">{{ setting.json }}</pre> <pre v-if="setting.id === 'branding' && isHarvesterPrime">{{ $store.getters['harvester-common/privateLabel'] }}</pre>
<pre v-else-if="setting.kind === 'json'">{{ setting.json }}</pre>
<pre v-else-if="setting.kind === 'multiline'">{{ setting.data.value || setting.data.default }}</pre> <pre v-else-if="setting.kind === 'multiline'">{{ setting.data.value || setting.data.default }}</pre>
<pre v-else-if="setting.kind === 'enum'">{{ t(setting.enum) }}</pre> <pre v-else-if="setting.kind === 'enum'">{{ t(setting.enum) }}</pre>
<pre v-else-if="setting.kind === 'custom' && setting.custom">{{ setting.custom }}</pre> <pre v-else-if="setting.kind === 'custom' && setting.custom">{{ setting.custom }}</pre>
@@ -352,21 +360,19 @@ export default {
flex: 1; flex: 1;
} }
.modified { .modified,
.experimental,
.preview {
margin-left: 10px; margin-left: 10px;
border: 1px solid var(--primary); border: 1px solid;
border-radius: 5px; border-radius: 5px;
padding: 2px 10px; padding: 2px 10px;
font-size: 12px; font-size: 12px;
} }
.experimental { .modified { border-color: var(--primary); }
margin-left: 10px; .experimental { border-color: var(--error); }
border: 1px solid var(--error); .preview { border-color: var(--warning); }
border-radius: 5px;
padding: 2px 10px;
font-size: 12px;
}
.no-search-match { .no-search-match {
text-align: center; text-align: center;
+20 -3
View File
@@ -57,6 +57,7 @@ import {
} from './table-headers'; } from './table-headers';
import { ADD_ONS } from './harvester-map'; import { ADD_ONS } from './harvester-map';
import { registerAddonSideNav } from '../utils/dynamic-nav'; import { registerAddonSideNav } from '../utils/dynamic-nav';
import { setVendor } from '@shell/config/private-label';
const TEMPLATE = HCI.VM_VERSION; const TEMPLATE = HCI.VM_VERSION;
const MONITORING_GROUP = 'Monitoring & Logging::Monitoring'; const MONITORING_GROUP = 'Monitoring & Logging::Monitoring';
@@ -109,15 +110,31 @@ export function init($plugin, store) {
} }
}; };
store.watch(
(_state, getters) => ({
isHarvesterPrime: !!getters['harvester-common/isHarvesterPrime'],
isDark: getters['prefs/theme'] === 'dark',
privateLabel: getters['harvester-common/privateLabel']
}),
({ isHarvesterPrime, isDark, privateLabel }) => {
const primeLogo = isDark ? require('../assets/images/dark/suse-virtualization.svg') : require('../assets/images/suse-virtualization.svg');
setVendor(privateLabel || '');
const primeLabelKey = privateLabel ? 'harvester.branding.primeLabel' : 'harvester.branding.primeEmptyLabel';
store.dispatch('setIsSingleProduct', { store.dispatch('setIsSingleProduct', {
productName: PRODUCT_NAME, productName: PRODUCT_NAME,
logo: require(`@shell/assets/images/providers/harvester.svg`), logo: isHarvesterPrime ? primeLogo : require(`@shell/assets/images/providers/harvester.svg`),
productNameKey: 'harvester.productLabel', productNameKey: isHarvesterPrime ? primeLabelKey : 'harvester.productLabel',
getVersionInfo: (store) => store.getters[`${ PRODUCT_NAME }/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown', getVersionInfo: (store) => store.getters[`${ PRODUCT_NAME }/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown',
afterLoginRoute: home, afterLoginRoute: home,
logoRoute: home, logoRoute: home,
supportCustomLogo: true supportCustomLogo: !isHarvesterPrime
}); });
},
{ immediate: true }
);
} }
product({ product({
+3 -1
View File
@@ -111,15 +111,17 @@ export const HCI_ALLOWED_SETTINGS = {
[HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: { kind: 'number', featureFlag: 'kubeconfigDefaultTokenTTLMinutesSetting' }, [HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: { kind: 'number', featureFlag: 'kubeconfigDefaultTokenTTLMinutesSetting' },
[HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: {
kind: 'boolean', kind: 'boolean',
experimental: true, preview: true,
featureFlag: 'longhornV2LVMSupport' featureFlag: 'longhornV2LVMSupport'
}, },
[HCI_SETTING.LONGHORN_V2_DATA_ENGINE_HUGEPAGE_ENABLED]: { [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_HUGEPAGE_ENABLED]: {
kind: 'boolean', kind: 'boolean',
preview: true,
featureFlag: 'longhornV2HugepageSettings' featureFlag: 'longhornV2HugepageSettings'
}, },
[HCI_SETTING.LONGHORN_V2_DATA_ENGINE_MEMORY_SIZE]: { [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_MEMORY_SIZE]: {
kind: 'number', kind: 'number',
preview: true,
featureFlag: 'longhornV2HugepageSettings' featureFlag: 'longhornV2HugepageSettings'
}, },
[HCI_SETTING.ADDITIONAL_GUEST_MEMORY_OVERHEAD_RATIO]: { kind: 'string', from: 'import' }, [HCI_SETTING.ADDITIONAL_GUEST_MEMORY_OVERHEAD_RATIO]: { kind: 'string', from: 'import' },
+164
View File
@@ -0,0 +1,164 @@
<script>
import merge from 'lodash/merge';
import jsyaml from 'js-yaml';
import { mapGetters } from 'vuex';
import { Card } from '@components/Card';
import { LabeledInput } from '@components/Form/LabeledInput';
import AsyncButton from '@shell/components/AsyncButton';
import { escapeHtml } from '@shell/utils/string';
const DEFAULT_VALUE = {
rancher: {
hostname: '',
version: '',
bootstrapPassword: '',
},
};
export default {
name: 'HarvesterEnableK3k',
emits: ['close'],
components: {
AsyncButton,
Card,
LabeledInput,
},
props: {
resources: {
type: Array,
required: true
}
},
data() {
const addon = this.resources[0];
let valuesContentJson;
try {
valuesContentJson = merge({}, DEFAULT_VALUE, jsyaml.load(addon.spec.valuesContent));
} catch (e) {
valuesContentJson = merge({}, DEFAULT_VALUE);
}
return { valuesContentJson };
},
computed: {
...mapGetters({ t: 'i18n/t' }),
buttonDisabled() {
const { rancher } = this.valuesContentJson;
return !(rancher?.hostname || '').trim() || !(rancher?.version || '').trim() || !(rancher?.bootstrapPassword || '').trim();
}
},
methods: {
close() {
this.$emit('close');
},
async enable(buttonCb) {
const addon = this.resources[0];
try {
addon.spec.valuesContent = jsyaml.dump(this.valuesContentJson);
addon.spec.enabled = true;
await addon.save();
buttonCb(true);
this.close();
} catch (err) {
addon.spec.enabled = false;
this.$store.dispatch('growl/fromError', {
title: this.t('generic.notification.title.error', { name: escapeHtml(addon.metadata.name) }),
err,
}, { root: true });
buttonCb(false);
}
}
}
};
</script>
<template>
<Card :show-highlight-border="false">
<template #title>
<h4
v-clean-html="t('harvester.addons.rancherK3k.enable.title')"
class="text-default-text"
/>
</template>
<template #body>
<div class="body">
<div class="row mb-15">
<div class="col span-6">
<LabeledInput
v-model:value="valuesContentJson.rancher.hostname"
:required="true"
:label="t('harvester.addons.rancherK3k.hostname')"
placeholder="rancher.$vip.nip.io"
/>
</div>
<div class="col span-6">
<LabeledInput
v-model:value="valuesContentJson.rancher.version"
:required="true"
:label="t('harvester.addons.rancherK3k.version')"
placeholder="v1.14.0"
/>
</div>
</div>
<div class="row mb-15">
<div class="col span-12">
<LabeledInput
v-model:value="valuesContentJson.rancher.bootstrapPassword"
:required="true"
type="password"
:label="t('harvester.addons.rancherK3k.password')"
:tooltip="t('harvester.addons.rancherK3k.passwordTooltip')"
/>
</div>
</div>
</div>
</template>
<template #actions>
<div class="buttons actions">
<button
class="btn role-secondary mr-10"
@click="close"
>
{{ t('generic.cancel') }}
</button>
<AsyncButton
mode="enable"
:disabled="buttonDisabled"
@click="enable"
/>
</div>
</template>
</Card>
</template>
<style lang="scss" scoped>
.body {
display: flex;
flex-direction: column;
min-width: 400px;
}
.actions {
width: 100%;
}
.buttons {
display: flex;
justify-content: flex-end;
width: 100%;
}
</style>
@@ -0,0 +1,167 @@
<script>
import merge from 'lodash/merge';
import jsyaml from 'js-yaml';
import { LabeledInput } from '@components/Form/LabeledInput';
import { RadioGroup } from '@components/Form/Radio';
const DEFAULT_VALUE = {
certManagerVersion: 'v1.20.2',
rancher: {
hostname: '',
version: '',
bootstrapPassword: '',
},
k3kCluster: {
servers: 1,
version: 'v1.35.4-k3s1',
storageClassName: 'harvester-longhorn',
},
};
export default {
name: 'EditAddonRancherK3k',
components: { LabeledInput, RadioGroup },
inheritAttrs: false,
props: {
value: {
type: Object,
required: true,
},
mode: {
type: String,
required: true
},
registerBeforeHook: {
type: Function,
required: true,
},
},
data() {
let valuesContentJson = {};
try {
valuesContentJson = merge({}, DEFAULT_VALUE, jsyaml.load(this.value.spec.valuesContent));
} catch (err) {
valuesContentJson = merge({}, DEFAULT_VALUE);
this.$store.dispatch('growl/fromError', {
title: this.$store.getters['i18n/t']('generic.notification.title.error'),
err: err.data || err,
}, { root: true });
}
return { valuesContentJson };
},
created() {
if (this.registerBeforeHook) {
this.registerBeforeHook(this.willSave, 'willSave');
}
},
methods: {
willSave() {
const errors = [];
if (!this.value.spec.enabled) {
return Promise.resolve();
}
if (!this.valuesContentJson.rancher.hostname) {
errors.push(this.t('validation.required', { key: this.t('harvester.addons.rancherK3k.hostname') }, true));
}
if (!this.valuesContentJson.rancher.version) {
errors.push(this.t('validation.required', { key: this.t('harvester.addons.rancherK3k.version') }, true));
}
if (!this.valuesContentJson.rancher.bootstrapPassword) {
errors.push(this.t('validation.required', { key: this.t('harvester.addons.rancherK3k.password') }, true));
}
if (errors.length > 0) {
return Promise.reject(errors);
} else {
return Promise.resolve();
}
},
},
watch: {
valuesContentJson: {
handler(neu) {
this.value.spec['valuesContent'] = jsyaml.dump(neu);
},
deep: true,
immediate: true
},
},
};
</script>
<template>
<div>
<div class="row">
<div class="col span-12">
<RadioGroup
v-model:value="value.spec.enabled"
class="mb-20"
name="model"
:mode="mode"
:options="[true,false]"
:labels="[t('generic.enabled'), t('generic.disabled')]"
/>
</div>
</div>
<template v-if="value.spec.enabled">
<div class="row mb-20">
<div class="col span-6">
<LabeledInput
v-model:value="valuesContentJson.rancher.hostname"
label-key="harvester.addons.rancherK3k.hostname"
:required="true"
:mode="mode"
placeholder="rancher.$vip.nip.io"
/>
</div>
<div class="col span-6">
<LabeledInput
v-model:value="valuesContentJson.rancher.version"
label-key="harvester.addons.rancherK3k.version"
:required="true"
:mode="mode"
placeholder="v1.14.0"
/>
</div>
</div>
<div class="row mt-20">
<div class="col span-6">
<LabeledInput
v-model:value="valuesContentJson.rancher.bootstrapPassword"
label-key="harvester.addons.rancherK3k.password"
:mode="mode"
:required="true"
type="password"
:tooltip="t('harvester.addons.rancherK3k.passwordTooltip')"
/>
</div>
</div>
</template>
</div>
</template>
<style lang="scss" scoped>
:deep() .radio-group {
display: flex;
.radio-container {
margin-right: 30px;
}
}
</style>
+21 -1
View File
@@ -84,6 +84,8 @@ dialog:
harvester: harvester:
branding: branding:
primeLabel: '{vendor}'
primeEmptyLabel: ''
logos: logos:
tip: 'Upload a logo to replace the Harvester logo in the top-level navigation header. Image height should be 21 pixels with a max width of 200 pixels. Max file size is 20KB. Accepted formats: JPEG, PNG, SVG.' tip: 'Upload a logo to replace the Harvester logo in the top-level navigation header. Image height should be 21 pixels with a max width of 200 pixels. Max file size is 20KB. Accepted formats: JPEG, PNG, SVG.'
favicon: favicon:
@@ -1832,6 +1834,8 @@ harvester:
'rancher-logging': rancher-logging is an add-on to collect versatile logs, events, and audits from the Harvester cluster and route them to many kinds of servers based on flows. 'rancher-logging': rancher-logging is an add-on to collect versatile logs, events, and audits from the Harvester cluster and route them to many kinds of servers based on flows.
'rancher-monitoring': rancher-monitoring is an add-on to collect Harvester cluster and virtual machine metrics, view them on the embedded dashboard, and send alert(s) to remote servers. 'rancher-monitoring': rancher-monitoring is an add-on to collect Harvester cluster and virtual machine metrics, view them on the embedded dashboard, and send alert(s) to remote servers.
'rancher-vcluster': rancher-vcluster deploys a virtual cluster (vcluster) with Rancher installed. 'rancher-vcluster': rancher-vcluster deploys a virtual cluster (vcluster) with Rancher installed.
'k3k': k3k is an add-on to deploy the k3k controller.
'rancher-k3k': rancher-k3k deploys a k3k virtual cluster with Rancher installed.
'harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations. 'harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
'harvester-system/harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations. 'harvester-system/harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
'harvester-csi-driver-lvm': harvester-csi-driver-lvm is an add-on allowing users to create PVC through the LVM with local devices. 'harvester-csi-driver-lvm': harvester-csi-driver-lvm is an add-on allowing users to create PVC through the LVM with local devices.
@@ -2136,6 +2140,14 @@ harvester:
hostname: Hostname hostname: Hostname
rancherVersion: Rancher Version rancherVersion: Rancher Version
password: Bootstrap Password password: Bootstrap Password
rancherK3k:
accessRancher: Access the Rancher Dashboard
hostname: Hostname
version: Rancher Version
password: Bootstrap Password
passwordTooltip: The initial password in Rancher for the first time login.
enable:
title: Enable K3k
switchFailed: "{action} {name} failed!" switchFailed: "{action} {name} failed!"
nvidiaDriverToolkit: nvidiaDriverToolkit:
titles: titles:
@@ -2417,7 +2429,15 @@ typeDescription:
harvester: "Branding allows administrators to globally re-brand the UI by customizing the Harvester product name, logos and color scheme." harvester: "Branding allows administrators to globally re-brand the UI by customizing the Harvester product name, logos and color scheme."
advancedSettings: advancedSettings:
experimental: 'Experimental features allow users to test and evaluate early-access functionality prior to official supported releases' tags:
modified:
label: Modified
experimental:
label: Experimental
description: 'Experimental: The feature is incomplete but its essential functionality is operational. The feature is not recommended for use in production environments.'
preview:
label: Technical Preview
description: 'Technical Preview: The feature is almost complete and its functionality is not expected to change significantly. Explore the feature extensively before using in production environments.'
descriptions: descriptions:
'harv-vlan': Default Network Interface name of the VLAN network. 'harv-vlan': Default Network Interface name of the VLAN network.
'harv-backup-target': Custom backup target to store virtual machine backups. 'harv-backup-target': Custom backup target to store virtual machine backups.
+1 -1
View File
@@ -72,7 +72,7 @@ export default {
/> />
<a <a
v-if="scope.row.metadata.name === 'rancher-vcluster' && scope.row.spec.enabled" v-if="['rancher-vcluster', 'rancher-k3k'].includes(scope.row.metadata.name) && scope.row.spec.enabled"
v-tooltip="t('harvester.addons.rancherVcluster.accessRancher')" v-tooltip="t('harvester.addons.rancherVcluster.accessRancher')"
class="ml-5" class="ml-5"
rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer"
+2 -1
View File
@@ -1317,8 +1317,9 @@ export default {
case SOURCE_TYPE.IMAGE: { case SOURCE_TYPE.IMAGE: {
const image = this.images.find( (I) => R.image === I.id); const image = this.images.find( (I) => R.image === I.id);
out.spec.storageClassName = R.realName ? R.storageClassName : (R.storageClassName || image?.storageClassName);
if (image) { if (image) {
out.spec.storageClassName = image.storageClassName;
out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: image.id }; out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: image.id };
} else { } else {
out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: '' }; out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: '' };
+18 -6
View File
@@ -5,12 +5,14 @@ import HarvesterResource from './harvester';
import { HCI } from '../types'; import { HCI } from '../types';
const HARVESTER_NVIDIA_DRIVER_TOOLKIT = 'harvester-system/nvidia-driver-toolkit'; const HARVESTER_NVIDIA_DRIVER_TOOLKIT = 'harvester-system/nvidia-driver-toolkit';
const RANCHER_VCLUSTER = 'harvester-system/rancher-vcluster';
const RANCHER_K3K_ADDON = 'rancher-k3k/rancher-k3k';
export default class HciAddonConfig extends HarvesterResource { export default class HciAddonConfig extends HarvesterResource {
get availableActions() { get availableActions() {
const out = super._availableActions; const out = super._availableActions;
if (this.id === 'harvester-system/rancher-vcluster') { if (this.id === RANCHER_VCLUSTER || this.id === RANCHER_K3K_ADDON) {
const rancherDashboard = { const rancherDashboard = {
action: 'goToRancher', action: 'goToRancher',
enabled: this.spec.enabled, enabled: this.spec.enabled,
@@ -57,6 +59,15 @@ export default class HciAddonConfig extends HarvesterResource {
return; return;
} }
if (!this.spec.enabled && this.id === RANCHER_K3K_ADDON) {
this.$dispatch('promptModal', {
resources: [this],
component: 'HarvesterEnableK3k',
});
return;
}
this.spec.enabled = !this.spec.enabled; this.spec.enabled = !this.spec.enabled;
await this.save(); await this.save();
} catch (err) { } catch (err) {
@@ -69,18 +80,19 @@ export default class HciAddonConfig extends HarvesterResource {
} }
goToRancher() { goToRancher() {
const valuesContent = jsyaml.load(this.spec.valuesContent);
window.open( window.open(
`https://${ valuesContent.hostname }`, this.rancherHostname,
'_blank', '_blank',
); );
} }
get rancherHostname() { get rancherHostname() {
const valuesContent = jsyaml.load(this.spec.valuesContent); const valuesContent = jsyaml.load(this.spec.valuesContent) || {};
return `https://${ valuesContent.hostname }`; // rancher-k3k nests the hostname under `rancher`, rancher-vcluster keeps it at the top level
const hostname = this.id === RANCHER_K3K_ADDON ? valuesContent.rancher?.hostname : valuesContent.hostname;
return `https://${ hostname }`;
} }
get stateColor() { get stateColor() {
+14 -2
View File
@@ -63,6 +63,7 @@ export default {
return { return {
vendor: getVendor(), vendor: getVendor(),
uiPLSetting: {}, uiPLSetting: {},
privateLabelDraft: null,
uiLogoDarkSetting: {}, uiLogoDarkSetting: {},
uiLogoDark: '', uiLogoDark: '',
uiLogoLightSetting: {}, uiLogoLightSetting: {},
@@ -81,6 +82,17 @@ export default {
}; };
}, },
computed: { computed: {
isHarvesterPrime() {
return !!this.$store.getters['harvester-common/isHarvesterPrime'];
},
privateLabel: {
get() {
return this.privateLabelDraft ?? (this.isHarvesterPrime ? this.$store.getters['harvester-common/privateLabel'] : this.uiPLSetting.value);
},
set(value) {
this.privateLabelDraft = value;
}
},
mode() { mode() {
const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING); const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING);
@@ -112,7 +124,7 @@ export default {
this.errors.push(e); this.errors.push(e);
}, },
async save(btnCB) { async save(btnCB) {
this.uiPLSetting.value = this.uiPLSetting.value.replaceAll(/[\<>&=#()"]/gm, ''); this.uiPLSetting.value = (this.privateLabel || '').replaceAll(/[\<>&=#()"]/gm, '');
if (this.customizeLogo) { if (this.customizeLogo) {
this.uiLogoLightSetting.value = this.uiLogoLight; this.uiLogoLightSetting.value = this.uiLogoLight;
this.uiLogoDarkSetting.value = this.uiLogoDark; this.uiLogoDarkSetting.value = this.uiLogoDark;
@@ -169,7 +181,7 @@ export default {
<div class="row mb-20"> <div class="row mb-20">
<div class="col span-6"> <div class="col span-6">
<LabeledInput <LabeledInput
v-model:value="uiPLSetting.value" v-model:value="privateLabel"
:label="t('branding.uiPL.label')" :label="t('branding.uiPL.label')"
:mode="mode" :mode="mode"
:maxlength="100" :maxlength="100"
+19
View File
@@ -1,4 +1,6 @@
import Parse from 'url-parse'; import Parse from 'url-parse';
import { MANAGEMENT } from '@shell/config/types';
import { SETTING } from '@shell/config/settings';
import { HCI } from '../types'; import { HCI } from '../types';
import { PRODUCT_NAME } from '../config/harvester'; import { PRODUCT_NAME } from '../config/harvester';
import { featureEnabled, getVersion } from '../utils/feature-flags'; import { featureEnabled, getVersion } from '../utils/feature-flags';
@@ -64,6 +66,23 @@ const mutations = {
}; };
const getters = { const getters = {
isHarvesterPrime: (_state, _getters, _rootState, rootGetters) => {
const setting = rootGetters['harvester/byId']?.(HCI.SETTING, 'server-flavor');
return (setting?.value || setting?.default) === 'prime';
},
privateLabel: (_state, getters, _rootState, rootGetters) => {
const setting = rootGetters['management/byId']?.(MANAGEMENT.SETTING, SETTING.PL);
const value = setting?.value || '';
if (getters.isHarvesterPrime && value === (setting?.default || 'Harvester')) {
return '';
}
return value;
},
getBundleId(state) { getBundleId(state) {
return state.latestBundleId; return state.latestBundleId;
}, },
+1466 -1356
View File
File diff suppressed because it is too large. Load diff