Source code for sagemaker.hyperpod.common.config.metadata

 1from typing import Dict, Optional
 2from pydantic import Field, BaseModel
 3
 4
[docs] 5class Metadata(BaseModel): 6 """Metadata class""" 7 8 name: str = Field( 9 description="The name of the Kubernetes resource. Must follow RFC1123 naming conventions: lowercase alphanumeric characters or hyphens, start and end with alphanumeric character, 1-63 characters long (e.g., 'my-pytorch-job-123')." 10 ) 11 namespace: Optional[str] = Field( 12 default=None, 13 description="The Kubernetes namespace where the resource will be created. If not specified, uses the default namespace or the namespace configured in your cluster context.", 14 ) 15 labels: Optional[Dict[str, str]] = Field( 16 default=None, 17 description="Labels are key value pairs that are attached to objects, such as Pod. Labels are intended to be used to specify identifying attributes of objects. The system ignores labels that are not in the service's selector. Labels can only be added to objects during creation.", 18 ) 19 annotations: Optional[Dict[str, str]] = Field( 20 default=None, 21 description="Annotations are key-value pairs that can be used to attach arbitrary non-identifying metadata to objects.", 22 )