{
  "description": "Configures dynamic provisioning for the agentgateway data plane.\nLabels and annotations that apply to\nall resources may be specified at a higher level; see\nhttps://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#gatewayinfrastructure",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "Desired data plane provisioning settings.",
      "properties": {
        "deployment": {
          "additionalProperties": false,
          "description": "Overrides for the generated\n`Deployment` resource.",
          "properties": {
            "metadata": {
              "additionalProperties": false,
              "description": "`metadata` defines a subset of object metadata to be customized.\n`labels` and `annotations` are merged with existing values. If both\n`GatewayClass` and `Gateway` parameters define the same label or\nannotation key, the `Gateway` value takes precedence (applied second).",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "spec": {
              "description": "`spec` provides an opaque mechanism to configure the resource spec.\nThis field accepts a complete or partial Kubernetes resource spec, such\nas `PodSpec` or `ServiceSpec`, and will be merged with the generated\nconfiguration using **Strategic Merge Patch** semantics.\n\n# Application Order\n\nOverlays are applied after all typed configuration fields from both levels.\nThe full merge order is:\n\n 1. `GatewayClass` typed configuration fields\n 2. `Gateway` typed configuration fields\n 3. `GatewayClass` overlays\n 4. `Gateway` overlays (can override all previous values)\n\n# Strategic Merge Patch \u0026 Deletion Guide\n\nThis merge strategy allows you to override individual fields, merge lists, or delete items\nwithout needing to provide the entire resource definition.\n\n**1. Replacing Values (Scalars):**\nSimple fields (strings, integers, booleans) in your config will overwrite the generated defaults.\n\n**2. Merging Lists (Append/Merge):**\nLists with \"merge keys\", like `containers` which merges on `name`, or\n`tolerations` which merges on `key`,\nwill append your items to the generated list, or update existing items if keys match.\n\n**3. Deleting Fields or List Items ($patch: delete):**\nTo remove a field or list item from the generated resource, use the\n`$patch: delete` directive. This works for both map fields and list items,\nand is the recommended approach because it works with both client-side\nand server-side apply.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      # Delete pod-level securityContext\n\t      securityContext:\n\t        $patch: delete\n\t      # Delete nodeSelector\n\t      nodeSelector:\n\t        $patch: delete\n\t      containers:\n\t      # Be sure to use the correct proxy name here or you will add a\n\t      # container instead of modifying a container.\n\t      - name: proxy-name\n\t        # Delete container-level securityContext\n\t        securityContext:\n\t          $patch: delete\n\n**4. Null Values (server-side apply only):**\nSetting a field to `null` can also remove it, but this ONLY works with\n`kubectl apply --server-side` or equivalent. With regular client-side\n`kubectl apply`, null values are stripped by kubectl before reaching\nthe API server, so the deletion won't occur. Prefer `$patch: delete`\nfor consistent behavior across both apply modes.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector: null  # Removes nodeSelector (server-side apply only!)\n\n**5. Replacing Maps Entirely ($patch: replace):**\nTo replace an entire map with your values (instead of merging), use `$patch: replace`.\nThis removes all existing keys and replaces them with only your specified keys.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector:\n\t        $patch: replace\n\t        custom-key: custom-value\n\n**6. Replacing Lists Entirely ($patch: replace):**\nIf you want to strictly define a list and ignore all generated defaults, use `$patch: replace`.\n\n\tservice:\n\t  spec:\n\t    ports:\n\t    - $patch: replace\n\t    - name: http\n\t      port: 80\n\t      targetPort: 8080\n\t      protocol: TCP\n\t    - name: https\n\t      port: 443\n\t      targetPort: 8443\n\t      protocol: TCP",
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-preserve-unknown-fields": true
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "env": {
          "description": "Container environment variables. These override any existing\nvalues. If you want to delete an environment variable entirely, use\n`$patch: delete` with an overlay instead. Note that\n[variable\nexpansion](https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/)\ndoes apply, but is highly discouraged -- to set dependent environment\nvariables, you can use `$(VAR_NAME)`, but it's highly discouraged.\n`$$(VAR_NAME)` avoids expansion and results in a literal\n`$(VAR_NAME)`.\n\nIf `SESSION_KEY` is specified, it takes precedence over the\ncontroller-managed per-`Gateway` session key `Secret`.",
          "items": {
            "additionalProperties": false,
            "description": "EnvVar represents an environment variable present in a Container.",
            "properties": {
              "name": {
                "description": "Name of the environment variable.\nMay consist of any printable ASCII characters except '='.",
                "type": "string"
              },
              "value": {
                "description": "Variable references $(VAR_NAME) are expanded\nusing the previously defined environment variables in the container and\nany service environment variables. If a variable cannot be resolved,\nthe reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.\n\"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\".\nEscaped references will never be expanded, regardless of whether the variable\nexists or not.\nDefaults to \"\".",
                "type": [
                  "string",
                  "null"
                ]
              },
              "valueFrom": {
                "additionalProperties": false,
                "description": "Source for the environment variable's value. Cannot be used if value is not empty.",
                "properties": {
                  "configMapKeyRef": {
                    "additionalProperties": false,
                    "description": "Selects a key of a ConfigMap.",
                    "properties": {
                      "key": {
                        "description": "The key to select.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "optional": {
                        "description": "Specify whether the ConfigMap or its key must be defined",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  },
                  "fieldRef": {
                    "additionalProperties": false,
                    "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`,\nspec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.",
                    "properties": {
                      "apiVersion": {
                        "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "fieldPath": {
                        "description": "Path of the field to select in the specified API version.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "fieldPath"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  },
                  "fileKeyRef": {
                    "additionalProperties": false,
                    "description": "FileKeyRef selects a key of the env file.\nRequires the EnvFiles feature gate to be enabled.",
                    "properties": {
                      "key": {
                        "description": "The key within the env file. An invalid key will prevent the pod from starting.\nThe keys defined within a source may consist of any printable ASCII characters except '='.\nDuring Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.",
                        "type": "string"
                      },
                      "optional": {
                        "default": false,
                        "description": "Specify whether the file or its key must be defined. If the file or key\ndoes not exist, then the env var is not published.\nIf optional is set to true and the specified key does not exist,\nthe environment variable will not be set in the Pod's containers.\n\nIf optional is set to false and the specified key does not exist,\nan error will be returned during Pod creation.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "path": {
                        "description": "The path within the volume from which to select the file.\nMust be relative and may not contain the '..' path or start with '..'.",
                        "type": "string"
                      },
                      "volumeName": {
                        "description": "The name of the volume mount containing the env file.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "path",
                      "volumeName"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  },
                  "resourceFieldRef": {
                    "additionalProperties": false,
                    "description": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.",
                    "properties": {
                      "containerName": {
                        "description": "Container name: required for volumes, optional for env vars",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "divisor": {
                        "description": "Specifies the output format of the exposed resources, defaults to \"1\"",
                        "oneOf": [
                          {
                            "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                            "type": "string"
                          },
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "x-kubernetes-int-or-string": true
                      },
                      "resource": {
                        "description": "Required: resource to select",
                        "type": "string"
                      }
                    },
                    "required": [
                      "resource"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  },
                  "secretKeyRef": {
                    "additionalProperties": false,
                    "description": "Selects a key of a secret in the pod's namespace",
                    "properties": {
                      "key": {
                        "description": "The key of the secret to select from.  Must be a valid secret key.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "optional": {
                        "description": "Specify whether the Secret or its key must be defined",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "horizontalPodAutoscaler": {
          "additionalProperties": false,
          "description": "Creates a `HorizontalPodAutoscaler`\nfor the agentgateway proxy. If absent, no HPA is created. If present, an\nHPA is created with its `scaleTargetRef` automatically configured to\ntarget the agentgateway proxy `Deployment`. The `metadata` and `spec`\nfields from this overlay are applied to the generated HPA.",
          "properties": {
            "metadata": {
              "additionalProperties": false,
              "description": "`metadata` defines a subset of object metadata to be customized.\n`labels` and `annotations` are merged with existing values. If both\n`GatewayClass` and `Gateway` parameters define the same label or\nannotation key, the `Gateway` value takes precedence (applied second).",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "spec": {
              "description": "`spec` provides an opaque mechanism to configure the resource spec.\nThis field accepts a complete or partial Kubernetes resource spec, such\nas `PodSpec` or `ServiceSpec`, and will be merged with the generated\nconfiguration using **Strategic Merge Patch** semantics.\n\n# Application Order\n\nOverlays are applied after all typed configuration fields from both levels.\nThe full merge order is:\n\n 1. `GatewayClass` typed configuration fields\n 2. `Gateway` typed configuration fields\n 3. `GatewayClass` overlays\n 4. `Gateway` overlays (can override all previous values)\n\n# Strategic Merge Patch \u0026 Deletion Guide\n\nThis merge strategy allows you to override individual fields, merge lists, or delete items\nwithout needing to provide the entire resource definition.\n\n**1. Replacing Values (Scalars):**\nSimple fields (strings, integers, booleans) in your config will overwrite the generated defaults.\n\n**2. Merging Lists (Append/Merge):**\nLists with \"merge keys\", like `containers` which merges on `name`, or\n`tolerations` which merges on `key`,\nwill append your items to the generated list, or update existing items if keys match.\n\n**3. Deleting Fields or List Items ($patch: delete):**\nTo remove a field or list item from the generated resource, use the\n`$patch: delete` directive. This works for both map fields and list items,\nand is the recommended approach because it works with both client-side\nand server-side apply.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      # Delete pod-level securityContext\n\t      securityContext:\n\t        $patch: delete\n\t      # Delete nodeSelector\n\t      nodeSelector:\n\t        $patch: delete\n\t      containers:\n\t      # Be sure to use the correct proxy name here or you will add a\n\t      # container instead of modifying a container.\n\t      - name: proxy-name\n\t        # Delete container-level securityContext\n\t        securityContext:\n\t          $patch: delete\n\n**4. Null Values (server-side apply only):**\nSetting a field to `null` can also remove it, but this ONLY works with\n`kubectl apply --server-side` or equivalent. With regular client-side\n`kubectl apply`, null values are stripped by kubectl before reaching\nthe API server, so the deletion won't occur. Prefer `$patch: delete`\nfor consistent behavior across both apply modes.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector: null  # Removes nodeSelector (server-side apply only!)\n\n**5. Replacing Maps Entirely ($patch: replace):**\nTo replace an entire map with your values (instead of merging), use `$patch: replace`.\nThis removes all existing keys and replaces them with only your specified keys.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector:\n\t        $patch: replace\n\t        custom-key: custom-value\n\n**6. Replacing Lists Entirely ($patch: replace):**\nIf you want to strictly define a list and ignore all generated defaults, use `$patch: replace`.\n\n\tservice:\n\t  spec:\n\t    ports:\n\t    - $patch: replace\n\t    - name: http\n\t      port: 80\n\t      targetPort: 8080\n\t      protocol: TCP\n\t    - name: https\n\t      port: 443\n\t      targetPort: 8443\n\t      protocol: TCP",
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-preserve-unknown-fields": true
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "image": {
          "additionalProperties": false,
          "description": "The agentgateway container image. See\nhttps://kubernetes.io/docs/concepts/containers/images\nfor details.\n\nDefault values, which may be overridden individually:\n\n\tregistry: cr.agentgateway.dev\n\trepository: agentgateway\n\ttag: \u003cagentgateway version\u003e\n\tpullPolicy: \u003comitted, relying on Kubernetes defaults which depend on the tag\u003e",
          "properties": {
            "digest": {
              "description": "Image digest, such as `sha256:12345...`.",
              "type": [
                "string",
                "null"
              ]
            },
            "pullPolicy": {
              "description": "Image pull policy for the container. See\nhttps://kubernetes.io/docs/concepts/containers/images/#image-pull-policy\nfor details.",
              "type": [
                "string",
                "null"
              ]
            },
            "registry": {
              "description": "Image registry.",
              "type": [
                "string",
                "null"
              ]
            },
            "repository": {
              "description": "Image repository.",
              "type": [
                "string",
                "null"
              ]
            },
            "tag": {
              "description": "Image tag.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "istio": {
          "additionalProperties": false,
          "description": "Istio integration settings. If enabled, agentgateway can natively connect to Istio-enabled pods with mTLS.",
          "properties": {
            "additionalTrustDomains": {
              "description": "Additional SPIFFE trust domains accepted on inbound HBONE connections.\nThe local trust domain is always implicitly included.",
              "items": {
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "caAddress": {
              "description": "Address of the Istio CA. If unset, defaults to `https://istiod.istio-system.svc:15012`.",
              "type": [
                "string",
                "null"
              ]
            },
            "clusterId": {
              "description": "ID of the cluster this gateway runs in. If unset, defaults to `Kubernetes`.",
              "type": [
                "string",
                "null"
              ]
            },
            "enabled": {
              "description": "Explicitly turns Istio integration on or off for this gateway.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "network": {
              "description": "Istio network this gateway runs in. If unset, defaults to the empty network.",
              "type": [
                "string",
                "null"
              ]
            },
            "trustDomain": {
              "description": "Istio trust domain. If not set, defaults to `cluster.local`, or the default\ntrust domain for the control plane's istio revision.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "logging": {
          "additionalProperties": false,
          "description": "Logging configuration. By default, all logs are set to\n`info` level.",
          "properties": {
            "format": {
              "description": "Logging output format.",
              "enum": [
                "json",
                "text"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "level": {
              "description": "Logging level in standard `RUST_LOG` syntax, for example `info` (the\ndefault), or a comma-separated per-module setting such as\n`rmcp=warn,hickory_server::server::server_future=off,typespec_client_core::http::policies::logging=warn`.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "modelCatalog": {
          "additionalProperties": false,
          "description": "Model cost catalog sources. Only effective when set on a Gateway-level\nAgentgatewayParameters (via Gateway.spec.infrastructure.parametersRef);\nignored on GatewayClass-level parameters because ConfigMap references\nare resolved from the Gateway's deployment namespace.",
          "properties": {
            "sources": {
              "items": {
                "additionalProperties": false,
                "description": "ModelCatalogSource is a single source of model cost catalog data.",
                "properties": {
                  "configMap": {
                    "additionalProperties": false,
                    "description": "ModelCatalogConfigMapRef identifies a ConfigMap holding model cost catalog JSON.\nThe ConfigMap must be in the same namespace as the Gateway that references it.",
                    "properties": {
                      "key": {
                        "description": "Data key whose value is the catalog JSON. Defaults to \"catalog.json\".",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "podDisruptionBudget": {
          "additionalProperties": false,
          "description": "Creates a `PodDisruptionBudget` for the\nagentgateway proxy. If absent, no PDB is created. If present, a PDB is\ncreated with its selector automatically configured to target the\nagentgateway proxy `Deployment`. The `metadata` and `spec` fields from\nthis overlay are applied to the generated PDB.",
          "properties": {
            "metadata": {
              "additionalProperties": false,
              "description": "`metadata` defines a subset of object metadata to be customized.\n`labels` and `annotations` are merged with existing values. If both\n`GatewayClass` and `Gateway` parameters define the same label or\nannotation key, the `Gateway` value takes precedence (applied second).",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "spec": {
              "description": "`spec` provides an opaque mechanism to configure the resource spec.\nThis field accepts a complete or partial Kubernetes resource spec, such\nas `PodSpec` or `ServiceSpec`, and will be merged with the generated\nconfiguration using **Strategic Merge Patch** semantics.\n\n# Application Order\n\nOverlays are applied after all typed configuration fields from both levels.\nThe full merge order is:\n\n 1. `GatewayClass` typed configuration fields\n 2. `Gateway` typed configuration fields\n 3. `GatewayClass` overlays\n 4. `Gateway` overlays (can override all previous values)\n\n# Strategic Merge Patch \u0026 Deletion Guide\n\nThis merge strategy allows you to override individual fields, merge lists, or delete items\nwithout needing to provide the entire resource definition.\n\n**1. Replacing Values (Scalars):**\nSimple fields (strings, integers, booleans) in your config will overwrite the generated defaults.\n\n**2. Merging Lists (Append/Merge):**\nLists with \"merge keys\", like `containers` which merges on `name`, or\n`tolerations` which merges on `key`,\nwill append your items to the generated list, or update existing items if keys match.\n\n**3. Deleting Fields or List Items ($patch: delete):**\nTo remove a field or list item from the generated resource, use the\n`$patch: delete` directive. This works for both map fields and list items,\nand is the recommended approach because it works with both client-side\nand server-side apply.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      # Delete pod-level securityContext\n\t      securityContext:\n\t        $patch: delete\n\t      # Delete nodeSelector\n\t      nodeSelector:\n\t        $patch: delete\n\t      containers:\n\t      # Be sure to use the correct proxy name here or you will add a\n\t      # container instead of modifying a container.\n\t      - name: proxy-name\n\t        # Delete container-level securityContext\n\t        securityContext:\n\t          $patch: delete\n\n**4. Null Values (server-side apply only):**\nSetting a field to `null` can also remove it, but this ONLY works with\n`kubectl apply --server-side` or equivalent. With regular client-side\n`kubectl apply`, null values are stripped by kubectl before reaching\nthe API server, so the deletion won't occur. Prefer `$patch: delete`\nfor consistent behavior across both apply modes.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector: null  # Removes nodeSelector (server-side apply only!)\n\n**5. Replacing Maps Entirely ($patch: replace):**\nTo replace an entire map with your values (instead of merging), use `$patch: replace`.\nThis removes all existing keys and replaces them with only your specified keys.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector:\n\t        $patch: replace\n\t        custom-key: custom-value\n\n**6. Replacing Lists Entirely ($patch: replace):**\nIf you want to strictly define a list and ignore all generated defaults, use `$patch: replace`.\n\n\tservice:\n\t  spec:\n\t    ports:\n\t    - $patch: replace\n\t    - name: http\n\t      port: 80\n\t      targetPort: 8080\n\t      protocol: TCP\n\t    - name: https\n\t      port: 443\n\t      targetPort: 8443\n\t      protocol: TCP",
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-preserve-unknown-fields": true
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "rawConfig": {
          "description": "Raw agentgateway configuration to merge into the generated config file.\nThis is merged with\nconfiguration derived from typed fields like `logging.format`, and those\ntyped fields will take precedence.\n\nExample:\n\n\trawConfig:\n\t  binds:\n\t  - port: 3000\n\t    listeners:\n\t    - routes:\n\t      - policies:\n\t          cors:\n\t            allowOrigins:\n\t            - \"*\"\n\t            allowHeaders:\n\t            - mcp-protocol-version\n\t            - content-type\n\t            - cache-control\n\t        backends:\n\t        - mcp:\n\t            targets:\n\t            - name: everything\n\t              stdio:\n\t                cmd: npx\n\t                args: [\"@modelcontextprotocol/server-everything\"]",
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-preserve-unknown-fields": true
        },
        "resources": {
          "additionalProperties": false,
          "description": "Compute resources required by this container. See\nhttps://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\nfor details.",
          "properties": {
            "claims": {
              "description": "Claims lists the names of resources, defined in spec.resourceClaims,\nthat are used by this container.\n\nThis field depends on the\nDynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
              "items": {
                "additionalProperties": false,
                "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                "properties": {
                  "name": {
                    "description": "Name must match the name of one entry in pod.spec.resourceClaims of\nthe Pod where this field is used. It makes that resource available\ninside a container.",
                    "type": "string"
                  },
                  "request": {
                    "description": "Request is the name chosen for a request in the referenced claim.\nIf empty, everything from the claim is made available, otherwise\nonly the result of this request.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-map-keys": [
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "limits": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "x-kubernetes-int-or-string": true
              },
              "description": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": [
                "object",
                "null"
              ]
            },
            "requests": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "x-kubernetes-int-or-string": true
              },
              "description": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value. Requests cannot exceed Limits.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "service": {
          "additionalProperties": false,
          "description": "Overrides for the generated `Service`\nresource.",
          "properties": {
            "metadata": {
              "additionalProperties": false,
              "description": "`metadata` defines a subset of object metadata to be customized.\n`labels` and `annotations` are merged with existing values. If both\n`GatewayClass` and `Gateway` parameters define the same label or\nannotation key, the `Gateway` value takes precedence (applied second).",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "spec": {
              "description": "`spec` provides an opaque mechanism to configure the resource spec.\nThis field accepts a complete or partial Kubernetes resource spec, such\nas `PodSpec` or `ServiceSpec`, and will be merged with the generated\nconfiguration using **Strategic Merge Patch** semantics.\n\n# Application Order\n\nOverlays are applied after all typed configuration fields from both levels.\nThe full merge order is:\n\n 1. `GatewayClass` typed configuration fields\n 2. `Gateway` typed configuration fields\n 3. `GatewayClass` overlays\n 4. `Gateway` overlays (can override all previous values)\n\n# Strategic Merge Patch \u0026 Deletion Guide\n\nThis merge strategy allows you to override individual fields, merge lists, or delete items\nwithout needing to provide the entire resource definition.\n\n**1. Replacing Values (Scalars):**\nSimple fields (strings, integers, booleans) in your config will overwrite the generated defaults.\n\n**2. Merging Lists (Append/Merge):**\nLists with \"merge keys\", like `containers` which merges on `name`, or\n`tolerations` which merges on `key`,\nwill append your items to the generated list, or update existing items if keys match.\n\n**3. Deleting Fields or List Items ($patch: delete):**\nTo remove a field or list item from the generated resource, use the\n`$patch: delete` directive. This works for both map fields and list items,\nand is the recommended approach because it works with both client-side\nand server-side apply.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      # Delete pod-level securityContext\n\t      securityContext:\n\t        $patch: delete\n\t      # Delete nodeSelector\n\t      nodeSelector:\n\t        $patch: delete\n\t      containers:\n\t      # Be sure to use the correct proxy name here or you will add a\n\t      # container instead of modifying a container.\n\t      - name: proxy-name\n\t        # Delete container-level securityContext\n\t        securityContext:\n\t          $patch: delete\n\n**4. Null Values (server-side apply only):**\nSetting a field to `null` can also remove it, but this ONLY works with\n`kubectl apply --server-side` or equivalent. With regular client-side\n`kubectl apply`, null values are stripped by kubectl before reaching\nthe API server, so the deletion won't occur. Prefer `$patch: delete`\nfor consistent behavior across both apply modes.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector: null  # Removes nodeSelector (server-side apply only!)\n\n**5. Replacing Maps Entirely ($patch: replace):**\nTo replace an entire map with your values (instead of merging), use `$patch: replace`.\nThis removes all existing keys and replaces them with only your specified keys.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector:\n\t        $patch: replace\n\t        custom-key: custom-value\n\n**6. Replacing Lists Entirely ($patch: replace):**\nIf you want to strictly define a list and ignore all generated defaults, use `$patch: replace`.\n\n\tservice:\n\t  spec:\n\t    ports:\n\t    - $patch: replace\n\t    - name: http\n\t      port: 80\n\t      targetPort: 8080\n\t      protocol: TCP\n\t    - name: https\n\t      port: 443\n\t      targetPort: 8443\n\t      protocol: TCP",
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-preserve-unknown-fields": true
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "serviceAccount": {
          "additionalProperties": false,
          "description": "Overrides for the generated\n`ServiceAccount` resource.",
          "properties": {
            "metadata": {
              "additionalProperties": false,
              "description": "`metadata` defines a subset of object metadata to be customized.\n`labels` and `annotations` are merged with existing values. If both\n`GatewayClass` and `Gateway` parameters define the same label or\nannotation key, the `Gateway` value takes precedence (applied second).",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "spec": {
              "description": "`spec` provides an opaque mechanism to configure the resource spec.\nThis field accepts a complete or partial Kubernetes resource spec, such\nas `PodSpec` or `ServiceSpec`, and will be merged with the generated\nconfiguration using **Strategic Merge Patch** semantics.\n\n# Application Order\n\nOverlays are applied after all typed configuration fields from both levels.\nThe full merge order is:\n\n 1. `GatewayClass` typed configuration fields\n 2. `Gateway` typed configuration fields\n 3. `GatewayClass` overlays\n 4. `Gateway` overlays (can override all previous values)\n\n# Strategic Merge Patch \u0026 Deletion Guide\n\nThis merge strategy allows you to override individual fields, merge lists, or delete items\nwithout needing to provide the entire resource definition.\n\n**1. Replacing Values (Scalars):**\nSimple fields (strings, integers, booleans) in your config will overwrite the generated defaults.\n\n**2. Merging Lists (Append/Merge):**\nLists with \"merge keys\", like `containers` which merges on `name`, or\n`tolerations` which merges on `key`,\nwill append your items to the generated list, or update existing items if keys match.\n\n**3. Deleting Fields or List Items ($patch: delete):**\nTo remove a field or list item from the generated resource, use the\n`$patch: delete` directive. This works for both map fields and list items,\nand is the recommended approach because it works with both client-side\nand server-side apply.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      # Delete pod-level securityContext\n\t      securityContext:\n\t        $patch: delete\n\t      # Delete nodeSelector\n\t      nodeSelector:\n\t        $patch: delete\n\t      containers:\n\t      # Be sure to use the correct proxy name here or you will add a\n\t      # container instead of modifying a container.\n\t      - name: proxy-name\n\t        # Delete container-level securityContext\n\t        securityContext:\n\t          $patch: delete\n\n**4. Null Values (server-side apply only):**\nSetting a field to `null` can also remove it, but this ONLY works with\n`kubectl apply --server-side` or equivalent. With regular client-side\n`kubectl apply`, null values are stripped by kubectl before reaching\nthe API server, so the deletion won't occur. Prefer `$patch: delete`\nfor consistent behavior across both apply modes.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector: null  # Removes nodeSelector (server-side apply only!)\n\n**5. Replacing Maps Entirely ($patch: replace):**\nTo replace an entire map with your values (instead of merging), use `$patch: replace`.\nThis removes all existing keys and replaces them with only your specified keys.\n\n\tspec:\n\t  template:\n\t    spec:\n\t      nodeSelector:\n\t        $patch: replace\n\t        custom-key: custom-value\n\n**6. Replacing Lists Entirely ($patch: replace):**\nIf you want to strictly define a list and ignore all generated defaults, use `$patch: replace`.\n\n\tservice:\n\t  spec:\n\t    ports:\n\t    - $patch: replace\n\t    - name: http\n\t      port: 80\n\t      targetPort: 8080\n\t      protocol: TCP\n\t    - name: https\n\t      port: 443\n\t      targetPort: 8443\n\t      protocol: TCP",
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-preserve-unknown-fields": true
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "shutdown": {
          "additionalProperties": false,
          "description": "Shutdown delay configuration. How graceful planned or unplanned data\nplane changes happen is in tension with how quickly rollouts of the data\nplane complete. How long a data plane pod must wait for shutdown to be\nperfectly graceful depends on how you have configured your `Gateway`\nresources.",
          "properties": {
            "max": {
              "description": "Maximum time (in seconds) to wait before allowing Agentgateway to\nterminate. Refer to the `TERMINATION_GRACE_PERIOD_SECONDS`\nenvironment variable for details.",
              "format": "int64",
              "maximum": 31536000,
              "minimum": 0,
              "type": "integer"
            },
            "min": {
              "description": "Minimum time (in seconds) to wait before allowing Agentgateway to\nterminate. Refer to the `CONNECTION_MIN_TERMINATION_DEADLINE`\nenvironment variable for details.",
              "format": "int64",
              "maximum": 31536000,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "max",
            "min"
          ],
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-validations": [
            {
              "message": "The 'min' value must be less than or equal to the 'max' value.",
              "rule": "self.min \u003c= self.max"
            }
          ]
        }
      },
      "type": "object"
    },
    "status": {
      "description": "Current status for these provisioning settings.",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}