[jboss-jira] [JBoss JIRA] (WFWIP-255) Existing PVC can slip into as the storage for operator
Petr Kremensky (Jira)
issues at jboss.org
Tue Oct 22 08:45:01 EDT 2019
Petr Kremensky created WFWIP-255:
------------------------------------
Summary: Existing PVC can slip into as the storage for operator
Key: WFWIP-255
URL: https://issues.jboss.org/browse/WFWIP-255
Project: WildFly WIP
Issue Type: Bug
Components: OpenShift
Reporter: Petr Kremensky
Assignee: Jeff Mesnil
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 ${APP_NAME}-volume-quickstart-0 name - the PVC would be in normal circumstances created by the operator
{noformat}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: quickstart-volume-quickstart-0
spec:
accessModes:
- ReadWriteOnce
- ReadOnlyMany
- ReadWriteMany
resources:
requests:
storage: 1Mi
volumeMode: Filesystem
volumeName: pv0022
{noformat}
* deploy the project
{noformat}
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
{noformat}
The PVC created by user is reused by operator.
Additional details:
* oc get pvc quickstart-volume-quickstart-0 -o yaml
{noformat}
$ 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
{noformat}
* oc get wildflyserver quickstart -o yaml
{noformat}
$ 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
{noformat}
* oc get pod/quickstart-0 -o yaml
{noformat}
$ 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
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list