-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Drop extensions.NetworkPolicy #46626
Labels
sig/network
Categorizes an issue or PR as relevant to SIG Network.
Comments
/assign @thockin |
I removed the should-be-totally-unnecessary code for NP from
pkg/apis/extensions - leaving it in pkg/apis/extensions/v1beta1
It compiles.
I can POST a networking/v1 object, and it is stored in etcd as
extensions/v1beta1 - yay!
I can NOT POST an extensions/v1beta1 object.
```
$ cat /tmp/netpol.yaml
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: my-netpol
spec:
podSelector: {}
$ kubectl create -f /tmp/netpol.yaml
error: error validating "/tmp/netpol.yaml": error validating data: couldn't
find type: v1beta1.NetworkPolicy; if you choose to ignore these errors,
turn validation off with --validate=false
$ kubectl create -f /tmp/netpol.yaml --validate=false
error: unable to recognize "/tmp/netpol.yaml": no matches for extensions/,
Kind=NetworkPolicy
```
Looking up that 2nd error, I get to staging/src/
k8s.io/apimachinery/pkg/api/meta/multirestmapper.go, where I see things
like:
```
return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")}
```
...and I am lost
https://github.com/kubernetes/kubernetes/compare/master...thockin:pr-39164-plus?expand=1
At this point, I am stopping my investigation. I don't have time to crawl
around. If the worst problem we have is duplicated code, I guess I will
live. It does feel like this should be possible.
…On Tue, May 30, 2017 at 1:06 PM, Dan Winship ***@***.***> wrote:
/assign @thockin <https://github.com/thockin>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46626 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVHV0Qn-WuriOyu89IOlymXI7O4HZks5r_HbCgaJpZM4NqZY6>
.
|
Worst case is we do this after 1.7 cuts |
thockin
added
the
sig/network
Categorizes an issue or PR as relevant to SIG Network.
label
May 31, 2017
This was referenced Aug 7, 2017
k8s-github-robot
pushed a commit
that referenced
this issue
Aug 15, 2017
Automatic merge from submit-queue Drop extensions internal Network* types Fixes #46626
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After #39164 we now have two separate "internal" NetworkPolicy objects: extensions.NetworkPolicy, and networking.NetworkPolicy. Additionally, there are two separate packages under pkg/registry (pkg/registry/extensions/networkpolicy and pkg/registry/network/networkpolicy), two sets of kubectl printers/describers, and some handwritten conversions in pkg/apis/extensions/v1beta1 and pkg/apis/networking/v1.
It ought to be possible to get rid of this duplication, without changing the externally-visible API.
The text was updated successfully, but these errors were encountered: