Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this is going to fix lagoon issue #461 #463

Merged
merged 7 commits into from Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions images/oc-build-deploy-dind/build-deploy-docker-compose.sh
Expand Up @@ -379,24 +379,25 @@ do
# Some Templates need additonal Parameters, like where persistent storage can be found.
TEMPLATE_PARAMETERS=()
PERSISTENT_STORAGE_PATH=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent false)

PERSISTENT_STORAGE_CLASS=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent\\.class false)
if [ ! $PERSISTENT_STORAGE_CLASS == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_CLASS="${PERSISTENT_STORAGE_CLASS}")
fi

PERSISTENT_STORAGE_SIZE=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent\\.size false)
if [ ! $PERSISTENT_STORAGE_SIZE == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_SIZE="${PERSISTENT_STORAGE_SIZE}")
fi

if [ ! $PERSISTENT_STORAGE_PATH == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_PATH="${PERSISTENT_STORAGE_PATH}")

PERSISTENT_STORAGE_CLASS=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent\\.class false)
if [ ! $PERSISTENT_STORAGE_CLASS == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_CLASS="${PERSISTENT_STORAGE_CLASS}")
fi

PERSISTENT_STORAGE_NAME=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent\\.name false)
if [ ! $PERSISTENT_STORAGE_NAME == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_NAME="${PERSISTENT_STORAGE_NAME}")
fi

PERSISTENT_STORAGE_SIZE=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.persistent\\.size false)
if [ ! $PERSISTENT_STORAGE_SIZE == "false" ]; then
TEMPLATE_PARAMETERS+=(-p PERSISTENT_STORAGE_SIZE="${PERSISTENT_STORAGE_SIZE}")
fi
fi

DEPLOYMENT_STRATEGY=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.deployment\\.strategy false)
Expand Down
Expand Up @@ -34,6 +34,12 @@ parameters:
- name: DEPLOYMENT_STRATEGY
description: Strategy of Deploymentconfig
value: "Rolling"
- name: PERSISTENT_STORAGE_CLASS
description: Name of the Storage Class to use
value: ""
- name: PERSISTENT_STORAGE_SIZE
description: Size of the Storage to request
value: "5Gi"
objects:
- apiVersion: v1
kind: PersistentVolumeClaim
Expand All @@ -42,6 +48,8 @@ objects:
spec:
accessModes:
- ReadWriteOnce
storageClassName: "${PERSISTENT_STORAGE_CLASS}"
resources:
requests:
storage: 5Gi
storage: ${PERSISTENT_STORAGE_SIZE}