PowerFlex

Configuring PowerFlex CSI Driver with Container Storage Module for Authorization

Given a setup where Kubernetes, a storage system, and the Container Storage Module for Authorization Proxy Server are deployed, follow these steps to configure the CSI Drivers to work with the Authorization sidecar:

  1. Apply the secret containing the tenant token data into the driver namespace. It’s assumed that the Kubernetes administrator has the token secret manifest, generated by your storage administrator via Generate a Token, saved in /tmp/token.yaml.

    #It is assumed that array type powerflex has the namepace “vxflexos”.

     kubectl apply -f /tmp/token.yaml -n vxflexos
    
  2. Edit these parameters in samples/secret/karavi-authorization-config.json file in the CSI PowerFlex driver and update/add connection information for one or more backend storage arrays. In an instance where multiple CSI drivers are configured on the same Kubernetes cluster, the port range in the endpoint parameter must be different for each driver.

Parameters
  • Create the karavi-authorization-config secret using this command:
    kubectl -n vxflexos create secret generic karavi-authorization-config --from-file=config=samples/secret/karavi-authorization-config.json -o yaml --dry-run=client | kubectl apply -f -
    
  1. Create the proxy-server-root-certificate secret.

    If running in insecure mode, create the secret with empty data:

    kubectl -n vxflexos create secret generic proxy-server-root-certificate --from-literal=rootCertificate.pem= -o yaml --dry-run=client | kubectl apply -f -
    

    Otherwise, create the proxy-server-root-certificate secret with the appropriate file:

    kubectl -n vxflexos create secret generic proxy-server-root-certificate --from-file=rootCertificate.pem=/path/to/rootCA -o yaml --dry-run=client | kubectl apply -f -
    
  2. Prepare the driver configuration secret, applicable to your driver installation method, to communicate with the Container Storage Module Authorization sidecar.

    Helm

    Refer to the Install the Driver section to edit the parameters in samples/config.yaml to configure the driver to communicate with the Authorization sidecar.

    • Update endpoint to match the localhost endpoint in samples/secret/karavi-authorization-config.json.

    • Update skipCertificateValidation to true.

    • The username and password can be any value since they will be ignored.

    Example:

    - username: "ignored"
      password: "ignored"
      systemID: "ID2"
      endpoint: "https://localhost:9400"
      skipCertificateValidation: true 
      isDefault: true 
      mdm: "10.0.0.3,10.0.0.4"
    

    Operator

    Refer to the Create Secret section to prepare secret.yaml to configure the driver to communicate with the CSM Authorization sidecar.

    • Update endpoint to match the localhost endpoint in samples/secret/karavi-authorization-config.json.

    • Update skipCertificateValidation to true.

    • The username and password can be any value since they will be ignored.

    Example:

    - username: "ignored"
      password: "ignored"
      systemID: "ID2"
      endpoint: "https://localhost:9400"
      skipCertificateValidation: true 
      isDefault: true 
      mdm: "10.0.0.3,10.0.0.4"
    
  3. Enable Container Storage Module Authorization in the driver installation applicable to your installation method.

    Helm

    Refer to the Install the Driver section to edit the parameters in myvalues.yaml to enable Authorization.

    • Update authorization.enabled to true.

    • Update images.authorization to the image of Authorization sidecar. In most cases, you can leave the default value.

    • Update authorization.proxyHost to the hostname of Authorization Proxy Server. csm-authorization.com is a placeholder for the proxyHost. See the administrator of Authorization for the correct value.

    • Update authorization.skipCertificateValidation to true or false depending on if you want to disable or enable certificate validation of Authorization Proxy Server.

    Example:

    authorization:
      enabled: true
    
      # sidecarProxyImage: the container image used for the csm-authorization-sidecar.
      # Default value: quay.io/dell/container-storage-modules/csm-authorization-sidecar:v1.13.0
      sidecarProxyImage: quay.io/dell/container-storage-modules/csm-authorization-sidecar:v1.13.0
    
      # proxyHost: hostname of the csm-authorization server
      # Default value: None
      proxyHost: csm-authorization.com
    
      # skipCertificateValidation: certificate validation of the csm-authorization server
      # Allowed Values:
      #   "true" - TLS certificate verification will be skipped
      #   "false" - TLS certificate will be verified 
      # Default value: "true" 
      skipCertificateValidation: true
    

    Operator

    Refer to the Install Driver section to edit the parameters in the Custom Resource to enable Authorization.

    Under modules, enable the module named authorization:

    • Update the enabled field to true.

    • Update the image to the image of the Authorization sidecar. In most cases, you can leave the default value.

    • Update the PROXY_HOST environment value to the hostname of the Authorization Proxy Server. csm-authorization.com is a placeholder for the proxyHost. See the administrator of Authorization for the correct value.

    • Update the SKIP_CERTIFICATE_VALIDATION environment value to true or false depending on if you want to disable or enable certificate validation of Authorization Proxy Server.

    Example:

    modules:
      # Authorization: enable csm-authorization for RBAC
      - name: authorization
        # enable: Enable/Disable csm-authorization
        enabled: true
        configVersion: v1.13.0
        components:
        - name: karavi-authorization-proxy
          image: quay.io/dell/container-storage-modules/csm-authorization-sidecar:v1.13.0
          envs:
            # proxyHost: hostname of the csm-authorization server
            - name: "PROXY_HOST"
              value: "csm-authorization.com"
    
            # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server       
            - name: "SKIP_CERTIFICATE_VALIDATION"
              value: "true"
    

    Alternatively, you can use the minimal sample files provided here and install the module using default values

  4. Install the CSI PowerFlex driver following the appropriate documenation for your installation method.

  5. (Optional) Install dellctl to perform Kubernetes administrator commands for additional capabilities (e.g., list volumes). Please refer to the dellctl documentation page for the installation steps and command list.