Parameterize the template

This commit is contained in:
Ovidio Mallo 2016-12-05 23:29:38 +01:00
parent ee94d7711a
commit 35e09f59dc

View file

@ -5,22 +5,22 @@ objects:
kind: DeploymentConfig kind: DeploymentConfig
metadata: metadata:
labels: labels:
app: frontend app: ${APP}
name: frontend name: ${APP}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
app: frontend app: ${APP}
deploymentconfig: frontend deploymentconfig: ${APP}
template: template:
metadata: metadata:
labels: labels:
app: frontend app: ${APP}
deploymentconfig: frontend deploymentconfig: ${APP}
spec: spec:
containers: containers:
- image: rubex-dev/${IMAGE_STREAM_TAG} - image: ${PROJECT_BASE}-${BUILD_ENV}/${APP}:${ENV}
name: frontend name: ${APP}
ports: ports:
- containerPort: 8080 - containerPort: 8080
protocol: TCP protocol: TCP
@ -29,17 +29,17 @@ objects:
imageChangeParams: imageChangeParams:
automatic: false automatic: false
containerNames: containerNames:
- frontend - ${APP}
from: from:
kind: ImageStreamTag kind: ImageStreamTag
name: ${IMAGE_STREAM_TAG} name: ${IMAGE_STREAM_TAG}
namespace: rubex-dev namespace: ${PROJECT_BASE}-${BUILD_ENV}
- apiVersion: v1 - apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
app: frontend app: ${APP}
name: frontend name: ${APP}
spec: spec:
ports: ports:
- name: 8080-tcp - name: 8080-tcp
@ -47,21 +47,33 @@ objects:
protocol: TCP protocol: TCP
targetPort: 8080 targetPort: 8080
selector: selector:
app: frontend app: ${APP}
deploymentconfig: frontend deploymentconfig: ${APP}
- apiVersion: v1 - apiVersion: v1
kind: Route kind: Route
metadata: metadata:
labels: labels:
app: frontend app: ${APP}
name: frontend name: ${APP}
spec: spec:
port: port:
targetPort: 8080-tcp targetPort: 8080-tcp
to: to:
kind: Service kind: Service
name: frontend name: ${APP}
parameters: parameters:
- description: The image stream tag from which to deploy. - description: The project base name.
displayName: Image Stream Tag displayName: Project base name
name: IMAGE_STREAM_TAG name: PROJECT_BASE
value: rubex
- description: The application name.
displayName: Application name
name: APP
value: frontend
- description: The environment in which the image stream is built.
displayName: Build environment
name: BUILD_ENV
value: dev
- description: The environment into which the app is deployed.
displayName: Environment
name: ENV