Skip to content

Commit

Permalink
Merge pull request #116 from sclorg/migrate_to_deployment
Browse files Browse the repository at this point in the history
Migrate from DeploymentConfig -> Deployment
  • Loading branch information
phracek authored Feb 7, 2024
2 parents f2e9f77 + c836755 commit 0e5e6db
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 34 deletions.
52 changes: 24 additions & 28 deletions openshift/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
---
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.openshift.tags: bot-betka-fedora
app: bot-betka-fedora
template: bot-betka-fedora
name: bot-betka-fedora
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "bot-betka-fedora:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
},
{
"from": {
"kind": "ImageStreamTag",
"name": "cwt-generator:latest"
}
}
]
spec:
template:
metadata:
Expand All @@ -14,7 +34,7 @@ spec:
containers:
- name: bot-betka-fedora
# get latest from image stream
image: bot-betka-fedora:latest
image: " "
env:
- name: GITLAB_API_TOKEN
valueFrom:
Expand Down Expand Up @@ -77,32 +97,8 @@ spec:
persistentVolumeClaim:
claimName: claim.betka
restartPolicy: Always
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
# 'automatic: false' means disable trigger (@ prod)
# 'automatic: true' means enable trigger (@ stage)
# This is all you have to change (to true) to enable CD
automatic: true
containerNames:
- bot-betka-fedora
from:
kind: ImageStreamTag
name: 'bot-betka-fedora:latest'
- type: ImageChange
imageChangeParams:
# 'automatic: false' means disable trigger (@ prod)
# 'automatic: true' means enable trigger (@ stage)
# This is all you have to change (to true) to enable CD
automatic: true
containerNames:
- cwt-generator
from:
kind: ImageStreamTag
name: 'cwt-generator:latest'
replicas: 1
strategy:
type: Rolling
type: RollingUpdate
rollingParams:
intervalSeconds: 1
6 changes: 4 additions & 2 deletions openshift/templates/flower.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
kind: Deployment
apiVersion: apps/v1
metadata:
name: flower
labels:
service: flower
spec:
selector:
service: flower
matchLabels:
name: flower
template:
metadata:
labels:
Expand Down
6 changes: 4 additions & 2 deletions openshift/templates/redis-commander.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
kind: Deployment
apiVersion: apps/v1
metadata:
name: redis-commander
labels:
service: redis-commander
spec:
selector:
service: redis-commander
matchLabels:
name: redis-commander
template:
metadata:
labels:
Expand Down
6 changes: 4 additions & 2 deletions openshift/templates/redis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
kind: Deployment
apiVersion: apps/v1
metadata:
name: redis
labels:
service: redis
spec:
selector:
service: redis
matchLabels:
name: redis
template:
metadata:
labels:
Expand Down

0 comments on commit 0e5e6db

Please sign in to comment.