Rename configs to manifests
This commit is contained in:
parent
0c380f192b
commit
d8e090f39f
3 changed files with 5 additions and 5 deletions
107
deployment/manifests/app.yaml
Normal file
107
deployment/manifests/app.yaml
Normal file
|
@ -0,0 +1,107 @@
|
|||
apiVersion: v1
|
||||
kind: Template
|
||||
objects:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: ${APP}-data
|
||||
labels:
|
||||
app: ${APP}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: ${STORAGE_SIZE}
|
||||
selector:
|
||||
matchLabels:
|
||||
durability: ${STORAGE_DURABILITY}
|
||||
- apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
name: ${APP}
|
||||
labels:
|
||||
app: ${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:
|
||||
name: ${APP}
|
||||
labels:
|
||||
app: ${APP}
|
||||
spec:
|
||||
ports:
|
||||
- name: 8080-tcp
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: ${APP}
|
||||
deploymentconfig: ${APP}
|
||||
- apiVersion: v1
|
||||
kind: Route
|
||||
metadata:
|
||||
name: ${APP}
|
||||
labels:
|
||||
app: ${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"
|
||||
- description: The durability of reclaimed storage volumes.
|
||||
displayName: Storage durability
|
||||
name: STORAGE_DURABILITY
|
||||
value: permanent
|
||||
- description: The size of the storage to reclaim.
|
||||
displayName: Storage size
|
||||
name: STORAGE_SIZE
|
||||
value: 5Gi
|
32
deployment/manifests/build.yaml
Normal file
32
deployment/manifests/build.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
apiVersion: v1
|
||||
kind: Template
|
||||
objects:
|
||||
- apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: frontend
|
||||
- apiVersion: v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: frontend
|
||||
spec:
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: frontend:latest
|
||||
source:
|
||||
type: Git
|
||||
git:
|
||||
uri: https://github.com/omallo/ruby-ex
|
||||
ref: master
|
||||
strategy:
|
||||
type: Source
|
||||
sourceStrategy:
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: ruby:2.3
|
||||
namespace: openshift
|
Loading…
Add table
Add a link
Reference in a new issue