Removes duplicate NetworkAttachment CRD ref

The CRD is now defined in the NetworkPlumbingWG org, along with
generated libs for client, listers, informers, and deep copy functions.
Therefore remove the duplicate definition here, and use the standard
definition.

Signed-off-by: Tim Rozet <trozet@redhat.com>
This commit is contained in:
Tim Rozet
2019-09-19 10:36:52 -04:00
committed by Doug Smith
parent 2745e46ed8
commit e8baccff16
12 changed files with 507 additions and 60 deletions

View File

@@ -21,7 +21,6 @@ import (
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/current"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// NetConf for cni config file written in json
@@ -109,33 +108,6 @@ type DelegateNetConf struct {
Bytes []byte
}
// NetworkAttachmentDefinition represents net-attach-def of K8s NPWG spec
type NetworkAttachmentDefinition struct {
metav1.TypeMeta `json:",inline"`
// Note that ObjectMeta is mandatory, as an object
// name is required
Metadata metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"`
// Specification describing how to invoke a CNI plugin to
// add or remove network attachments for a Pod.
// In the absence of valid keys in a Spec, the runtime (or
// meta-plugin) should load and execute a CNI .configlist
// or .config (in that order) file on-disk whose JSON
// “name” key matches this Network objects name.
// +optional
Spec NetworkAttachmentDefinitionSpec `json:"spec"`
}
// NetworkAttachmentDefinitionSpec represents net-attach-def spec of K8s NPWG spec
type NetworkAttachmentDefinitionSpec struct {
// Config contains a standard JSON-encoded CNI configuration
// or configuration list which defines the plugin chain to
// execute. If present, this key takes precedence over
// Plugin.
// +optional
Config string `json:"config"`
}
// NetworkSelectionElement represents one element of the JSON format
// Network Attachment Selection Annotation as described in section 4.1.2
// of the CRD specification.