@mathieu-benoit and I were trying to get a Score adaption of https://github.com/Azure-Samples/aks-store-demo/tree/main working with score-compose but found that a routing configuration assumed that the hostname was equal to the workload name. However score compose was using (workload name)-(1st container name) because it shares the network of the 1st container.
This PR fixes this by setting the hostname directly on the 1st container as appropriate.
This shouldn't break compatibility and should make things more readable when workloads only contain one container.
@mathieu-benoit and I were trying to get a Score adaption of https://github.com/Azure-Samples/aks-store-demo/tree/main working with score-compose but found that a routing configuration assumed that the hostname was equal to the workload name. However score compose was using (workload name)-(1st container name) because it shares the network of the 1st container.
This PR fixes this by setting the hostname directly on the 1st container as appropriate.
This shouldn't break compatibility and should make things more readable when workloads only contain one container.