)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"d992b6b6ae8c228f4a9c5225e4d272f4cd501699","unresolved":false,"context_lines":[{"line_number":10,"context_line":"config change propagation to POD running a service which consumes"},{"line_number":11,"context_line":"configuration from its configmap."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TrivialFix"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5b77851e8650307d53476b1d42b3510c04b92a54"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a71b18c_c2b661f8","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":10},"updated":"2016-12-12 01:08:17.000000000","message":"we don\u0027t use trivialfix flag anymore - voted on the ml.  If you want to continue using it nothing stops you but it wastes typing :)\n\nThis seems more like a blueprint to me.  If its a simple bug fix, then it doesn\u0027t need a bug id at this point (until we have a stable branch and need bug ids to track backports).","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"}],"tests/configmap-monitor.yaml":[{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"07816b36b49f963057433141a2bd0afdfc8b3616","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        - image: docker.io/port/centos-binary-kolla-kube-toolbox:3.0.1"},{"line_number":58,"context_line":"          name: configmap-monitor"},{"line_number":59,"context_line":"          command:"},{"line_number":60,"context_line":"            - /bin/bash"},{"line_number":61,"context_line":"            - -c"},{"line_number":62,"context_line":"            - |"},{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_70539e17","line":60,"updated":"2016-12-11 02:57:49.000000000","message":"Switching this command to while true; do sleep 100; done,\n\nand moving the rest to a livelyness hook like we discussed on irc might solve the kill issue Pete\u0027s talking about.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"29dcde0222e97fb942ba76d1ac6b833203922f93","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        - image: docker.io/port/centos-binary-kolla-kube-toolbox:3.0.1"},{"line_number":58,"context_line":"          name: configmap-monitor"},{"line_number":59,"context_line":"          command:"},{"line_number":60,"context_line":"            - /bin/bash"},{"line_number":61,"context_line":"            - -c"},{"line_number":62,"context_line":"            - |"},{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_d069d2bf","line":60,"in_reply_to":"3a71b18c_70539e17","updated":"2016-12-11 03:25:00.000000000","message":"The issue I have with a liveliness hook it the overhead it creates, which is acceptable for health monitoring, but overkill for something like this. Generally, I expect configuration to hardly ever (if ever) change in production - with the exception of rolling credentials to meet regulatory requirements.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"897865cfeec3ccb417a2821a6791496e5bcec522","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        - image: docker.io/port/centos-binary-kolla-kube-toolbox:3.0.1"},{"line_number":58,"context_line":"          name: configmap-monitor"},{"line_number":59,"context_line":"          command:"},{"line_number":60,"context_line":"            - /bin/bash"},{"line_number":61,"context_line":"            - -c"},{"line_number":62,"context_line":"            - |"},{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_08addb9a","line":60,"in_reply_to":"3a71b18c_c2f581ed","updated":"2016-12-12 02:27:34.000000000","message":"True, but I\u0027m really not convinced that a self-terminating pod is the right approach for this. The great thing about Kubernetes is that it makes it simple for an operator to perform this sort of activity manually, or via an external service (e.g. https://review.openstack.org/#/c/409565/1/tests/configmap-monitor.yaml).\n\nI\u0027m pretty worried that introducing self-termination would cause more issues than it would resolve. I believe that an external service could provide improved control, security (no need for API access), resource utilization and auditing over something baked into each pod. This would include being able to turn such functionality off if desired while testing a configuration change on a small section of the population before rolling it out fully[1].\n\n\n\n[1] But even then I would still prefer to perform this action via current K8s workflows until such time as a rolling update like facility is available for all required pod controllers (Statefulsets/daemonsets etc). e.g. launch new DS with updated Configmap, and use node labels to schedule as desired.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"00350049d564e1d7296c76a8ee873c8eefbebac6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        - image: docker.io/port/centos-binary-kolla-kube-toolbox:3.0.1"},{"line_number":58,"context_line":"          name: configmap-monitor"},{"line_number":59,"context_line":"          command:"},{"line_number":60,"context_line":"            - /bin/bash"},{"line_number":61,"context_line":"            - -c"},{"line_number":62,"context_line":"            - |"},{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_c2f581ed","line":60,"in_reply_to":"3a71b18c_d069d2bf","updated":"2016-12-12 00:44:12.000000000","message":"Pete,\nThat assumption in practice is incorrect.  Operators adjust configuration in production systems all the time.  More often then password rotation for example.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"07816b36b49f963057433141a2bd0afdfc8b3616","unresolved":false,"context_lines":[{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"},{"line_number":64,"context_line":"               while true;"},{"line_number":65,"context_line":"                 do"},{"line_number":66,"context_line":"                    current_version\u003d$(kubectl get configmap main-process-configmap -o json | jq -r \u0027.metadata.resourceVersion \u0027)"},{"line_number":67,"context_line":"                    echo \"Original version - $original_version, Current version - $current_version\";"},{"line_number":68,"context_line":"                    if [ $original_version !\u003d $current_version ]; then"},{"line_number":69,"context_line":"                       echo \u0027Configmap got changed need to restart POD\u0027;"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_302f6689","line":66,"updated":"2016-12-11 02:57:49.000000000","message":"I think rather then need a service account, you could do this by looking at the configmaps files? If I remember correctly, they periodically update the configmap volume on the host when changed on the controller, and do it atomically by updating a symlink. you might be able to then look at the symlink they use for the atomic switching and see when it changes. No service account should then be needed increasing the overall security.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"29dcde0222e97fb942ba76d1ac6b833203922f93","unresolved":false,"context_lines":[{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"},{"line_number":64,"context_line":"               while true;"},{"line_number":65,"context_line":"                 do"},{"line_number":66,"context_line":"                    current_version\u003d$(kubectl get configmap main-process-configmap -o json | jq -r \u0027.metadata.resourceVersion \u0027)"},{"line_number":67,"context_line":"                    echo \"Original version - $original_version, Current version - $current_version\";"},{"line_number":68,"context_line":"                    if [ $original_version !\u003d $current_version ]; then"},{"line_number":69,"context_line":"                       echo \u0027Configmap got changed need to restart POD\u0027;"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_30e20630","line":66,"in_reply_to":"3a71b18c_302f6689","updated":"2016-12-11 03:25:00.000000000","message":"If that works it would be a win, if the change I suggested below was implemented I\u0027d no longer be concerned about security, but if it is possible to query via a file then we could use inotify-tools to monitor it for changes which would be much nicer than periodically polling the API.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":19384,"name":"Serguei Bezverkhi","email":"sbezverk@cisco.com","username":"sbezverk"},"change_message_id":"5b8089ded776d4a91455040171ada165a08e3138","unresolved":false,"context_lines":[{"line_number":63,"context_line":"               original_version\u003d$(\u003c/tmp/configmap-monitor/configmap-version.txt);"},{"line_number":64,"context_line":"               while true;"},{"line_number":65,"context_line":"                 do"},{"line_number":66,"context_line":"                    current_version\u003d$(kubectl get configmap main-process-configmap -o json | jq -r \u0027.metadata.resourceVersion \u0027)"},{"line_number":67,"context_line":"                    echo \"Original version - $original_version, Current version - $current_version\";"},{"line_number":68,"context_line":"                    if [ $original_version !\u003d $current_version ]; then"},{"line_number":69,"context_line":"                       echo \u0027Configmap got changed need to restart POD\u0027;"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_d040f2a7","line":66,"in_reply_to":"3a71b18c_30e20630","updated":"2016-12-11 04:50:30.000000000","message":"Interesting discovery. I implemented liveness prob and it restarts the pod, but init container does not run on pod restart so my original_version does not get updated.","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"767a432247903c7ca86656b3ae55d9b5ce387804","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                    current_version\u003d$(kubectl get configmap main-process-configmap -o json | jq -r \u0027.metadata.resourceVersion \u0027)"},{"line_number":67,"context_line":"                    echo \"Original version - $original_version, Current version - $current_version\";"},{"line_number":68,"context_line":"                    if [ $original_version !\u003d $current_version ]; then"},{"line_number":69,"context_line":"                       echo \u0027Configmap got changed need to restart POD\u0027;"},{"line_number":70,"context_line":"                    fi;"},{"line_number":71,"context_line":"                    sleep 10;"},{"line_number":72,"context_line":"               done;"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a71b18c_b00b7623","line":69,"range":{"start_line":69,"start_character":23,"end_line":69,"end_character":72},"updated":"2016-12-11 02:48:43.000000000","message":"If you changed the logic here to kill the pods in a targeted daemon set or similar I\u0027d be much happier with this concept. This way it would be able to provide similar functionality to a rolling update (though without updating the deployment version etc.)","commit_id":"7d2ebed68e84bacff08fb2b4014230aae2a406dd"}]}
