habitat-sh / habitat-operator

A Kubernetes operator for Habitat services
Apache License 2.0
61 stars 17 forks source link

[topology label] add new label `operator.habitat.sh/topology` #332

Closed surajssd closed 6 years ago

surajssd commented 6 years ago

Renaming the topology label from just topology to operator.habitat.sh/topology.

Fixes https://github.com/habitat-sh/habitat-operator/issues/309

surajssd commented 6 years ago

@indradhanush can you PTAL?

surajssd commented 6 years ago

When the operator with this change is deployed, it updates the labels inside the StatefulSet that already exists, this leads to deletion of existing pod and re-creation of new one.

With following events

0s        0s        1         example-standalone-habitat-0.154a601bee720296   Pod       spec.containers{habitat-service}   Normal    Killing   kubelet, minikube   Killing container with id docker://habitat-service:Need to kill Pod
0s        0s        1         example-standalone-habitat-0.154a601c4f5af632   Pod                 Normal    Scheduled   default-scheduler   Successfully assigned example-standalone-habitat-0 to minikube        
0s        10m       6         example-standalone-habitat.154a5f85a74d6e69   StatefulSet             Normal    SuccessfulCreate   statefulset-controller   create Pod example-standalone-habitat-0 in StatefulSet example-standalone-habitat successful
0s        0s        1         example-standalone-habitat.154a601c553527f4   Habitat             Normal    ConfigMapUpdated   habitat-controller   Removed peer IP from ConfigMap                                  
0s        0s        2         example-standalone-habitat.154a601c553527f4   Habitat             Normal    ConfigMapUpdated   habitat-controller   Removed peer IP from ConfigMap                                  
0s        0s        1         example-standalone-habitat-0.154a601c5a318ee4   Pod                 Normal    SuccessfulMountVolume   kubelet, minikube   MountVolume.SetUp succeeded for volume "config"           
0s        0s        1         example-standalone-habitat-0.154a601c5a3641b6   Pod                 Normal    SuccessfulMountVolume   kubelet, minikube   MountVolume.SetUp succeeded for volume "default-token-clkdd"
0s        1s        3         example-standalone-habitat.154a601c553527f4   Habitat             Normal    ConfigMapUpdated   habitat-controller   Removed peer IP from ConfigMap                                  
0s        0s        1         example-standalone-habitat-0.154a601c8b0e4721   Pod       spec.containers{habitat-service}   Normal    Pulling   kubelet, minikube   pulling image "habitat/redis-hab"              
0s        0s        1         example-standalone-habitat-0.154a601d75eea4aa   Pod       spec.containers{habitat-service}   Normal    Pulled    kubelet, minikube   Successfully pulled image "habitat/redis-hab"  
0s        0s        1         example-standalone-habitat-0.154a601d820e072c   Pod       spec.containers{habitat-service}   Normal    Created   kubelet, minikube   Created container                              
0s        0s        1         example-standalone-habitat-0.154a601d8cdbf692   Pod       spec.containers{habitat-service}   Normal    Started   kubelet, minikube   Started container                              
0s        0s        1         example-standalone-habitat.154a601dbc96d81b   Habitat             Normal    ConfigMapUpdated   habitat-controller   Updated peer IP in ConfigMap 

cc: @krnowak

krnowak commented 6 years ago

Please rebase.

surajssd commented 6 years ago

@krnowak rebased!

surajssd commented 6 years ago

@krnowak rebased PTAL :-)

krnowak commented 6 years ago

Would be nice to do the similar thing for other labels we add there I think.