@@ -16,23 +16,17 @@ package status
16
16
import (
17
17
"k8s.io/apimachinery/pkg/util/sets"
18
18
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
19
- "sigs.k8s.io/gateway-api/conformance/utils/suite"
20
- )
21
19
22
- // SetGatewayClassAccepted inserts or updates the Accepted condition
23
- // for the provided GatewayClass.
24
- func SetGatewayClassAccepted (gc * gwapiv1.GatewayClass , accepted bool , reason , msg string ) * gwapiv1.GatewayClass {
25
- gc .Status .Conditions = MergeConditions (gc .Status .Conditions , computeGatewayClassAcceptedCondition (gc , accepted , reason , msg ))
26
- return gc
27
- }
20
+ "github.com/envoyproxy/gateway/test/conformance"
21
+ )
28
22
29
- // GetSupportedFeatures returns a list of supported Gateway-API features,
23
+ // GatewaySupportedFeatures is a list of supported Gateway-API features,
30
24
// based on the running conformance tests suite.
31
- func GetSupportedFeatures () []gwapiv1. SupportedFeature {
25
+ var GatewaySupportedFeatures = getSupportedFeatures ()
32
26
33
- // TODO(levikobi): This must be in sync with the cSuite supported features.
34
- supportedFeatures := suite . AllFeatures
35
- supportedFeatures .Delete (suite . MeshCoreFeatures .UnsortedList ()... )
27
+ func getSupportedFeatures () []gwapiv1. SupportedFeature {
28
+ supportedFeatures := conformance . EnvoyGatewaySuite . SupportedFeatures
29
+ supportedFeatures .Delete (conformance . EnvoyGatewaySuite . ExemptFeatures .UnsortedList ()... )
36
30
37
31
ret := sets .New [gwapiv1.SupportedFeature ]()
38
32
for _ , feature := range supportedFeatures .UnsortedList () {
@@ -41,9 +35,10 @@ func GetSupportedFeatures() []gwapiv1.SupportedFeature {
41
35
return sets .List (ret )
42
36
}
43
37
44
- // SetGatewayClassSupportedFeatures insert or updates the SupportedFeatures field
38
+ // SetGatewayClassAccepted inserts or updates the Accepted condition
45
39
// for the provided GatewayClass.
46
- func SetGatewayClassSupportedFeatures (gc * gwapiv1.GatewayClass ) * gwapiv1.GatewayClass {
47
- gc .Status .SupportedFeatures = GetSupportedFeatures ()
40
+ func SetGatewayClassAccepted (gc * gwapiv1.GatewayClass , accepted bool , reason , msg string ) * gwapiv1.GatewayClass {
41
+ gc .Status .Conditions = MergeConditions (gc .Status .Conditions , computeGatewayClassAcceptedCondition (gc , accepted , reason , msg ))
42
+ gc .Status .SupportedFeatures = GatewaySupportedFeatures
48
43
return gc
49
44
}
0 commit comments