Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions controllers/plan/syncApp.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ func (p *SyncApp) ingressHosts(
) []string {
hostMap := map[string]bool{}
fleetSuffix := fmt.Sprintf("-%s", p.Fleet)
log.Info("DEBUGGING: Checking ingress host", "App", p.App, "target", p.Target, "namespace", p.Namespace, "defaultDomains", defaultDomains)
addDefaultHost := func(host string) {
if p.isUserDefined(host) {
return
Expand All @@ -189,8 +188,6 @@ func (p *SyncApp) ingressHosts(
}
}

log.Info("DEBUGGING: Checking defaultHost length", "App", p.App, "target", p.Target, "namespace", p.Namespace, "ingressHosts", hostMap)

for _, host := range port.Hosts {
hostMap[host] = true
}
Expand Down Expand Up @@ -251,8 +248,6 @@ func (p *SyncApp) portHeaderMatches(
}
}

log.Info("DEBUGGING: Checking private/public enable", "App", p.App, "target", p.Target, "namespace", p.Namespace, "privateEnabled", privateEnabled, "publicEnabled", publicEnabled, "portName", port.Name)

if publicEnabled {
hosts := p.publicHosts(log, port, cluster)
if len(hosts) > 0 {
Expand All @@ -279,7 +274,6 @@ func (p *SyncApp) portHeaderMatches(
}
if privateEnabled {
hosts := p.privateHosts(log, port, cluster)
log.Info("DEBUGGING: Checking private host length", "App", p.App, "target", p.Target, "namespace", p.Namespace, "hostLength", len(hosts), "hosts", hosts)
if len(hosts) > 0 {
for _, host := range hosts {
hostMap[host] = true
Expand Down Expand Up @@ -540,24 +534,18 @@ func (p *SyncApp) destinationRule() *istioclient.DestinationRule {
// virtualService will return nil if there are not configured routes
func (p *SyncApp) virtualService(log logr.Logger, cluster *picchuv1alpha1.Cluster) *istioclient.VirtualService {
hostMap := map[string]bool{}
log.Info(fmt.Sprintf("DEBUGGING: Syncing taggedRoutes for %s", p.App), "target", p.Target, "namespace", p.Namespace)

taggedRoutes, taggedHosts := p.taggedRoutes(log, cluster)
for _, host := range taggedHosts {
hostMap[host] = true
}
log.Info(fmt.Sprintf("DEBUGGING: Finished syncing taggedRoutes for %s", p.App), "target", p.Target, "namespace", p.Namespace, "hostMap", hostMap)

log.Info(fmt.Sprintf("DEBUGGING: Syncing releasedRoutes for %s", p.App))
releaseRoutes, releaseHosts := p.releaseRoutes(log, cluster)
for _, host := range releaseHosts {
hostMap[host] = true
}

log.Info(fmt.Sprintf("DEBUGGING: Finished syncing releasedRoutes for %s", p.App), "target", p.Target, "namespace", p.Namespace, "hostMap", hostMap)

log.Info(fmt.Sprintf("DEBUGGING: Syncing devRoutes for %s", p.App), "target", p.Target, "namespace", p.Namespace)
devRoutes := p.devRoutes(cluster)
log.Info(fmt.Sprintf("DEBUGGING: Finished syncing devRoutes for %s", p.App), "target", p.Target, "namespace", p.Namespace)

http := append(devRoutes, taggedRoutes...)
http = append(http, releaseRoutes...)
Expand Down