Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-gateway]: Support http(s) as AppProtocol in Kubernetes svc #6616

Merged
merged 6 commits into from
Aug 24, 2024
Merged
Changes from 1 commit
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
14 changes: 10 additions & 4 deletions internal/dag/accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,21 @@

// the ServicePort's AppProtocol must be one of the these.
const (
protoK8sH2C = "kubernetes.io/h2c"
protoK8sWS = "kubernetes.io/ws"
protoK8sH2C = "kubernetes.io/h2c"
protoK8sWS = "kubernetes.io/ws"
protoHttp = "www-http"

Check failure on line 113 in internal/dag/accessors.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: const protoHttp should be protoHTTP (revive)
Krast76 marked this conversation as resolved.
Show resolved Hide resolved
protoHttps = "https"

Check failure on line 114 in internal/dag/accessors.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: const protoHttps should be protoHTTPS (revive)
protoWebHttp = "http"

Check failure on line 115 in internal/dag/accessors.go

View workflow job for this annotation

GitHub Actions / lint

var-naming: const protoWebHttp should be protoWebHTTP (revive)
)

func toContourProtocol(appProtocol string) (string, bool) {
proto, ok := map[string]string{
// *NOTE: for gateway-api: the websocket is enabled by default
protoK8sWS: "",
protoK8sH2C: "h2c",
protoK8sWS: "",
protoK8sH2C: "h2c",
protoHttp: "",
protoHttps: "tls",
protoWebHttp: "",
}[appProtocol]
return proto, ok
}
Expand Down
Loading