Skip to content

Commit 23dd9c2

Browse files
committed
[api-gateway]: Support http, https and www-http as AppProtocol in kubernetes' service
Fix #6560
1 parent f9b6f6f commit 23dd9c2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

internal/dag/accessors.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,21 @@ func validateExternalName(svc *core_v1.Service, enableExternalNameSvc bool) erro
108108

109109
// the ServicePort's AppProtocol must be one of the these.
110110
const (
111-
protoK8sH2C = "kubernetes.io/h2c"
112-
protoK8sWS = "kubernetes.io/ws"
111+
protoK8sH2C = "kubernetes.io/h2c"
112+
protoK8sWS = "kubernetes.io/ws"
113+
protoHttp = "www-http"
114+
protoHttps = "https"
115+
protoWebHttp = "http"
113116
)
114117

115118
func toContourProtocol(appProtocol string) (string, bool) {
116119
proto, ok := map[string]string{
117120
// *NOTE: for gateway-api: the websocket is enabled by default
118-
protoK8sWS: "",
119-
protoK8sH2C: "h2c",
121+
protoK8sWS: "",
122+
protoK8sH2C: "h2c",
123+
protoHttp: "",
124+
protoHttps: "tls",
125+
protoWebHttp: "",
120126
}[appProtocol]
121127
return proto, ok
122128
}

0 commit comments

Comments
 (0)