Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typha prometheus settings cause a failing deploy #8004

Closed
ericlake opened this issue Sep 22, 2021 · 2 comments
Closed

typha prometheus settings cause a failing deploy #8004

ericlake opened this issue Sep 22, 2021 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ericlake
Copy link
Contributor

Environment:

  • Equinix

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

Linux 5.4.81-flatcar x86_64
NAME="Flatcar Container Linux by Kinvolk"
ID=flatcar
ID_LIKE=coreos
VERSION=2605.9.0
VERSION_ID=2605.9.0
BUILD_ID=2020-12-04-1210
PRETTY_NAME="Flatcar Container Linux by Kinvolk 2605.9.0 (Oklo)"
ANSI_COLOR="38;5;75"
HOME_URL="https://flatcar-linux.org/"
BUG_REPORT_URL="https://issues.flatcar-linux.org"
FLATCAR_BOARD="amd64-usr"
  • Version of Ansible (ansible --version):
ansible 2.9.13
  • Version of Python (python --version):
2.7.16

Kubespray version (commit) (git rev-parse --short HEAD):
2.17.0

b83e8b02

Network plugin used:
calico

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):
https://gist.github.com/ericlake/e7e9b1f4e0fe1e40d1a5092f2df95ed0

Command used to invoke ansible:

ansible-playbook -i hosts ../kubespray/cluster.yml -b --forks=50 --timeout=600 -e "retry_stagger: 60, download_run_once: true"

Output of ansible run:

failed: [controller-001.a2.da.dev.logdna.net] (item=calico-typha.yml) => {"ansible_loop_var": "item", "changed": false, "item": {"ansible_loop_var": "item", "changed": true, "checksum": "598ac79530749e8e2110793b53fc49ac208e7130", "dest": "/etc/kubernetes/calico-typha.yml", "diff": [], "failed": false, "gid": 0, "group": "root", "invocation": {"module_args": {"_original_basename": "calico-typha.yml.j2", "attributes": null, "backup": false, "checksum": "598ac79530749e8e2110793b53fc49ac208e7130", "content": null, "delimiter": null, "dest": "/etc/kubernetes/calico-typha.yml", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/core/.ansible/tmp/ansible-tmp-1632349768.56-75434-32452975679246/source", "unsafe_writes": null, "validate": null}}, "item": {"file": "calico-typha.yml", "name": "calico", "type": "typha"}, "md5sum": "53c00ac7f562cf9ecbbfd27899ea066d", "mode": "0644", "owner": "root", "size": 5378, "src": "/home/core/.ansible/tmp/ansible-tmp-1632349768.56-75434-32452975679246/source", "state": "file", "uid": 0}, "msg": "error running kubectl (/opt/bin/kubectl --namespace=kube-system apply --force --filename=/etc/kubernetes/calico-typha.yml) command (rc=1), out='service/calico-typha unchanged\n', err='error: error validating \"/etc/kubernetes/calico-typha.yml\": error validating data: [ValidationError(Deployment.spec.template.spec.containers[0].volumeMounts[2]): unknown field \"value\" in io.k8s.api.core.v1.VolumeMount, ValidationError(Deployment.spec.template.spec.containers[0].volumeMounts[2]): missing required field \"mountPath\" in io.k8s.api.core.v1.VolumeMount, ValidationError(Deployment.spec.template.spec.containers[0].volumeMounts[3]): unknown field \"value\" in io.k8s.api.core.v1.VolumeMount, ValidationError(Deployment.spec.template.spec.containers[0].volumeMounts[3]): missing required field \"mountPath\" in io.k8s.api.core.v1.VolumeMount]; if you choose to ignore these errors, turn validation off with --validate=false\n'"}

Anything else do we need to know:

When the following variables are set the above error is shown

typha_prometheusmetricsenabled: true
typha_prometheusmetricsport: 9091

This seems to be happening because https://github.com/kubernetes-sigs/kubespray/blob/master/roles/network_plugin/calico/templates/calico-typha.yml.j2#L120-L127 is in the volumeMounts section of the spec and not in the envs section.

@ericlake ericlake added the kind/bug Categorizes issue or PR as related to a bug. label Sep 22, 2021
@ericlake
Copy link
Contributor Author

PR with my proposed changes #8005

@ericlake
Copy link
Contributor Author

The PR was approved and merged so this issue should be safe to close at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant