diff --git a/roles/network_plugin/calico/templates/calico-typha.yml.j2 b/roles/network_plugin/calico/templates/calico-typha.yml.j2 index f14f9b38d99..b9dee1168d0 100644 --- a/roles/network_plugin/calico/templates/calico-typha.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-typha.yml.j2 @@ -108,14 +108,6 @@ spec: value: /etc/typha/server_certificate.pem - name: TYPHA_SERVERKEYFILE value: /etc/typha/server_key.pem - volumeMounts: - - mountPath: /etc/typha - name: typha-server - readOnly: true - - mountPath: /etc/ca/ca.crt - subPath: ca.crt - name: cacert - readOnly: true {% endif %} {% if typha_prometheusmetricsenabled %} # Since Typha is host-networked, @@ -124,6 +116,16 @@ spec: value: "true" - name: TYPHA_PROMETHEUSMETRICSPORT value: "{{ typha_prometheusmetricsport }}" +{% endif %} +{% if typha_secure %} + volumeMounts: + - mountPath: /etc/typha + name: typha-server + readOnly: true + - mountPath: /etc/ca/ca.crt + subPath: ca.crt + name: cacert + readOnly: true {% endif %} # Needed for version >=3.7 when the 'host-local' ipam is used # Should never happen given templates/cni-calico.conflist.j2