Beispiel #1
0
 def get_init_env_vars(self):
     env_vars = get_internal_env_vars(
         service_internal_header=InternalServices.INITIALIZER,
         namespace=self.namespace,
         authentication_type=AuthenticationTypes.INTERNAL_TOKEN,
         include_internal_token=True)
     return env_vars
Beispiel #2
0
def get_sidecar_env_vars(namespace, job_container_name,
                         internal_health_check_url, internal_reconcile_url):
    env_vars = get_internal_env_vars(
        namespace=namespace,
        service_internal_header=InternalServices.SIDECAR,
        authentication_type=AuthenticationTypes.INTERNAL_TOKEN,
        include_internal_token=True)

    return env_vars + [
        get_env_var(name='POLYAXON_CONTAINER_ID', value=job_container_name),
        get_env_var(name='POLYAXON_INTERNAL_HEALTH_CHECK_URL',
                    value=internal_health_check_url),
        get_env_var(name='POLYAXON_INTERNAL_RECONCILE_URL',
                    value=internal_reconcile_url),
        get_from_field_ref(name='POLYAXON_POD_ID', field_path='metadata.name'),
    ]