This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 279
/
types.go
192 lines (127 loc) · 8.71 KB
/
types.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// Package announcements provides the types and constants required to contextualize events received from the
// Kubernetes API server that are propagated internally within the control plane to trigger configuration changes.
package announcements
// Kind is used to record the kind of announcement
type Kind string
func (at Kind) String() string {
return string(at)
}
const (
// ProxyUpdate is the event kind used to trigger an update to subscribed proxies
ProxyUpdate Kind = "proxy-update"
// PodAdded is the type of announcement emitted when we observe an addition of a Kubernetes Pod
PodAdded Kind = "pod-added"
// PodDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Pod
PodDeleted Kind = "pod-deleted"
// PodUpdated is the type of announcement emitted when we observe an update to a Kubernetes Pod
PodUpdated Kind = "pod-updated"
// ---
// EndpointAdded is the type of announcement emitted when we observe an addition of a Kubernetes Endpoint
EndpointAdded Kind = "endpoint-added"
// EndpointDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Endpoint
EndpointDeleted Kind = "endpoint-deleted"
// EndpointUpdated is the type of announcement emitted when we observe an update to a Kubernetes Endpoint
EndpointUpdated Kind = "endpoint-updated"
// ---
// NamespaceAdded is the type of announcement emitted when we observe an addition of a Kubernetes Namespace
NamespaceAdded Kind = "namespace-added"
// NamespaceDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Namespace
NamespaceDeleted Kind = "namespace-deleted"
// NamespaceUpdated is the type of announcement emitted when we observe an update to a Kubernetes Namespace
NamespaceUpdated Kind = "namespace-updated"
// ---
// ServiceAdded is the type of announcement emitted when we observe an addition of a Kubernetes Service
ServiceAdded Kind = "service-added"
// ServiceDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Service
ServiceDeleted Kind = "service-deleted"
// ServiceUpdated is the type of announcement emitted when we observe an update to a Kubernetes Service
ServiceUpdated Kind = "service-updated"
// ---
// ServiceAccountAdded is the type of announcement emitted when we observe an addition of a Kubernetes Service Account
ServiceAccountAdded Kind = "serviceaccount-added"
// ServiceAccountDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Service Account
ServiceAccountDeleted Kind = "serviceaccount-deleted"
// ServiceAccountUpdated is the type of announcement emitted when we observe an update to a Kubernetes Service
ServiceAccountUpdated Kind = "serviceaccount-updated"
// ---
// TrafficSplitAdded is the type of announcement emitted when we observe an addition of a Kubernetes TrafficSplit
TrafficSplitAdded Kind = "trafficsplit-added"
// TrafficSplitDeleted the type of announcement emitted when we observe the deletion of a Kubernetes TrafficSplit
TrafficSplitDeleted Kind = "trafficsplit-deleted"
// TrafficSplitUpdated is the type of announcement emitted when we observe an update to a Kubernetes TrafficSplit
TrafficSplitUpdated Kind = "trafficsplit-updated"
// ---
// RouteGroupAdded is the type of announcement emitted when we observe an addition of a Kubernetes RouteGroup
RouteGroupAdded Kind = "routegroup-added"
// RouteGroupDeleted the type of announcement emitted when we observe the deletion of a Kubernetes RouteGroup
RouteGroupDeleted Kind = "routegroup-deleted"
// RouteGroupUpdated is the type of announcement emitted when we observe an update to a Kubernetes RouteGroup
RouteGroupUpdated Kind = "routegroup-updated"
// ---
// TCPRouteAdded is the type of announcement emitted when we observe an addition of a Kubernetes TCPRoute
TCPRouteAdded Kind = "tcproute-added"
// TCPRouteDeleted the type of announcement emitted when we observe the deletion of a Kubernetes TCPRoute
TCPRouteDeleted Kind = "tcproute-deleted"
// TCPRouteUpdated is the type of announcement emitted when we observe an update to a Kubernetes TCPRoute
TCPRouteUpdated Kind = "tcproute-updated"
// ---
// TrafficTargetAdded is the type of announcement emitted when we observe an addition of a Kubernetes TrafficTarget
TrafficTargetAdded Kind = "traffictarget-added"
// TrafficTargetDeleted the type of announcement emitted when we observe the deletion of a Kubernetes TrafficTarget
TrafficTargetDeleted Kind = "traffictarget-deleted"
// TrafficTargetUpdated is the type of announcement emitted when we observe an update to a Kubernetes TrafficTarget
TrafficTargetUpdated Kind = "traffictarget-updated"
// ---
// IngressAdded is the type of announcement emitted when we observe an addition of a Kubernetes Ingress
IngressAdded Kind = "ingress-added"
// IngressDeleted the type of announcement emitted when we observe the deletion of a Kubernetes Ingress
IngressDeleted Kind = "ingress-deleted"
// IngressUpdated is the type of announcement emitted when we observe an update to a Kubernetes Ingress
IngressUpdated Kind = "ingress-updated"
// ---
// CertificateRotated is the type of announcement emitted when a certificate is rotated by the certificate provider
CertificateRotated Kind = "certificate-rotated"
// --- config.openservicemesh.io API events
// MeshConfigAdded is the type of announcement emitted when we observe an addition of a Kubernetes MeshConfig
MeshConfigAdded Kind = "meshconfig-added"
// MeshConfigDeleted the type of announcement emitted when we observe the deletion of a Kubernetes MeshConfig
MeshConfigDeleted Kind = "meshconfig-deleted"
// MeshConfigUpdated is the type of announcement emitted when we observe an update to a Kubernetes MeshConfig
MeshConfigUpdated Kind = "meshconfig-updated"
// MeshRootCertificateAdded is the type of announcement emitted when we observe an addition of a Kubernetes MeshRootCertificate
MeshRootCertificateAdded Kind = "meshrootcertificate-added"
// MeshRootCertificateDeleted is the type of announcement emitted when we observe the deletion of a Kubernetes MeshRootCertificate
MeshRootCertificateDeleted Kind = "meshrootcertificate-deleted"
// MeshRootCertificateUpdated is the type of announcement emitted when we observe an update to a Kubernetes MeshRootCertificate
MeshRootCertificateUpdated Kind = "meshrootcertificate-updated"
// --- policy.openservicemesh.io API events
// EgressAdded is the type of announcement emitted when we observe an addition of egresses.policy.openservicemesh.io
EgressAdded Kind = "egress-added"
// EgressDeleted the type of announcement emitted when we observe a deletion of egresses.policy.openservicemesh.io
EgressDeleted Kind = "egress-deleted"
// EgressUpdated is the type of announcement emitted when we observe an update to egresses.policy.openservicemesh.io
EgressUpdated Kind = "egress-updated"
// IngressBackendAdded is the type of announcement emitted when we observe an addition of ingressbackends.policy.openservicemesh.io
IngressBackendAdded Kind = "ingressbackend-added"
// IngressBackendDeleted the type of announcement emitted when we observe a deletion of ingressbackends.policy.openservicemesh.io
IngressBackendDeleted Kind = "ingressbackend-deleted"
// IngressBackendUpdated is the type of announcement emitted when we observe an update to ingressbackends.policy.openservicemesh.io
IngressBackendUpdated Kind = "ingressbackend-updated"
// RetryPolicyAdded is the type of announcement emitted when we observe an addition of retries.policy.openservicemesh.io
RetryPolicyAdded Kind = "retry-added"
// RetryPolicyDeleted the type of announcement emitted when we observe a deletion of retries.policy.openservicemesh.io
RetryPolicyDeleted Kind = "retry-deleted"
// RetryPolicyUpdated is the type of announcement emitted when we observe an update to retries.policy.openservicemesh.io
RetryPolicyUpdated Kind = "retry-updated"
// UpstreamTrafficSettingAdded is the type of announcement emitted when we observe an addition of upstreamtrafficsettings.policy.openservicemesh.io
UpstreamTrafficSettingAdded Kind = "upstreamtrafficsetting-added"
// UpstreamTrafficSettingDeleted is the type of announcement emitted when we observe a deletion of upstreamtrafficsettings.policy.openservicemesh.io
UpstreamTrafficSettingDeleted Kind = "upstreamtrafficsetting-deleted"
// UpstreamTrafficSettingUpdated is the type of announcement emitted when we observe an update of upstreamtrafficsettings.policy.openservicemesh.io
UpstreamTrafficSettingUpdated Kind = "upstreamtrafficsetting-updated"
)
// Announcement is a struct for messages between various components of OSM signaling a need for a change in Envoy proxy configuration
type Announcement struct {
Type Kind
ReferencedObjectID interface{}
}