Skip to content

Commit

Permalink
update go api
Browse files Browse the repository at this point in the history
  • Loading branch information
takara9 committed May 22, 2024
1 parent f9269d4 commit 208fa91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions api/v1beta2/mysqlcluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("default").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand All @@ -475,7 +475,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("not-support-volume-expansion").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand Down Expand Up @@ -507,7 +507,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("default").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand All @@ -522,7 +522,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("not-support-volume-expansion").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand Down
6 changes: 4 additions & 2 deletions controllers/mysqlcluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
Expand Down Expand Up @@ -108,7 +108,9 @@ var _ = Describe("MySQLCluster reconciler", func() {
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
LeaderElection: false,
MetricsBindAddress: "0",
Metrics: metricsserver.Options{
BindAddress: "0",
},
})
Expect(err).ToNot(HaveOccurred())

Expand Down

0 comments on commit 208fa91

Please sign in to comment.