Skip to content

Commit

Permalink
open shift rename
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGarewal committed Oct 22, 2024
1 parent 873e440 commit 0290a08
Showing 1 changed file with 155 additions and 0 deletions.
155 changes: 155 additions & 0 deletions minio/openshift.deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
apiVersion: v1
kind: Template
metadata:
annotations:
description: "Minio deployment"
labels:
app: "${NAME}"
template: "${NAME}-template"
name: "${NAME}"
parameters:
- name: "NAME"
displayName: "App to deploy"
value: "minio"
- name: "SECRETS"
displayName: "Secret object to reference"
value: "minio-secrets"
- name: "SRC_NAMESPACE"
displayName: "Namespace containing the deployment source"
value: "moe-gwells-tools"
- name: "SRC_IMAGE"
displayName: "Name of source image"
value: "minio"
# - name: "SRC_TAG"
# displayName: "Tag of source image"
#value: "latest"
- name: "DEST_PVC_SIZE"
displayName: "PVC size"
value: "10Gi"
- name: "DEST_PVC_CLASS"
displayName: "PVC class"
value: "gluster-file"
- name: "DEST_PVC_ACCESS"
displayName: "PVC access mode"
value: "ReadWriteOnce"
- name: "IMAGE_TAG"
required: true
- name: "MINIO_ACCESS_KEY"
required: true
- name: "MINIO_SECRET_KEY"
required: true
- name: "MINIO_DATA_DIR"
required: true
- name: "ENV_NAME"
required: true
- name: "NAME_SUFFIX"
required: false
objects:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
finalizers:
- kubernetes.io/pvc-protection
name: "${NAME}-config-vol-v2"
labels:
app: "${NAME}"
spec:
accessModes:
- ${DEST_PVC_ACCESS}
resources:
requests:
storage: ${DEST_PVC_SIZE}
storageClassName: ${DEST_PVC_CLASS}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
finalizers:
- kubernetes.io/pvc-protection
name: "${NAME}-data-vol"
labels:
app: "${NAME}"
spec:
accessModes:
- ${DEST_PVC_ACCESS}
resources:
requests:
storage: ${DEST_PVC_SIZE}
storageClassName: ${DEST_PVC_CLASS}
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: "${NAME}"
template: "${NAME}-template"
name: "${NAME}"
spec:
replicas: 1
strategy:
activeDeadlineSeconds: 3000
recreateParams:
timeoutSeconds: 600
type: Recreate
template:
metadata:
labels:
app: "${NAME}"
template: "${NAME}-template"
spec:
containers:
- env:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ${SECRETS}
key: MINIO_ACCESS_KEY
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: ${SECRETS}
key: MINIO_SECRET_KEY
- name: MINIO_DATA_DIR
value: /opt/minio/s3/data
- name: MINIO_CONFIG_DIR
value: /opt/minio/s3/config
image: ghcr.io/bcgov/nr-gwells/minio:${IMAGE_TAG}
imagePullPolicy: Always
name: "${NAME}"
ports:
- containerPort: 9000
protocol: TCP
resources:
limits:
cpu: 250m
requests:
cpu: 100m
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/minio/s3/config
name: config-vol
- mountPath: /opt/minio/s3/data
name: data-vol
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: config-vol
persistentVolumeClaim:
claimName: "${NAME}-config-vol-v2"
- name: data-vol
persistentVolumeClaim:
claimName: "${NAME}-data-vol"
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
ports:
- name: 9000-tcp
port: 9000
protocol: TCP
targetPort: 9000

0 comments on commit 0290a08

Please sign in to comment.