Skip to content

Commit 738c01c

Browse files
yongchuanzhouredscholarzyc
authored
feat: improve web installer node checks and disk configuration (#3162)
* feat(web): expose host blockdevices for web installer storage configuration Signed-off-by: yongchuanzhou <18600490162@163.com> * feat: add inventory host storage module Support configuring host storage items from inventory for disk formatting, LVM volume management, and optional mount settings. Signed-off-by: yongchuanzhou <18600490162@163.com> * feat: add inventory host storage module Support configuring host storage items from inventory for disk formatting, LVM volume management, and optional mount settings. Signed-off-by: yongchuanzhou <18600490162@163.com> * feat: add multipath storage support Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: render storage module templates Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: force cleanup selected storage disks Signed-off-by: yongchuanzhou <18600490162@163.com> * feat: expose gpu info in host check Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: align web installer paths and host groups Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: stabilize web host checks Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: harden storage script quoting Signed-off-by: yongchuanzhou <18600490162@163.com> * Refine web installer host setup Signed-off-by: yongchuanzhou <18600490162@163.com> * Refine host check handling Signed-off-by: yongchuanzhou <18600490162@163.com> * refactor: move storage and multipath logic to roles per review Signed-off-by: redscholar <blacktiledhouse@gmail.com> * feat: support harbor port configuration Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: preserve allocated storage devices Signed-off-by: zyc <zyc@macdeMacBook-Pro-2.local> * fix: load gpu vendor config from scanner path Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: change harbor schema Signed-off-by: redscholar <blacktiledhouse@gmail.com> * fix: normalize harbor registry host Signed-off-by: yongchuanzhou <18600490162@163.com> * fix: use image_registry.http_port and image_registry.https_port Signed-off-by: redscholar <blacktiledhouse@gmail.com> * fix: add retries in when push images Signed-off-by: redscholar <blacktiledhouse@gmail.com> * fix: fix: handle empty http_code and merge harbor registry creation tasks Signed-off-by: redscholar <blacktiledhouse@gmail.com> * fix: use kubernetes.storage_disks instance of storage Signed-off-by: redscholar <blacktiledhouse@gmail.com> --------- Signed-off-by: yongchuanzhou <18600490162@163.com> Signed-off-by: redscholar <blacktiledhouse@gmail.com> Signed-off-by: zyc <zyc@macdeMacBook-Pro-2.local> Co-authored-by: redscholar <blacktiledhouse@gmail.com> Co-authored-by: zyc <zyc@macdeMacBook-Pro-2.local>
1 parent 5cedeae commit 738c01c

83 files changed

Lines changed: 3620 additions & 380 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ generate-goimports: ## Format all import, `goimports` is required.
190190
.PHONY: lint
191191
lint: $(GOLANGCI_LINT) ## Lint the codebase
192192
@$(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
193-
@cd $(TEST_DIR); $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
193+
@if find $(TEST_DIR) -name '*.go' | grep -q .; then \
194+
cd $(TEST_DIR); $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS); \
195+
fi
194196

195197
.PHONY: verify-dockerfiles
196198
verify-dockerfiles:

builtin/core/defaults/config/v1.23.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.24.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.25.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.26.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.27.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.28.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.29.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.30.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

builtin/core/defaults/config/v1.31.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ spec:
3333
# Leave empty to skip installation (assuming an existing registry is available).
3434
type: ""
3535
# auth:
36-
# # Address of the private image registry
36+
# # Address of the private image registry. Format: host:port/project
37+
# # The port (if present) is used as http_port when plain_http=true,
38+
# # or as https_port when plain_http=false.
3739
# registry: "dockerhub.kubekey.local"
40+
# # Use plain HTTP (no TLS). Default is false.
41+
# plain_http: false
42+
# username: admin
43+
# password: Harbor12345
3844
# Specify a VIP for image registry high availability. If set, enables HA.
3945
ha_vip: ""
4046
# ========== Image Registry - High Availability ==========
4147
# keepalived image tag for load balancing when multiple registry nodes exist.
4248
# keepalived_version: 2.3.4
4349
# ========== Image Registry - Harbor ==========
50+
# Image registry port settings. Usually you do not need to set them manually;
51+
# they are derived from image_registry.auth.registry and plain_http.
52+
# http_port: 80
53+
# https_port: 443
4454
# Harbor image tag (only valid if type is harbor).
4555
#harbor_version: v2.10.2
4656
# docker-compose binary

0 commit comments

Comments
 (0)