Fix: bump version of Terraform Controller (#2250)

Bumped the version of Terraform controller to change the filed of
Configuration's status.

Related issue: https://github.com/oam-dev/terraform-controller/pull/104
This commit is contained in:
Zheng Xi Zhou
2021-09-09 17:19:57 +08:00
committed by GitHub
parent e0eded58e5
commit 19bcfdd8df
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ require (
github.com/mholt/archiver/v3 v3.3.0
github.com/mitchellh/hashstructure/v2 v2.0.1
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28
github.com/oam-dev/terraform-controller v0.1.16
github.com/oam-dev/terraform-controller v0.1.18
github.com/olekukonko/tablewriter v0.0.4
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.14.0
+2 -2
View File
@@ -1055,8 +1055,8 @@ github.com/oam-dev/stern v1.13.0-alpha h1:EVjM8Qvh6LssB6t4RZrjf9DtCq1cz+/cy6OF7f
github.com/oam-dev/stern v1.13.0-alpha/go.mod h1:AOkvfFUv0Arz7GBi0jz7S0Jsu4K/kdvSjNsnRt1+BIg=
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28 h1:tD8HiFKnt0jnwdTWjeqUnfnUYLD/+Nsmj8ZGIxqDWiU=
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28/go.mod h1:Mu8i0/DdplvnjwRbAYPsc8+LRR27n/mp8VWdkN10GzE=
github.com/oam-dev/terraform-controller v0.1.16 h1:EcJnHui7eLfVKDYndZR9xIq9wXb/86+okcHIbi4vPDg=
github.com/oam-dev/terraform-controller v0.1.16/go.mod h1:RMRlttrEOwWZawyDg3+ZtxAVGvTkCL+yMCTz94vkx/8=
github.com/oam-dev/terraform-controller v0.1.18 h1:64cWQUF5bJR4Y87oMPsyYr7Ra5miP22eIoNgeqEpN5A=
github.com/oam-dev/terraform-controller v0.1.18/go.mod h1:RMRlttrEOwWZawyDg3+ZtxAVGvTkCL+yMCTz94vkx/8=
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
@@ -170,13 +170,13 @@ func (h *AppHandler) aggregateHealthStatus(appFile *appfile.Appfile) ([]common.A
if err := h.r.Client.Get(ctx, client.ObjectKey{Name: wl.Name, Namespace: h.app.Namespace}, &configuration); err != nil {
return nil, false, errors.WithMessagef(err, "app=%s, comp=%s, check health error", appFile.Name, wl.Name)
}
if configuration.Status.State != terraformtypes.Available {
if configuration.Status.Apply.State != terraformtypes.Available {
healthy = false
status.Healthy = false
} else {
status.Healthy = true
}
status.Message = configuration.Status.Message
status.Message = configuration.Status.Apply.Message
default:
pCtx = process.NewContext(h.app.Namespace, wl.Name, appFile.Name, appFile.RevisionName)
if !h.isNewRevision && wl.CapabilityCategory != types.CUECategory {
@@ -207,7 +207,7 @@ var _ = Describe("Test statusAggregate", func() {
By("set status for Terraform configuration")
var gotConfiguration terraformapi.Configuration
k8sClient.Get(ctx, client.ObjectKey{Namespace: ns, Name: componentName}, &gotConfiguration)
gotConfiguration.Status.State = terraformtypes.Available
gotConfiguration.Status.Apply.State = terraformtypes.Available
k8sClient.Status().Update(ctx, &gotConfiguration)
By("aggregate status one more time")
@@ -505,12 +505,12 @@ func CUEBasedHealthCheck(ctx context.Context, c client.Client, wlRef core.Object
wlHealth.HealthStatus = StatusUnhealthy
wlHealth.Diagnosis = errors.Wrap(err, errHealthCheck).Error()
}
if configuration.Status.State != terraformtypes.Available {
if configuration.Status.Apply.State != terraformtypes.Available {
wlHealth.HealthStatus = StatusUnhealthy
} else {
wlHealth.HealthStatus = StatusHealthy
}
wlHealth.Diagnosis = configuration.Status.Message
wlHealth.Diagnosis = configuration.Status.Apply.Message
okToCheckTrait = true
default:
pCtx = process.NewContext(ns, wl.Name, appfile.Name, appfile.RevisionName)