ruby-ex/deployment/config/app.yaml

81 lines
1.7 KiB
YAML
Raw Normal View History

apiVersion: v1
kind: Template
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
name: ${APP}
spec:
2016-12-07 00:09:18 +00:00
replicas: 1
selector:
2016-12-05 22:29:38 +00:00
app: ${APP}
deploymentconfig: ${APP}
template:
metadata:
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
deploymentconfig: ${APP}
spec:
containers:
2016-12-05 22:29:38 +00:00
- image: ${PROJECT_BASE}-${BUILD_ENV}/${APP}:${ENV}
2016-12-06 13:30:08 +00:00
imagePullPolicy: Always
2016-12-05 22:29:38 +00:00
name: ${APP}
ports:
- containerPort: 8080
protocol: TCP
triggers:
- type: ImageChange
imageChangeParams:
automatic: false
containerNames:
2016-12-05 22:29:38 +00:00
- ${APP}
from:
kind: ImageStreamTag
2016-12-06 13:00:31 +00:00
name: ${APP}:${ENV}
2016-12-05 22:29:38 +00:00
namespace: ${PROJECT_BASE}-${BUILD_ENV}
- apiVersion: v1
kind: Service
metadata:
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
name: ${APP}
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
2016-12-05 22:29:38 +00:00
app: ${APP}
deploymentconfig: ${APP}
- apiVersion: v1
kind: Route
metadata:
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
name: ${APP}
spec:
port:
targetPort: 8080-tcp
to:
kind: Service
2016-12-05 22:29:38 +00:00
name: ${APP}
parameters:
2016-12-05 22:29:38 +00:00
- 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