2023-11-15 17:07:01 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package hashicorp.consul.mesh.v2beta1;
|
|
|
|
|
2023-11-28 20:46:11 +00:00
|
|
|
import "k8s.io/api/core/v1/generated.proto";
|
2023-11-16 17:18:44 +00:00
|
|
|
import "pbresource/annotations.proto";
|
|
|
|
|
|
|
|
// This is a Resource type.
|
2023-11-15 17:07:01 +00:00
|
|
|
message GatewayClassConfig {
|
2023-11-16 17:18:44 +00:00
|
|
|
option (hashicorp.consul.resource.spec) = {scope: SCOPE_CLUSTER};
|
|
|
|
|
2023-11-28 20:46:11 +00:00
|
|
|
// +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer
|
|
|
|
optional string service_type = 1;
|
|
|
|
|
|
|
|
// NodeSelector is a selector which must be true for the pod to fit on a node.
|
|
|
|
// Selector which must match a node's labels for the pod to be scheduled on that node.
|
|
|
|
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
|
|
|
map<string, string> node_selector = 2;
|
|
|
|
|
|
|
|
// Tolerations allow the scheduler to schedule nodes with matching taints.
|
|
|
|
// More Info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
|
|
|
|
repeated k8s.io.api.core.v1.Toleration tolerations = 3;
|
|
|
|
optional Deployment deployment = 4;
|
|
|
|
optional CopyAnnotations copy_annotations = 5;
|
|
|
|
optional string pod_security_policy = 6;
|
|
|
|
optional string openshift_scc_name = 7;
|
|
|
|
optional bool use_host_ports = 8;
|
2023-11-15 17:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CopyAnnotations {
|
|
|
|
repeated string service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Deployment {
|
2023-11-28 20:46:11 +00:00
|
|
|
// +kubebuilder:default:=1
|
|
|
|
// +kubebuilder:validation:Maximum=8
|
|
|
|
// +kubebuilder:validation:Minimum=1
|
|
|
|
// Number of gateway instances that should be deployed by default
|
2023-11-15 17:07:01 +00:00
|
|
|
optional uint32 default_instances = 1;
|
2023-11-28 20:46:11 +00:00
|
|
|
// +kubebuilder:default:=1
|
|
|
|
// +kubebuilder:validation:Maximum=8
|
|
|
|
// +kubebuilder:validation:Minimum=1
|
|
|
|
// Minimum allowed number of gateway instances
|
2023-11-15 17:07:01 +00:00
|
|
|
optional uint32 min_instances = 2;
|
2023-11-28 20:46:11 +00:00
|
|
|
// +kubebuilder:default:=8
|
|
|
|
// +kubebuilder:validation:Maximum=8
|
|
|
|
// +kubebuilder:validation:Minimum=1
|
|
|
|
// Max allowed number of gateway instances
|
2023-11-15 17:07:01 +00:00
|
|
|
optional uint32 max_instances = 3;
|
2023-11-28 20:46:11 +00:00
|
|
|
// Resources defines the resource requirements for the gateway.
|
|
|
|
repeated k8s.io.api.core.v1.ResourceRequirements resources = 4;
|
2023-11-15 17:07:01 +00:00
|
|
|
}
|