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

(Fix): Change naming to be inline with kubernetes naming #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ What you can do in this case is either install a storage class that enables

1. Retrieve the `.py` file generated by Kale (it should be next to the `.ipynb`)
2. Search for `marshal_vop` definition (`marshal_vop = dsl.VolumeOp...`)
3. Change this line `modes=dsl.VOLUME_MODE_RWM`, to `modes=dsl.VOLUME_MODE_RWO`
3. Change this line `modes=['ReadWriteMany']`, to `modes=['ReadWriteOnce']`
4. Run the `.py` file

### Data passing and pickle errors
Expand Down
2 changes: 1 addition & 1 deletion backend/kale/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class VolumeTypeValidator(EnumValidator):
class VolumeAccessModeValidator(EnumValidator):
"""Validates the access mode of a Volume."""

enum = ("", "rom", "rwo", "rwm")
enum = ("", "rox", "rwo", "rwx")


class IsLowerValidator(Validator):
Expand Down
6 changes: 3 additions & 3 deletions backend/kale/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
log = logging.getLogger(__name__)


VOLUME_ACCESS_MODE_MAP = {"rom": ["ReadOnlyMany"], "rwo": ["ReadWriteOnce"],
"rwm": ["ReadWriteMany"]}
DEFAULT_VOLUME_ACCESS_MODE = VOLUME_ACCESS_MODE_MAP["rwm"]
VOLUME_ACCESS_MODE_MAP = {"rox": ["ReadOnlyMany"], "rwo": ["ReadWriteOnce"],
"rwx": ["ReadWriteMany"]}
DEFAULT_VOLUME_ACCESS_MODE = VOLUME_ACCESS_MODE_MAP["rwx"]


class PipelineParam(NamedTuple):
Expand Down
12 changes: 6 additions & 6 deletions labextension/src/components/VolumeAccessModeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
import * as React from 'react';
import { Select, ISelectOption } from './Select';

const VOLUME_ACCESS_MODE_ROM: ISelectOption = {
const VOLUME_ACCESS_MODE_ROX: ISelectOption = {
label: 'ReadOnlyMany',
value: 'rom',
value: 'rox',
};
const VOLUME_ACCESS_MODE_RWO: ISelectOption = {
label: 'ReadWriteOnce',
value: 'rwo',
};
const VOLUME_ACCESS_MODE_RWM: ISelectOption = {
const VOLUME_ACCESS_MODE_RWX: ISelectOption = {
label: 'ReadWriteMany',
value: 'rwm',
value: 'rwx',
};
const VOLUME_ACCESS_MODES: ISelectOption[] = [
VOLUME_ACCESS_MODE_ROM,
VOLUME_ACCESS_MODE_ROX,
VOLUME_ACCESS_MODE_RWO,
VOLUME_ACCESS_MODE_RWM,
VOLUME_ACCESS_MODE_RWX,
];

interface VolumeAccessModeSelectProps {
Expand Down
2 changes: 1 addition & 1 deletion labextension/src/widgets/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const DefaultState: IState = {
autosnapshot: false,
katib_run: false,
steps_defaults: [],
volume_access_mode: 'rwm',
volume_access_mode: 'rwx',
},
runDeployment: false,
deploymentType: 'compile',
Expand Down