Skip to content

Commit bf820cb

Browse files
fix(deps): update module github.com/projectcapsule/capsule to v0.12.1 (#875)
chore: align with capsule api 0.12.0
1 parent c6fc9aa commit bf820cb

File tree

25 files changed

+285
-380
lines changed

25 files changed

+285
-380
lines changed

api/v1beta1/globalproxysettings_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package v1beta1
55

66
import (
7-
"github.com/projectcapsule/capsule/api/v1beta2"
7+
capsuleapi "github.com/projectcapsule/capsule/pkg/api"
88
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
99
)
1010

@@ -28,7 +28,7 @@ type GlobalSubjectSpec struct {
2828

2929
type GlobalSubject struct {
3030
// Kind of tenant owner. Possible values are "User", "Group", and "ServiceAccount".
31-
Kind v1beta2.OwnerKind `json:"kind"`
31+
Kind capsuleapi.OwnerKind `json:"kind"`
3232
// Name of tenant owner.
3333
Name string `json:"name"`
3434
}

api/v1beta1/proxysettings_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
package v1beta1
55

66
import (
7-
"github.com/projectcapsule/capsule/api/v1beta2"
7+
capsuleapi "github.com/projectcapsule/capsule/pkg/api"
88
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
99
)
1010

1111
type OwnerSpec struct {
1212
// Kind of tenant owner. Possible values are "User", "Group", and "ServiceAccount"
13-
Kind v1beta2.OwnerKind `json:"kind"`
13+
Kind capsuleapi.OwnerKind `json:"kind"`
1414
// Name of tenant owner.
1515
Name string `json:"name"`
1616
// Proxy settings for tenant owner.
17-
ProxyOperations []v1beta2.ProxySettings `json:"proxySettings,omitempty"`
17+
ProxyOperations []capsuleapi.ProxySettings `json:"proxySettings,omitempty"`
1818
// Cluster Resources for tenant Owner.
1919
ClusterResources []ClusterResource `json:"clusterResources,omitempty"`
2020
}

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/capsule-proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ If you only need to make minor customizations, you can specify them on the comma
9595
| global.jobs.certs.image.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy of the post install certgen job |
9696
| global.jobs.certs.image.registry | string | `"registry.k8s.io"` | Set the image repository of the post install certgen job |
9797
| global.jobs.certs.image.repository | string | `"ingress-nginx/kube-webhook-certgen"` | Set the image repository of the post install certgen job |
98-
| global.jobs.certs.image.tag | string | `"v1.6.2"` | Set the image tag of the post install certgen job |
98+
| global.jobs.certs.image.tag | string | `"v1.6.5"` | Set the image tag of the post install certgen job |
9999
| global.jobs.certs.nodeSelector | object | `{}` | Set the node selector |
100100
| global.jobs.certs.podSecurityContext | object | `{"enabled":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Security context for the job pods. |
101101
| global.jobs.certs.priorityClassName | string | `""` | Set a pod priorityClassName |

charts/capsule-proxy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ global:
6868
# -- Set the image pull policy of the post install certgen job
6969
pullPolicy: IfNotPresent
7070
# -- Set the image tag of the post install certgen job
71-
tag: "v1.6.2"
71+
tag: "v1.6.5"
7272
# -- Annotations to add to the certgen job.
7373
annotations: {}
7474
# -- Set the restartPolicy

e2e/namespace_test.go

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
8+
capsuleapi "github.com/projectcapsule/capsule/pkg/api"
89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
910
"k8s.io/client-go/kubernetes"
1011

@@ -21,10 +22,15 @@ var _ = Describe("Namespaces", func() {
2122
Labels: e2eLabels(),
2223
},
2324
Spec: capsulev1beta2.TenantSpec{
24-
Owners: capsulev1beta2.OwnerListSpec{
25+
Owners: capsuleapi.OwnerListSpec{
2526
{
26-
Name: "alice",
27-
Kind: "User",
27+
CoreOwnerSpec: capsuleapi.CoreOwnerSpec{
28+
UserSpec: capsuleapi.UserSpec{
29+
30+
Name: "alice",
31+
Kind: "User",
32+
},
33+
},
2834
},
2935
},
3036
},
@@ -37,14 +43,24 @@ var _ = Describe("Namespaces", func() {
3743
Labels: e2eLabels(),
3844
},
3945
Spec: capsulev1beta2.TenantSpec{
40-
Owners: capsulev1beta2.OwnerListSpec{
46+
Owners: capsuleapi.OwnerListSpec{
4147
{
42-
Name: "bob",
43-
Kind: "User",
48+
CoreOwnerSpec: capsuleapi.CoreOwnerSpec{
49+
UserSpec: capsuleapi.UserSpec{
50+
51+
Name: "alice",
52+
Kind: "User",
53+
},
54+
},
4455
},
4556
{
46-
Name: "alice",
47-
Kind: "User",
57+
CoreOwnerSpec: capsuleapi.CoreOwnerSpec{
58+
UserSpec: capsuleapi.UserSpec{
59+
60+
Name: "bob",
61+
Kind: "User",
62+
},
63+
},
4864
},
4965
},
5066
},

e2e/utils_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import (
77
"time"
88

99
. "github.com/onsi/gomega"
10-
capsulev1beta2 "github.com/projectcapsule/capsule/api/v1beta2"
10+
capsuleapi "github.com/projectcapsule/capsule/pkg/api"
11+
1112
corev1 "k8s.io/api/core/v1"
1213
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1314
"k8s.io/apimachinery/pkg/labels"
@@ -90,15 +91,15 @@ func NewNamespace(name string, labels ...map[string]string) *corev1.Namespace {
9091
}
9192
}
9293

93-
func NamespaceCreation(ns *corev1.Namespace, owner capsulev1beta2.OwnerSpec, timeout time.Duration) AsyncAssertion {
94+
func NamespaceCreation(ns *corev1.Namespace, owner capsuleapi.OwnerSpec, timeout time.Duration) AsyncAssertion {
9495
cs := ownerClient(owner)
9596
return Eventually(func() (err error) {
9697
_, err = cs.CoreV1().Namespaces().Create(context.TODO(), ns, metav1.CreateOptions{})
9798
return
9899
}, timeout, defaultPollInterval)
99100
}
100101

101-
func ownerClient(owner capsulev1beta2.OwnerSpec) (cs kubernetes.Interface) {
102+
func ownerClient(owner capsuleapi.OwnerSpec) (cs kubernetes.Interface) {
102103
c, err := config.GetConfig()
103104
Expect(err).ToNot(HaveOccurred())
104105
c.Impersonate.Groups = []string{"projectcapsule.dev", owner.Name}

go.mod

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/projectcapsule/capsule-proxy
22

3-
go 1.24.0
4-
5-
toolchain go1.24.6
3+
go 1.25.4
64

75
require (
86
github.com/go-logr/logr v1.4.3
@@ -12,22 +10,21 @@ require (
1210
github.com/onsi/ginkgo/v2 v2.27.2
1311
github.com/onsi/gomega v1.38.2
1412
github.com/pkg/errors v0.9.1
15-
github.com/projectcapsule/capsule v0.10.8
16-
github.com/prometheus/client_golang v1.23.0
13+
github.com/projectcapsule/capsule v0.12.1
14+
github.com/prometheus/client_golang v1.23.2
1715
github.com/prometheus/client_model v0.6.2
1816
github.com/spf13/pflag v1.0.10
1917
github.com/thediveo/enumflag v0.10.1
20-
github.com/thediveo/enumflag/v2 v2.0.7
2118
go.uber.org/zap v1.27.1
22-
golang.org/x/net v0.43.0
23-
k8s.io/api v0.34.1
24-
k8s.io/apiextensions-apiserver v0.34.1
25-
k8s.io/apimachinery v0.34.1
26-
k8s.io/apiserver v0.34.1
27-
k8s.io/client-go v0.34.1
28-
k8s.io/component-base v0.34.1
19+
golang.org/x/net v0.48.0
20+
k8s.io/api v0.34.2
21+
k8s.io/apiextensions-apiserver v0.34.2
22+
k8s.io/apimachinery v0.34.2
23+
k8s.io/apiserver v0.34.2
24+
k8s.io/client-go v0.34.2
25+
k8s.io/component-base v0.34.2
2926
k8s.io/kubectl v0.34.0
30-
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
27+
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
3128
sigs.k8s.io/controller-runtime v0.22.4
3229
)
3330

@@ -37,57 +34,65 @@ require (
3734
github.com/blang/semver/v4 v4.0.0 // indirect
3835
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3936
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
40-
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
37+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
4138
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
4239
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
4340
github.com/felixge/httpsnoop v1.0.4 // indirect
4441
github.com/fsnotify/fsnotify v1.9.0 // indirect
4542
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
4643
github.com/go-logr/zapr v1.3.0 // indirect
47-
github.com/go-openapi/jsonpointer v0.21.1 // indirect
48-
github.com/go-openapi/jsonreference v0.21.0 // indirect
49-
github.com/go-openapi/swag v0.23.1 // indirect
44+
github.com/go-openapi/jsonpointer v0.22.4 // indirect
45+
github.com/go-openapi/jsonreference v0.21.4 // indirect
46+
github.com/go-openapi/swag v0.25.4 // indirect
47+
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
48+
github.com/go-openapi/swag/conv v0.25.4 // indirect
49+
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
50+
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
51+
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
52+
github.com/go-openapi/swag/loading v0.25.4 // indirect
53+
github.com/go-openapi/swag/mangling v0.25.4 // indirect
54+
github.com/go-openapi/swag/netutils v0.25.4 // indirect
55+
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
56+
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
57+
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
5058
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
5159
github.com/gogo/protobuf v1.3.2 // indirect
5260
github.com/google/btree v1.1.3 // indirect
53-
github.com/google/gnostic-models v0.7.0 // indirect
61+
github.com/google/gnostic-models v0.7.1 // indirect
5462
github.com/google/go-cmp v0.7.0 // indirect
5563
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
5664
github.com/google/uuid v1.6.0 // indirect
57-
github.com/josharian/intern v1.0.0 // indirect
5865
github.com/json-iterator/go v1.1.12 // indirect
59-
github.com/mailru/easyjson v0.9.0 // indirect
6066
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6167
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
6268
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6369
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
64-
github.com/prometheus/common v0.65.0 // indirect
65-
github.com/prometheus/procfs v0.16.1 // indirect
70+
github.com/prometheus/common v0.67.4 // indirect
71+
github.com/prometheus/procfs v0.19.2 // indirect
72+
github.com/valyala/bytebufferpool v1.0.0 // indirect
73+
github.com/valyala/fasttemplate v1.2.2 // indirect
6674
github.com/x448/float16 v0.8.4 // indirect
67-
go.opentelemetry.io/otel v1.35.0 // indirect
68-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
69-
go.uber.org/automaxprocs v1.6.0 // indirect
75+
go.opentelemetry.io/otel v1.39.0 // indirect
76+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
7077
go.uber.org/multierr v1.11.0 // indirect
71-
go.yaml.in/yaml/v2 v2.4.2 // indirect
78+
go.yaml.in/yaml/v2 v2.4.3 // indirect
7279
go.yaml.in/yaml/v3 v3.0.4 // indirect
73-
golang.org/x/mod v0.27.0 // indirect
74-
golang.org/x/oauth2 v0.30.0 // indirect
75-
golang.org/x/sync v0.16.0 // indirect
76-
golang.org/x/sys v0.35.0 // indirect
77-
golang.org/x/term v0.34.0 // indirect
78-
golang.org/x/text v0.28.0 // indirect
79-
golang.org/x/time v0.11.0 // indirect
80-
golang.org/x/tools v0.36.0 // indirect
80+
golang.org/x/mod v0.30.0 // indirect
81+
golang.org/x/oauth2 v0.34.0 // indirect
82+
golang.org/x/sync v0.19.0 // indirect
83+
golang.org/x/sys v0.39.0 // indirect
84+
golang.org/x/term v0.38.0 // indirect
85+
golang.org/x/text v0.32.0 // indirect
86+
golang.org/x/time v0.14.0 // indirect
87+
golang.org/x/tools v0.39.0 // indirect
8188
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
82-
google.golang.org/protobuf v1.36.7 // indirect
83-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
89+
google.golang.org/protobuf v1.36.10 // indirect
90+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
8491
gopkg.in/inf.v0 v0.9.1 // indirect
85-
gopkg.in/yaml.v3 v3.0.1 // indirect
8692
k8s.io/klog/v2 v2.130.1 // indirect
87-
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
88-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
93+
k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect
94+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
8995
sigs.k8s.io/randfill v1.0.0 // indirect
90-
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
91-
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
96+
sigs.k8s.io/structured-merge-diff/v6 v6.3.1 // indirect
9297
sigs.k8s.io/yaml v1.6.0 // indirect
9398
)

0 commit comments

Comments
 (0)