From 8eda986d033faa11e08994e7dfca4b8b1a8dd981 Mon Sep 17 00:00:00 2001 From: Vladimir Jigulin Date: Tue, 15 Dec 2020 20:19:32 +0300 Subject: [PATCH] do not force http protocol versions for api There is no requirement to use http2 in kubernetes api. Since we use transport=>tls, by default gun will try http2 and fallback to http. --- src/kube_vxlan_controller_k8s.erl | 2 -- src/kube_vxlan_controller_run.erl | 1 - 2 files changed, 3 deletions(-) diff --git a/src/kube_vxlan_controller_k8s.erl b/src/kube_vxlan_controller_k8s.erl index e18e647..a000889 100644 --- a/src/kube_vxlan_controller_k8s.erl +++ b/src/kube_vxlan_controller_k8s.erl @@ -42,7 +42,6 @@ init([#{server := Server, ca_cert_file := CaCertFile}]) -> {Host, Port} = uri_parse(Server), Opts = #{connect_timeout => ?TIMEOUT, - protocols => [http2], transport => tls, tls_opts => [{cacertfile, CaCertFile}] }, @@ -119,7 +118,6 @@ ws_connect(Resource, Query, #{server := Server, ca_cert_file := CaCertFile, token := Token}) -> {Host, Port} = uri_parse(Server), Opts = #{connect_timeout => ?HttpStreamRecvTimeout, - protocols => [http], transport => tls, tls_opts => [{cacertfile, CaCertFile}] }, diff --git a/src/kube_vxlan_controller_run.erl b/src/kube_vxlan_controller_run.erl index 3394b91..81d8d01 100644 --- a/src/kube_vxlan_controller_run.erl +++ b/src/kube_vxlan_controller_run.erl @@ -53,7 +53,6 @@ init([#{server := Server, ca_cert_file := CaCertFile} = Config]) -> {Host, Port} = ?K8s:uri_parse(Server), Opts = #{connect_timeout => ?TIMEOUT, - protocols => [http2], transport => tls, tls_opts => [{cacertfile, CaCertFile}] },