Created
June 4, 2020 13:23
-
-
Save gerardcl/5d94eb9157255e3f79fc2d2e437b6ee5 to your computer and use it in GitHub Desktop.
MinIO OpenShift Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Template | |
| metadata: | |
| name: minio | |
| parameters: | |
| - name: MEMORY_LIMIT | |
| displayName: Memory Limit | |
| description: Maximum amount of memory available for the container. | |
| value: 256Mi | |
| required: true | |
| - name: MEMORY_REQUEST | |
| displayName: Memory Request | |
| description: Minimum amount of memory requested for the container. | |
| value: 128Mi | |
| required: true | |
| - name: CPU_LIMIT | |
| displayName: CPU Limit | |
| description: Maximum amount of CPU available for the container. | |
| value: 250m | |
| required: true | |
| - name: CPU_REQUEST | |
| displayName: CPU Request | |
| description: Minimum amount of CPU requested for the container. | |
| value: 50m | |
| required: true | |
| - description: Minio Storage Size. | |
| displayName: Minio Storage Size | |
| name: MINIO_PVC_SIZE | |
| value: 50Gi | |
| required: true | |
| - description: Minio Access Key. | |
| displayName: Minio Access Key | |
| from: 'minio[a-zA-Z0-9]{15}' | |
| generate: expression | |
| name: MINIO_ACCESS_KEY | |
| required: true | |
| - description: Minio Secret Key. | |
| displayName: Minio Secret Key | |
| from: '[a-zA-Z0-9]{25}' | |
| generate: expression | |
| name: MINIO_SECRET_KEY | |
| required: true | |
| objects: | |
| - apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: minio-credentials | |
| labels: | |
| tool: minio | |
| stringData: | |
| minio-access-key: ${MINIO_ACCESS_KEY} | |
| minio-secret-key: ${MINIO_SECRET_KEY} | |
| type: Opaque | |
| - apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: minio | |
| labels: | |
| tool: minio | |
| annotations: | |
| serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"minio"}}' | |
| - apiVersion: v1 | |
| kind: Route | |
| metadata: | |
| name: minio | |
| labels: | |
| tool: minio | |
| port: | |
| targetPort: minio | |
| spec: | |
| to: | |
| kind: Service | |
| name: minio | |
| tls: | |
| insecureEdgeTerminationPolicy: Redirect | |
| termination: edge | |
| - apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: minio | |
| labels: | |
| tool: minio | |
| annotations: | |
| service.alpha.openshift.io/serving-cert-secret-name: minio-tls | |
| spec: | |
| ports: | |
| - name: minio | |
| port: 9000 | |
| targetPort: 9000 | |
| selector: | |
| app: minio | |
| - apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: minio-pvc | |
| labels: | |
| tool: minio | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| storage: ${MINIO_PVC_SIZE} | |
| - apiVersion: v1 | |
| kind: DeploymentConfig | |
| metadata: | |
| name: minio | |
| deploymentconfig: minio | |
| labels: | |
| tool: minio | |
| spec: | |
| replicas: 1 | |
| revisionHistoryLimit: 10 | |
| strategy: | |
| recreateParams: | |
| timeoutSeconds: 600 | |
| resources: {} | |
| type: Recreate | |
| selector: | |
| app: minio | |
| template: | |
| metadata: | |
| labels: | |
| app: minio | |
| deploymentconfig: minio | |
| spec: | |
| serviceAccountName: minio | |
| containers: | |
| - name: minio | |
| image: minio/minio:latest | |
| imagePullPolicy: IfNotPresent | |
| resources: | |
| limits: | |
| cpu: '${CPU_LIMIT}' | |
| memory: '${MEMORY_LIMIT}' | |
| requests: | |
| cpu: '${CPU_REQUEST}' | |
| memory: '${MEMORY_REQUEST}' | |
| ports: | |
| - containerPort: 9000 | |
| protocol: TCP | |
| name: public | |
| args: | |
| - server | |
| - /data | |
| env: | |
| - name: MINIO_ACCESS_KEY | |
| valueFrom: | |
| secretKeyRef: | |
| key: minio-access-key | |
| name: minio-credentials | |
| - name: MINIO_SECRET_KEY | |
| valueFrom: | |
| secretKeyRef: | |
| key: minio-secret-key | |
| name: minio-credentials | |
| volumeMounts: | |
| - mountPath: /etc/tls/private | |
| name: minio-tls | |
| - name: minio-storage | |
| mountPath: "/data" | |
| volumes: | |
| - name: minio-tls | |
| secret: | |
| secretName: minio-tls | |
| - name: minio-storage | |
| persistentVolumeClaim: | |
| claimName: minio-pvc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment