Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions modules/serverless-https-redirect-global.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Module is included in the following assemblies:
//
// * serverless/admin_guide/knative-serving-CR-config.adoc

[id="serverless-https-redirect-global_{context}"]
= HTTPS redirection global settings

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:

[source,yaml]
----
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
spec:
config:
network:
httpProtocol: "redirected"
...
----
21 changes: 21 additions & 0 deletions modules/serverless-https-redirect-service.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Module is included in the following assemblies:
//
// * serverless/knative_serving/serverless-applications.adoc

[id="serverless-https-redirect-service_{context}"]
= HTTPS redirection per service

You can enable or disable HTTPS redirection for a service by configuring the `networking.knative.dev/httpOption` annotation, as shown in the following example:

[source,yaml]
----
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: example
namespace: default
annotations:
networking.knative.dev/httpOption: "redirected"
spec:
...
----
4 changes: 4 additions & 0 deletions serverless/admin_guide/knative-serving-CR-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ This guide describes how cluster administrators can manage settings for develope
include::modules/knative-serving-CR-system-deployments.adoc[leveloffset=+1]
include::modules/serverless-config-emptydir.adoc[leveloffset=+1]

// global https redirect
// include::modules/serverless-https-redirect-global.adoc[leveloffset=+1]
// uncomment at 1.19.0 release

[id="additional-resources_knative-serving-CR-config"]
== Additional resources

Expand Down
4 changes: 4 additions & 0 deletions serverless/knative_serving/serverless-applications.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ include::modules/interacting-serverless-apps-http2-gRPC.adoc[leveloffset=+1]
// Using Knative services w/ restrictive NetworkPolicies
include::modules/serverless-services-network-policies.adoc[leveloffset=+1]

// HTTPS redirection
// include::modules/serverless-https-redirect-service.adoc[leveloffset=+1]
// uncomment at 1.19.0 release

[id="serverless-applications-kn-offline-mode"]
== Using kn CLI in offline mode

Expand Down