Add OpenShift config for deployment
This commit is contained in:
parent
e51f8c2a59
commit
d166f17f52
4 changed files with 163 additions and 0 deletions
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"editor.tabSize": 2
|
||||
}
|
65
deployment/config/dev/app.yaml
Normal file
65
deployment/config/dev/app.yaml
Normal file
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
openshift.io/container.frontend.image.entrypoint: '["container-entrypoint","/bin/sh","-c","$STI_SCRIPTS_PATH/usage"]'
|
||||
labels:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
||||
spec:
|
||||
containers:
|
||||
- image: frontend:latest
|
||||
name: frontend
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- frontend
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: frontend:latest
|
||||
type: ImageChange
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
ports:
|
||||
- name: 8080-tcp
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Route
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
port:
|
||||
targetPort: 8080-tcp
|
||||
to:
|
||||
kind: Service
|
||||
name: frontend
|
42
deployment/config/dev/build.yaml
Normal file
42
deployment/config/dev/build.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: frontend:latest
|
||||
source:
|
||||
git:
|
||||
uri: https://github.com/omallo/ruby-ex
|
||||
type: Git
|
||||
strategy:
|
||||
sourceStrategy:
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: ruby:2.3
|
||||
namespace: openshift
|
||||
type: Source
|
||||
triggers:
|
||||
- github:
|
||||
secret: vo6X68zZF5Vo7Gr3VE6i
|
||||
type: GitHub
|
||||
- generic:
|
||||
secret: 1mmeM9GOBvY2aS7rlF0f
|
||||
type: Generic
|
||||
- type: ConfigChange
|
||||
- imageChange: {}
|
||||
type: ImageChange
|
||||
status:
|
||||
lastVersion: 0
|
53
deployment/config/test/app.yaml
Normal file
53
deployment/config/test/app.yaml
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
openshift.io/container.frontend.image.entrypoint: '["container-entrypoint","/usr/libexec/s2i/run"]'
|
||||
labels:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
||||
spec:
|
||||
containers:
|
||||
- image: rubex-dev/frontend:test
|
||||
name: frontend
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- frontend
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: frontend:test
|
||||
namespace: rubex-dev
|
||||
type: ImageChange
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
name: frontend
|
||||
spec:
|
||||
ports:
|
||||
- name: 8080-tcp
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: frontend
|
||||
deploymentconfig: frontend
|
Loading…
Reference in a new issue