{"$defs":{"Attachment":{"oneOf":[{"$ref":"#/$defs/Intercept"},{"$ref":"#/$defs/Replace"},{"$ref":"#/$defs/Ingest"},{"$ref":"#/$defs/Wiretap"}]},"AttachmentCommon":{"properties":{"command":{"description":"Local command that handles the attachment's traffic, like the trailing \"-- \u003ccmd\u003e \u003cargs...\u003e\" of the imperative commands. Apply starts it after the attachment is established, so that it sees the remote environment variables and the mount paths, and restarts it when it has exited or when this command has changed. The process is stopped when the attachment is removed.","items":{"type":"string"},"minItems":1,"type":"array"},"container":{"description":"Name of the container that provides the environment and mounts. Defaults to the container matching the first port.","type":"string"},"env":{"$ref":"#/$defs/Env"},"mount":{"$ref":"#/$defs/Mount"},"name":{"description":"Name of the attachment.","type":"string"},"namespace":{"description":"Namespace of the workload. Defaults to the namespace of the connection.","type":"string"},"nodeAgent":{"description":"Use a node-scoped traffic agent.","type":"boolean"},"type":{"enum":["intercept","replace","ingest","wiretap"]}},"required":["type","name"],"type":"object"},"CIDR":{"description":"A subnet in CIDR notation.","pattern":"^[0-9a-fA-F.:]+/[0-9]{1,3}$","type":"string"},"Connection":{"additionalProperties":false,"description":"The Telepresence connection, corresponding to the flags of \"telepresence connect\".","properties":{"allowConflictingSubnets":{"description":"Subnets that are allowed to conflict with local subnets.","items":{"$ref":"#/$defs/CIDR"},"type":"array"},"alsoProxy":{"description":"Additional subnets to proxy.","items":{"$ref":"#/$defs/CIDR"},"type":"array"},"context":{"description":"Name of the kubeconfig context to use.","type":"string"},"kubeFlags":{"additionalProperties":{"type":"string"},"description":"Additional Kubernetes flags, keyed by flag name without the leading dashes (e.g. server, token, as, insecure-skip-tls-verify), with the flag argument as the value.","type":"object"},"kubeconfig":{"description":"Path to the kubeconfig file to use.","type":"string"},"managerNamespace":{"description":"The namespace where the traffic manager is to be found.","type":"string"},"mappedNamespaces":{"description":"Namespaces considered by the DNS resolver and NAT for outbound connections. Defaults to all namespaces.","items":{"type":"string"},"minItems":1,"type":"array"},"name":{"description":"Name of the connection. Defaults to a name derived from the Kubernetes context and namespace.","type":"string"},"namespace":{"description":"The Kubernetes namespace scope for the connection.","type":"string"},"neverProxy":{"description":"Subnets to never proxy.","items":{"$ref":"#/$defs/CIDR"},"type":"array"},"proxyVia":{"description":"Subnets translated using virtual IPs and routed via a workload. Use the workload \"local\" for plain virtual network address translation (the equivalent of the --vnat flag).","items":{"additionalProperties":false,"properties":{"subnet":{"$ref":"#/$defs/SymbolicSubnet"},"workload":{"type":"string"}},"required":["subnet","workload"],"type":"object"},"type":"array"},"rerouteLocal":{"description":"Ports on the local host rerouted to a remote host. Format is \u003clocal port\u003e:\u003chost\u003e:\u003cport\u003e[/{tcp,udp}]. \u003cport\u003e can be symbolic when \u003chost\u003e is a service name.","items":{"type":"string"},"type":"array"},"rerouteRemote":{"description":"Ports rerouted on a remote host. Format is \u003chost\u003e:\u003cport\u003e:\u003cnew port\u003e[/{tcp,udp}]. \u003cport\u003e can be symbolic when \u003chost\u003e is a service name.","items":{"type":"string"},"type":"array"}},"type":"object"},"Env":{"additionalProperties":false,"description":"Emission of the remote environment to files on the workstation.","properties":{"file":{"description":"Emit the remote environment to this file, using the given syntax.","type":"string"},"json":{"description":"Emit the remote environment to this file as a JSON blob.","type":"string"},"syntax":{"default":"docker","description":"Syntax used for the environment file.","enum":["docker","compose","sh","sh:export","csh","csh:export","ps","ps:export","cmd","json"]}},"type":"object"},"Ingest":{"allOf":[{"$ref":"#/$defs/AttachmentCommon"}],"description":"Ingest the environment and mounts of a container without routing any traffic.","properties":{"name":{"description":"Name of the workload to ingest.","type":"string"},"toPod":{"$ref":"#/$defs/ToPod"},"type":{"const":"ingest"}},"unevaluatedProperties":false},"Intercept":{"allOf":[{"$ref":"#/$defs/AttachmentCommon"},{"$ref":"#/$defs/InterceptCommon"}],"description":"Intercept traffic destined for a port of a workload.","properties":{"metadata":{"additionalProperties":{"type":"string"},"description":"Metadata to attach to the intercept. It can be retrieved using the Telepresence API server.","type":"object"},"toPod":{"$ref":"#/$defs/ToPod"},"type":{"const":"intercept"}},"unevaluatedProperties":false},"InterceptCommon":{"description":"Properties shared by intercept and wiretap attachments.","properties":{"address":{"description":"Local IP address to forward to. Defaults to 127.0.0.1.","type":"string"},"httpHeaders":{"description":"Only handle HTTP requests that match all given HTTP headers. Format is \u003cname\u003e=\u003cregex\u003e.","items":{"type":"string"},"type":"array"},"httpPathEqualities":{"description":"Only handle HTTP requests with a path exactly equal to one of the given paths.","items":{"type":"string"},"type":"array"},"httpPathPrefixes":{"description":"Only handle HTTP requests with a path matching one of the given prefixes.","items":{"type":"string"},"type":"array"},"httpPathRegexps":{"description":"Only handle HTTP requests with a path matching one of the given regular expressions.","items":{"type":"string"},"type":"array"},"mechanism":{"default":"tcp","description":"The mechanism used by the attachment.","type":"string"},"plaintext":{"description":"Use plaintext format when communicating with the interceptor process on the local workstation.","type":"boolean"},"ports":{"description":"Local ports to forward to. Use \u003clocal port\u003e:\u003cidentifier\u003e to uniquely identify service ports, where \u003cidentifier\u003e is the port name or number.","items":{"$ref":"#/$defs/PortIdentifier"},"minItems":1,"type":"array"},"service":{"description":"Name of the service to attach to. Sometimes needed to uniquely identify the port.","type":"string"},"workload":{"description":"Name of the workload to attach to. Defaults to the attachment name.","type":"string"}},"type":"object"},"Mount":{"additionalProperties":false,"description":"Mounting of the remote container's volumes on the workstation.","properties":{"enabled":{"default":true,"description":"Whether the remote volumes are mounted.","type":"boolean"},"localMountPort":{"description":"Expose the remote file system on this local port using SFTP instead of mounting it.","maximum":65535,"minimum":1,"type":"integer"},"path":{"description":"Local mount point for the remote volumes. Defaults to a generated temporary directory.","type":"string"},"readOnly":{"description":"Mount the volumes read-only. Always true for an ingest.","type":"boolean"}},"type":"object"},"PortIdentifier":{"description":"A port number, a port name, or a \u003cport\u003e:\u003cport or name\u003e mapping.","oneOf":[{"type":"string"},{"maximum":65535,"minimum":1,"type":"integer"}]},"Replace":{"allOf":[{"$ref":"#/$defs/AttachmentCommon"}],"description":"Replace a container in a workload.","properties":{"address":{"description":"Local IP address to forward to. Defaults to 127.0.0.1.","type":"string"},"name":{"description":"Name of the workload whose container is replaced. Use \u003cworkload\u003e/\u003ccontainer\u003e when the container property isn't used to name the container.","type":"string"},"ports":{"default":["all"],"description":"Container ports to forward to the local workstation. Use \u003clocal port\u003e:\u003ccontainer port\u003e when the local port differs, or \"all\" for all container ports.","items":{"$ref":"#/$defs/PortIdentifier"},"minItems":1,"type":"array"},"toPod":{"$ref":"#/$defs/ToPod"},"type":{"const":"replace"}},"unevaluatedProperties":false},"SymbolicSubnet":{"description":"A subnet in CIDR notation, or one of the symbolic names \"service\", \"pods\", \"also\", or \"all\".","oneOf":[{"$ref":"#/$defs/CIDR"},{"enum":["service","pods","also","all"]}]},"ToPod":{"description":"Additional ports to forward to the pod, made available on localhost. The default protocol is TCP. Use \u003cport\u003e/UDP for UDP ports.","items":{"pattern":"^[1-9][0-9]{0,4}(/(tcp|udp|TCP|UDP))?$","type":"string"},"type":"array"},"Wiretap":{"allOf":[{"$ref":"#/$defs/AttachmentCommon"},{"$ref":"#/$defs/InterceptCommon"}],"description":"Receive a copy of the traffic destined for a port of a workload without disturbing the original flow.","properties":{"type":{"const":"wiretap"}},"unevaluatedProperties":false}},"$id":"https://telepresence.io/schemas/workstation-state.v1alpha1.yaml","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"anyOf":[{"required":["connection"]},{"required":["attachments"]}],"description":"Declarative description of the Telepresence state on a workstation: an\noptional connection and a set of attachments (intercept, replace, ingest,\nor wiretap). The manifest is consumed by \"telepresence apply -f\" to bring\nthe workstation to the described state, and by \"telepresence delete -f\" to\ntear that state down.\n\nA manifest without a connection requires an already established connection,\nand \"telepresence delete -f\" will then leave that connection intact. Only a\nmanifest that declares the connection will disconnect during delete.\n\nDocker mode is deliberately out of scope; that form of state is captured\nusing an annotated Docker Compose specification.","properties":{"apiVersion":{"const":"telepresence.io/v1alpha1"},"attachments":{"description":"Attachments established (in order) by apply and removed (in reverse order) by delete. Attachment names must be unique within the manifest.","items":{"$ref":"#/$defs/Attachment"},"minItems":1,"type":"array"},"connection":{"$ref":"#/$defs/Connection"},"kind":{"const":"WorkstationState"}},"required":["apiVersion","kind"],"title":"Telepresence workstation state","type":"object"}