Getting a cacheable kubernetes.InterfaceCaching user data to avoid excess database tripsCacheManager.getCacheFileBaseDir() always returns nullWhat the best way (or standard practice) to organize the cache in RESTfull api and reduce load on a server?Blank cache entry after asynchronous JavaScript load in IE8Caching of nested cacheable operation via SpringCacheUnderstanding the Logic of Kubernetes API framework in GoKubernetes Controller - Unable to find v1.Node resourceAssign additional field when unmarshalling JSON object to GO structWhat's the best way to get notified when kubernetes Deployments change using the k8s.io/client-go library?In Cluster Config is unable to get pods when deployed in a non-default namespace
ssTTsSTtRrriinInnnnNNNIiinngg
Should I tell management that I intend to leave due to bad software development practices?
Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)
What is required to make GPS signals available indoors?
What Exploit Are These User Agents Trying to Use?
OP Amp not amplifying audio signal
Rotate ASCII Art by 45 Degrees
Where would I need my direct neural interface to be implanted?
What does the same-ish mean?
What are the G forces leaving Earth orbit?
Is this draw by repetition?
How can saying a song's name be a copyright violation?
What is a Samsaran Word™?
Getting extremely large arrows with tikzcd
What is an equivalently powerful replacement spell for the Yuan-Ti's Suggestion spell?
Placement of More Information/Help Icon button for Radio Buttons
How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?
Using "tail" to follow a file without displaying the most recent lines
What is the most common color to indicate the input-field is disabled?
How seriously should I take size and weight limits of hand luggage?
Venezuelan girlfriend wants to travel the USA to be with me. What is the process?
How can I prove that a state of equilibrium is unstable?
Am I breaking OOP practice with this architecture?
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
Getting a cacheable kubernetes.Interface
Caching user data to avoid excess database tripsCacheManager.getCacheFileBaseDir() always returns nullWhat the best way (or standard practice) to organize the cache in RESTfull api and reduce load on a server?Blank cache entry after asynchronous JavaScript load in IE8Caching of nested cacheable operation via SpringCacheUnderstanding the Logic of Kubernetes API framework in GoKubernetes Controller - Unable to find v1.Node resourceAssign additional field when unmarshalling JSON object to GO structWhat's the best way to get notified when kubernetes Deployments change using the k8s.io/client-go library?In Cluster Config is unable to get pods when deployed in a non-default namespace
I currently have a function that gives me a kubernetes.Interface
object that I use extensively.
func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error)
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil
return nil, errors.Wrap(err, "Could not create kubernetes clientset")
return clientset, nil
I want to use k8s.io/client-go/tools/cache
somehow, but I'm a little lost.
I seem to be able to use NewFilteredListWatchFromClient
and create an Informer via NewSharedInformer
.
kubernetes.New
takes a rest.Interface
as an argument, and presumably if I could get something compatible out of the Informer
, this whole thing might just work. But here's where I run out of road.
Thoughts?
Examples?
go caching kubernetes client-go
add a comment |
I currently have a function that gives me a kubernetes.Interface
object that I use extensively.
func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error)
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil
return nil, errors.Wrap(err, "Could not create kubernetes clientset")
return clientset, nil
I want to use k8s.io/client-go/tools/cache
somehow, but I'm a little lost.
I seem to be able to use NewFilteredListWatchFromClient
and create an Informer via NewSharedInformer
.
kubernetes.New
takes a rest.Interface
as an argument, and presumably if I could get something compatible out of the Informer
, this whole thing might just work. But here's where I run out of road.
Thoughts?
Examples?
go caching kubernetes client-go
add a comment |
I currently have a function that gives me a kubernetes.Interface
object that I use extensively.
func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error)
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil
return nil, errors.Wrap(err, "Could not create kubernetes clientset")
return clientset, nil
I want to use k8s.io/client-go/tools/cache
somehow, but I'm a little lost.
I seem to be able to use NewFilteredListWatchFromClient
and create an Informer via NewSharedInformer
.
kubernetes.New
takes a rest.Interface
as an argument, and presumably if I could get something compatible out of the Informer
, this whole thing might just work. But here's where I run out of road.
Thoughts?
Examples?
go caching kubernetes client-go
I currently have a function that gives me a kubernetes.Interface
object that I use extensively.
func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error)
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil
return nil, errors.Wrap(err, "Could not create kubernetes clientset")
return clientset, nil
I want to use k8s.io/client-go/tools/cache
somehow, but I'm a little lost.
I seem to be able to use NewFilteredListWatchFromClient
and create an Informer via NewSharedInformer
.
kubernetes.New
takes a rest.Interface
as an argument, and presumably if I could get something compatible out of the Informer
, this whole thing might just work. But here's where I run out of road.
Thoughts?
Examples?
go caching kubernetes client-go
go caching kubernetes client-go
edited Mar 21 at 20:48
Michael
asked Mar 21 at 20:42
MichaelMichael
283
283
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288938%2fgetting-a-cacheable-kubernetes-interface%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288938%2fgetting-a-cacheable-kubernetes-interface%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown