Skip to content

Commit

Permalink
Promote VolumeAttributesClass to beta
Browse files Browse the repository at this point in the history
Kubernetes-commit: 0260c7d023551f85621049ca604a4fd5110ba0a9
  • Loading branch information
carlory authored and k8s-publishing-bot committed Aug 1, 2024
1 parent b315eb8 commit 8fc44bc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
14 changes: 8 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ require (
golang.org/x/sys v0.21.0
gopkg.in/evanphx/json-patch.v4 v4.12.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef
k8s.io/api v0.0.0-20240724010313-f04ea0bc861d
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe
k8s.io/cli-runtime v0.0.0-20240713190550-094be534f684
k8s.io/client-go v0.0.0-20240720223250-82af755eff54
k8s.io/component-base v0.0.0-20240715183844-6f32dbe8ef25
k8s.io/component-helpers v0.0.0-20240713184356-f77f7fa6cffb
k8s.io/cli-runtime v0.0.0-20240722232727-5f321dd941eb
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b
k8s.io/component-base v0.0.0-20240722183709-6cc953a9d440
k8s.io/component-helpers v0.0.0-20240723204758-b05521a7bd36
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
k8s.io/metrics v0.0.0-20240713190411-b5dc5cba9c19
k8s.io/metrics v0.0.0-20240801013046-d3a51c3340fa
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
sigs.k8s.io/kustomize/kustomize/v5 v5.4.2
Expand Down Expand Up @@ -97,3 +97,5 @@ require (
)

replace k8s.io/code-generator => k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c

replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe
28 changes: 14 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -277,24 +277,24 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef h1:srEy4lds3ddDhT+cxFy68Uvt3GVRTo3fwnw+Us/Nqqs=
k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef/go.mod h1:SvpyE6bmVBf1ly5BaD4y6yym4ZpHrV2pa8tTRjcglaA=
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe h1:V9MwpYUwbKlfLKVrhpVuKWiat/LBIhm1pGB9/xdHm5Q=
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/cli-runtime v0.0.0-20240713190550-094be534f684 h1:WxhNQHxCpKjsVLa9IB05GmGlEsjYIOpfarRJGl+EtLY=
k8s.io/cli-runtime v0.0.0-20240713190550-094be534f684/go.mod h1:00xlk94/AwccyFVMnGbbX7sWiRNDXLHtSqQ/U4Sozvs=
k8s.io/client-go v0.0.0-20240720223250-82af755eff54 h1:BQ6OUPmYQm6GUJsPJrV4ouPTusfkZvo08u7uxXZEK4A=
k8s.io/client-go v0.0.0-20240720223250-82af755eff54/go.mod h1:GaT6DD2rtHnEnFV8iJ38Y8SemkQQI9E00pYBv8+d0Xc=
k8s.io/component-base v0.0.0-20240715183844-6f32dbe8ef25 h1:9SIVS17h6glmGM2G4ILkpQRUYc/zZ7y15gD2uaby0rM=
k8s.io/component-base v0.0.0-20240715183844-6f32dbe8ef25/go.mod h1:YYWVx/ele54LQcShCdQpmsIqiHgZ+KjWY7WGMzTjKGk=
k8s.io/component-helpers v0.0.0-20240713184356-f77f7fa6cffb h1:klgEnJlSj867TrU7c2RBXdxuNdBklpwZxOJHHsKP5x8=
k8s.io/component-helpers v0.0.0-20240713184356-f77f7fa6cffb/go.mod h1:T/wlkd8Q5SQXhqWJt2x1HD2GTAQ9eysgwNbWLMOEipA=
k8s.io/api v0.0.0-20240724010313-f04ea0bc861d h1:phdCFnuErJqqxJwiX9uNdygnJ1i3RiTQepKHtf354qA=
k8s.io/api v0.0.0-20240724010313-f04ea0bc861d/go.mod h1:ytlEzqC2wOTwYET71W7+J+k7O2V7vrDuzmNLBSpgT+k=
k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe h1:lt6b7CTEYMgUTCGIZrATyWMZTQThE+qIQq5YTCbpMVQ=
k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/cli-runtime v0.0.0-20240722232727-5f321dd941eb h1:yv9ReRIg3QrBPy2Yo50L3bvWbACXByOxmq9iwB4FoC0=
k8s.io/cli-runtime v0.0.0-20240722232727-5f321dd941eb/go.mod h1:EOQpzfwX2k5ma0OxH824MgOF4hwrHa63qewkR7dEwFQ=
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b h1:NTLYx38CAu+VstHvPLosqB6uSQUtSM+3Mqz2D/C5JpE=
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b/go.mod h1:Y6CzOT21oLI4O66cjiV5oSSUgOL7gG/VCG9n8XI8OxU=
k8s.io/component-base v0.0.0-20240722183709-6cc953a9d440 h1:14X+5sRQRsul6tLxIKTP0/DotvWlMd9DFCgMqHP1hZY=
k8s.io/component-base v0.0.0-20240722183709-6cc953a9d440/go.mod h1:dj2Pl05aLcVMZi2NXcwv+M/WdUVPEkisFPjDze7rbSk=
k8s.io/component-helpers v0.0.0-20240723204758-b05521a7bd36 h1:1d/BKG+qwNzedOVzqgMMtgf++8AvXDwTFNPsb6HZbcI=
k8s.io/component-helpers v0.0.0-20240723204758-b05521a7bd36/go.mod h1:hbv+hLcDM9+GDpLPvr5PeUDzL/ejWs1BWz/+rjY+h8s=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/metrics v0.0.0-20240713190411-b5dc5cba9c19 h1:qOfe7taXie9iPv+ESDV73iIk43W3PMn56JCSkR7j+Zg=
k8s.io/metrics v0.0.0-20240713190411-b5dc5cba9c19/go.mod h1:L15kLoNeqDBxOGA/dFTp7vwwNnEauBmZ63xhBolNoag=
k8s.io/metrics v0.0.0-20240801013046-d3a51c3340fa h1:PgZAvlyyAr2QVsGXi+d/UTU+2B/Xsdi9Ut9jEzfnkxM=
k8s.io/metrics v0.0.0-20240801013046-d3a51c3340fa/go.mod h1:L15kLoNeqDBxOGA/dFTp7vwwNnEauBmZ63xhBolNoag=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
8 changes: 4 additions & 4 deletions pkg/describe/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1"
schedulingv1 "k8s.io/api/scheduling/v1"
storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -227,7 +227,7 @@ func describerMap(clientConfig *rest.Config) (map[schema.GroupKind]ResourceDescr
{Group: certificatesv1beta1.GroupName, Kind: "CertificateSigningRequest"}: &CertificateSigningRequestDescriber{c},
{Group: storagev1.GroupName, Kind: "StorageClass"}: &StorageClassDescriber{c},
{Group: storagev1.GroupName, Kind: "CSINode"}: &CSINodeDescriber{c},
{Group: storagev1alpha1.GroupName, Kind: "VolumeAttributesClass"}: &VolumeAttributesClassDescriber{c},
{Group: storagev1beta1.GroupName, Kind: "VolumeAttributesClass"}: &VolumeAttributesClassDescriber{c},
{Group: policyv1beta1.GroupName, Kind: "PodDisruptionBudget"}: &PodDisruptionBudgetDescriber{c},
{Group: policyv1.GroupName, Kind: "PodDisruptionBudget"}: &PodDisruptionBudgetDescriber{c},
{Group: rbacv1.GroupName, Kind: "Role"}: &RoleDescriber{c},
Expand Down Expand Up @@ -4722,7 +4722,7 @@ type VolumeAttributesClassDescriber struct {
}

func (d *VolumeAttributesClassDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) {
vac, err := d.StorageV1alpha1().VolumeAttributesClasses().Get(context.TODO(), name, metav1.GetOptions{})
vac, err := d.StorageV1beta1().VolumeAttributesClasses().Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return "", err
}
Expand All @@ -4735,7 +4735,7 @@ func (d *VolumeAttributesClassDescriber) Describe(namespace, name string, descri
return describeVolumeAttributesClass(vac, events)
}

func describeVolumeAttributesClass(vac *storagev1alpha1.VolumeAttributesClass, events *corev1.EventList) (string, error) {
func describeVolumeAttributesClass(vac *storagev1beta1.VolumeAttributesClass, events *corev1.EventList) (string, error) {
return tabbedString(func(out io.Writer) error {
w := NewPrefixWriter(out)
w.Write(LEVEL_0, "Name:\t%s\n", vac.Name)
Expand Down
4 changes: 2 additions & 2 deletions pkg/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
policyv1beta1 "k8s.io/api/policy/v1beta1"
schedulingv1 "k8s.io/api/scheduling/v1"
storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
apiequality "k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -3659,7 +3659,7 @@ Parameters: param1=value1,param2=value2
Events: <none>
`

f := fake.NewSimpleClientset(&storagev1alpha1.VolumeAttributesClass{
f := fake.NewSimpleClientset(&storagev1beta1.VolumeAttributesClass{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
ResourceVersion: "4",
Expand Down

0 comments on commit 8fc44bc

Please sign in to comment.