-
Notifications
You must be signed in to change notification settings - Fork 12
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
Proposal for volume/storage support for opencompose #79
Conversation
docs/proposals/volumes-proposal.md
Outdated
volumes: | ||
- name: db | ||
path: /app/store | ||
access: ro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is binary options, it can be only ro
or rw
. How about changing it to something that reflects this more?
For example readOnly
that can boolean, and if not set that false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/proposals/volumes-proposal.md
Outdated
volumes: | ||
- name: db | ||
path: /app/store | ||
access: ro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about mode
?
access
is a bit confusing, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it to accessMode: ReadWriteMany
docs/proposals/volumes-proposal.md
Outdated
|
||
volumes: | ||
- name: db | ||
size: 5Gib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make sure we support GiB, GB, G, MiB, MB, M, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
docs/proposals/volumes-proposal.md
Outdated
|
||
`ro` -> `ReadOnlyMany` | ||
`rw` -> `ReadWriteOnce` | ||
`rwm` -> `ReadWriteMany` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rom
, rwo
, rwm
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it as k8s has it
docs/proposals/volumes-proposal.md
Outdated
- `volumeName`: (required field, type: *string*) name of volume from root level `volumes` directive or `service` level `emptyDirVolumes` directive. | ||
- `mountPath`: (required field, type: *string*) This will be mapped to `pod.spec.containers.volumeMounts.mountPath` in `deployment`. | ||
- `volumeSubPath`: (optional field, type: *string*) This will be mapped to `pod.spec.containers.volumeMounts.subPath` in `deployment`. | ||
- `readOnly`: (optional field, type: *bool*, default: false) This will be mapped to `pod.spec.containers.volumeMounts.readOnly` in `deployment`. **TODO**: How does this map to the `accessMode` in root level `volumes`? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not related to accessMode; those are two completely separate things
docs/proposals/volumes-proposal.md
Outdated
} | ||
``` | ||
src: http://blog.kubernetes.io/2016/10/dynamic-provisioning-and-storage-in-kubernetes.html | ||
- `reclaimPolicy`: (optional field, type: *string*) **TODO**: No field in `pvc`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my bad 😊
we shouldn't have reclaimPolicy
here. This is PersistentVolume property, so we don't have to worry about that.
5356b19
to
63c5116
Compare
docs/proposals/volumes-proposal.md
Outdated
|
||
- `name`: (required field, type: *string*) name of volume, which is referenced from containers for mounting. `pvc` will be created with this name. | ||
- `size`: (required field, type: *string*) In `pvc` this will be put in `pvc.spec.resources.requests` | ||
- `accessMode`: (optional field, type: *string*) In `pvc` this will turn into `pvc.spec.accessModes`. The possible values of this field could be: `ReadOnlyMany`, `ReadWriteOnce` or `ReadWriteMany`. **TODO**: Decide default value because `pvc.spec.accessModes` is a required field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @kadel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should do it as required field for now. We can decide on default later.
I think we can keep all proposal docs like this in |
@kadel sure |
@kadel ping |
should this be squashed before merge? or should we keep it as it is to retain history? |
This is a proposal of how the volume definition in opencompose should look like.
@kadel squashed |
This is a proposal of how the volume definition in opencompose should look like.