Skip to content

Commit

Permalink
Update multus-cni from v3.2 to ecc474a (#15)
Browse files Browse the repository at this point in the history
Update package multus-cni from v3.2 to current tip of master.

Multus added support for multiple IPs/interface in this
PR: k8snetworkplumbingwg/multus-cni#387

The latest available tag is v3.3, which does not include
the above PR.

Signed-off-by: vpickard <vpickard@redhat.com>
  • Loading branch information
vpickard authored and ahalimx86 committed Nov 11, 2019
1 parent 9ffd768 commit d317d56
Show file tree
Hide file tree
Showing 927 changed files with 69,616 additions and 29,235 deletions.
1 change: 1 addition & 0 deletions .gopath/src/github.com/intel/network-resources-injector
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 23 additions & 16 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ import:
- csr
- package: github.com/golang/glog
- package: github.com/intel/multus-cni
version: ~3.2
version: ecc474a26425fd5e6d1b75468a479a24e58add91
subpackages:
- types
- package: github.com/k8snetworkplumbingwg/network-attachment-definition-client/
subpackages:
- pkg/apis/k8s.cni.cncf.io/v1
- package: github.com/pkg/errors
version: ~0.8.1
- package: k8s.io/api
Expand Down
2 changes: 1 addition & 1 deletion pkg/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func generateCSR() ([]byte, []byte, error) {
glog.Infof("generating Certificate Signing Request")
serviceName := strings.Join([]string{prefix, "service"}, "-")
certRequest := csr.New()
certRequest.KeyRequest = &csr.BasicKeyRequest{"rsa", 2048}
certRequest.KeyRequest = &csr.KeyRequest{"rsa", 2048}
certRequest.CN = strings.Join([]string{serviceName, namespace, "svc"}, ".")
certRequest.Hosts = []string{
serviceName,
Expand Down
11 changes: 6 additions & 5 deletions pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"github.com/golang/glog"
"github.com/intel/multus-cni/types"
cniv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
"github.com/pkg/errors"

"k8s.io/api/admission/v1beta1"
Expand Down Expand Up @@ -116,9 +117,9 @@ func deserializeAdmissionReview(body []byte) (*v1beta1.AdmissionReview, error) {
return ar, err
}

func deserializeNetworkAttachmentDefinition(ar *v1beta1.AdmissionReview) (types.NetworkAttachmentDefinition, error) {
func deserializeNetworkAttachmentDefinition(ar *v1beta1.AdmissionReview) (cniv1.NetworkAttachmentDefinition, error) {
/* unmarshal NetworkAttachmentDefinition from AdmissionReview request */
netAttachDef := types.NetworkAttachmentDefinition{}
netAttachDef := cniv1.NetworkAttachmentDefinition{}
err := json.Unmarshal(ar.Request.Object.Raw, &netAttachDef)
return netAttachDef, err
}
Expand Down Expand Up @@ -228,7 +229,7 @@ func parsePodNetworkSelectionElement(selection, defaultNamespace string) (*types
return networkSelectionElement, nil
}

func getNetworkAttachmentDefinition(namespace, name string) (*types.NetworkAttachmentDefinition, error) {
func getNetworkAttachmentDefinition(namespace, name string) (*cniv1.NetworkAttachmentDefinition, error) {
path := fmt.Sprintf("/apis/k8s.cni.cncf.io/v1/namespaces/%s/network-attachment-definitions/%s", namespace, name)
rawNetworkAttachmentDefinition, err := clientset.ExtensionsV1beta1().RESTClient().Get().AbsPath(path).DoRaw()
if err != nil {
Expand All @@ -237,7 +238,7 @@ func getNetworkAttachmentDefinition(namespace, name string) (*types.NetworkAttac
return nil, err
}

networkAttachmentDefinition := types.NetworkAttachmentDefinition{}
networkAttachmentDefinition := cniv1.NetworkAttachmentDefinition{}
json.Unmarshal(rawNetworkAttachmentDefinition, &networkAttachmentDefinition)

return &networkAttachmentDefinition, nil
Expand Down Expand Up @@ -371,7 +372,7 @@ func MutateHandler(w http.ResponseWriter, req *http.Request) {
glog.Infof("network attachment definition '%s/%s' found", n.Namespace, n.Name)

/* network object exists, so check if it contains resourceName annotation */
if resourceName, exists := networkAttachmentDefinition.Metadata.Annotations[networkResourceNameKey]; exists {
if resourceName, exists := networkAttachmentDefinition.ObjectMeta.Annotations[networkResourceNameKey]; exists {
/* add resource to map/increment if it was already there */
resourceRequests[resourceName]++
glog.Infof("resource '%s' needs to be requested for network '%s/%s'", resourceName, n.Namespace, n.Name)
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/cloudflare/cfssl/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 69 additions & 1 deletion vendor/github.com/cloudflare/cfssl/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/github.com/cloudflare/cfssl/Gopkg.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/cloudflare/cfssl/api/initca/initca.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d317d56

Please sign in to comment.