Attempting to create a set of resources based on a file via oc create
fails if they already exist.
According to the docs here oc create
should:
Parse a configuration file and create one or more OpenShift Enterprise objects ... Any existing resources are ignored.
(emphasis mine).
I can't see any config options for this command or globally that would alter this behaviour and it seems to me to be counter to the docs.
The command I ran is oc create -f some.file
The output is:
Error from server: services 'my-app' already exists
Error from server: buildconfigs 'my-app' already exists
Error from server: imagestreams 'my-app' already exists
Error from server: deploymentconfigs 'my-app' already exists
Error from server: routes 'my-app' already exists
Error from server: secrets 'my-app' already exists
It also exits with a non-zero exit code, so it's not just a warning. Am I missing something obvious here or misunderstanding what the documentation is saying?
I just want to be able to apply this file and ensure the state of the OpenShift project afterwards.