Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docker
Browse files Browse the repository at this point in the history
aojea authored Mar 3, 2024
2 parents 11fdd29 + bce3f53 commit 06bb51a
Showing 1,555 changed files with 118,582 additions and 50,464 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
GO_VERSION: "1.20.4"
GO_VERSION: "1.21.4"

jobs:
e2e:
6 changes: 3 additions & 3 deletions .github/workflows/k8s.yml
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@ on:
workflow_dispatch:

env:
GO_VERSION: "1.20.4"
K8S_VERSION: "v1.27.1"
KIND_VERSION: "v0.18.0"
GO_VERSION: "1.21.7"
K8S_VERSION: "v1.29.2"
KIND_VERSION: "v0.22.0"
KIND_CLUSTER_NAME: "kind-cloud"

jobs:
98 changes: 50 additions & 48 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,71 +1,73 @@
module sigs.k8s.io/cloud-provider-kind

go 1.19
go 1.21

require (
github.com/pkg/errors v0.9.1
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/apiserver v0.26.1
k8s.io/client-go v0.26.1
k8s.io/cloud-provider v0.26.1
k8s.io/component-base v0.26.1
k8s.io/klog/v2 v2.90.0
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d
sigs.k8s.io/kind v0.17.0
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/apiserver v0.29.2
k8s.io/client-go v0.29.2
k8s.io/cloud-provider v0.29.2
k8s.io/component-base v0.29.2
k8s.io/klog/v2 v2.120.1
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/kind v0.22.0
)

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/emicklei/go-restful/v3 v3.11.3 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/safetext v0.0.0-20240104143208-7a7d9b3d812f // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/cobra v1.6.0 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.49.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-helpers v0.26.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
k8s.io/component-helpers v0.29.2 // indirect
k8s.io/controller-manager v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
654 changes: 138 additions & 516 deletions go.sum

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions hack/ci/add-kubernetes-to-workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e
set -x

REPO_ROOT=$(git rev-parse --show-toplevel)
cd ${REPO_ROOT}
cd ..
WORKSPACE=$(pwd)

# Set up go workspace to build with this version
cd "${REPO_ROOT}"

go work init
go work use .

# Add kubernetes to workspace
go work use ${WORKSPACE}/kubernetes
for d in ${WORKSPACE}/kubernetes/staging/src/k8s.io/*; do
go work use $d
done

# Workaround for go.mod replacements
sed -i 's/^\s*k8s.io.*//g' go.mod
go work sync
2 changes: 1 addition & 1 deletion hack/lint.sh
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ set -o pipefail
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

cd $REPO_ROOT
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.51.1 golangci-lint run -v
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.56.2 golangci-lint run -v
14 changes: 12 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ import (
nodecontroller "k8s.io/cloud-provider/controllers/node"
servicecontroller "k8s.io/cloud-provider/controllers/service"
controllersmetrics "k8s.io/component-base/metrics/prometheus/controllers"
ccmfeatures "k8s.io/controller-manager/pkg/features"
"k8s.io/klog/v2"
"sigs.k8s.io/cloud-provider-kind/pkg/constants"
"sigs.k8s.io/cloud-provider-kind/pkg/container"
@@ -124,9 +125,17 @@ func (c *Controller) Run(ctx context.Context) {
// TODO: implement leader election to not have problems with multiple providers
// ref: https://github.com/kubernetes/kubernetes/blob/d97ea0f705847f90740cac3bc3dd8f6a4026d0b5/cmd/kube-scheduler/app/server.go#L211
func startCloudControllerManager(ctx context.Context, clusterName string, kubeClient kubernetes.Interface, cloud cloudprovider.Interface) (*ccm, error) {
// TODO: we need to set up the ccm specific feature gates
// but try to avoid to expose this to users
featureGates := utilfeature.DefaultMutableFeatureGate
err := ccmfeatures.SetupCurrentKubernetesSpecificFeatureGates(featureGates)
if err != nil {
return nil, err
}

client := kubeClient.Discovery().RESTClient()
// wait for health
err := wait.PollImmediateWithContext(ctx, 1*time.Second, 30*time.Second, func(ctx context.Context) (bool, error) {
err = wait.PollUntilContextTimeout(ctx, 1*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) {
healthStatus := 0
client.Get().AbsPath("/healthz").Do(ctx).StatusCode(&healthStatus)
if healthStatus != http.StatusOK {
@@ -150,7 +159,7 @@ func startCloudControllerManager(ctx context.Context, clusterName string, kubeCl
sharedInformers.Core().V1().Services(),
sharedInformers.Core().V1().Nodes(),
clusterName,
utilfeature.DefaultFeatureGate,
featureGates,
)
if err != nil {
// This error shouldn't fail. It lives like this as a legacy.
@@ -167,6 +176,7 @@ func startCloudControllerManager(ctx context.Context, clusterName string, kubeCl
kubeClient,
cloud,
30*time.Second,
5, // workers
)
if err != nil {
// This error shouldn't fail. It lives like this as a legacy.
2 changes: 1 addition & 1 deletion vendor/github.com/BurntSushi/toml/.gitignore
1 change: 0 additions & 1 deletion vendor/github.com/BurntSushi/toml/COMPATIBLE

This file was deleted.

187 changes: 48 additions & 139 deletions vendor/github.com/BurntSushi/toml/README.md
312 changes: 177 additions & 135 deletions vendor/github.com/BurntSushi/toml/decode.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vendor/github.com/BurntSushi/toml/decode_go116.go
8 changes: 8 additions & 0 deletions vendor/github.com/BurntSushi/toml/deprecated.go
22 changes: 10 additions & 12 deletions vendor/github.com/BurntSushi/toml/doc.go
291 changes: 178 additions & 113 deletions vendor/github.com/BurntSushi/toml/encode.go

Large diffs are not rendered by default.

124 changes: 87 additions & 37 deletions vendor/github.com/BurntSushi/toml/error.go
104 changes: 84 additions & 20 deletions vendor/github.com/BurntSushi/toml/lex.go
13 changes: 7 additions & 6 deletions vendor/github.com/BurntSushi/toml/meta.go
184 changes: 116 additions & 68 deletions vendor/github.com/BurntSushi/toml/parse.go
9 changes: 2 additions & 7 deletions vendor/github.com/alessio/shellescape/.golangci.yml
35 changes: 28 additions & 7 deletions vendor/github.com/alessio/shellescape/.goreleaser.yml
31 changes: 17 additions & 14 deletions vendor/github.com/cespare/xxhash/v2/README.md
10 changes: 10 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/testall.sh
47 changes: 20 additions & 27 deletions vendor/github.com/cespare/xxhash/v2/xxhash.go
336 changes: 165 additions & 171 deletions vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
183 changes: 183 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s
22 changes: 11 additions & 11 deletions vendor/github.com/cespare/xxhash/v2/xxhash_other.go
1 change: 1 addition & 0 deletions vendor/github.com/cespare/xxhash/v2/xxhash_safe.go
3 changes: 2 additions & 1 deletion vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
28 changes: 26 additions & 2 deletions vendor/github.com/emicklei/go-restful/v3/CHANGES.md
6 changes: 3 additions & 3 deletions vendor/github.com/emicklei/go-restful/v3/README.md
2 changes: 2 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/constants.go
7 changes: 7 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/entity_accessors.go
11 changes: 0 additions & 11 deletions vendor/github.com/emicklei/go-restful/v3/json.go

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/emicklei/go-restful/v3/jsoniter.go

This file was deleted.

5 changes: 3 additions & 2 deletions vendor/github.com/emicklei/go-restful/v3/request.go
3 changes: 3 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/response.go
17 changes: 15 additions & 2 deletions vendor/github.com/emicklei/go-restful/v3/route.go
55 changes: 34 additions & 21 deletions vendor/github.com/emicklei/go-restful/v3/route_builder.go
1,385 changes: 1,385 additions & 0 deletions vendor/github.com/evanphx/json-patch/v5/internal/json/decode.go

Large diffs are not rendered by default.

1,486 changes: 1,486 additions & 0 deletions vendor/github.com/evanphx/json-patch/v5/internal/json/encode.go

Large diffs are not rendered by default.

141 changes: 141 additions & 0 deletions vendor/github.com/evanphx/json-patch/v5/internal/json/fold.go
42 changes: 42 additions & 0 deletions vendor/github.com/evanphx/json-patch/v5/internal/json/fuzz.go
143 changes: 143 additions & 0 deletions vendor/github.com/evanphx/json-patch/v5/internal/json/indent.go
Loading

0 comments on commit 06bb51a

Please sign in to comment.