Skip to content

Commit

Permalink
fix: failed to install without image_registry (#2448)
Browse files Browse the repository at this point in the history
Signed-off-by: joyceliu <[email protected]>
Co-authored-by: joyceliu <[email protected]>
  • Loading branch information
redscholar and joyceliu authored Nov 4, 2024
1 parent a9cd66e commit b80c527
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 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
11 changes: 3 additions & 8 deletions .github/workflows/sync-vendor.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: sync-vendor


on:
push:
paths:
- go.mod
workflow_dispatch:

# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}

jobs:
vendor:
name: sync vendor
Expand All @@ -22,7 +18,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
Expand All @@ -37,9 +33,8 @@ 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 }}"
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` for commit ${{ github.sha }}.
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

0 comments on commit b80c527

Please sign in to comment.