ruby-ex/deployment/manifests/app.yaml

101 lines
2.1 KiB
YAML
Raw Normal View History

apiVersion: v1
kind: Template
objects:
2016-12-15 17:32:06 +00:00
#- apiVersion: v1
# kind: PersistentVolumeClaim
# metadata:
# name: ${APP}-data
# labels:
# app: ${APP}
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: ${STORAGE_SIZE}
- apiVersion: v1
kind: DeploymentConfig
metadata:
2016-12-08 22:32:58 +00:00
name: ${APP}
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
spec:
2016-12-07 22:51:04 +00:00
replicas: ${REPLICAS}
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:
2016-12-16 12:40:18 +00:00
- 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:
2016-12-08 22:32:58 +00:00
name: ${APP}
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
spec:
ports:
2016-12-16 12:40:18 +00:00
- name: 8080-tcp
port: 8080
protocol: TCP
2016-12-16 12:40:18 +00:00
targetPort: 8080
selector:
2016-12-05 22:29:38 +00:00
app: ${APP}
deploymentconfig: ${APP}
- apiVersion: v1
kind: Route
metadata:
2016-12-08 22:32:58 +00:00
name: ${APP}
labels:
2016-12-05 22:29:38 +00:00
app: ${APP}
spec:
port:
2016-12-16 12:40:18 +00:00
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
2016-12-07 22:51:04 +00:00
- description: The number of replicas.
displayName: Replicas
name: REPLICAS
2016-12-07 23:30:54 +00:00
value: "1"
2016-12-09 00:13:22 +00:00
- description: The size of the storage to reclaim.
displayName: Storage size
name: STORAGE_SIZE
value: 5Gi