Bug 1563566 - Make sure storage.k8s.io/v1beta1 API is enabled in 3.10
Summary: Make sure storage.k8s.io/v1beta1 API is enabled in 3.10
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jan Safranek
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-04 08:10 UTC by Jan Safranek
Modified: 2018-04-13 13:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-13 13:57:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Safranek 2018-04-04 08:10:10 UTC
This is a TODO issue to make sure we have storage.k8s.io/v1beta1 enabled and accessible in OpenShift 3.10 by default - it's needed by CSI.

This should work out of the box, without any configuration:

$ oc create -f - <<EOF
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttachment
metadata:
  name: first
spec:
  attacher: csi-mock
  source:
    persistentVolumeName: mypv
  nodeName: 127.0.0.1

EOF

$ oc get volumeattachment
NAME      CREATED AT
first     2018-04-04T08:06:38Z

$ curl -k https://127.0.0.1:6443/apis/storage.k8s.io/
{
  "kind": "APIGroup",
  "apiVersion": "v1",
  "name": "storage.k8s.io",
  "versions": [
    {
      "groupVersion": "storage.k8s.io/v1",
      "version": "v1"
    },
    {
      "groupVersion": "storage.k8s.io/v1beta1", <--- THIS IS IMPORTANT
      "version": "v1beta1"
    }
  ],
  "preferredVersion": {
    "groupVersion": "storage.k8s.io/v1",
    "version": "v1"
  },
  "serverAddressByClientCIDRs": null
}

(use real API server address/port instead of 127.0.0.1:6443.

Note that this tests just presence and usability of the API, we do not expect that the external attacher attaches something somewhere! PV "mypv" and node "127.0.0.1" does not need to exist.



Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 1 Liang Xia 2018-04-08 07:51:37 UTC
I can see that storage.k8s.io/v1beta1 exist without any configuration.

# openshift version
openshift v3.10.0-0.16.0
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.16


# curl -k https://10.240.0.14:8443/apis/storage.k8s.io/
{
  "kind": "APIGroup",
  "apiVersion": "v1",
  "name": "storage.k8s.io",
  "versions": [
    {
      "groupVersion": "storage.k8s.io/v1",
      "version": "v1"
    },
    {
      "groupVersion": "storage.k8s.io/v1beta1",
      "version": "v1beta1"
    }
  ],
  "preferredVersion": {
    "groupVersion": "storage.k8s.io/v1",
    "version": "v1"
  },
  "serverAddressByClientCIDRs": null
}


However, I can not create VolumeAttachment.
# oc create -f - <<EOF
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttachment
metadata:
  name: first
spec:
  attacher: csi-mock
  source:
    persistentVolumeName: mypv
  nodeName: 127.0.0.1

EOF
error: unable to recognize "STDIN": no matches for storage.k8s.io/, Kind=VolumeAttachment

Comment 2 Jan Safranek 2018-04-13 13:57:47 UTC
Yeah, I checked 3.10 and it has v1beta1 API enabled and VolumeAttachment works there. I am closing this bug, CSI is going to be tested properly in trello cards and Polarion.


Note You need to log in before you can comment on or make changes to this bug.