From 1845238e1cc9fd8bf48061c89c53961f0f14c1e8 Mon Sep 17 00:00:00 2001 From: "Nelo-T. Wallus" Date: Wed, 17 Sep 2025 09:53:24 +0200 Subject: [PATCH 1/5] Remove Go version check Signed-off-by: Nelo-T. Wallus Signed-off-by: Nelo-T. Wallus --- hack/verify-go-versions.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hack/verify-go-versions.sh b/hack/verify-go-versions.sh index 6827b9a01..095a832cd 100755 --- a/hack/verify-go-versions.sh +++ b/hack/verify-go-versions.sh @@ -22,7 +22,3 @@ VERSION=$(grep "go 1." go.mod | sed 's/go //' | sed 's/.0$//') grep "FROM golang:" Dockerfile | { ! grep -v "${VERSION}"; } || { echo "Wrong go version in Dockerfile, expected ${VERSION}"; exit 1; } grep "go-version:" .github/workflows/*.yaml | { ! grep -v "go-version: v${VERSION}"; } || { echo "Wrong go version in .github/workflows/*.yaml, expected ${VERSION}"; exit 1; } grep "golang:" .ko.yaml | { ! grep -v "golang:${VERSION}"; } || { echo "Wrong go version in .ko.yaml, expected ${VERSION}"; exit 1; } -# Note CONTRIBUTING.md isn't copied in the Dockerfile -if [ -z "${IGNORE_GO_VERSION}" ]; then - go version | { ! grep -v go${VERSION}; } || { echo "Unexpected go version installed, expected ${VERSION}. Use IGNORE_GO_VERSION=1 to skip this check."; exit 1; } -fi From c63ce85d45ef8884326c7caa07fdf02214ccc5df Mon Sep 17 00:00:00 2001 From: "Nelo-T. Wallus" Date: Wed, 1 Oct 2025 15:12:50 +0200 Subject: [PATCH 2/5] Remove redundant dex config Signed-off-by: Nelo-T. Wallus Signed-off-by: Nelo-T. Wallus --- contrib/kcp/dex-config-dev.yaml | 149 -------------------------------- 1 file changed, 149 deletions(-) delete mode 100644 contrib/kcp/dex-config-dev.yaml diff --git a/contrib/kcp/dex-config-dev.yaml b/contrib/kcp/dex-config-dev.yaml deleted file mode 100644 index 94c44579c..000000000 --- a/contrib/kcp/dex-config-dev.yaml +++ /dev/null @@ -1,149 +0,0 @@ -# DEPRECATED: use config.yaml.dist and config.dev.yaml examples in the repository root. -# TODO: keep this until all references are updated. - -# The base path of dex and the external name of the OpenID Connect service. -# This is the canonical URL that all clients MUST use to refer to dex. If a -# path is provided, dex's HTTP service will listen at a non-root URL. -issuer: http://127.0.0.1:5556/dex - -# The storage configuration determines where dex stores its state. Supported -# options include SQL flavors and Kubernetes third party resources. -# -# See the documentation (https://dexidp.io/docs/storage/) for further information. -storage: - type: memory - config: - file: examples/dex.db - - # type: mysql - # config: - # host: localhost - # port: 3306 - # database: dex - # user: mysql - # password: mysql - # ssl: - # mode: "false" - - # type: postgres - # config: - # host: localhost - # port: 5432 - # database: dex - # user: postgres - # password: postgres - # ssl: - # mode: disable - - # type: etcd - # config: - # endpoints: - # - http://localhost:2379 - # namespace: dex/ - - # type: kubernetes - # config: - # kubeConfigFile: $HOME/.kube/config - -# Configuration for the HTTP endpoints. -web: - http: 0.0.0.0:5556 - # Uncomment for HTTPS options. - # https: 127.0.0.1:5554 - # tlsCert: /etc/dex/tls.crt - # tlsKey: /etc/dex/tls.key - -# Configuration for dex appearance -# frontend: -# issuer: dex -# logoURL: theme/logo.png -# dir: web/ -# theme: light - -# Configuration for telemetry -telemetry: - http: 0.0.0.0:5558 - # enableProfiling: true - -# Uncomment this block to enable the gRPC API. This values MUST be different -# from the HTTP endpoints. -grpc: - addr: 127.0.0.1:5557 -# tlsCert: examples/grpc-client/server.crt -# tlsKey: examples/grpc-client/server.key -# tlsClientCA: examples/grpc-client/ca.crt - -# Uncomment this block to enable configuration for the expiration time durations. -# Is possible to specify units using only s, m and h suffixes. -# expiry: -# deviceRequests: "5m" -# signingKeys: "6h" -# idTokens: "24h" -# refreshTokens: -# reuseInterval: "3s" -# validIfNotUsedFor: "2160h" # 90 days -# absoluteLifetime: "3960h" # 165 days - -# Options for controlling the logger. -# logger: -# level: "debug" -# format: "text" # can also be "json" - -# Default values shown below -oauth2: - # use ["code", "token", "id_token"] to enable implicit flow for web-only clients -# responseTypes: [ "code" ] # also allowed are "token" and "id_token" - # By default, dex will ask for approval to share data with application - # (approval for sharing data from connected IdP to dex is separate process on IdP) - skipApprovalScreen: true - # If only one authentication method is enabled, the default behavior is to - # go directly to it. For connected IdPs, this redirects the browser away - # from application to upstream provider such as the Google login page -# alwaysShowLoginScreen: false - # Uncomment the passwordConnector to use a specific connector for password grants -# passwordConnector: local - -# Instead of reading from an external storage, use this list of clients. -# -# If this option isn't chosen clients may be added through the gRPC API. -staticClients: -- id: kube-bind - redirectURIs: - - 'http://127.0.0.1:8080/callback' - name: 'Kube Bind' - secret: ZXhhbXBsZS1hcHAtc2VjcmV0 - -# - id: example-device-client -# redirectURIs: -# - /device/callback -# name: 'Static Client for Device Flow' -# public: true -connectors: -- type: mockCallback - id: mock - name: Example -# - type: google -# id: google -# name: Google -# config: -# issuer: https://accounts.google.com -# # Connector config values starting with a "$" will read from the environment. -# clientID: $GOOGLE_CLIENT_ID -# clientSecret: $GOOGLE_CLIENT_SECRET -# redirectURI: http://127.0.0.1:5556/dex/callback -# hostedDomains: -# - $GOOGLE_HOSTED_DOMAIN - -# Let dex keep a list of passwords which can be used to login to dex. -# enablePasswordDB: true - -# A static list of passwords to login the end user. By identifying here, dex -# won't look in its underlying storage for passwords. -# -# If this option isn't chosen users may be added through the gRPC API. -# staticPasswords: -# - email: "admin@example.com" -# # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) -# hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" -# username: "admin" -# userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" From 841d85745841b8c452f03a105e59184f9bf41cb8 Mon Sep 17 00:00:00 2001 From: "Nelo-T. Wallus" Date: Wed, 1 Oct 2025 15:11:06 +0200 Subject: [PATCH 3/5] Update go.mod Signed-off-by: Nelo-T. Wallus Signed-off-by: Nelo-T. Wallus --- contrib/kcp/go.mod | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/contrib/kcp/go.mod b/contrib/kcp/go.mod index eb34eb92e..42ab1733a 100644 --- a/contrib/kcp/go.mod +++ b/contrib/kcp/go.mod @@ -2,11 +2,11 @@ module github.com/kube-bind/kube-bind/kcp go 1.24.0 -replace github.com/kube-bind/kube-bind => ../../ - -replace github.com/kube-bind/kube-bind/sdk => ../../sdk - -replace github.com/kube-bind/kube-bind/cli => ../../cli +replace ( + github.com/kube-bind/kube-bind => ../../ + github.com/kube-bind/kube-bind/cli => ../../cli + github.com/kube-bind/kube-bind/sdk => ../../sdk +) require ( github.com/kcp-dev/client-go v0.0.0-20250728134101-0355faa9361b @@ -145,7 +145,3 @@ replace ( k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20250816165010-ffe1d7c8649b k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20250816165010-ffe1d7c8649b ) - -replace sigs.k8s.io/multicluster-runtime => github.com/mjudeikis/sigs-multicluster-runtime v0.0.0-20250818101434-d8ebc45e169b - -replace github.com/kcp-dev/multicluster-provider => github.com/mjudeikis/kcp-multicluster-provider v0.0.0-20250818102159-3d31cbb06ebe From 1d430bf47f65ce719c7548cde1ab6f763ad0539d Mon Sep 17 00:00:00 2001 From: "Nelo-T. Wallus" Date: Thu, 2 Oct 2025 15:46:37 +0200 Subject: [PATCH 4/5] Fix host argument to log entry Signed-off-by: Nelo-T. Wallus Signed-off-by: Nelo-T. Wallus --- cli/pkg/kubectl/bind-apiservice/plugin/konnector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go b/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go index e55ab73d8..feb5e93d2 100644 --- a/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go +++ b/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go @@ -119,7 +119,7 @@ func (b *BindAPIServiceOptions) deployKonnector(ctx context.Context, config *res return true, nil } - logger.V(2).Info("Waiting for APIServiceBindings to be served", "error", err, "host", bindClient.RESTClient()) + logger.V(2).Info("Waiting for APIServiceBindings to be served", "error", err, "host", config.Host) if first { fmt.Fprint(b.Options.IOStreams.ErrOut, " Waiting for the konnector to be ready") first = false From 71368705c73c184027a9fc85268f17be91fd2b43 Mon Sep 17 00:00:00 2001 From: "Nelo-T. Wallus" Date: Thu, 2 Oct 2025 11:32:37 +0200 Subject: [PATCH 5/5] Use require instead of panicking Signed-off-by: Nelo-T. Wallus Signed-off-by: Nelo-T. Wallus --- test/e2e/framework/backend.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/e2e/framework/backend.go b/test/e2e/framework/backend.go index 135bf84e7..090fc4ccf 100644 --- a/test/e2e/framework/backend.go +++ b/test/e2e/framework/backend.go @@ -42,9 +42,7 @@ import ( func StartBackend(t *testing.T, clientConfig *rest.Config, args ...string) (net.Addr, *backend.Server) { signingKey := securecookie.GenerateRandomKey(32) - if len(signingKey) == 0 { - panic("error creating signing key") - } + require.NotEmpty(t, signingKey, "error creating signing key") return StartBackendWithoutDefaultArgs(t, clientConfig, append([]string{ "--oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0",