Skip to content

Commit

Permalink
Migrate DeploymentConfigs to Deployments
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan P <[email protected]>
  • Loading branch information
i5okie committed Dec 13, 2024
1 parent 153bb51 commit 312c186
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Files created by the scripts from; https://github.com/BCDevOps/openshift-project-tools
*_DeploymentConfig.json
*_Deployment.json
*_BuildConfig.json
*.local.*
__pycache__
Expand Down
4 changes: 2 additions & 2 deletions openshift/templates/audit/audit-deploy.overrides.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CONFIG_MAP_NAME=audit-conf
SOURCE_FILE=$( dirname "$0" )/../../../docker/audit.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 Down Expand Up @@ -97,4 +97,4 @@ else
fi

SPECIALDEPLOYPARMS="--param-file=${_overrideParamFile}"
echo ${SPECIALDEPLOYPARMS}
echo ${SPECIALDEPLOYPARMS}
20 changes: 5 additions & 15 deletions openshift/templates/audit/audit-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ objects:
${ORGBOOK_WALLET_DB_PASSWORD_KEY_NAME}: ${ORGBOOK_WALLET_DB_PASSWORD}
type: Opaque

- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: ${NAME}${SUFFIX}
labels:
Expand All @@ -66,20 +66,10 @@ objects:
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 @@ -104,7 +94,7 @@ objects:
- /bin/bash
- -c
- "./run.sh"
image: ""
image: image-registry.openshift-image-registry.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}
ports: []
env:

Expand Down

0 comments on commit 312c186

Please sign in to comment.