-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement: add configmap to configure user agents for specify respo…
…nse cache. - background: At present, only response for requests from fixed user agents(like kube-proxy, flanneld, coredns, kubelet, yurthub, yurt-tunnel-agent) can be cached in local disk by yurthub. if user's pod access kube-apiserver through yurthub, the response can not be cached on local disk for user agents can not be recognized. - solution: 1. It's not good idea to enable cache all response for requests through yurthub, because some clients only want to access kube-apiserver or some list requests may get large volume data and make pressure to local disk. 2. So we add an configmap named yurt-hub-cfg with `cache_agents` field in kube-system namespace, user can add request user agent in this field. 3. For example, `calico` components want to access kube-apiserver through yurthub and want to use yurthub cache ability, you can configure as following: ``` apiVersion: v1 kind: ConfigMap metadata: name: yurt-hub-cfg namespace: kube-system data: cache_agents: "calico" ```
- Loading branch information
1 parent
51dc6fb
commit 14df997
Showing
8 changed files
with
167 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: yurt-hub-cfg | ||
namespace: kube-system | ||
data: | ||
cache_agents: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.