-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: implement the setting up of the scheme with managed contents #1
Conversation
Signed-off-by: Edmund Ochieng <ochienged@gmail.com>
// ApiVersion and Kind set. Failure to which the code will panic when adding the types to the scheme | ||
scheme := runtime.NewScheme() | ||
for _, obj := range objs { | ||
gvk := obj.GetObjectKind().GetVersionKind() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime/schema#ObjectKind
gvk := obj.GetObjectKind().GetVersionKind() | |
gvk := obj.GetObjectKind().GroupVersionKind() |
Applies to all other places the same error is popping up
// if we continue to create a new cache every time, we should ensure that we are appropriately stopping | ||
// the cache and configured sources _before_ replacing it in the mapping. | ||
i.extensionCaches[ce.Name] = c | ||
i.extensionCaches[ce.Name] = extensionsCacheData{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.extensionCaches[ce.Name] = extensionsCacheData{ | |
i.extensionCaches[ce.Name] = extensionCacheData{ |
panic("Not implemented!") | ||
if data, ok := i.extensionCaches[ce.GetName()]; ok { | ||
data.Cancel() | ||
delete(i.extensionCaches, ce.GetName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete(i.extensionCaches, ce.GetName) | |
delete(i.extensionCaches, ce.GetName()) |
return &instance{ | ||
rcm: rcm, | ||
baseCfg: cfg, | ||
extensionCaches: make(map[string]cache.Cache), | ||
scheme: scheme, | ||
extensionCaches: make(map[string]extensionCacheData{}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extensionCaches: make(map[string]extensionCacheData{}), | |
extensionCaches: make(map[string]extensionCacheData), |
Going to ignore the lint failure for now. Will make sure this is addressed before creating a PR against the main repo |
90e32b2
into
feature/managed-content-cache
Description
Reviewer Checklist