-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Swap NetworkPolicy storage to networking.k8s.io/v1 #51955
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -562,11 +562,12 @@ func BuildStorageFactory(s *options.ServerRunOptions) (*serverstorage.DefaultSto | |||
return nil, fmt.Errorf("error in initializing storage factory: %s", err) | ||||
} | ||||
|
||||
// keep Deployments, NetworkPolicies, Daemonsets and ReplicaSets in extensions for backwards compatibility, we'll have to migrate at some point, eventually | ||||
storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies")) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am nearly surprised that this change does not change the etcd prefix as well. But reading through
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danwinship extensions and network ordering should be swapped here to look as follows
We should also add a comment as mentioned by @thockin . DEPRECATED in 1.9, removed in 1.10 or something similar. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cmluciano this PR is switching to write to etcd in networking.k8s.io version, which is what we want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, misread the comment |
||||
|
||||
// keep Deployments, Daemonsets and ReplicaSets in extensions for backwards compatibility, we'll have to migrate at some point, eventually | ||||
storageFactory.AddCohabitatingResources(extensions.Resource("deployments"), apps.Resource("deployments")) | ||||
storageFactory.AddCohabitatingResources(extensions.Resource("daemonsets"), apps.Resource("daemonsets")) | ||||
storageFactory.AddCohabitatingResources(extensions.Resource("replicasets"), apps.Resource("replicasets")) | ||||
storageFactory.AddCohabitatingResources(extensions.Resource("networkpolicies"), networking.Resource("networkpolicies")) | ||||
for _, override := range s.Etcd.EtcdServersOverrides { | ||||
tokens := strings.Split(override, "#") | ||||
if len(tokens) != 2 { | ||||
|
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.
Do we want a comment to remove this during v1.9 devel?
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.
Along with the extensions type completely?
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.
we shouldn't remove this until the extensions type is removed and the requirement to migrate is release-noted and available. should networkpolicies be added to
update-storage-objects.sh
?