Skip to content

Commit

Permalink
Fix naming to be inline with kubernetes naming
Browse files Browse the repository at this point in the history
  • Loading branch information
davidspek committed Feb 3, 2021
1 parent 07ccdc5 commit b0ef77e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
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

0 comments on commit b0ef77e

Please sign in to comment.