30x / k8s-router

A general purpose router for Kubernetes.
Apache License 2.0
15 stars 2 forks source link

Improved internal caching #49

Closed AdamMagaluk closed 8 years ago

AdamMagaluk commented 8 years ago

Implements #44

Instead of storing the pointer to Kubernete's v1.Pod structure and v1.Secret structure in the cache and thus holding onto the full object. This PR converts that struct to our model with only things we use in nginx/config and router/pods.

For secrets the cache is now just a lookup of namespace to the byte array of the token.

For pods we store Namespace, Pod Status, and a fnv hash of the annotations used for quick comparison when a pod is checked during an update event.

jbowen93 commented 8 years ago

LGTM

noahdietz commented 8 years ago

LGTM