Ejemplo n.º 1
0
    def _get_store(store, secret_key):
        if not store or not secret_key:
            return StoreManager()
        try:
            store_access = config.get_dict(secret_key)
        except RheaError:
            raise VolumeNotFoundError(
                'Could not create store for path,'
                'received a store type `{}` without valid access key.'.format(store))

        return StoreManager.get_for_type(store_type=store, store_access=store_access)
Ejemplo n.º 2
0
def get_outputs_store(persistence_outputs):
    store, _, secret_key = get_store_secret_from_definition(
        volume_name=persistence_outputs,
        volume_settings=settings.PERSISTENCE_OUTPUTS)
    if not store or not secret_key:
        return StoreManager()
    try:
        store_access = config.get_dict(secret_key)
    except RheaError:
        raise VolumeNotFoundError(
            'Could not create store for path,'
            'received a store type `{}` without valid access key.'.format(
                store))

    return StoreManager.get_for_type(store_type=store,
                                     store_access=store_access)
Ejemplo n.º 3
0
def get_external_registries():
    registries = []
    for key in config.params_startswith(PRIVATE_REGISTRIES_PREFIX):

        try:
            registry_dict = config.get_dict(key, is_secret=True)
            registry_spec = UriSpec(**registry_dict)
        except RheaError:
            registry_spec = config.get_string(key, is_secret=True)
            try:
                # We might get this value from a chart with `toJson` applied.
                registry_spec = json.loads(registry_spec)
            except json.decoder.JSONDecodeError:
                pass

            registry_spec = config.parse_uri_spec(registry_spec)

        if registry_spec:
            registries.append(registry_spec)

    return registries
Ejemplo n.º 4
0
from polyaxon.config_manager import config

ALLOW_USER_PROJECTS = config.get_boolean('POLYAXON_ALLOW_USER_PROJECTS',
                                         is_optional=True,
                                         default=True)
OWNER_TYPES = config.get_string('POLYAXON_OWNER_TYPES',
                                is_optional=True,
                                is_list=True,
                                default=['user'])
ROLES = config.get_dict('POLYAXON_ROLES',
                        is_optional=True,
                        is_list=True,
                        default=[])
DEFAULT_ROLE = config.get_string('POLYAXON_DEFAULT_ROLE',
                                 is_optional=True,
                                 default='dummy')
SCOPE_ROLES = config.get_dict_of_dicts('POLYAXON_SCOPE_ROLES',
                                       is_optional=True,
                                       default={})
Ejemplo n.º 5
0
from polyaxon.config_manager import config

INTEGRATIONS_MATTERMOST_WEBHOOKS = config.get_dict(
    'POLYAXON_INTEGRATIONS_HIPCHAT_WEBHOOKS',
    is_list=True,
    is_optional=True,
    is_local=True)
Ejemplo n.º 6
0
from polyaxon.config_manager import config

INTEGRATIONS_WEBHOOKS = config.get_dict('POLYAXON_INTEGRATIONS_WEBHOOKS',
                                        is_list=True,
                                        is_optional=True,
                                        is_local=True)
Ejemplo n.º 7
0
from polyaxon.config_manager import config

PERSISTENCE_OUTPUTS = config.get_dict('POLYAXON_PERSISTENCE_OUTPUTS')
Ejemplo n.º 8
0
from polyaxon.config_manager import config

PERSISTENCE_LOGS = config.get_dict('POLYAXON_PERSISTENCE_LOGS')
Ejemplo n.º 9
0
from polyaxon.config_manager import config

PERSISTENCE_UPLOAD = config.get_dict('POLYAXON_PERSISTENCE_UPLOAD')
UPLOAD_MOUNT_PATH = PERSISTENCE_UPLOAD['mountPath']
UPLOAD_HOST_PATH = PERSISTENCE_UPLOAD.get('host_path', UPLOAD_MOUNT_PATH)
UPLOAD_CLAIM_NAME = PERSISTENCE_UPLOAD.get('existingClaim')
Ejemplo n.º 10
0
from polyaxon.config_manager import config

PERSISTENCE_REPOS = config.get_dict('POLYAXON_PERSISTENCE_REPOS')
REPOS_MOUNT_PATH = PERSISTENCE_REPOS['mountPath']
REPOS_HOST_PATH = PERSISTENCE_REPOS.get('host_path', REPOS_MOUNT_PATH)
REPOS_CLAIM_NAME = PERSISTENCE_REPOS.get('existingClaim')
Ejemplo n.º 11
0
from polyaxon.config_manager import config

PERSISTENCE_DATA = config.get_dict('POLYAXON_PERSISTENCE_DATA')