Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details for storage and knative services #5605

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
- Configuring storage: serving/services/storage.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Configuring storage: serving/services/storage.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
43 changes: 43 additions & 0 deletions docs/serving/services/storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuring storage for Knative services

Knative Serving integrates with K8s storage capabilities via supporting a subset of ephemeral storage volumes and via PersistentVolumeClaims(PVCs) volume types.
In detail Knative Serving supports emptyDir by default, secret, configmap, projection and PVCs volume types.
For more details on volume configuration check the related [feature flags](../configuration/feature-flags.md) when applicable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Knative Serving integrates with K8s storage capabilities via supporting a subset of ephemeral storage volumes and via PersistentVolumeClaims(PVCs) volume types.
In detail Knative Serving supports emptyDir by default, secret, configmap, projection and PVCs volume types.
For more details on volume configuration check the related [feature flags](../configuration/feature-flags.md) when applicable.
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.


Here is an example of using PVCs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here is an example of using PVCs:
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
```

The example assumes that the user has enabled PVC support via the corresponding feature flag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can drop this since we mention it above

Suggested change
The example assumes that the user has enabled PVC support via the corresponding feature flag.

!!! warning
Mounting large volumes may add considerable overhead to the application's start up time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider moving this before the example