Documentation ¶
Index ¶
- Constants
- func LogHTTPSettings(logger Logger, existingBlacklisted []n.ApplicationGatewayBackendHTTPSettings, ...)
- func LogListeners(existingBlacklisted []n.ApplicationGatewayHTTPListener, ...)
- func LogPathMaps(existingBlacklisted []n.ApplicationGatewayURLPathMap, ...)
- func LogPools(existingBlacklisted []n.ApplicationGatewayBackendAddressPool, ...)
- func LogProbes(logger Logger, existingBlacklisted []n.ApplicationGatewayProbe, ...)
- func LogRedirects(existingBlacklisted []n.ApplicationGatewayRedirectConfiguration, ...)
- func LogRules(existingBlacklisted []n.ApplicationGatewayRequestRoutingRule, ...)
- func MergeCerts(certBuckets ...[]n.ApplicationGatewaySslCertificate) []n.ApplicationGatewaySslCertificate
- func MergeHTTPSettings(settingBuckets ...[]n.ApplicationGatewayBackendHTTPSettings) []n.ApplicationGatewayBackendHTTPSettings
- func MergeListeners(listenerBuckets ...[]n.ApplicationGatewayHTTPListener) []n.ApplicationGatewayHTTPListener
- func MergePathMaps(pathMapBuckets ...[]n.ApplicationGatewayURLPathMap) []n.ApplicationGatewayURLPathMap
- func MergePools(pools ...[]n.ApplicationGatewayBackendAddressPool) []n.ApplicationGatewayBackendAddressPool
- func MergeProbes(probesBuckets ...[]n.ApplicationGatewayProbe) []n.ApplicationGatewayProbe
- func MergeRedirects(redirectBuckets ...[]n.ApplicationGatewayRedirectConfiguration) []n.ApplicationGatewayRedirectConfiguration
- func MergeRules(appGw *n.ApplicationGateway, ...) []n.ApplicationGatewayRequestRoutingRule
- func PruneIngressRules(ing *networking.Ingress, ...) []networking.IngressRule
- type ExistingResources
- func (er ExistingResources) GetBlacklistedHTTPSettings() ([]n.ApplicationGatewayBackendHTTPSettings, ...)
- func (er ExistingResources) GetBlacklistedListeners() ([]n.ApplicationGatewayHTTPListener, []n.ApplicationGatewayHTTPListener)
- func (er ExistingResources) GetBlacklistedPathMaps() ([]n.ApplicationGatewayURLPathMap, []n.ApplicationGatewayURLPathMap)
- func (er ExistingResources) GetBlacklistedPools() ([]n.ApplicationGatewayBackendAddressPool, ...)
- func (er ExistingResources) GetBlacklistedProbes() ([]n.ApplicationGatewayProbe, []n.ApplicationGatewayProbe)
- func (er ExistingResources) GetBlacklistedRedirects() ([]n.ApplicationGatewayRedirectConfiguration, ...)
- func (er ExistingResources) GetBlacklistedRoutingRules() ([]n.ApplicationGatewayRequestRoutingRule, ...)
- type Logger
- type Target
- type TargetBlacklist
- type TargetPath
Constants ¶
const ( // MaxAllowedHostNames the maximum number of HostNames allowed for listener. MaxAllowedHostNames int = 5 )
Variables ¶
This section is empty.
Functions ¶
func LogHTTPSettings ¶
func LogHTTPSettings(logger Logger, existingBlacklisted []n.ApplicationGatewayBackendHTTPSettings, existingNonBlacklisted []n.ApplicationGatewayBackendHTTPSettings, managedSettings []n.ApplicationGatewayBackendHTTPSettings)
LogHTTPSettings emits a few log lines detailing what settings are created, blacklisted, and removed from ARM.
func LogListeners ¶
func LogListeners(existingBlacklisted []n.ApplicationGatewayHTTPListener, existingNonBlacklisted []n.ApplicationGatewayHTTPListener, managedListeners []n.ApplicationGatewayHTTPListener)
LogListeners emits a few log lines detailing what Listeners are created, blacklisted, and removed from ARM.
func LogPathMaps ¶
func LogPathMaps(existingBlacklisted []n.ApplicationGatewayURLPathMap, existingNonBlacklisted []n.ApplicationGatewayURLPathMap, managedPathMaps []n.ApplicationGatewayURLPathMap)
LogPathMaps emits a few log lines detailing what pathMaps are created, blacklisted, and removed from ARM.
func LogPools ¶
func LogPools(existingBlacklisted []n.ApplicationGatewayBackendAddressPool, existingNonBlacklisted []n.ApplicationGatewayBackendAddressPool, managedPools []n.ApplicationGatewayBackendAddressPool)
LogPools emits a few log lines detailing what pools are created, blacklisted, and removed from ARM.
func LogProbes ¶
func LogProbes(logger Logger, existingBlacklisted []n.ApplicationGatewayProbe, existingNonBlacklisted []n.ApplicationGatewayProbe, managedProbes []n.ApplicationGatewayProbe)
LogProbes emits a few log lines detailing what probes are created, blacklisted, and removed from ARM.
func LogRedirects ¶
func LogRedirects(existingBlacklisted []n.ApplicationGatewayRedirectConfiguration, existingNonBlacklisted []n.ApplicationGatewayRedirectConfiguration, managedRedirects []n.ApplicationGatewayRedirectConfiguration)
LogRedirects emits a few log lines detailing what Redirects are created, blacklisted, and removed from ARM.
func LogRules ¶
func LogRules(existingBlacklisted []n.ApplicationGatewayRequestRoutingRule, existingNonBlacklisted []n.ApplicationGatewayRequestRoutingRule, managedRules []n.ApplicationGatewayRequestRoutingRule)
LogRules emits a few log lines detailing what rules are created, blacklisted, and removed from ARM.
func MergeCerts ¶
func MergeCerts(certBuckets ...[]n.ApplicationGatewaySslCertificate) []n.ApplicationGatewaySslCertificate
MergeCerts merges list of lists of certs into a single list, maintaining uniqueness.
func MergeHTTPSettings ¶
func MergeHTTPSettings(settingBuckets ...[]n.ApplicationGatewayBackendHTTPSettings) []n.ApplicationGatewayBackendHTTPSettings
MergeHTTPSettings merges list of lists of HTTP Settings into a single list, maintaining uniqueness.
func MergeListeners ¶
func MergeListeners(listenerBuckets ...[]n.ApplicationGatewayHTTPListener) []n.ApplicationGatewayHTTPListener
MergeListeners merges list of lists of listeners into a single list, maintaining uniqueness.
func MergePathMaps ¶
func MergePathMaps(pathMapBuckets ...[]n.ApplicationGatewayURLPathMap) []n.ApplicationGatewayURLPathMap
MergePathMaps merges list of lists of pathMaps into a single list, maintaining uniqueness.
func MergePools ¶
func MergePools(pools ...[]n.ApplicationGatewayBackendAddressPool) []n.ApplicationGatewayBackendAddressPool
MergePools merges list of lists of backend address pools into a single list, maintaining uniqueness.
func MergeProbes ¶
func MergeProbes(probesBuckets ...[]n.ApplicationGatewayProbe) []n.ApplicationGatewayProbe
MergeProbes merges list of lists of health probes into a single list, maintaining uniqueness.
func MergeRedirects ¶
func MergeRedirects(redirectBuckets ...[]n.ApplicationGatewayRedirectConfiguration) []n.ApplicationGatewayRedirectConfiguration
MergeRedirects merges list of lists of redirects into a single list, maintaining uniqueness.
func MergeRules ¶
func MergeRules(appGw *n.ApplicationGateway, ruleBuckets ...[]n.ApplicationGatewayRequestRoutingRule) []n.ApplicationGatewayRequestRoutingRule
MergeRules merges list of lists of rules into a single list, maintaining uniqueness.
func PruneIngressRules ¶
func PruneIngressRules(ing *networking.Ingress, prohibitedTargets []*ptv1.AzureIngressProhibitedTarget) []networking.IngressRule
PruneIngressRules transforms the given ingress struct to remove targets, which AGIC should not create configuration for.
Types ¶
type ExistingResources ¶
type ExistingResources struct { BackendPools []n.ApplicationGatewayBackendAddressPool Certificates []n.ApplicationGatewaySslCertificate RoutingRules []n.ApplicationGatewayRequestRoutingRule Listeners []n.ApplicationGatewayHTTPListener URLPathMaps []n.ApplicationGatewayURLPathMap HTTPSettings []n.ApplicationGatewayBackendHTTPSettings Ports []n.ApplicationGatewayFrontendPort Probes []n.ApplicationGatewayProbe Redirects []n.ApplicationGatewayRedirectConfiguration ProhibitedTargets []*ptv1.AzureIngressProhibitedTarget DefaultBackendPool *n.ApplicationGatewayBackendAddressPool // contains filtered or unexported fields }
ExistingResources is used in brownfield deployments and holds a copy of the existing App Gateway config, based on which AGIC will determine what should be retained and what config should be discarded or overwritten.
func NewExistingResources ¶
func NewExistingResources(appGw n.ApplicationGateway, prohibitedTargets []*ptv1.AzureIngressProhibitedTarget, defaultPool *n.ApplicationGatewayBackendAddressPool) ExistingResources
NewExistingResources creates a new ExistingResources struct.
func (ExistingResources) GetBlacklistedHTTPSettings ¶
func (er ExistingResources) GetBlacklistedHTTPSettings() ([]n.ApplicationGatewayBackendHTTPSettings, []n.ApplicationGatewayBackendHTTPSettings)
GetBlacklistedHTTPSettings filters the given list of routing pathMaps to the list pathMaps that AGIC is allowed to manage. HTTP Setting is blacklisted when it is associated with a Routing Rule that is blacklisted.
func (ExistingResources) GetBlacklistedListeners ¶
func (er ExistingResources) GetBlacklistedListeners() ([]n.ApplicationGatewayHTTPListener, []n.ApplicationGatewayHTTPListener)
GetBlacklistedListeners filters the given list of health probes to the list Probes that AGIC is allowed to manage.
func (ExistingResources) GetBlacklistedPathMaps ¶
func (er ExistingResources) GetBlacklistedPathMaps() ([]n.ApplicationGatewayURLPathMap, []n.ApplicationGatewayURLPathMap)
GetBlacklistedPathMaps filters the given list of routing pathMaps to the list pathMaps that AGIC is allowed to manage.
func (ExistingResources) GetBlacklistedPools ¶
func (er ExistingResources) GetBlacklistedPools() ([]n.ApplicationGatewayBackendAddressPool, []n.ApplicationGatewayBackendAddressPool)
GetBlacklistedPools removes the managed pools from the given list of pools; resulting in a list of pools not managed by AGIC.
func (ExistingResources) GetBlacklistedProbes ¶
func (er ExistingResources) GetBlacklistedProbes() ([]n.ApplicationGatewayProbe, []n.ApplicationGatewayProbe)
GetBlacklistedProbes filters the given list of health probes to the list Probes that AGIC is allowed to manage.
func (ExistingResources) GetBlacklistedRedirects ¶
func (er ExistingResources) GetBlacklistedRedirects() ([]n.ApplicationGatewayRedirectConfiguration, []n.ApplicationGatewayRedirectConfiguration)
GetBlacklistedRedirects removes the managed redirects from the given list of redirects; resulting in a list of redirects not managed by AGIC.
func (ExistingResources) GetBlacklistedRoutingRules ¶
func (er ExistingResources) GetBlacklistedRoutingRules() ([]n.ApplicationGatewayRequestRoutingRule, []n.ApplicationGatewayRequestRoutingRule)
GetBlacklistedRoutingRules filters the given list of routing rules to the list rules that AGIC is allowed to manage.
type Logger ¶
type Logger interface {
// Info is the a function allowing us to log messages.
Info(args ...interface{})
}
Logger is an abstraction over a logging facility.
type Target ¶
type Target struct { Hostname string `json:"Hostname,omitempty"` Path TargetPath `json:"Path,omitempty"` }
Target uniquely identifies a subset of App Gateway configuration, which AGIC will manage or be prohibited from managing.
func (Target) IsBlacklisted ¶
func (t Target) IsBlacklisted(blacklist TargetBlacklist) bool
IsBlacklisted figures out whether a given Target objects in a list of blacklisted targets.
type TargetBlacklist ¶
type TargetBlacklist *[]Target
TargetBlacklist is a list of Targets, which AGIC is not allowed to apply configuration for.
func GetTargetBlacklist ¶
func GetTargetBlacklist(prohibitedTargets []*ptv1.AzureIngressProhibitedTarget) TargetBlacklist
GetTargetBlacklist returns the list of Targets given a list ProhibitedTarget CRDs.