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
59 changes: 59 additions & 0 deletions modules/serverless-ossm-enabling-serving-metrics.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[id="serverless-ossm-enabling-serving-metrics_{context}"]
= Enabling Knative Serving metrics when using Service Mesh with mTLS

If Service Mesh is enabled with mTLS, metrics for Knative Serving are disabled by default, because Service Mesh prevents Prometheus from scraping metrics. This section shows how to enable Knative Serving metrics when using Service Mesh and mTLS.

.Prerequisites

* You have installed the {ServerlessOperatorName} on your {product-title} cluster.
* You have installed {ProductName} with the mTLS functionality enabled.
* You have installed Knative Serving.

.Procedure

. Specify `prometheus` as the `metrics.backend-destination` in the `observability` spec of the Knative Serving custom resource (CR):
+
[source,yaml]
----
apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
spec:
config:
observability:
metrics.backend-destination: "prometheus"
----
+
This step prevents metrics from being disabled by default.

. Apply the following network policy to allow traffic from the Prometheus namespace:
+
[source,yaml]
----
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-openshift-monitoring-ns
namespace: knative-serving
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
name: "openshift-monitoring"
podSelector: {}
----

. Modify and reapply the default Service Mesh control plane in the `istio-system` namespace, so that it includes the following spec:
+
[source,yaml]
----
spec:
proxy:
networking:
trafficControl:
inbound:
excludedPorts:
- 8444
----
54 changes: 1 addition & 53 deletions modules/serverless-rn-1-16-0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,59 +26,7 @@ WARNING: found multiple channel heads: [amqstreams.v1.7.2 amqstreams.v1.6.2], pl
+
You can fix this issue by uninstalling the AMQ Streams Operator before installing or upgrading the {ServerlessOperatorName}. You can then reinstall the AMQ Streams Operator.

// Added note about the following to admin and dev metrics assemblies - remove these if the issue gets resolved.
* If Service Mesh is enabled with mTLS, metrics for Knative Serving are disabled by default because Service Mesh prevents Prometheus from scraping metrics.
+
If you want to enable Knative Serving metrics for use with Service Mesh and mTLS, you must complete the following steps:

.. Specify `prometheus` as the `metrics.backend-destination` in the `observability` spec of the Knative Serving custom resource (CR):
+
[source,yaml]
----
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
spec:
config:
observability:
metrics.backend-destination: "prometheus"
----
+
This step prevents metrics from being disabled by default.

.. Apply the following network policy to allow traffic from the Prometheus namespace:
+
[source,yaml]
----
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-openshift-monitoring-ns
namespace: knative-serving
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
name: "openshift-monitoring"
podSelector: {}
policyTypes:
- Ingress
----

.. Modify and reapply the default Service Mesh control plane in the `istio-system` namespace, so that it includes the following spec:
+
[source,yaml]
----
spec:
proxy:
networking:
trafficControl:
inbound:
excludedPorts:
- 8444
----
* If Service Mesh is enabled with mTLS, metrics for Knative Serving are disabled by default because Service Mesh prevents Prometheus from scraping metrics. For instructions on enabling Knative Serving metrics for use with Service Mesh and mTLS, see the "Integrating Service Mesh with OpenShift Serverless" section of the Serverless documentation.

* If you deploy Service Mesh CRs with the Istio ingress enabled, you might see the following warning in the `istio-ingressgateway` pod:
+
Expand Down
2 changes: 1 addition & 1 deletion serverless/admin_guide/serverless-admin-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Metrics enable cluster administrators to monitor how {ServerlessProductName} clu
====
If Service Mesh is enabled with mTLS, metrics for Knative Serving are disabled by default because Service Mesh prevents Prometheus from scraping metrics.

For information about resolving this issue, see the xref:../../serverless/serverless-release-notes.adoc#serverless-rn-1-16-0_serverless-release-notes[Serverless 1.16.0 release notes].
For information about resolving this issue, see xref:../../serverless/admin_guide/serverless-ossm-setup.html#serverless-ossm-enabling-serving-metrics_serverless-ossm-setup[Integrating Service Mesh with OpenShift Serverless].
====

// Common metrics
Expand Down
1 change: 1 addition & 0 deletions serverless/admin_guide/serverless-ossm-setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ If you want to use any domain name, including those which are not subdomains of

include::modules/serverlesss-ossm-external-certs.adoc[leveloffset=+2]
include::modules/serverless-ossm-setup.adoc[leveloffset=+2]
include::modules/serverless-ossm-enabling-serving-metrics.adoc[leveloffset=+2]

// With kourier
include::modules/serverless-ossm-setup-with-kourier.adoc[leveloffset=+1]
2 changes: 1 addition & 1 deletion serverless/knative_serving/serverless-serving-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Metrics enable developers to monitor how Knative services are performing.
====
If Service Mesh is enabled with mTLS, metrics for Knative Serving are disabled by default because Service Mesh prevents Prometheus from scraping metrics.

For information about resolving this issue, see the xref:../../serverless/serverless-release-notes.adoc#serverless-rn-1-16-0_serverless-release-notes[Serverless 1.16.0 release notes].
For information about resolving this issue, see xref:../../serverless/admin_guide/serverless-ossm-setup.html#serverless-ossm-enabling-serving-metrics_serverless-ossm-setup[Integrating Service Mesh with OpenShift Serverless].
====

include::modules/serverless-queue-proxy-metrics.adoc[leveloffset=+1]