Skip to content

Commit

Permalink
Add details for storage and knative services (#5605)
Browse files Browse the repository at this point in the history
* add details for storage and knative services

* fixes

* Update storage.md

add missing whitespace

---------

Co-authored-by: Reto Lehmann <retocode@icloud.com>
  • Loading branch information
skonto and ReToCode authored Jul 13, 2023
1 parent a65dbda commit d60f9ca
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 40 additions & 0 deletions docs/serving/services/storage.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit d60f9ca

Please sign in to comment.