How to update config for an existing cluster
Is this a BUG REPORT or FEATURE REQUEST?: Not sure
What happened: When I ran kismatic install validate without having made any changes to my plan file, I noticed that the underlying Ansible playbook reported many changes would occur if I were to apply this. Given that I had made no changes I would expect there to have been zero changes reported by ansible.
What you expected to happen: I would expect there to have been zero changes reported by ansible. It could be that I'm using kismatic incorrectly. What I need is a way to modify kube-apiserver.yaml on a running cluster. specifically I need to add two additional line to this file which relate to webhook configuration. So my overall question is, how do I make small config changes in an idempotent fashion to my cluster.
How to reproduce it (as minimally and precisely as possible): run "kismatic install validate" The ansible output will state there are changes to apply, e.g. .. dev-host-1-sandbox.local : ok=23 changed=16 unreachable=0 failed=0
Anything else we need to know?:
Environment:
- Kismatic version (use
kismatic version): 1.7.0 - Plan file Gist (remove sensitive information if any):
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a): Centos 7
@bobclarke are you able to share an example of what the changes being reported, all tasks are idempotent and nothing will be modified if you rerun kismatic install apply (assuming you are using the same version of KET and haven't changed anything in the plan file)
As for being able to make a change on the api-server, you can modify with the required changes and rerun kismatic install apply
cluster:
kube_apiserver:
option_overrides: {}
Hi @dkoshkin, This is taken from runs/preflight/2018-02-26-12-35-48/ansible.log which was generated when I ran kismatic install validate. The log file was large (25MB). This is a snippet (hostnames redacted) :
2018-02-26 12:35:54.946+0000 - ok: [fake-host-1] => { 2018-02-26 12:35:54.946+0000 - "changed": false, 2018-02-26 12:35:54.946+0000 - "cmd": "grep --extended-regexp "^\w+\s+requiretty" /etc/sudoers || echo "string not found"", 2018-02-26 12:35:54.946+0000 - "delta": "0:00:00.004533", 2018-02-26 12:35:54.946+0000 - "end": "2018-02-26 12:35:58.626608", 2018-02-26 12:35:54.946+0000 - "invocation": { 2018-02-26 12:35:54.946+0000 - "module_args": { 2018-02-26 12:35:54.946+0000 - "_raw_params": "grep --extended-regexp "^\w+\s+requiretty" /etc/sudoers || echo "string not found"", 2018-02-26 12:35:54.946+0000 - "_uses_shell": true, 2018-02-26 12:35:54.946+0000 - "chdir": null, 2018-02-26 12:35:54.946+0000 - "creates": null, 2018-02-26 12:35:54.946+0000 - "executable": null, 2018-02-26 12:35:54.946+0000 - "removes": null, 2018-02-26 12:35:54.946+0000 - "warn": true 2018-02-26 12:35:54.946+0000 - } 2018-02-26 12:35:54.946+0000 - }, 2018-02-26 12:35:54.946+0000 - "rc": 0, 2018-02-26 12:35:54.946+0000 - "start": "2018-02-26 12:35:58.622075", 2018-02-26 12:35:54.946+0000 - "stderr": "", 2018-02-26 12:35:54.946+0000 - "stderr_lines": [], 2018-02-26 12:35:54.946+0000 - "stdout": "string not found", 2018-02-26 12:35:54.946+0000 - "stdout_lines": [ 2018-02-26 12:35:54.946+0000 - "string not found" 2018-02-26 12:35:54.946+0000 - ] 2018-02-26 12:35:54.946+0000 - }
Here is another example 2018-02-26 12:39:22.501+0000 - changed: [fake-host-2] => { 2018-02-26 12:39:22.501+0000 - "changed": true, 2018-02-26 12:39:22.501+0000 - "cmd": [ 2018-02-26 12:39:22.501+0000 - "/bin/true" 2018-02-26 12:39:22.501+0000 - ], 2018-02-26 12:39:22.501+0000 - "delta": "0:00:00.005757", 2018-02-26 12:39:22.501+0000 - "end": "2018-02-26 12:39:27.570792", 2018-02-26 12:39:22.501+0000 - "failed": false, 2018-02-26 12:39:22.501+0000 - "failed_when_result": false, 2018-02-26 12:39:22.501+0000 - "invocation": { 2018-02-26 12:39:22.501+0000 - "module_args": { 2018-02-26 12:39:22.501+0000 - "_raw_params": "/bin/true", 2018-02-26 12:39:22.501+0000 - "_uses_shell": false, 2018-02-26 12:39:22.501+0000 - "chdir": null, 2018-02-26 12:39:22.501+0000 - "creates": null, 2018-02-26 12:39:22.501+0000 - "executable": null, 2018-02-26 12:39:22.501+0000 - "removes": null, 2018-02-26 12:39:22.501+0000 - "warn": true 2018-02-26 12:39:22.501+0000 - } 2018-02-26 12:39:22.501+0000 - }, 2018-02-26 12:39:22.501+0000 - "rc": 0, 2018-02-26 12:39:22.501+0000 - "start": "2018-02-26 12:39:27.565035", 2018-02-26 12:39:22.501+0000 - "stderr": "", 2018-02-26 12:39:22.501+0000 - "stderr_lines": [], 2018-02-26 12:39:22.501+0000 - "stdout": "", 2018-02-26 12:39:22.501+0000 - "stdout_lines": [] 2018-02-26 12:39:22.501+0000 - } 2018-02-26 12:39:22.503+0000 - META: ran handlers 2018-02-26 12:39:22.504+0000 - META: ran handlers
And here is the ansible summary:
2018-02-26 12:39:22.506+0000 - fake-host-1 : ok=14 changed=10 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-2 : ok=23 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-3 : ok=23 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-4: ok=23 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-5 : ok=23 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-6 : ok=23 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-7 : ok=24 changed=16 unreachable=0 failed=0
2018-02-26 12:39:22.506+0000 - fake-host-8: ok=18 changed=14 unreachable=0 failed=0