author liujian <54946465+redscholar@users.noreply.github.com> 1730687587 +0800
committer joyceliu <joyceliu@yunify.com> 1730699443 +0800

fix: failed to install without image_registry (#2442)

Signed-off-by: joyceliu <joyceliu@yunify.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
Signed-off-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
liujian 2024-11-04 10:33:07 +08:00 committed by joyceliu
parent 82cc8fd489
commit 6fdb8c2f18
4 changed files with 8 additions and 11 deletions

View File

@ -1,5 +1,4 @@
name: sync-vendor
name: SyncVendor
on:
push:
@ -7,8 +6,6 @@ on:
- go.mod
workflow_dispatch:
# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}
jobs:
vendor:
@ -22,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
go-version: '1.22.0'
- name: Run go mod vendor
run: go mod vendor
@ -37,9 +34,9 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
commit-message: "Add vendor directory"
branch: "add-vendor-${{ github.event.number }}"
branch: "add-vendor-${{ github.sha }}"
delete-branch: true
title: "[ci-bot] Add vendor directory"
body: |
This [PR](https://github.com/kubesphere/kubekey/pull/${{ github.event.number }}) adds the vendor directory generated by go mod vendor.
This [PR](https://github.com/kubesphere/kubekey/pull/${{ github.sha }}) adds the vendor directory generated by go mod vendor.

View File

@ -25,7 +25,7 @@ image_registry:
registry: |
{{- if and .image_registry.ha_vip (ne .image_registry.ha_vip "") }}
{{ .image_registry.ha_vip }}
{{- else }}
{{- else if .groups.image_registry | default list | len | lt 0 }}
{{ index .inventory_hosts (.groups.image_registry | default list | first) "internal_ipv4" }}
{{- end }}
username: admin

View File

@ -5,7 +5,7 @@ image_registry:
registry: |
{{- if and .image_registry.ha_vip (ne .image_registry.ha_vip "") }}
{{ .image_registry.ha_vip }}
{{- else }}
{{- else if .groups.image_registry | default list | len | lt 0 }}
{{ index .inventory_hosts (.groups.image_registry | default list | first) "internal_ipv4" }}
{{- end }}
username: admin

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/kubesphere/kubekey/v4
go 1.22.0
go 1.23.0
require (
github.com/Masterminds/sprig/v3 v3.2.3