Closed djwhatle closed 6 years ago
We should be able to use a k8s construct: metadata.generatedName
to address this:
Names generated by the system may be requested using metadata.generateName. GenerateName indicates that the name should be made unique by the server prior to persisting it. A non-empty value for the field indicates the name will be made unique (and the name returned to the client will be different than the name passed). The value of this field will be combined with a unique suffix on the server if the Name field has not been provided.
So I'd propose something descriptive (apb.Name
), for this value. metadata.generatedName: foo-apb-
would result in a pod name of foo-apb-xyrhf
, for example. We just need to make sure the broker does not set the Name field on the pod.
What happened:
What you expected to happen: APBs have descriptive but unique names, similar to how normal pods are named in OpenShift. Example:
apb-hello-world-1-3x7zf
Edit: It would be even more helpful to see the action that the APB pod is carrying out. Example:
apb-provision-hello-world-1-lzwrb
Perhaps the APB name can be used in the pod name as-is. Another option would be to have a "short name" parameter defined in apb.yml.
Relevant line in broker: https://github.com/openshift/ansible-service-broker/blob/master/pkg/apb/executor.go#L71