Skip to content

Commit

Permalink
Make chitragupta describe its actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alephnull committed Apr 27, 2021
1 parent 12c0699 commit 506ce1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ makes A records in Route53 accessible as <task>.<cluster>.<domain>.`,
}
clusters := devenv.FastFetchClusters(cnames)
for _, c := range clusters {
c.SyncDNS(route53.ChangeActionUpsert, config.ZoneID, config.Domain)
err := c.SyncDNS(route53.ChangeActionUpsert, config.ZoneID, config.Domain)
if err != nil {
log.Error().Err(err).Interface("cluster", c).Msg("could not update DNS")
}
}
} else {
cluster, err := devenv.GetGromitCluster(clusterName)
Expand Down
3 changes: 2 additions & 1 deletion devenv/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (c *GromitCluster) Populate() error {
if err != nil {
continue
}
c.log.Trace().Str("task", t).Str("ip", ip).Msg("populating tasks")
c.tasks = append(c.tasks, GromitTask{
Name: tname,
IP: ip,
Expand All @@ -114,7 +115,7 @@ func (c *GromitCluster) SyncDNS(action route53.ChangeAction, zoneid string, doma
var changes []route53.Change
for _, t := range c.tasks {
fqdn := fmt.Sprintf("%s.%s.%s", t.Name, c.Name, domain)
c.log.Trace().Str("fqdn", fqdn).Str("A record", t.IP).Msgf("for task %s", t.Name)
c.log.Debug().Str("fqdn", fqdn).Str("A record", t.IP).Msgf("for task %s", t.Name)
changes = append(changes, route53.Change{
Action: action,
ResourceRecordSet: &route53.ResourceRecordSet{
Expand Down

0 comments on commit 506ce1b

Please sign in to comment.