Skip to content

Commit

Permalink
Reconcile first ingress resources. (#582)
Browse files Browse the repository at this point in the history
Signed-off-by: Rodrigo Reis <[email protected]>
  • Loading branch information
gargravarr authored Feb 13, 2024
1 parent cc42b67 commit 93d797e
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions controller/stackset.go
Original file line number Diff line number Diff line change
Expand Up @@ -1264,36 +1264,7 @@ func (c *StackSetController) ReconcileStackSetDesiredTraffic(ctx context.Context
}

func (c *StackSetController) ReconcileStackResources(ctx context.Context, ssc *core.StackSetContainer, sc *core.StackContainer) error {
if c.configMapSupportEnabled {
err := c.ReconcileStackConfigMap(ctx, sc.Stack, sc.Resources.ConfigMaps, sc.UpdateObjectMeta)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageConfigMap", err)
}
}

if c.secretSupportEnabled {
err := c.ReconcileStackSecret(ctx, sc.Stack, sc.Resources.Secrets, sc.UpdateObjectMeta)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageSecret", err)
}
}

err := c.ReconcileStackDeployment(ctx, sc.Stack, sc.Resources.Deployment, sc.GenerateDeployment)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageDeployment", err)
}

err = c.ReconcileStackHPA(ctx, sc.Stack, sc.Resources.HPA, sc.GenerateHPA)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageHPA", err)
}

err = c.ReconcileStackService(ctx, sc.Stack, sc.Resources.Service, sc.GenerateService)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageService", err)
}

err = c.ReconcileStackIngress(ctx, sc.Stack, sc.Resources.Ingress, sc.GenerateIngress)
err := c.ReconcileStackIngress(ctx, sc.Stack, sc.Resources.Ingress, sc.GenerateIngress)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageIngress", err)
}
Expand Down Expand Up @@ -1335,6 +1306,35 @@ func (c *StackSetController) ReconcileStackResources(ctx context.Context, ssc *c
}
}

if c.configMapSupportEnabled {
err = c.ReconcileStackConfigMap(ctx, sc.Stack, sc.Resources.ConfigMaps, sc.UpdateObjectMeta)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageConfigMap", err)
}
}

if c.secretSupportEnabled {
err := c.ReconcileStackSecret(ctx, sc.Stack, sc.Resources.Secrets, sc.UpdateObjectMeta)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageSecret", err)
}
}

err = c.ReconcileStackDeployment(ctx, sc.Stack, sc.Resources.Deployment, sc.GenerateDeployment)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageDeployment", err)
}

err = c.ReconcileStackHPA(ctx, sc.Stack, sc.Resources.HPA, sc.GenerateHPA)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageHPA", err)
}

err = c.ReconcileStackService(ctx, sc.Stack, sc.Resources.Service, sc.GenerateService)
if err != nil {
return c.errorEventf(sc.Stack, "FailedManageService", err)
}

return nil
}

Expand Down

0 comments on commit 93d797e

Please sign in to comment.