Skip to content
Closed
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
1 change: 1 addition & 0 deletions internal/dataplane/kongstate/kongupstreampolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
return &kong.Healthcheck{
Active: translateActiveHealthcheck(healthchecks.Active),
Passive: translatePassiveHealthcheck(healthchecks.Passive),
Thresholds: healthchecks.Thresholds,

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / linters / lint

healthchecks.Thresholds undefined (type *"github.com/kong/kubernetes-configuration/v2/api/configuration/v1beta1".KongUpstreamHealthcheck has no field or method Thresholds) (typecheck)

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / linters / lint

unknown field Thresholds in struct literal of type kong.Healthcheck

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / conformance-tests / expressions-router

healthchecks.Thresholds undefined (type *"github.com/kong/kubernetes-configuration/v2/api/configuration/v1beta1".KongUpstreamHealthcheck has no field or method Thresholds)

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / conformance-tests / expressions-router

unknown field Thresholds in struct literal of type kong.Healthcheck

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / conformance-tests / traditional-compatible-router

healthchecks.Thresholds undefined (type *"github.com/kong/kubernetes-configuration/v2/api/configuration/v1beta1".KongUpstreamHealthcheck has no field or method Thresholds)

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / conformance-tests / traditional-compatible-router

unknown field Thresholds in struct literal of type kong.Healthcheck

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / unit-tests / unit-tests

healthchecks.Thresholds undefined (type *"github.com/kong/kubernetes-configuration/v2/api/configuration/v1beta1".KongUpstreamHealthcheck has no field or method Thresholds)

Check failure on line 176 in internal/dataplane/kongstate/kongupstreampolicy.go

View workflow job for this annotation

GitHub Actions / unit-tests / unit-tests

unknown field Thresholds in struct literal of type kong.Healthcheck
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be heatlthchecks.Threshold. Also, since the types are different in CRD and Kong SDK (*int64 and *flaot64), there should be a translateThreshold function to run the transferring like

func translateThreshold(threshold *int64) *float64 {
    if threshold == nil {
        return nil
    }
    return lo.ToPtr(float64(*threshold))
}

}
}

Expand Down
Loading