Documentation ¶
Index ¶
- func DestRuleIsMtls(rule *istioClientNet.DestinationRule) bool
- func PortDestRuleIsMtls(rule *PortDestRule) bool
- type DestRules
- func (dr *DestRules) AddByName(s Service, rule *istioClientNet.DestinationRule)
- func (dr *DestRules) AddByNamespace(namespace string, rule *istioClientNet.DestinationRule)
- func (dr *DestRules) AddByPort(s Service, port uint32, rule *istioClientNet.DestinationRule, ...)
- func (dr *DestRules) ByName(s Service) []*istioClientNet.DestinationRule
- func (dr *DestRules) ByNamespace(namespace string) []*istioClientNet.DestinationRule
- func (dr *DestRules) ByPort(s Service, port uint32) []*PortDestRule
- func (dr *DestRules) ForEachByName(cb func(s Service, rule *istioClientNet.DestinationRule))
- func (dr *DestRules) ForEachByPort(cb func(s Service, port uint32, rule *PortDestRule))
- func (dr *DestRules) TLSByName(s Service) (bool, *istioClientNet.DestinationRule, error)
- func (dr *DestRules) TLSByPort(s Service, port uint32) (bool, *PortDestRule, error)
- type PortDestRule
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestRuleIsMtls ¶
func DestRuleIsMtls(rule *istioClientNet.DestinationRule) bool
DestRuleIsMtls returns true if mTLS is enabled for the Destination Rule
func PortDestRuleIsMtls ¶
func PortDestRuleIsMtls(rule *PortDestRule) bool
PortDestRuleIsMtls returns true if mTLS is enabled for the PortDestRule
Types ¶
type DestRules ¶
type DestRules struct {
// contains filtered or unexported fields
}
DestRules holds maps of Istio destination rules by port, name, and namespace
func LoadDestRules ¶
func LoadDestRules(rules []*istioClientNet.DestinationRule) (*DestRules, error)
LoadDestRules is passed a list of Destination Rules and returns a DestRules with each of the Destination Rules mapped by port, name, and namespace
func NewDestRules ¶
func NewDestRules() *DestRules
NewDestRules initializes the maps for a DestRules to be loaded by LoadDestRules
func (*DestRules) AddByName ¶
func (dr *DestRules) AddByName(s Service, rule *istioClientNet.DestinationRule)
AddByName adds a Destination Rule to the DestRules name map
func (*DestRules) AddByNamespace ¶
func (dr *DestRules) AddByNamespace(namespace string, rule *istioClientNet.DestinationRule)
AddByNamespace adds a Destination Rule to the DestRules namespace map
func (*DestRules) AddByPort ¶
func (dr *DestRules) AddByPort( s Service, port uint32, rule *istioClientNet.DestinationRule, portRule *istioNet.TrafficPolicy_PortTrafficPolicy, )
AddByPort adds a Destination Rule to the DestRules port map
func (*DestRules) ByName ¶
func (dr *DestRules) ByName(s Service) []*istioClientNet.DestinationRule
ByName is passed a Service and returns the Destination Rule in the DestRules name map for the name of that Service
func (*DestRules) ByNamespace ¶
func (dr *DestRules) ByNamespace(namespace string) []*istioClientNet.DestinationRule
ByNamespace is passed a namespace and returns the Destination Rule in the DestRules namespace map for that namespace
func (*DestRules) ByPort ¶
func (dr *DestRules) ByPort(s Service, port uint32) []*PortDestRule
ByPort is passed a Service and a port number and returns the Destination Rule in the DestRules port map for that port number
func (*DestRules) ForEachByName ¶
func (dr *DestRules) ForEachByName(cb func(s Service, rule *istioClientNet.DestinationRule))
ForEachByName examines all Destination Rules for a Service based off of a Destination Rule that is passed
func (*DestRules) ForEachByPort ¶
func (dr *DestRules) ForEachByPort(cb func(s Service, port uint32, rule *PortDestRule))
ForEachByPort examines all Destination Rules for a Service and port number based off of a PortDestRule that is passed
func (*DestRules) TLSByName ¶
func (dr *DestRules) TLSByName(s Service) (bool, *istioClientNet.DestinationRule, error)
TLSByName returns true if mTLS is enabled for the Destination Rule
type PortDestRule ¶
type PortDestRule struct { Rule *istioClientNet.DestinationRule PortRule *istioNet.TrafficPolicy_PortTrafficPolicy }
PortDestRule stores the Istio destination rule and port traffic policy for a port
type Service ¶
Service is the necesary components of a kubernetes service to look at auth policies and destination rules
func ServiceFromFqdn ¶
ServiceFromFqdn validates a kubernetes FQDN and returns a service with the name and namespace from a validated FQDN