Skip to content

Commit

Permalink
fix: failed to install without image_registry
Browse files Browse the repository at this point in the history
Signed-off-by: joyceliu <[email protected]>
  • Loading branch information
joyceliu committed Nov 4, 2024
1 parent b24c279 commit 4c3493f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: golangci-lint
name: GolangciLint

on:
pull_request:
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.22.0

- name: Sync mod
run: make generate-modules
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.22.0

- name: Sync mod
run: make generate-modules
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.22.0

- name: Sync mod
run: make generate-modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: goreleaser
name: GoReleaser

on:
push:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/sync-vendor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: sync-vendor

name: SyncVendor

on:
push:
pull_request:
types:
- closed
paths:
- go.mod
workflow_dispatch:
Expand All @@ -14,15 +15,15 @@ jobs:
vendor:
name: sync vendor
runs-on: self-runner-kubesphere
if: github.repository == 'kubesphere/kubekey'
if: github.repository == 'kubesphere/kubekey' && github.event.pull_request.merged == true
steps:
- name: Checkout code
uses: actions/checkout@v3

- 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
Expand All @@ -37,9 +38,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-pr-${{ github.event.pull_request.number }}"
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 adds the vendor directory generated by go mod vendor.
Related PR: ${{ github.event.pull_request.html_url }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
GO_VERSION ?= 1.22
GO_VERSION ?= 1.22.0
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
GOARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS)
Expand Down
2 changes: 1 addition & 1 deletion builtin/roles/install/cri/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builtin/roles/install/image-registry/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubesphere/kubekey/v4

go 1.22.0
go 1.22.1

require (
github.com/Masterminds/sprig/v3 v3.2.3
Expand Down

0 comments on commit 4c3493f

Please sign in to comment.