Closed robert-eby closed 6 years ago
Not a problem; I had bad indentation in KubernetesNetwork.yaml. Too bad promenade couldn't catch that.
Hey @robert-eby, can you post the incorrect configuration and I can see if there is a way to make the validation more strict around that?
I had the entire proxy: stanza flush left, rather than being indented with two spaces. Legal YAML, but not useful here. Perhaps the validation code could detect if there are extra items in the top level map other than "schema", "metadata" and "data" and flag that.
Ah, I see. The current validation is a bit of a shim until we can leverage a proper Deckhand client module, which I would expect to be a bit more thorough.
If KubernetesNetwork.yaml has values as follows:
proxy: url: http://one.proxy.example.com:8080 additional_no_proxy:
Then those values should be installed in several files generated by promenade. However, they are not.
$ grep -ir proxy.url promenade/templates ./promenade/templates/include/up.sh:export http_proxy={{ config['KubernetesNetwork:proxy.url'] | default('', true) }} ./promenade/templates/include/up.sh:export https_proxy={{ config['KubernetesNetwork:proxy.url'] | default('', true) }} ./promenade/templates/roles/common/etc/apt/apt.conf.d/20-proxy.conf:{% if config['KubernetesNetwork:proxy.url'] is defined -%} ./promenade/templates/roles/common/etc/apt/apt.conf.d/20-proxy.conf:Acquire::http::Proxy "{{ config['KubernetesNetwork:proxy.url'] }}"; ./promenade/templates/roles/common/etc/apt/apt.conf.d/20-proxy.conf:Acquire::https::Proxy "{{ config['KubernetesNetwork:proxy.url'] }}"; ./promenade/templates/roles/common/etc/systemd/system/docker.service.d/http-proxy.conf:Environment="HTTP_PROXY={{ config['KubernetesNetwork:proxy.url'] | default('', true) }}" ./promenade/templates/roles/common/etc/systemd/system/docker.service.d/http-proxy.conf:Environment="HTTPS_PROXY={{ config['KubernetesNetwork:proxy.url'] | default('', true) }}" ./promenade/templates/roles/genesis/usr/local/bin/armada:{%- if config['KubernetesNetwork:proxy.url'] is defined %} ./promenade/templates/roles/genesis/usr/local/bin/armada:HTTP_PROXY={{ config['KubernetesNetwork:proxy.url'] }} ./promenade/templates/roles/genesis/usr/local/bin/armada: {%- if config['KubernetesNetwork:proxy.url'] is defined %}
$ grep -ir no_proxy promenade/templates promenade/templates/include/up.sh:export no_proxy={{ config.get(kind='KubernetesNetwork') | fill_no_proxy }} promenade/templates/roles/common/etc/systemd/system/docker.service.d/http-proxy.conf:Environment="NO_PROXY={{ config.get(kind='KubernetesNetwork') | fill_no_proxy }}" promenade/templates/roles/genesis/usr/local/bin/armada:NO_PROXY={{ config.get(kind='KubernetesNetwork') | fill_no_proxy }}