GafaelfawrIngressPath#

pydantic model gafaelfawr.models.kubernetes.GafaelfawrIngressPath#

A path routing rule for an ingress.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "GafaelfawrIngressPath",
   "description": "A path routing rule for an ingress.",
   "type": "object",
   "properties": {
      "path": {
         "title": "Path",
         "type": "string"
      },
      "pathType": {
         "$ref": "#/$defs/PathType"
      },
      "backend": {
         "$ref": "#/$defs/GafaelfawrIngressPathBackend"
      }
   },
   "$defs": {
      "GafaelfawrIngressPathBackend": {
         "description": "Backend that serves a given path.",
         "properties": {
            "service": {
               "$ref": "#/$defs/GafaelfawrIngressPathService"
            }
         },
         "required": [
            "service"
         ],
         "title": "GafaelfawrIngressPathBackend",
         "type": "object"
      },
      "GafaelfawrIngressPathService": {
         "description": "Service that serves a given path.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "port": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GafaelfawrServicePortName"
                  },
                  {
                     "$ref": "#/$defs/GafaelfawrServicePortNumber"
                  }
               ],
               "title": "Port"
            }
         },
         "required": [
            "name",
            "port"
         ],
         "title": "GafaelfawrIngressPathService",
         "type": "object"
      },
      "GafaelfawrServicePortName": {
         "additionalProperties": false,
         "description": "Port for a service.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "name"
         ],
         "title": "GafaelfawrServicePortName",
         "type": "object"
      },
      "GafaelfawrServicePortNumber": {
         "additionalProperties": false,
         "description": "Port for a service.",
         "properties": {
            "number": {
               "title": "Number",
               "type": "integer"
            }
         },
         "required": [
            "number"
         ],
         "title": "GafaelfawrServicePortNumber",
         "type": "object"
      },
      "PathType": {
         "description": "Matching types for paths in ingress rules.",
         "enum": [
            "Exact",
            "ImplementationSpecific",
            "Prefix"
         ],
         "title": "PathType",
         "type": "string"
      }
   },
   "required": [
      "path",
      "pathType",
      "backend"
   ]
}

Fields:
field backend: GafaelfawrIngressPathBackend [Required]#

Backend that serves this path.

field path: str [Required]#

Path match, interpreted based on the path_type field.

field pathType: PathType [Required] (name 'path_type')#

How to match the specified path against the URL.

model_dump(**kwargs)#

Export the model as a dictionary.

Overridden to change the default of by_alias from False to True, so that by default the exported dictionary uses camel-case.

Parameters:

kwargs (Any) –

Return type:

dict[str, Any]

model_dump_json(**kwargs)#

Export the model as JSON.

Overridden to change the default of by_alias from False to True, so that by default the exported dictionary uses camel-case.

Parameters:

kwargs (Any) –

Return type:

str

to_kubernetes()#

Convert to the Kubernetes API object. :rtype: V1HTTPIngressPath

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.