cloudfoundry / cf-k8s-networking

building a cloud foundry without gorouter....
Apache License 2.0
32 stars 17 forks source link

Pod and Service labels consistency #22

Closed mike1808 closed 4 years ago

mike1808 commented 4 years ago

It'll be nice to have the same labels for pods and services to able to reuse the selector find services and pods corresponding to an app GUID. Right now pods have cloudfoundry.org/app_guid and cloudfoundry.org/guid labels and services have cloudfoundry.org/app.

AFAIK, having the same label is a good practice in Kubernetes which eases operators' experience and leverages tools working Kubernetes cluster to group objects under the same entity. https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

mike1808 commented 4 years ago

I'm currently working on it.

cppforlife commented 4 years ago

i would recommend using app-guid instead of app_guid.

mike1808 commented 4 years ago

@cppforlife is that a best practice in k8s? I don't what's the naming guidelines in this ecosystem