ruby-ex/deployment/config/app.yaml
2016-12-07 23:51:04 +01:00

84 lines
1.8 KiB
YAML

apiVersion: v1
kind: Template
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${APP}
name: ${APP}
spec:
replicas: ${REPLICAS}
selector:
app: ${APP}
deploymentconfig: ${APP}
template:
metadata:
labels:
app: ${APP}
deploymentconfig: ${APP}
spec:
containers:
- image: ${PROJECT_BASE}-${BUILD_ENV}/${APP}:${ENV}
imagePullPolicy: Always
name: ${APP}
ports:
- containerPort: 8080
protocol: TCP
triggers:
- type: ImageChange
imageChangeParams:
automatic: false
containerNames:
- ${APP}
from:
kind: ImageStreamTag
name: ${APP}:${ENV}
namespace: ${PROJECT_BASE}-${BUILD_ENV}
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${APP}
name: ${APP}
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: ${APP}
deploymentconfig: ${APP}
- apiVersion: v1
kind: Route
metadata:
labels:
app: ${APP}
name: ${APP}
spec:
port:
targetPort: 8080-tcp
to:
kind: Service
name: ${APP}
parameters:
- description: The project base name.
displayName: Project base name
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
- description: The number of replicas.
displayName: Replicas
name: REPLICAS
value: 1