Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate DeploymentConfigs to Deployments #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions openshift/templates/agent/agent-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ objects:
admin-api-key: ${ADMIN_API_KEY}
type: Opaque

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
labels:
Expand All @@ -159,17 +159,13 @@ objects:
app-group: ${APP_GROUP}
role: ${ROLE}
env: ${TAG_NAME}
annotations:
description: Defines how to deploy the application server
app.openshift.io/connects-to: >-
[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"${WALLET_HOST}${SUFFIX}"},
{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"${API_HOST}${SUFFIX}"}]
spec:
replicas: 1
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
strategy:
type: Rolling
type: RollingUpdate
template:
metadata:
name: ${NAME}${SUFFIX}
Expand Down Expand Up @@ -297,7 +293,7 @@ objects:
value: ${AGENT_TRACE_TAG}
- name: TRACE_LABEL
value: ${AGENT_TRACE_LABEL}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports:
- containerPort: ${{AGENT_ADMIN_PORT}}
protocol: TCP
Expand Down Expand Up @@ -336,18 +332,6 @@ objects:
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
name: ${NAME}:${TAG_NAME}
namespace: ${IMAGE_NAMESPACE}

- kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v1
metadata:
Expand All @@ -361,8 +345,8 @@ objects:
env: ${TAG_NAME}
spec:
scaleTargetRef:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
apiVersion: apps/v1
kind: Deployment
name: ${NAME}${SUFFIX}
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
Expand Down
4 changes: 2 additions & 2 deletions openshift/templates/backup/backup-deploy.overrides.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CONFIG_MAP_NAME=backup-conf-primary
SOURCE_FILE=$( dirname "$0" )/config/backup.conf

OUTPUT_FORMAT=json
OUTPUT_FILE=${CONFIG_MAP_NAME}-configmap_DeploymentConfig.json
OUTPUT_FILE=${CONFIG_MAP_NAME}-configmap_Deployment.json

printStatusMsg "Generating ConfigMap; ${CONFIG_MAP_NAME} ..."
generateConfigMap "${CONFIG_MAP_NAME}" "${SOURCE_FILE}" "${OUTPUT_FORMAT}" "${OUTPUT_FILE}"
Expand All @@ -30,4 +30,4 @@ else
fi

SPECIALDEPLOYPARMS="--param-file=${_overrideParamFile}"
echo ${SPECIALDEPLOYPARMS}
echo ${SPECIALDEPLOYPARMS}
27 changes: 5 additions & 22 deletions openshift/templates/backup/backup-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ objects:
webhook-url: ${WEBHOOK_URL}
type: Opaque

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
labels:
Expand All @@ -69,30 +69,13 @@ objects:
app-group: ${APP_GROUP}
role: ${ROLE}
env: ${TAG_NAME}
annotations:
description: Defines how to deploy the application server
app.openshift.io/connects-to: >-
[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"${WALLET_DB_HOST}${SUFFIX}"},
{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"${DATABASE_HOST}${SUFFIX}"}]
annotations:
description: Defines how to deploy the ${NAME}${SUFFIX} server
spec:
strategy:
type: Recreate
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
namespace: ${IMAGE_NAMESPACE}
name: ${SOURCE_IMAGE_NAME}:${TAG_NAME}
replicas: 1
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
template:
metadata:
name: ${NAME}${SUFFIX}
Expand All @@ -119,7 +102,7 @@ objects:
path: ${CONFIG_FILE_NAME}
containers:
- name: ${NAME}${SUFFIX}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports: []
env:
- name: BACKUP_STRATEGY
Expand Down
24 changes: 5 additions & 19 deletions openshift/templates/bc-reg-fdw/bc-reg-fdw-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ objects:
app: ${APP_NAME}${SUFFIX}
env: ${TAG_NAME}

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
labels:
Expand All @@ -71,24 +71,10 @@ objects:
spec:
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 600
resources: {}
activeDeadlineSeconds: 21600
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
namespace: ${IMAGE_NAMESPACE}
name: ${SOURCE_IMAGE_NAME}:${TAG_NAME}
- type: ConfigChange
replicas: 1
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
template:
metadata:
name: ${NAME}${SUFFIX}
Expand All @@ -107,7 +93,7 @@ objects:
claimName: ${NAME}${SUFFIX}
containers:
- name: ${NAME}${SUFFIX}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports:
- containerPort: 5432
protocol: TCP
Expand Down
38 changes: 8 additions & 30 deletions openshift/templates/bcreg-controller/bcreg-controller-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ objects:
selector:
name: ${NAME}${SUFFIX}

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
labels:
Expand All @@ -96,35 +96,13 @@ objects:
app-group: ${APP_GROUP}
role: ${ROLE}
env: ${TAG_NAME}
annotations:
description: Defines how to deploy the application server
app.openshift.io/connects-to: >-
[{"apiVersion":"apps.openshift.io/v1","kind":"DeploymentConfig","name":"${AGENT_HOST}${SUFFIX}"}]
annotations:
description: Defines how to deploy the container.
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
namespace: ${IMAGE_NAMESPACE}
name: ${NAME}:${TAG_NAME}
type: RollingUpdate
replicas: 1
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
template:
metadata:
name: ${NAME}${SUFFIX}
Expand All @@ -138,7 +116,7 @@ objects:
spec:
containers:
- name: ${NAME}${SUFFIX}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports:
- containerPort: ${{HOST_PORT}}
protocol: TCP
Expand Down Expand Up @@ -205,8 +183,8 @@ objects:
env: ${TAG_NAME}
spec:
scaleTargetRef:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
apiVersion: apps/v1
kind: Deployment
name: ${NAME}${SUFFIX}
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
Expand Down
24 changes: 5 additions & 19 deletions openshift/templates/event-db/event-db-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ objects:
app: ${APP_NAME}${SUFFIX}
env: ${TAG_NAME}

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
generation: 1
Expand All @@ -72,25 +72,11 @@ objects:
spec:
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 600
resources: {}
activeDeadlineSeconds: 21600
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
namespace: ${IMAGE_NAMESPACE}
name: ${SOURCE_IMAGE_NAME}:${TAG_NAME}
- type: ConfigChange
replicas: 1
test: false
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
template:
metadata:
name: ${NAME}${SUFFIX}
Expand All @@ -109,7 +95,7 @@ objects:
claimName: ${NAME}${SUFFIX}
containers:
- name: ${NAME}${SUFFIX}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports:
- containerPort: 5432
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ objects:
app: ${APP_NAME}${SUFFIX}
env: ${TAG_NAME}

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
generation: 1
Expand All @@ -63,25 +63,11 @@ objects:
spec:
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 600
resources: {}
activeDeadlineSeconds: 21600
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}${SUFFIX}
from:
kind: ImageStreamTag
namespace: ${IMAGE_NAMESPACE}
name: ${SOURCE_IMAGE_NAME}:${TAG_NAME}
- type: ConfigChange
replicas: 1
test: false
selector:
name: ${NAME}${SUFFIX}
matchLabels:
name: ${NAME}${SUFFIX}
template:
metadata:
name: ${NAME}${SUFFIX}
Expand All @@ -100,7 +86,7 @@ objects:
claimName: ${NAME}${SUFFIX}
containers:
- name: ${NAME}${SUFFIX}
image:
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports:
- containerPort: 5432
protocol: TCP
Expand Down
Loading