efs.j2 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. kind: DeploymentConfig
  2. apiVersion: v1
  3. metadata:
  4. name: "{{deploy_name}}"
  5. labels:
  6. provisioners-infra: "{{name}}"
  7. name: "{{name}}"
  8. spec:
  9. replicas: {{replica_count}}
  10. selector:
  11. provisioners-infra: "{{name}}"
  12. name: "{{name}}"
  13. strategy:
  14. type: Recreate
  15. template:
  16. metadata:
  17. name: "{{deploy_name}}"
  18. labels:
  19. provisioners-infra: "{{name}}"
  20. name: "{{name}}"
  21. spec:
  22. serviceAccountName: "{{deploy_serviceAccount}}"
  23. {% if node_selector is iterable and node_selector | length > 0 %}
  24. nodeSelector:
  25. {% for key, value in node_selector.items() %}
  26. {{key}}: "{{value}}"
  27. {% endfor %}
  28. {% endif %}
  29. containers:
  30. - name: efs-provisioner
  31. image: {{openshift_provisioners_image_prefix}}efs-provisioner:{{openshift_provisioners_image_version}}
  32. env:
  33. - name: AWS_ACCESS_KEY_ID
  34. valueFrom:
  35. secretKeyRef:
  36. name: provisioners-efs
  37. key: aws-access-key-id
  38. - name: AWS_SECRET_ACCESS_KEY
  39. valueFrom:
  40. secretKeyRef:
  41. name: provisioners-efs
  42. key: aws-secret-access-key
  43. - name: FILE_SYSTEM_ID
  44. value: "{{openshift_provisioners_efs_fsid}}"
  45. - name: AWS_REGION
  46. value: "{{openshift_provisioners_efs_region}}"
  47. - name: PROVISIONER_NAME
  48. value: "{{openshift_provisioners_efs_name}}"
  49. volumeMounts:
  50. - name: pv-volume
  51. mountPath: /persistentvolumes
  52. securityContext:
  53. supplementalGroups:
  54. - {{openshift_provisioners_efs_supplementalgroup}}
  55. volumes:
  56. - name: pv-volume
  57. persistentVolumeClaim:
  58. claimName: "{{claim_name}}"