Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ testbin/*
*.swp
*.swo
*~

.claude
18 changes: 18 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ linters:
alias: kubeletv1beta1
- pkg: k8s.io/kubelet/config/v1beta1
alias: kubelettypes
- pkg: k8s.io/kubelet/pkg/apis/stats/v1alpha1
alias: kubeletstatsv1alpha1
- pkg: k8s.io/kubernetes/cmd/kube-controller-manager/names
alias: kubenames
- pkg: k8s.io/client-go/tools/clientcmd/api/v1
Expand Down Expand Up @@ -262,6 +264,15 @@ linters:
# msg: Use slog instead
- pattern: ^(record|events)\.NewFakeRecorder(For)?$
msg: Use pkg/operator/util/recorder/fake_recorder.go instead.
- pattern: ^trace\.Span\.AddEvent$
msg: use emit.Warnf/Infof with SinkSpanEvent instead
- pattern: ^slog\.Logger\.(Warn|Info)Context$
msg: use emit.Warnf/emit.Infof instead
- pattern: ^recorder\.Recorder\.(Warnf|Normalf)$
msg: use emit.Warnf/emit.Infof instead
- pattern: ^(gomega\.)?NewWithT$
pkg: ^github\.com/onsi/gomega$
msg: use G() from the test package instead
revive:
rules:
- name: exported
Expand Down Expand Up @@ -336,6 +347,13 @@ linters:
- gocritic
text: "deferInLoop: Possible resource leak, 'defer' is called in the 'for' loop"
path: *testFiles
- linters:
- forbidigo
path: pkg/operator/util/emit/emit\.go
# volume_stats_test cannot import the test package: test imports volume_stats (cycle)
- linters:
- forbidigo
path: pkg/reconcilers/etcd_cluster/volume_stats/volume_stats_test\.go

run:
timeout: 10m
Expand Down
9 changes: 5 additions & 4 deletions api/v1alpha1/webhook/hostedcontrolplane_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
. "github.com/onsi/gomega"
"github.com/teutonet/cluster-api-provider-hosted-control-plane/api/v1alpha1"
"github.com/teutonet/cluster-api-provider-hosted-control-plane/pkg/importcycle"
. "github.com/teutonet/cluster-api-provider-hosted-control-plane/test"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
Expand Down Expand Up @@ -186,7 +187,7 @@ func TestHostedControlPlaneWebhook_ValidateCreate(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
g, _, _ := G(t)
_, err := webhook.ValidateCreate(t.Context(), tt.hcp)

if tt.expectErr {
Expand Down Expand Up @@ -318,7 +319,7 @@ func TestHostedControlPlaneWebhook_ValidateUpdate(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
g, _, _ := G(t)
_, err := webhook.ValidateUpdate(t.Context(), tt.oldHCP, tt.newHCP)

if tt.expectErr {
Expand All @@ -332,7 +333,7 @@ func TestHostedControlPlaneWebhook_ValidateUpdate(t *testing.T) {

func TestHostedControlPlaneWebhook_ValidateDelete(t *testing.T) {
webhook := &hostedControlPlaneWebhook{}
g := NewWithT(t)
g, _, _ := G(t)

hcp := &v1alpha1.HostedControlPlane{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -386,7 +387,7 @@ func TestHostedControlPlaneWebhook_ParseVersion(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
g, _, _ := G(t)
hcp := &v1alpha1.HostedControlPlane{
Spec: v1alpha1.HostedControlPlaneSpec{
Version: tt.version,
Expand Down
74 changes: 37 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@ go 1.25.7

require (
github.com/aws/aws-sdk-go-v2 v1.41.5
github.com/aws/aws-sdk-go-v2/config v1.32.7
github.com/aws/aws-sdk-go-v2/credentials v1.19.7
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.2
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0
github.com/aws/aws-sdk-go-v2/config v1.32.13
github.com/aws/aws-sdk-go-v2/credentials v1.19.13
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.12
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3
Comment thread
cwrau marked this conversation as resolved.
github.com/blang/semver/v4 v4.0.0
github.com/caarlos0/env/v6 v6.10.1
github.com/cert-manager/cert-manager v1.19.3
github.com/cert-manager/cert-manager v1.20.1
github.com/cilium/cilium v1.19.3
github.com/coredns/corefile-migration v1.0.30
github.com/coredns/corefile-migration v1.0.31
github.com/go-logr/logr v1.4.3
Comment thread
cwrau marked this conversation as resolved.
github.com/onsi/gomega v1.39.1
github.com/robfig/cron/v3 v3.0.1
github.com/samber/lo v1.52.0
go.etcd.io/etcd/api/v3 v3.6.8
go.etcd.io/etcd/client/v3 v3.6.8
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0
github.com/samber/lo v1.53.0
go.etcd.io/etcd/api/v3 v3.6.9
go.etcd.io/etcd/client/v3 v3.6.9
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/trace v1.43.0
go.uber.org/zap v1.27.1
go4.org v0.0.0-20260112195520-a5071408f32f
golang.org/x/text v0.33.0
google.golang.org/grpc v1.80.0
golang.org/x/text v0.35.0
google.golang.org/grpc v1.79.3
k8s.io/api v0.35.3
k8s.io/apiextensions-apiserver v0.35.3
k8s.io/apimachinery v0.35.3
k8s.io/apiserver v0.35.3
k8s.io/client-go v0.35.3
k8s.io/cluster-bootstrap v0.35.0
k8s.io/cluster-bootstrap v0.35.3
k8s.io/component-base v0.35.3
k8s.io/kube-proxy v0.35.0
k8s.io/kubelet v0.35.0
k8s.io/kubernetes v1.35.1
k8s.io/kube-proxy v0.35.3
k8s.io/kubelet v0.35.3
Comment thread
cwrau marked this conversation as resolved.
k8s.io/kubernetes v1.35.3
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5
sigs.k8s.io/cluster-api v1.12.2
sigs.k8s.io/cluster-api v1.12.4
sigs.k8s.io/controller-runtime v0.23.3
sigs.k8s.io/gateway-api v1.4.1
sigs.k8s.io/gateway-api v1.5.1
Comment thread
cwrau marked this conversation as resolved.
)
Comment thread
cwrau marked this conversation as resolved.

require (
Expand All @@ -55,19 +55,19 @@ require (
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.14 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.18 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.10 // indirect
github.com/aws/smithy-go v1.24.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
Expand Down Expand Up @@ -121,7 +121,7 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down Expand Up @@ -159,7 +159,7 @@ require (
github.com/vishvananda/netns v0.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.8 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.9 // indirect
go.mongodb.org/mongo-driver v1.17.9 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
Expand All @@ -169,18 +169,18 @@ require (
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/net v0.52.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/term v0.41.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
golang.org/x/tools v0.42.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
Expand All @@ -192,7 +192,7 @@ require (
k8s.io/controller-manager v0.35.0 // indirect
k8s.io/cri-api v0.35.0 // indirect
k8s.io/cri-client v0.35.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kms v0.35.3 // indirect
k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect
Expand Down
Loading
Loading