Skip to content

Commit 8e04b7c

Browse files
authored
Merge pull request #38916 from abrennan89/SRVKS-824
SRVKS-824: Add HTTPS redirect docs
2 parents 11fad86 + edcc3cc commit 8e04b7c

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * serverless/admin_guide/knative-serving-CR-config.adoc
4+
5+
[id="serverless-https-redirect-global_{context}"]
6+
= HTTPS redirection global settings
7+
8+
You can enable HTTPS redirection for all services on the cluster by configuring the `httpProtocol` spec for the `KnativeServing` custom resource, as shown in the following example:
9+
10+
[source,yaml]
11+
----
12+
apiVersion: operator.knative.dev/v1alpha1
13+
kind: KnativeServing
14+
metadata:
15+
name: knative-serving
16+
spec:
17+
config:
18+
network:
19+
httpProtocol: "redirected"
20+
...
21+
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * serverless/knative_serving/serverless-applications.adoc
4+
5+
[id="serverless-https-redirect-service_{context}"]
6+
= HTTPS redirection per service
7+
8+
You can enable or disable HTTPS redirection for a service by configuring the `networking.knative.dev/httpOption` annotation, as shown in the following example:
9+
10+
[source,yaml]
11+
----
12+
apiVersion: serving.knative.dev/v1
13+
kind: Service
14+
metadata:
15+
name: example
16+
namespace: default
17+
annotations:
18+
networking.knative.dev/httpOption: "redirected"
19+
spec:
20+
...
21+
----

serverless/admin_guide/knative-serving-CR-config.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ This guide describes how cluster administrators can manage settings for develope
1212
include::modules/knative-serving-CR-system-deployments.adoc[leveloffset=+1]
1313
include::modules/serverless-config-emptydir.adoc[leveloffset=+1]
1414

15+
// global https redirect
16+
// include::modules/serverless-https-redirect-global.adoc[leveloffset=+1]
17+
// uncomment at 1.19.0 release
18+
1519
[id="additional-resources_knative-serving-CR-config"]
1620
== Additional resources
1721

serverless/knative_serving/serverless-applications.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ include::modules/interacting-serverless-apps-http2-gRPC.adoc[leveloffset=+1]
3838
// Using Knative services w/ restrictive NetworkPolicies
3939
include::modules/serverless-services-network-policies.adoc[leveloffset=+1]
4040

41+
// HTTPS redirection
42+
// include::modules/serverless-https-redirect-service.adoc[leveloffset=+1]
43+
// uncomment at 1.19.0 release
44+
4145
[id="serverless-applications-kn-offline-mode"]
4246
== Using kn CLI in offline mode
4347

0 commit comments

Comments
 (0)