/
generated.proto
271 lines (226 loc) · 10 KB
/
generated.proto
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = 'proto2';
package kmodules.xyz.custom_resources.apis.appcatalog.v1alpha1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "v1alpha1";
// AddKeyTransform specifies that Service Catalog should add an
// additional entry to the Secret associated with the ServiceBinding.
// For example, given the following AddKeyTransform:
// {"key": "CONNECTION_POOL_SIZE", "stringValue": "10"}
// the following entry will appear in the Secret:
// "CONNECTION_POOL_SIZE": "10"
// Note that this transform should only be used to add non-sensitive
// (non-secret) values. To add sensitive information, the
// AddKeysFromTransform should be used instead.
message AddKeyTransform {
// The name of the key to add
optional string key = 1;
// The binary value (possibly non-string) to add to the Secret under the specified key. If both
// value and stringValue are specified, then value is ignored and stringValue is stored.
// +optional
optional bytes value = 2;
// The string (non-binary) value to add to the Secret under the specified key.
// +optional
optional string stringValue = 3;
}
// AddKeysFromTransform specifies that Service Catalog should merge
// an existing secret into the Secret associated with the ServiceBinding.
// For example, given the following AddKeysFromTransform:
// {"secretRef": {"namespace": "foo", "name": "bar"}}
// the entries of the Secret "bar" from Namespace "foo" will be merged into
// the credentials Secret.
message AddKeysFromTransform {
// The reference to the Secret that should be merged into the credentials Secret.
optional ObjectReference secretRef = 1;
}
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=appbindings,singular=appbinding,categories={catalog,appscode,all}
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type"
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
message AppBinding {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
optional AppBindingSpec spec = 2;
}
// AppBindingList is a list of Apps
message AppBindingList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is a list of AppBinding CRD objects
repeated AppBinding items = 2;
}
// AppBindingSpec is the spec for app
message AppBindingSpec {
// Type used to facilitate programmatic handling of application.
// +optional
optional string type = 1;
// Version used to facilitate programmatic handling of application.
// +optional
optional string version = 2;
// ClientConfig defines how to communicate with the app.
// Required
optional ClientConfig clientConfig = 3;
// Secret is the name of the secret to create in the AppBinding's
// namespace that will hold the credentials associated with the AppBinding.
optional k8s.io.api.core.v1.LocalObjectReference secret = 4;
// List of transformations that should be applied to the credentials
// associated with the ServiceBinding before they are inserted into the Secret.
repeated SecretTransform secretTransforms = 5;
// Parameters is a set of the parameters to be used to connect to the
// app. The inline YAML/JSON payload to be translated into equivalent
// JSON object.
//
// The Parameters field is NOT secret or secured in any way and should
// NEVER be used to hold sensitive information. To set parameters that
// contain secret information, you should ALWAYS store that information
// in a Secret.
//
// +optional
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 6;
}
message AppReference {
// `namespace` is the namespace of the app.
// Required
optional string namespace = 1;
// `name` is the name of the app.
// Required
optional string name = 2;
// Parameters is a set of the parameters to be used to override default
// parameters. The inline YAML/JSON payload to be translated into equivalent
// JSON object.
//
// The Parameters field is NOT secret or secured in any way and should
// NEVER be used to hold sensitive information.
//
// +optional
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 3;
}
// ClientConfig contains the information to make a connection with an app
message ClientConfig {
// `url` gives the location of the app, in standard URL form
// (`[scheme://]host:port/path`). Exactly one of `url` or `service`
// must be specified.
//
// The `host` should not refer to a service running in the cluster; use
// the `service` field instead. The host might be resolved via external
// DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
// in-cluster DNS as that would be a layering violation). `host` may
// also be an IP address.
//
// A path is optional, and if present may be any string permissible in
// a URL. You may use the path to pass an arbitrary string to the
// app, for example, a cluster identifier.
//
// Attempting to use a user or basic auth e.g. "user:password@" is not
// allowed. Fragments ("#...") and query parameters ("?...") are not
// allowed, either.
//
// +optional
optional string url = 1;
// `service` is a reference to the service for this app. Either
// `service` or `url` must be specified.
//
// If the webhook is running within the cluster, then you should use `service`.
//
// +optional
optional ServiceReference service = 2;
// InsecureSkipTLSVerify disables TLS certificate verification when communicating with this app.
// This is strongly discouraged. You should use the CABundle instead.
optional bool insecureSkipTLSVerify = 3;
// CABundle is a PEM encoded CA bundle which will be used to validate the serving certificate of this app.
// +optional
optional bytes caBundle = 4;
}
// ObjectReference contains enough information to let you locate the
// referenced object.
message ObjectReference {
// Namespace of the referent.
optional string namespace = 1;
// Name of the referent.
optional string name = 2;
}
// RemoveKeyTransform specifies that one of the credentials keys returned
// from the broker should not be included in the credentials Secret.
message RemoveKeyTransform {
// The key to remove from the Secret
optional string key = 1;
}
// RenameKeyTransform specifies that one of the credentials keys returned
// from the broker should be renamed and stored under a different key
// in the Secret.
// For example, given the following credentials entry:
// "USERNAME": "johndoe"
// and the following RenameKeyTransform:
// {"from": "USERNAME", "to": "DB_USER"}
// the following entry will appear in the Secret:
// "DB_USER": "johndoe"
message RenameKeyTransform {
// The name of the key to rename
optional string from = 1;
// The new name for the key
optional string to = 2;
}
// SecretTransform is a single transformation that is applied to the
// credentials returned from the broker before they are inserted into
// the Secret associated with the ServiceBinding.
// Because different brokers providing the same type of service may
// each return a different credentials structure, users can specify
// the transformations that should be applied to the Secret to adapt
// its entries to whatever the service consumer expects.
// For example, the credentials returned by the broker may include the
// key "USERNAME", but the consumer requires the username to be
// exposed under the key "DB_USER" instead. To have the Service
// Catalog transform the Secret, the following SecretTransform must
// be specified in ServiceBinding.spec.secretTransform:
// - {"renameKey": {"from": "USERNAME", "to": "DB_USER"}}
// Only one of the SecretTransform's members may be specified.
message SecretTransform {
// RenameKey represents a transform that renames a credentials Secret entry's key
optional RenameKeyTransform renameKey = 1;
// AddKey represents a transform that adds an additional key to the credentials Secret
optional AddKeyTransform addKey = 2;
// AddKeysFrom represents a transform that merges all the entries of an existing Secret
// into the credentials Secret
optional AddKeysFromTransform addKeysFrom = 3;
// RemoveKey represents a transform that removes a credentials Secret entry
optional RemoveKeyTransform removeKey = 4;
}
// ServiceReference holds a reference to Service.legacy.k8s.io
message ServiceReference {
// Specifies which scheme to use, for example: http, https
// If specified, then it will applied as prefix in this format: scheme://
// If not specified, then nothing will be prefixed
optional string scheme = 1;
// `name` is the name of the service.
// Required
optional string name = 2;
// The port that will be exposed by this app.
optional int32 port = 3;
// `path` is an optional URL path which will be sent in any request to
// this service.
// +optional
optional string path = 4;
// `query` is optional encoded query string, without '?' which will be
// sent in any request to this service.
// +optional
optional string query = 5;
}