Code Monkey home page Code Monkey logo

aws-efs-csi-driver-operator's Introduction

aws-efs-csi-driver operator

An operator to deploy the AWS EFS CSI driver in OKD.

This operator is installed by OLM.

Quick start

To build and run the operator locally:

# Create only the resources the operator needs to run via CLI
oc apply -f - <<EOF
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
    name: efs.csi.aws.com
spec:
  logLevel: Normal
  managementState: Managed
  operatorLogLevel: Trace
EOF

# Build the operator
make

# Set the environment variables
export DRIVER_IMAGE=quay.io/openshift/origin-aws-efs-csi-driver:latest
export NODE_DRIVER_REGISTRAR_IMAGE=quay.io/openshift/origin-csi-node-driver-registrar:latest
export LIVENESS_PROBE_IMAGE=quay.io/openshift/origin-csi-livenessprobe:latest
export OPERATOR_NAME=aws-efs-csi-driver-operator
export PROVISIONER_IMAGE=quay.io/openshift/origin-csi-external-provisioner:latest
export KUBE_RBAC_PROXY_IMAGE=quay.io/openshift/origin-kube-rbac-proxy:latest

# Run the operator via CLI
./aws-efs-csi-driver-operator start --kubeconfig $KUBECONFIG --namespace openshift-cluster-csi-drivers

Automatic creation of EFS filesystem and storageclasses

For local testing and e2e, following command can be run to automate creation of EFS filesystem:

STORAGECLASS_LOCATION=sc.yaml MANIFEST_LOCATION=manifest.yaml ./create-efs-volume start --kubeconfig $KUBECONFIG --namespace openshift-cluster-csi-drivers

Note: Creation of EFS volume, security groups and firewall rules is not idempotent and hence you must delete those manually if you want to recreate.

This should give us a storageclass which can be applied and can be used for testing:

oc create -f sc.yaml
TEST_CSI_DRIVER_FILES=manifest.yaml ./openshift-tests run openshift/csi .

OLM

To build an bundle + index images, use hack/create-bundle.

cd hack
./create-bundle registry.ci.openshift.org/ocp/4.9:aws-efs-csi-driver registry.ci.openshift.org/ocp/4.9:aws-efs-csi-driver-operator quay.io/<my-repo>/efs-bundle quay.io/<my-repo>/efs-index

At the end it will print a command that creates Subscription for the newly created index image.

TODO: update the example to use quay.io/openshift once the images are mirrored there. registry.ci.openshift.org is not public.

aws-efs-csi-driver-operator's People

Contributors

bertinatto avatar coverprice avatar deads2k avatar dobsonj avatar gnufied avatar joepvd avatar jsafrane avatar locriandev avatar mpatlasov avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar phaow avatar romanbednar avatar sosiouxme avatar thiagoalessio avatar tsmetana avatar ximinhan avatar yselkowitz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-efs-csi-driver-operator's Issues

Persistent Volume Claim error while mounting to pod but successful in bounding on Openshift 4.8 AWS

Hello everyone, I had install Openshift 4.8 to AWS Environment with openshift installer cli but seem like my Cluster can not mount Persistent Volume Claim Elastic File System from AWS to Pod at runtime environment I also encounter problem like this.
I want to have Read Write Many RWX PVC so there is anyway to provisioning RWX PVC for AWS environment ?

mount failed: exit status 1 Mounting command: mount Mounting arguments: -t efs -o accesspoint

MountVolume.SetUp failed for volume "pv-mock-nfs-webcontent-sv" : rpc error: code = Internal desc = Could not mount "fs-0123cdef:/" at "/var/lib/kubelet/pods/248ff329-b93e-47a2-b5e3-8950f6b9220b/volumes/kubernetes.io~csi/pv-mock-nfs-webcontent-sv/mount": mount failed: exit status 1 Mounting command: mount Mounting arguments: -t efs -o accesspoint=fsap-0123456789abcdef,tls fs-0123cdef:/ /var/lib/kubelet/pods/248ff329-b93e-47a2-b5e3-8950f6b9220b/volumes/kubernetes.io~csi/pv-mock-nfs-webcontent-sv/mount Output: Access Point ID fsap-0123456789abcdef is malformed
apiVersion: aws-efs.managed.openshift.io/v1alpha1
kind: SharedVolume
metadata:
  creationTimestamp: '2022-01-14T06:26:29Z'
  finalizers:
    - finalizer.awsefs.managed.openshift.io
  generation: 1
  managedFields:
    - apiVersion: aws-efs.managed.openshift.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        'f:spec':
          .: {}
          'f:accessPointID': {}
          'f:fileSystemID': {}
      manager: Mozilla
      operation: Update
      time: '2022-01-14T06:26:29Z'
    - apiVersion: aws-efs.managed.openshift.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:finalizers':
            .: {}
            'v:"finalizer.awsefs.managed.openshift.io"': {}
        'f:status':
          .: {}
          'f:claimRef':
            .: {}
            'f:apiGroup': {}
            'f:kind': {}
            'f:name': {}
          'f:phase': {}
      manager: aws-efs-operator
      operation: Update
      time: '2022-01-14T06:26:29Z'
  name: webcontent-sv
  namespace: mock-nfs
  resourceVersion: '1125615'
  uid: f8983e31-00c0-4dd7-be3a-c5e254bfcf00
spec:
  accessPointID: fsap-0123456789abcdef
  fileSystemID: fs-0123cdef
status:
  claimRef:
    apiGroup: ''
    kind: PersistentVolumeClaim
    name: pvc-webcontent-sv
  phase: Ready

image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.