Description of problem: The spec.containers.command is not created with "oc create deploymentconfig <dc-name> --image=<image> -- <command>".The <command> are specified in spec.containers.args. Version-Release number of selected component (if applicable): OpenShift4.6 How reproducible: Create deploymentconfig with the following command. ``` $ oc create deploymentconfig testdeployer-from-dc --image=ubi8/ubi -- tail -f /dev/null ... spec: containers: - args: - tail - -f - /dev/null image: ubi8/ubi ``` If using deployment, the spec.containers.command is created. ``` $oc create deployment testdeployer-from-deploy --image=ubi8/ubi -- tail -f /dev/null ... spec: containers: - command: - tail - -f - /dev/null image: ubi8/ubi ``` Both pods were created without any problems. ``` $ oc get pod NAME READY STATUS RESTARTS AGE testdeployer-from-dc-1-2kc55 1/1 Running 0 15m testdeployer-from-dc-1-deploy 0/1 Completed 0 15m testdeployer-from-deploy-77749684d8-klrmj 1/1 Running 0 17m ``` Actual results: The spec.containers.command is not created. Expected results: The spec.containers.command should be created.
Confirmed with latest oc , can't reproduce the issue now: [root@localhost ~]# oc create deploymentconfig testdeployer-from-dc --image=ubi8/ubi -- tail -f /dev/null deploymentconfig.apps.openshift.io/testdeployer-from-dc created [root@localhost ~]# oc get dc NAME REVISION DESIRED CURRENT TRIGGERED BY testdc 1 1 1 config testdeployer-from-dc 1 1 1 config [root@localhost ~]# oc get dc testdeployer-from-dc -o yaml apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: creationTimestamp: "2021-09-16T05:14:51Z" generation: 1 name: testdeployer-from-dc namespace: zhou resourceVersion: "42894" uid: a377fe7c-13ae-4a49-a080-5e5ebfc0e115 spec: replicas: 1 revisionHistoryLimit: 10 selector: deployment-config.name: testdeployer-from-dc strategy: activeDeadlineSeconds: 21600 resources: {} rollingParams: intervalSeconds: 1 maxSurge: 25% maxUnavailable: 25% timeoutSeconds: 600 updatePeriodSeconds: 1 type: Rolling template: metadata: creationTimestamp: null labels: deployment-config.name: testdeployer-from-dc spec: containers: - command: - tail - -f - /dev/null image: ubi8/ubi imagePullPolicy: Always name: default-container resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 test: false triggers: - type: ConfigChange