Closed RMCampos closed 1 month ago
spec.template.spec.containers.image
should be parameterized, currentlyimage: ""
.
@WadeBarnes I didn't remove the image. If you or someone else provide some guidance, I can push a commit adding the image. As you can see, there was changes regarding the image name or parameter.
spec.template.spec.containers.image
should be parameterized, currentlyimage: ""
.@WadeBarnes I didn't remove the image. If you or someone else provide some guidance, I can push a commit adding the image. As you can see, there was changes regarding the image name or parameter.
@RMCampos, I know you did not change anything with respect to the code I identified. In it's current state as a DeploymentConfig
, it's relying on the fact that OpenShift will populate the the field with an image spec based on what's defined in the triggers
section. As a Deployment
you need to explicitly define the image spec.
You'll need to change it to something like:
image: ${IMAGE_NAMESPACE}${SOURCE_IMAGE_NAME}:${TAG_NAME}
@RMCampos Try:
image: "${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/${SOURCE_IMAGE_NAME}:${IMAGE_TAG}"
With revised params:
parameters:
- name: IMAGE_REGISTRY
description: Container image registry
value: docker.io
- name: IMAGE_NAMESPACE
description: The namespace of the OpenShift project containing the imagestream for the application.
value: bcgovimages
- name: SOURCE_IMAGE_NAME
description: The name of the image to use for this resource. Use 'backup-{database name}' depending on your database provider
value: backup-container
- name: IMAGE_TAG
displayName:
description: Image tag name, e.g. latest
value: latest
It should end up similar to:
image: "docker.io/bcgovimages/backup-container:latest"
Thanks @DerekRoberts
What
Dropped
DeploymentConfig
addingDeployment
.Why
DeploymentConfig
is now deprecated.References
Replace deprecated DeploymentConfigs with deployments: RedHat Learning Developers Docs
Co-Authored by: @DerekRoberts