mlab-lattice / lattice

Apache License 2.0
1 stars 3 forks source link

update UUID generator #259

Open kevindrosendahl opened 5 years ago

kevindrosendahl commented 5 years ago

currently using https://github.com/satori/go.uuid which should not be used (https://github.com/satori/go.uuid/issues/84).

want to move to a mode of not prefixing cross-cutting resource names (e.g. creating an address.lattice.mlab.com for service 123e4567-e89b-12d3-a456-426655440000 should just have the name 123e4567-e89b-12d3-a456-426655440000 rather than lattice-service-123e4567-e89b-12d3-a456-426655440000)

however to do this we must rely on the UUIDs being truly unique (which is reasonable assuming we're using a correct UUID generator https://stackoverflow.com/questions/2977593/is-it-safe-to-assume-a-guid-will-always-be-unique)

so we should ensure we're using a correct UUID generator. probably want to just replicate this: https://github.com/kubernetes/kubernetes/blob/7f23a743e8c23ac6489340bbb34fa6f1d392db9d/staging/src/k8s.io/apimachinery/pkg/util/uuid/uuid.go