@kubernetes-models/gke
Version:
117 lines (116 loc) • 6.76 kB
TypeScript
import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta";
import { Model, ModelData } from "@kubernetes-models/base";
/**
* GRPCRouteRetryPolicy provides a way to apply LoadBalancer policy configuration with the GKE implementation of the Gateway API.
*/
export interface IGRPCRouteRetryPolicy {
/**
* 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/sig-architecture/api-conventions.md#resources
*/
"apiVersion": "networking.gke.io/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/sig-architecture/api-conventions.md#types-kinds
*/
"kind": "GRPCRouteRetryPolicy";
"metadata"?: IObjectMeta;
/**
* Spec defines the desired state of GRPCRouteRetryPolicy.
*/
"spec": {
/**
* Default defines default policy configuration for the targeted resource.
*/
"default"?: {
/**
* Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.
*/
"numRetries"?: number;
/**
* Specifies a non-zero timeout per retry attempt.
*/
"perTryTimeout"?: {
/**
* Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.
*/
"nanos"?: number;
/**
* Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years
*/
"seconds"?: number;
};
/**
* Specifies one or more conditions for which this retry rule applies. Valid values are: - connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable
*/
"retryConditions"?: Array<string>;
};
/**
* TargetRef identifies an API object to apply policy to.
*/
"targetRef": {
/**
* Group is the group of the target resource.
*/
"group": string;
/**
* Kind is kind of the target resource.
*/
"kind": string;
/**
* Name is the name of the target resource.
*/
"name": string;
/**
* Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy.
*/
"namespace"?: string;
};
};
/**
* Status defines the current state of GRPCRouteRetryPolicy.
*/
"status"?: {
/**
* Conditions describe the current conditions of the GRPCRouteRetryPolicy.
*/
"conditions"?: Array<{
/**
* lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
*/
"lastTransitionTime": string;
/**
* message is a human readable message indicating details about the transition. This may be an empty string.
*/
"message": string;
/**
* observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
*/
"observedGeneration"?: number;
/**
* reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
*/
"reason": string;
/**
* status of the condition, one of True, False, Unknown.
*/
"status": "True" | "False" | "Unknown";
/**
* type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
*/
"type": string;
}>;
};
}
/**
* GRPCRouteRetryPolicy provides a way to apply LoadBalancer policy configuration with the GKE implementation of the Gateway API.
*/
export declare class GRPCRouteRetryPolicy extends Model<IGRPCRouteRetryPolicy> implements IGRPCRouteRetryPolicy {
"apiVersion": IGRPCRouteRetryPolicy["apiVersion"];
"kind": IGRPCRouteRetryPolicy["kind"];
"metadata"?: IGRPCRouteRetryPolicy["metadata"];
"spec": IGRPCRouteRetryPolicy["spec"];
"status"?: IGRPCRouteRetryPolicy["status"];
static apiVersion: IGRPCRouteRetryPolicy["apiVersion"];
static kind: IGRPCRouteRetryPolicy["kind"];
static is: import("@kubernetes-models/base").TypeMetaGuard<IGRPCRouteRetryPolicy>;
constructor(data?: ModelData<IGRPCRouteRetryPolicy>);
}