Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release-3.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/sync-feature-code.yaml
#	docs/kubernetes-versions.md
#	hack/sync-components.sh
#	version/components.json
  • Loading branch information
pixiake committed Oct 30, 2024
2 parents 5cad5b5 + ee1cf9b commit da475c6
Show file tree
Hide file tree
Showing 384 changed files with 38,165 additions and 90 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,15 @@
"contributions": [
"doc"
]
},
{
"login": "Hiiirad",
"name": "Hirad Rasoolinejad",
"avatar_url": "https://avatars.githubusercontent.com/u/26739670?v=4",
"profile": "https://github.com/Hiiirad",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/gen-repository-iso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
fail-fast: false
matrix:
include:
- name: centos7-rpms
dockerfile: dockerfile.centos7
- name: almalinux-9.0-rpms
dockerfile: dockerfile.almalinux90
- name: debian10-debs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kubernetes-auto-support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Kubernetes-Auto-Support

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/sync-feature-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
sync-feature:
runs-on: ubuntu-latest

steps:
- name: Check if PR has merged
id: check_pr
Expand All @@ -31,29 +30,28 @@ jobs:
if: ${{ steps.check_pr.outputs.pr_merged == 'true' }}
uses: actions/checkout@v3
with:
ref: feature
ref: feature-gitops
path: feature-branch

- name: Remove old feature directory
if: ${{ steps.check_pr.outputs.pr_merged == 'true' }}
run: rm -rf feature

- name: Sync feature branch to master/feature directory
if: ${{ steps.check_pr.outputs.pr_merged == 'true' }}
run: |
mkdir -p feature
rm -rf feature && mkdir -p feature
rm -rf feature-branch/vendor
cp -r feature-branch/* feature/
git config --global user.name 'ks-ci-bot'
git config --global user.email '[email protected]'
git add feature/
git commit -m "Sync feature branch to master/feature directory"
rm -rf feature-branch
- name: Push changes and create PR
if: ${{ steps.check_pr.outputs.pr_merged == 'true' }}
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Sync feature branch to master/feature directory
commit-message: 'Sync feature branch to master/feature directory'
delete-branch: true
branch: sync-feature-to-main
title: [ci-bot] Sync feature branch to master/feature directory
body: This PR syncs the feature branch to the master/feature directory.
sign-commits: true
title: '[ci-bot] Sync feature branch to master/feature directory'
body: |
This PR syncs the feature branch to the master/feature directory.
```release-note
none
```
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Contributions of any kind are welcome! Thanks goes to these wonderful contributo
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xrwang8"><img src="https://avatars.githubusercontent.com/u/68765051?v=4?s=100" width="100px;" alt="Ronald Fletcher"/><br /><sub><b>Ronald Fletcher</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=xrwang8" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/baikjy0215"><img src="https://avatars.githubusercontent.com/u/110450904?v=4?s=100" width="100px;" alt="baikjy0215"/><br /><sub><b>baikjy0215</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=baikjy0215" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/knowmost"><img src="https://avatars.githubusercontent.com/u/167442703?v=4?s=100" width="100px;" alt="knowmost"/><br /><sub><b>knowmost</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=knowmost" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Hiiirad"><img src="https://avatars.githubusercontent.com/u/26739670?v=4?s=100" width="100px;" alt="Hirad Rasoolinejad"/><br /><sub><b>Hirad Rasoolinejad</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=Hiiirad" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xrwang8"><img src="https://avatars.githubusercontent.com/u/68765051?v=4?s=100" width="100px;" alt="Ronald Fletcher"/><br /><sub><b>Ronald Fletcher</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=xrwang8" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/baikjy0215"><img src="https://avatars.githubusercontent.com/u/110450904?v=4?s=100" width="100px;" alt="baikjy0215"/><br /><sub><b>baikjy0215</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=baikjy0215" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/knowmost"><img src="https://avatars.githubusercontent.com/u/167442703?v=4?s=100" width="100px;" alt="knowmost"/><br /><sub><b>knowmost</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=knowmost" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Hiiirad"><img src="https://avatars.githubusercontent.com/u/26739670?v=4?s=100" width="100px;" alt="Hirad Rasoolinejad"/><br /><sub><b>Hirad Rasoolinejad</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=Hiiirad" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ kubectl completion bash >/etc/bash_completion.d/kubectl
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xrwang8"><img src="https://avatars.githubusercontent.com/u/68765051?v=4?s=100" width="100px;" alt="Ronald Fletcher"/><br /><sub><b>Ronald Fletcher</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=xrwang8" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/baikjy0215"><img src="https://avatars.githubusercontent.com/u/110450904?v=4?s=100" width="100px;" alt="baikjy0215"/><br /><sub><b>baikjy0215</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=baikjy0215" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/knowmost"><img src="https://avatars.githubusercontent.com/u/167442703?v=4?s=100" width="100px;" alt="knowmost"/><br /><sub><b>knowmost</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=knowmost" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Hiiirad"><img src="https://avatars.githubusercontent.com/u/26739670?v=4?s=100" width="100px;" alt="Hirad Rasoolinejad"/><br /><sub><b>Hirad Rasoolinejad</b></sub></a><br /><a href="https://github.com/kubesphere/kubekey/commits?author=Hiiirad" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions cmd/kk/cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Normally you don't need to do more extra work to have this feature if you've ins
Example: `# Installing bash completion on Linux
## If bash-completion is not installed on Linux, please install the 'bash-completion' package
## via your distribution's package manager.
## Load the ks completion code for bash into the current shell
source <(ks completion bash)
## Load the kk completion code for bash into the current shell
source <(kk completion bash)
## Write bash completion code to a file and source if from .bash_profile
mkdir -p ~/.config/kk/ && kk completion --type bash > ~/.config/kk/completion.bash.inc
printf "
Expand Down
21 changes: 8 additions & 13 deletions cmd/kk/pkg/artifact/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ import (
"bufio"
"context"
"fmt"
"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/core/connector"
"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/files"
"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/images"
"os"
"sort"
"strings"

"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/core/connector"
"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/files"
"github.com/kubesphere/kubekey/v3/cmd/kk/pkg/images"

mapset "github.com/deckarep/golang-set"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -276,7 +277,7 @@ func CreateManifestSpecifyVersion(arg common.Argument, name, version string, reg
}, &common.KubeConf{
Cluster: &kubekeyv1alpha2.ClusterSpec{
Kubernetes: kubekeyv1alpha2.Kubernetes{Version: v},
Registry: kubekeyv1alpha2.RegistryConfig{PrivateRegistry: "docker.io"},
Registry: kubekeyv1alpha2.RegistryConfig{PrivateRegistry: images.DefaultRegistry()},
},
}, imageName).ImageName()
if !imageIsExist(repo, imageArr) {
Expand All @@ -287,15 +288,9 @@ func CreateManifestSpecifyVersion(arg common.Argument, name, version string, reg
}

options := &templates.Options{
Name: name,
Arches: arch,
OperatingSystems: []kubekeyv1alpha2.OperatingSystem{{
Arch: "amd64",
Type: "linux",
Id: "ubuntu",
Version: "20.04",
OsImage: "Ubuntu 20.04.6 LTS",
}},
Name: name,
Arches: arch,
OperatingSystems: []kubekeyv1alpha2.OperatingSystem{},
KubernetesDistributions: kubernetesDistribution,
Components: kubekeyv1alpha2.Components{
Helm: kubekeyv1alpha2.Helm{Version: kubekeyv1alpha2.DefaultHelmVersion},
Expand Down
4 changes: 4 additions & 0 deletions cmd/kk/pkg/artifact/templates/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ spec:
{{- range .Options.Arches }}
- {{ . }}
{{- end }}
{{- if not .Options.OperatingSystems }}
operatingSystems: []
{{- else }}
operatingSystems:
{{- range $i, $v := .Options.OperatingSystems }}
- arch: {{ $v.Arch }}
Expand All @@ -49,6 +52,7 @@ spec:
localPath:
url:
{{- end }}
{{- end }}
kubernetesDistributions:
{{- range $i, $v := .Options.KubernetesDistributions }}
- type: {{ $v.Type }}
Expand Down
6 changes: 3 additions & 3 deletions cmd/kk/pkg/files/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,21 @@ func NewKubeBinary(name, arch, version, prePath string, getCmd func(path, url st
case kubeadm:
component.Type = KUBE
component.FileName = kubeadm
component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubeadm", version, arch)
component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubeadm", version, arch)
if component.Zone == "cn" {
component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubeadm", version, arch)
}
case kubelet:
component.Type = KUBE
component.FileName = kubelet
component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubelet", version, arch)
component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubelet", version, arch)
if component.Zone == "cn" {
component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubelet", version, arch)
}
case kubectl:
component.Type = KUBE
component.FileName = kubectl
component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl", version, arch)
component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubectl", version, arch)
if component.Zone == "cn" {
component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubectl", version, arch)
}
Expand Down
8 changes: 8 additions & 0 deletions cmd/kk/pkg/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,11 @@ func (images *Images) PullImages(runtime connector.Runtime, kubeConf *common.Kub
}
return nil
}

// DefaultRegistry is used to get default registry address.
func DefaultRegistry() string {
if os.Getenv("KKZONE") == "cn" {
return cnRegistry
}
return "docker.io"
}
2 changes: 1 addition & 1 deletion cmd/kk/pkg/images/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (c *CopyImagesToRegistry) Execute(runtime connector.Runtime) error {
image := Image{
RepoAddr: repoAddr,
Namespace: namespace,
NamespaceOverride: c.KubeConf.Cluster.Registry.NamespaceOverride,
NamespaceOverride: "",
Repo: imageName,
Tag: imageTag,
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/kk/pkg/version/kubernetes/version_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const (
V128
V129
V130
V131
)

var VersionList = []Version{
Expand All @@ -55,6 +56,7 @@ var VersionList = []Version{
V128,
V129,
V130,
V131,
}

func (v Version) String() string {
Expand Down Expand Up @@ -83,6 +85,8 @@ func (v Version) String() string {
return "v1.29"
case V130:
return "v1.30"
case V131:
return "v1.31"
default:
return "invalid option"
}
Expand Down
8 changes: 8 additions & 0 deletions docs/kubernetes-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
| v1.28.11 | :white_check_mark: |
| v1.28.12 | :white_check_mark: |
| v1.28.13 | :white_check_mark: |
| v1.28.14 | :white_check_mark: |
| v1.28.15 | :white_check_mark: |
| v1.29.0 | :white_check_mark: |
| v1.29.1 | :white_check_mark: |
| v1.29.2 | :white_check_mark: |
Expand All @@ -150,9 +152,15 @@
| v1.29.6 | :white_check_mark: |
| v1.29.7 | :white_check_mark: |
| v1.29.8 | :white_check_mark: |
| v1.29.9 | :white_check_mark: |
| v1.29.10 | :white_check_mark: |
| v1.30.0 | :white_check_mark: |
| v1.30.1 | :white_check_mark: |
| v1.30.2 | :white_check_mark: |
| v1.30.3 | :white_check_mark: |
| v1.30.4 | :white_check_mark: |
| v1.30.5 | :white_check_mark: |
| v1.30.6 | :white_check_mark: |
| v1.31.0 | :white_check_mark: |
| v1.31.1 | :white_check_mark: |
| v1.31.2 | :white_check_mark: |
Loading

0 comments on commit da475c6

Please sign in to comment.