Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-18018

Existing PVC can slip into as the storage for operator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • None
    • OpenShift

    Description

      PVC created manually (any accessModes) by user can be slip into the Operator.

      Things to notice here:

      • WFWIP-186 StorageSpec is intended to be mounted in ReadWriteOnce mode
      • foo: bar should never pass the validation as it is not a valid storage configuration

      reproduce

      • create PVC, use the ${OPERATOR_NAME}-volume-${OPERATOR_NAME}-0 name - the PVC would be in normal circumstances created by the operator
        apiVersion: v1
        kind: PersistentVolumeClaim
        metadata:
          name: quickstart-volume-quickstart-0
        spec:
          accessModes:
          - ReadWriteOnce
          - ReadOnlyMany
          - ReadWriteMany
          resources:
            requests:
              storage: 1Mi
          volumeMode: Filesystem
          volumeName: pv0022
        
      • deploy the project
        apiVersion: wildfly.org/v1alpha1
        kind: WildFlyServer
        metadata:
          name: quickstart
        spec:
          applicationImage: "quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0"
          replicas: 1
          storage:
            foo: bar
        

      The PVC created by user is reused by operator.

      Additional details:

      • oc get pvc quickstart-volume-quickstart-0 -o yaml
        $ oc get pvc quickstart-volume-quickstart-0 -o yaml
        apiVersion: v1
        kind: PersistentVolumeClaim
        metadata:
          name: quickstart-volume-quickstart-0
        ...
        spec:
          accessModes:
          - ReadWriteOnce
          - ReadOnlyMany
          - ReadWriteMany
          resources:
            requests:
              storage: 1Mi
          volumeMode: Filesystem
          volumeName: pv0022
        status:
          accessModes:
          - ReadWriteOnce
          - ReadWriteMany
          - ReadOnlyMany
          capacity:
            storage: 10Gi
          phase: Bound
        
      • oc get wildflyserver quickstart -o yaml
        $ oc get wildflyserver quickstart -o yaml
        apiVersion: wildfly.org/v1alpha1
        kind: WildFlyServer
        metadata:
          name: quickstart
        ...
        spec:
          applicationImage: quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0
          replicas: 1
          storage:
            foo: bar
        status:
          hosts:
          - quickstart-route-statefulset.apps-crc.testing
          pods:
          - name: quickstart-0
            podIP: 10.128.1.101
            state: ACTIVE
          replicas: 1
          scalingdownPods: 0
        
      • oc get pod/quickstart-0 -o yaml
        $ oc get pod/quickstart-0 -o yaml
        ...
            volumeMounts:
            - mountPath: /wildfly/standalone/data
              name: quickstart-volume
        ...
          volumes:
          - name: quickstart-volume
            persistentVolumeClaim:
              claimName: quickstart-volume-quickstart-0
        

      Attachments

        Activity

          People

            jmesnil1@redhat.com Jeff Mesnil
            pkremens@redhat.com Petr Kremensky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: