
// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.openshift.origin.pkg.sdn.api.v1;

import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1";

// ClusterNetwork describes the cluster network. There is normally only one object of this type,
// named "default", which is created by the SDN network plugin based on the master configuration
// when the cluster is brought up for the first time.
message ClusterNetwork {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;

  // Network is a CIDR string specifying the global overlay network's L3 space
  optional string network = 2;

  // HostSubnetLength is the number of bits of network to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods
  optional uint32 hostsubnetlength = 3;

  // ServiceNetwork is the CIDR range that Service IP addresses are allocated from
  optional string serviceNetwork = 4;

  // PluginName is the name of the network plugin being used
  optional string pluginName = 5;
}

// ClusterNetworkList is a collection of ClusterNetworks
message ClusterNetworkList {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;

  // Items is the list of cluster networks
  repeated ClusterNetwork items = 2;
}

// EgressNetworkPolicy describes the current egress network policy for a Namespace. When using
// the 'redhat/openshift-ovs-multitenant' network plugin, traffic from a pod to an IP address
// outside the cluster will be checked against each EgressNetworkPolicyRule in the pod's
// namespace's EgressNetworkPolicy, in order. If no rule matches (or no EgressNetworkPolicy
// is present) then the traffic will be allowed by default.
message EgressNetworkPolicy {
  // metadata for EgressNetworkPolicy
  optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;

  // spec is the specification of the current egress network policy
  optional EgressNetworkPolicySpec spec = 2;
}

// EgressNetworkPolicyList is a collection of EgressNetworkPolicy
message EgressNetworkPolicyList {
  // metadata for EgressNetworkPolicyList
  optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;

  // items is the list of policies
  repeated EgressNetworkPolicy items = 2;
}

// EgressNetworkPolicyPeer specifies a target to apply egress network policy to
message EgressNetworkPolicyPeer {
  // cidrSelector is the CIDR range to allow/deny traffic to
  optional string cidrSelector = 1;
}

// EgressNetworkPolicyRule contains a single egress network policy rule
message EgressNetworkPolicyRule {
  // type marks this as an "Allow" or "Deny" rule
  optional string type = 1;

  // to is the target that traffic is allowed/denied to
  optional EgressNetworkPolicyPeer to = 2;
}

// EgressNetworkPolicySpec provides a list of policies on outgoing network traffic
message EgressNetworkPolicySpec {
  // egress contains the list of egress policy rules
  repeated EgressNetworkPolicyRule egress = 1;
}

// HostSubnet describes the container subnet network on a node. The HostSubnet object must have the
// same name as the Node object it corresponds to.
message HostSubnet {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;

  // Host is the name of the node. (This is redundant with the object's name, and this
  // field is not actually used any more.)
  optional string host = 2;

  // HostIP is the IP address to be used as a VTEP by other nodes in the overlay network
  optional string hostIP = 3;

  // Subnet is the CIDR range of the overlay network assigned to the node for its pods
  optional string subnet = 4;
}

// HostSubnetList is a collection of HostSubnets
message HostSubnetList {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;

  // Items is the list of host subnets
  repeated HostSubnet items = 2;
}

// NetNamespace describes a single isolated network. When using the redhat/openshift-ovs-multitenant
// plugin, every Namespace will have a corresponding NetNamespace object with the same name.
// (When using redhat/openshift-ovs-subnet, NetNamespaces are not used.)
message NetNamespace {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;

  // NetName is the name of the network namespace. (This is the same as the object's name, but both fields must be set.)
  optional string netname = 2;

  // NetID is the network identifier of the network namespace assigned to each overlay network packet. This can be manipulated with the "oadm pod-network" commands.
  optional uint32 netid = 3;
}

// NetNamespaceList is a collection of NetNamespaces
message NetNamespaceList {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;

  // Items is the list of net namespaces
  repeated NetNamespace items = 2;
}

