From 3ecc8bfa173c80ed6b1c4879220aff9b92079a7f Mon Sep 17 00:00:00 2001 From: Stavros Kontopoulos Date: Mon, 6 Nov 2023 15:16:43 +0200 Subject: [PATCH] fixes --- docs/serving/services/storage.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/serving/services/storage.md b/docs/serving/services/storage.md index 98426160bd..7ab9cc79c2 100644 --- a/docs/serving/services/storage.md +++ b/docs/serving/services/storage.md @@ -5,6 +5,7 @@ Serving supports mounting the [volume types](https://kubernetes.io/docs/concepts [PersistentVolumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) are supported but require a [feature flag](../configuration/feature-flags.md) to be enabled. !!! warning + Mounting large volumes may add considerable overhead to the application's start up time. @@ -12,22 +13,20 @@ Bellow there is an example of using a persistent volume claim with a Knative Ser ## Prerequisites -Before you can configure PVCs for a Service, this feature must be enabled in the `KnativeServing` ConfigMap: +Before you can configure PVCs for a Service, this feature must be enabled in the `config-features` ConfigMap as follows: -```yaml -... -spec: - config: - features: - "kubernetes.podspec-persistent-volume-claim": enabled - "kubernetes.podspec-persistent-volume-write": enabled -... +``` +kubectl patch --namespace knative-serving configmap/config-features \ + --type merge \ + --patch '{"data":{"kubernetes.podspec-persistent-volume-claim": "enabled", "kubernetes.podspec-persistent-volume-write": "enabled"}}' ``` * The `kubernetes.podspec-persistent-volume-claim` extension controls whether persistent volumes (PVs) can be used with Knative Serving. * The `kubernetes.podspec-persistent-volume-write` extension controls whether PVs are available to Knative Serving with the write access. -> Note that if you have installed Serving via the Knative operator then you need to set the above feature flags at the corresponding Serving CR. +!!! note + + If you have installed Serving via the Knative operator then you need to set the above feature flags ** only ** at the corresponding Serving CR. ## Procedure @@ -41,8 +40,8 @@ spec: template: spec: containers: - ... - volumeMounts: + ... + volumeMounts: - mountPath: /data name: mydata readOnly: false @@ -62,4 +61,4 @@ spec: resources: requests: storage: 1Gi -``` +``` \ No newline at end of file