Documentation
¶
Index ¶
- Constants
- Variables
- func CallsMapPath(id int) string
- func Ct4MapPath(id int) string
- func Ct6MapPath(id int) string
- func FilterEPDir(dirFiles []os.FileInfo) []string
- func NewCiliumID(id int64) string
- func NewID(prefix PrefixType, id string) string
- func OptionChanged(key string, value bool, data interface{})
- func OrderEndpointAsc(eps []*models.Endpoint)
- func ParseCiliumID(id string) (int64, error)
- type Endpoint
- func (e *Endpoint) Allows(id policy.NumericIdentity) bool
- func (e *Endpoint) ApplyOptsLocked(opts map[string]string) bool
- func (e *Endpoint) CallsMapPathLocked() string
- func (e *Endpoint) CreateDirectory() error
- func (e *Endpoint) Ct4MapPathLocked() string
- func (e *Endpoint) Ct6MapPathLocked() string
- func (e *Endpoint) DeepCopy() *Endpoint
- func (e *Endpoint) GetBPFKeys() []lxcmap.EndpointKey
- func (e *Endpoint) GetBPFValue() (*lxcmap.EndpointInfo, error)
- func (e *Endpoint) GetID() uint64
- func (e *Endpoint) GetIPv4Address() string
- func (e *Endpoint) GetIPv6Address() string
- func (e *Endpoint) GetIdentity() policy.NumericIdentity
- func (e *Endpoint) GetLabels() []string
- func (e *Endpoint) GetModel() *models.Endpoint
- func (e *Endpoint) HasLabels(l pkgLabels.Labels) bool
- func (e *Endpoint) IPv4EgressMapPathLocked() string
- func (e *Endpoint) IPv4IngressMapPathLocked() string
- func (e *Endpoint) IPv6EgressMapPathLocked() string
- func (e *Endpoint) IPv6IngressMapPathLocked() string
- func (e *Endpoint) LeaveLocked(owner Owner)
- func (e *Endpoint) LogStatus(typ StatusType, code StatusCode, msg string)
- func (e *Endpoint) LogStatusOK(typ StatusType, msg string)
- func (e *Endpoint) PolicyGlobalMapPathLocked() string
- func (e *Endpoint) PolicyID() string
- func (e *Endpoint) PolicyMapPathLocked() string
- func (e *Endpoint) ProxyID(l4 *policy.L4Filter) string
- func (e *Endpoint) RLock()
- func (e *Endpoint) RUnlock()
- func (e *Endpoint) Regenerate(owner Owner) <-chan bool
- func (e *Endpoint) RegenerateIfReady(owner Owner) error
- func (e *Endpoint) RemoveDirectory()
- func (e *Endpoint) RemoveFromGlobalPolicyMap() error
- func (e *Endpoint) SetDefaultOpts(opts *option.BoolOptions)
- func (e *Endpoint) SetIdentity(owner Owner, id *policy.Identity)
- func (e *Endpoint) String() string
- func (e *Endpoint) StringID() string
- func (e *Endpoint) TriggerPolicyUpdates(owner Owner) (bool, error)
- func (e *Endpoint) Update(owner Owner, opts models.ConfigurationMap) error
- func (e *Endpoint) UpdateOrchIdentityLabels(l pkgLabels.Labels) bool
- func (e *Endpoint) UpdateOrchInformationLabels(l pkgLabels.Labels)
- type EndpointStatus
- type L3MapType
- type L3Maps
- type Owner
- type PortMap
- type PrefixType
- type Request
- type Status
- type StatusCode
- type StatusResponse
- type StatusType
- type UpdateCompilationError
- type UpdateValidationError
Constants ¶
View Source
const ( OptionAllowToHost = "AllowToHost" OptionAllowToWorld = "AllowToWorld" OptionConntrackAccounting = "ConntrackAccounting" OptionConntrackLocal = "ConntrackLocal" OptionConntrack = "Conntrack" OptionDebug = "Debug" OptionDropNotify = "DropNotification" OptionNAT46 = "NAT46" OptionPolicy = "Policy" AlwaysEnforce = "always" NeverEnforce = "never" DefaultEnforcement = "default" )
View Source
const ( // StateCreating is used to set the endpoint is being created. StateCreating = string(models.EndpointStateCreating) // StateDisconnected is used to set the endpoint is disconnected. StateDisconnected = string(models.EndpointStateDisconnected) // StateWaitingForIdentity is used to set if the endpoint is waiting // for an identity from the KVStore. StateWaitingForIdentity = string(models.EndpointStateWaitingForIdentity) // StateReady specifies if the endpoint is read to be used. StateReady = string(models.EndpointStateReady) // StateRegenerating specifies when the endpoint is being regenerated. StateRegenerating = string(models.EndpointStateRegenerating) // CallsMapName specifies the base prefix for EP specific call map. CallsMapName = "cilium_calls_" // PolicyGlobalMapName specifies the global tail call map for EP handle_policy() lookup. PolicyGlobalMapName = "cilium_policy" )
View Source
const ( CiliumLocalIdPrefix PrefixType = "cilium-local" CiliumGlobalIdPrefix = "cilium-global" ContainerIdPrefix = "container-id" DockerEndpointPrefix = "docker-endpoint" ContainerNamePrefix = "container-name" PodNamePrefix = "pod-name" // IPv4Prefix is the prefix used in Cilium IDs when the identifier is // the IPv4 address of the endpoint IPv4Prefix = "ipv4" )
View Source
const ( // ExecTimeout is the execution timeout to use in join_ep.sh executions ExecTimeout = time.Duration(30 * time.Second) )
Variables ¶
View Source
var ( OptionSpecAllowToHost = option.Option{ Define: "ALLOW_TO_HOST", Immutable: true, Description: "Allow all traffic to local host", } OptionSpecAllowToWorld = option.Option{ Define: "ALLOW_TO_WORLD", Immutable: true, Description: "Allow all traffic to outside world", } OptionSpecConntrackAccounting = option.Option{ Define: "CONNTRACK_ACCOUNTING", Description: "Enable per flow (conntrack) statistics", Requires: []string{OptionConntrack}, } OptionSpecConntrackLocal = option.Option{ Define: "CONNTRACK_LOCAL", Description: "Use endpoint dedicated tracking table instead of global one", Requires: []string{OptionConntrack}, } OptionSpecConntrack = option.Option{ Define: "CONNTRACK", Description: "Enable stateful connection tracking", } OptionSpecDebug = option.Option{ Define: "DEBUG", Description: "Enable debugging trace statements", } OptionSpecDropNotify = option.Option{ Define: "DROP_NOTIFY", Description: "Enable drop notifications", } OptionSpecNAT46 = option.Option{ Define: "ENABLE_NAT46", Description: "Enable automatic NAT46 translation", Requires: []string{OptionConntrack}, Verify: func(key string, val bool) error { if !IPv4Enabled { return fmt.Errorf("NAT46 requires IPv4 to be enabled") } else { return nil } }, } OptionSpecPolicy = option.Option{ Define: "POLICY_ENFORCEMENT", Description: "Enable policy enforcement", } EndpointMutableOptionLibrary = option.OptionLibrary{ OptionConntrackAccounting: &OptionSpecConntrackAccounting, OptionConntrackLocal: &OptionSpecConntrackLocal, OptionConntrack: &OptionSpecConntrack, OptionDebug: &OptionSpecDebug, OptionDropNotify: &OptionSpecDropNotify, OptionNAT46: &OptionSpecNAT46, OptionPolicy: &OptionSpecPolicy, } EndpointOptionLibrary = option.OptionLibrary{ OptionAllowToHost: &OptionSpecAllowToHost, OptionAllowToWorld: &OptionSpecAllowToWorld, } )
View Source
var ( //IPv4Enabled can be set to false to indicate IPv6 only operation IPv4Enabled = true )
Functions ¶
func CallsMapPath ¶ added in v0.9.0
func Ct4MapPath ¶
func Ct6MapPath ¶
func FilterEPDir ¶
FilterEPDir returns a list of directories' names that possible belong to an endpoint.
func NewCiliumID ¶
func NewCiliumID(id