Add details for storage and knative services (#5605)

* add details for storage and knative services

* fixes

* Update storage.md

add missing whitespace

---------

Co-authored-by: Reto Lehmann <retocode@icloud.com>
This commit is contained in:
Stavros Kontopoulos 2023-07-13 09:49:15 +03:00 committed by GitHub
parent a65dbda136
commit d60f9cacf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -131,6 +131,7 @@ nav:
# TODO: Add security section to docs?
- Configure resource requests and limits: serving/services/configure-requests-limits-services.md
- HTTPS redirection: serving/services/http-protocol.md
- Volume Support: serving/services/storage.md
- Traffic management: serving/traffic-management.md
- Configuring gradual rollout of traffic to Revisions: serving/rolling-out-latest-revision.md
- Tag resolution: serving/tag-resolution.md

View File

@ -0,0 +1,40 @@
# Volume Support for Knative services
By default Serving supports the mounting the [volume types](https://kubernetes.io/docs/concepts/storage/volumes): `emptyDir`, `secret`, `configMap` and `projected`. [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.
Here is an example of using a persistent volume claim with a Knative Service:
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
...
spec:
template:
spec:
containers:
...
volumeMounts:
- mountPath: /data
name: mydata
readOnly: false
volumes:
- name: mydata
persistentVolumeClaim:
claimName: knative-pv-claim
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: knative-pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```