import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; import { Model, ModelData } from "@kubernetes-models/base"; export interface INetworkServicesEdgeCacheOrigin { /** * apiVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources */ "apiVersion": "networkservices.cnrm.cloud.google.com/v1alpha1"; /** * kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds */ "kind": "NetworkServicesEdgeCacheOrigin"; "metadata"?: IObjectMeta; "spec": { /** * Enable AWS Signature Version 4 origin authentication. */ "awsV4Authentication"?: { /** * The access key ID your origin uses to identify the key. */ "accessKeyId": string; /** * The name of the AWS region that your origin is in. */ "originRegion": string; /** * The Secret Manager secret version of the secret access key used by your origin. * * This is the resource name of the secret version in the format 'projects/\*\/secrets/\*\/versions/\*' where the '\*' values are replaced by the project, secret, and version you require. */ "secretAccessKeyVersion": string; }; /** * A human-readable description of the resource. */ "description"?: string; /** * The Origin resource to try when the current origin cannot be reached. * After maxAttempts is reached, the configured failoverOrigin will be used to fulfil the request. * * The value of timeout.maxAttemptsTimeout dictates the timeout across all origins. * A reference to a Topic resource. */ "failoverOrigin"?: string; /** * The maximum number of attempts to cache fill from this origin. Another attempt is made when a cache fill fails with one of the retryConditions. * * Once maxAttempts to this origin have failed the failoverOrigin will be used, if one is specified. That failoverOrigin may specify its own maxAttempts, * retryConditions and failoverOrigin to control its own cache fill failures. * * The total number of allowed attempts to cache fill across this and failover origins is limited to four. * The total time allowed for cache fill attempts across this and failover origins can be controlled with maxAttemptsTimeout. * * The last valid, non-retried response from all origins will be returned to the client. * If no origin returns a valid response, an HTTP 502 will be returned to the client. * * Defaults to 1. Must be a value greater than 0 and less than 4. */ "maxAttempts"?: number; /** * A fully qualified domain name (FQDN) or IP address reachable over the public Internet, or the address of a Google Cloud Storage bucket. * * This address will be used as the origin for cache requests - e.g. FQDN: media-backend.example.com, IPv4: 35.218.1.1, IPv6: 2607:f8b0:4012:809::200e, Cloud Storage: gs://bucketname * * When providing an FQDN (hostname), it must be publicly resolvable (e.g. via Google public DNS) and IP addresses must be publicly routable. It must not contain a protocol (e.g., https://) and it must not contain any slashes. * If a Cloud Storage bucket is provided, it must be in the canonical "gs://bucketname" format. Other forms, such as "storage.googleapis.com", will be rejected. */ "originAddress": string; /** * The override actions, including url rewrites and header * additions, for requests that use this origin. */ "originOverrideAction"?: { /** * The header actions, including adding and removing * headers, for request handled by this origin. */ "headerAction"?: { /** * Describes a header to add. * * You may add a maximum of 25 request headers. */ "requestHeadersToAdd"?: Array<{ /** * The name of the header to add. */ "headerName": string; /** * The value of the header to add. */ "headerValue": string; /** * Whether to replace all existing headers with the same name. * * By default, added header values are appended * to the response or request headers with the * same field names. The added values are * separated by commas. * * To overwrite existing values, set 'replace' to 'true'. */ "replace"?: boolean; }>; }; /** * The URL rewrite configuration for request that are * handled by this origin. */ "urlRewrite"?: { /** * Prior to forwarding the request to the selected * origin, the request's host header is replaced with * contents of the hostRewrite. * * This value must be between 1 and 255 characters. */ "hostRewrite"?: string; }; }; /** * Follow redirects from this origin. */ "originRedirect"?: { /** * The set of redirect response codes that the CDN * follows. Values of * [RedirectConditions](https://cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheOrigins#redirectconditions) * are accepted. */ "redirectConditions"?: Array; }; /** * The port to connect to the origin on. * Defaults to port 443 for HTTP2 and HTTPS protocols, and port 80 for HTTP. */ "port"?: number; /** * The project that this resource belongs to. */ "projectRef": { /** * Allowed value: The `name` field of a `Project` resource. */ "external"?: string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name"?: string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; } & (Exclude<{ /** * Allowed value: The `name` field of a `Project` resource. */ "external"?: string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name": string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; }, { /** * Allowed value: The `name` field of a `Project` resource. */ "external": string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name"?: string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; }> | Exclude<{ /** * Allowed value: The `name` field of a `Project` resource. */ "external": string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name"?: string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; }, { /** * Allowed value: The `name` field of a `Project` resource. */ "external": string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name"?: string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; } & ({ /** * Allowed value: The `name` field of a `Project` resource. */ "external"?: string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name": string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace"?: string; } | { /** * Allowed value: The `name` field of a `Project` resource. */ "external"?: string; /** * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ "name"?: string; /** * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */ "namespace": string; })>); /** * The protocol to use to connect to the configured origin. Defaults to HTTP2, and it is strongly recommended that users use HTTP2 for both security & performance. * * When using HTTP2 or HTTPS as the protocol, a valid, publicly-signed, unexpired TLS (SSL) certificate must be presented by the origin server. Possible values: ["HTTP2", "HTTPS", "HTTP"]. */ "protocol"?: string; /** * Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ "resourceID"?: string; /** * Specifies one or more retry conditions for the configured origin. * * If the failure mode during a connection attempt to the origin matches the configured retryCondition(s), * the origin request will be retried up to maxAttempts times. The failoverOrigin, if configured, will then be used to satisfy the request. * * The default retryCondition is "CONNECT_FAILURE". * * retryConditions apply to this origin, and not subsequent failoverOrigin(s), * which may specify their own retryConditions and maxAttempts. * * Valid values are: * * - CONNECT_FAILURE: Retry on failures connecting to origins, for example due to connection timeouts. * - HTTP_5XX: Retry if the origin responds with any 5xx response code, or if the origin does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. * - GATEWAY_ERROR: Similar to 5xx, but only applies to response codes 502, 503 or 504. * - RETRIABLE_4XX: Retry for retriable 4xx response codes, which include HTTP 409 (Conflict) and HTTP 429 (Too Many Requests) * - NOT_FOUND: Retry if the origin returns a HTTP 404 (Not Found). This can be useful when generating video content, and the segment is not available yet. * - FORBIDDEN: Retry if the origin returns a HTTP 403 (Forbidden). Possible values: ["CONNECT_FAILURE", "HTTP_5XX", "GATEWAY_ERROR", "RETRIABLE_4XX", "NOT_FOUND", "FORBIDDEN"]. */ "retryConditions"?: Array; /** * The connection and HTTP timeout configuration for this origin. */ "timeout"?: { /** * The maximum duration to wait for a single origin connection to be established, including DNS lookup, TLS handshake and TCP/QUIC connection establishment. * * Defaults to 5 seconds. The timeout must be a value between 1s and 15s. * * The connectTimeout capped by the deadline set by the request's maxAttemptsTimeout. The last connection attempt may have a smaller connectTimeout in order to adhere to the overall maxAttemptsTimeout. */ "connectTimeout"?: string; /** * The maximum time across all connection attempts to the origin, including failover origins, before returning an error to the client. A HTTP 504 will be returned if the timeout is reached before a response is returned. * * Defaults to 15 seconds. The timeout must be a value between 1s and 30s. * * If a failoverOrigin is specified, the maxAttemptsTimeout of the first configured origin sets the deadline for all connection attempts across all failoverOrigins. */ "maxAttemptsTimeout"?: string; /** * The maximum duration to wait between reads of a single HTTP connection/stream. * * Defaults to 15 seconds. The timeout must be a value between 1s and 30s. * * The readTimeout is capped by the responseTimeout. All reads of the HTTP connection/stream must be completed by the deadline set by the responseTimeout. * * If the response headers have already been written to the connection, the response will be truncated and logged. */ "readTimeout"?: string; /** * The maximum duration to wait for the last byte of a response to arrive when reading from the HTTP connection/stream. * * Defaults to 30 seconds. The timeout must be a value between 1s and 120s. * * The responseTimeout starts after the connection has been established. * * This also applies to HTTP Chunked Transfer Encoding responses, and/or when an open-ended Range request is made to the origin. Origins that take longer to write additional bytes to the response than the configured responseTimeout will result in an error being returned to the client. * * If the response headers have already been written to the connection, the response will be truncated and logged. */ "responseTimeout"?: string; }; }; "status"?: { /** * Conditions represent the latest available observation of the resource's current state. */ "conditions"?: Array<{ /** * Last time the condition transitioned from one status to another. */ "lastTransitionTime"?: string; /** * Human-readable message indicating details about last transition. */ "message"?: string; /** * Unique, one-word, CamelCase reason for the condition's last transition. */ "reason"?: string; /** * Status is the status of the condition. Can be True, False, Unknown. */ "status"?: string; /** * Type is the type of the condition. */ "type"?: string; }>; /** * ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */ "observedGeneration"?: number; }; } export declare class NetworkServicesEdgeCacheOrigin extends Model implements INetworkServicesEdgeCacheOrigin { "apiVersion": INetworkServicesEdgeCacheOrigin["apiVersion"]; "kind": INetworkServicesEdgeCacheOrigin["kind"]; "metadata"?: INetworkServicesEdgeCacheOrigin["metadata"]; "spec": INetworkServicesEdgeCacheOrigin["spec"]; "status"?: INetworkServicesEdgeCacheOrigin["status"]; static apiVersion: INetworkServicesEdgeCacheOrigin["apiVersion"]; static kind: INetworkServicesEdgeCacheOrigin["kind"]; static is: import("@kubernetes-models/base").TypeMetaGuard; constructor(data?: ModelData); }