Bug 1866262 - ClusterCSIDriver CRs are not validated
Summary: ClusterCSIDriver CRs are not validated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Jan Safranek
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-05 08:56 UTC by Jan Safranek
Modified: 2020-10-27 16:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:24:53 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-storage-operator pull 76 0 None closed Bug 1866262: Remove DriverConfig from CSI operator CRs 2020-10-01 07:47:14 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:25:07 UTC

Description Jan Safranek 2020-08-05 08:56:02 UTC
Users can create invalid ClusterCSIDriver instances:

apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
    name: manila.csi.openstack.org
  spec:
    driverConfig:
      driverName: ebs.csi.aws.com
    logLevel: Normal
    managementState: Managed
    operatorLogLevel: Normal

Note that the CR name does not correspond to `spec.driverConfig.driverName`.

CSO will always create valid instances, however, we should block users from breaking them via validation.

Comment 1 Jan Safranek 2020-08-07 15:46:05 UTC
We'll going to fix it by validation in the operators, not by webhook. I.e. the operator sets a condition (Degraded?) that the CR is not valid and refuse to operate on it.

Comment 2 Jan Safranek 2020-08-17 09:51:03 UTC
It would be even better to remove ClusterCSIDriver.Spec.DriverConfig, as it does not bring anything useful (yet). We may always introduce it later.

Comment 3 Jan Safranek 2020-08-17 09:51:31 UTC
Attempt to remove ClusterCSIDriver.Spec.DriverConfig: https://github.com/openshift/api/pull/718

Comment 6 Qin Ping 2020-08-19 07:12:25 UTC
The fixed is not included in 4.6.0-0.nightly-2020-08-18-165040, waiting for a new version.

Comment 7 Qin Ping 2020-08-21 06:03:11 UTC
verified with: 4.6.0-0.nightly-2020-08-20-234448

Comment 9 errata-xmlrpc 2020-10-27 16:24:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


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