This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
apigateway.go
59 lines (54 loc) · 2.28 KB
/
apigateway.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package v1beta2
import "github.com/caos/orbos/internal/operator/boom/api/v1beta2/k8s"
type APIGateway struct {
//Flag if tool should be deployed
//@default: false
Deploy bool `json:"deploy" yaml:"deploy"`
//Number of replicas used for deployment
//@default: 1
ReplicaCount int `json:"replicaCount,omitempty" yaml:"replicaCount,omitempty"`
//Pod scheduling constrains
Affinity *k8s.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"`
//Service definition for ambassador
Service *AmbassadorService `json:"service,omitempty" yaml:"service,omitempty"`
//Activate the dev portal mapping
ActivateDevPortal bool `json:"activateDevPortal,omitempty" yaml:"activateDevPortal,omitempty"`
//NodeSelector for deployment
NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
//Tolerations to run ambassador on nodes
Tolerations k8s.Tolerations `json:"tolerations,omitempty" yaml:"tolerations,omitempty"`
//Resource requirements
Resources *k8s.Resources `json:"resources,omitempty" yaml:"resources,omitempty"`
//Caching options
Caching *Caching `json:"caching,omitempty" yaml:"caching,omitempty"`
//Enable gRPC Web
//@default: false
GRPCWeb bool `json:"grpcWeb,omitempty" yaml:"grpcWeb,omitempty"`
//Enable proxy protocol
//@default: true
ProxyProtocol bool `json:"proxyProtocol,omitempty" yaml:"proxyProtocol,omitempty"`
}
type Caching struct {
//Enable specifies, whether a redis instance should be deployed or not
Enable bool
//Resource requirements
Resources *k8s.Resources `json:"resources,omitempty" yaml:"resources,omitempty"`
}
type AmbassadorService struct {
//Kubernetes service type
Type string `json:"type,omitempty" yaml:"type,omitempty"`
//IP when service is a loadbalancer with a fixed IP
LoadBalancerIP string `json:"loadBalancerIP,omitempty" yaml:"loadBalancerIP,omitempty"`
//Port definitions for the service
Ports []*Port `json:"ports,omitempty" yaml:"ports,omitempty"`
}
type Port struct {
//Name of the Port
Name string `json:"name,omitempty" yaml:"name,omitempty"`
//Port number
Port uint16 `json:"port,omitempty" yaml:"port,omitempty"`
//Targetport in-cluster
TargetPort uint16 `json:"targetPort,omitempty" yaml:"targetPort,omitempty"`
//Used port on node
NodePort uint16 `json:"nodePort,omitempty" yaml:"nodePort,omitempty"`
}