@@ -27,7 +27,7 @@ package apiextensions.fn.proto.v1;
27
27
import "google/protobuf/duration.proto" ;
28
28
import "google/protobuf/struct.proto" ;
29
29
30
- option go_package = "github.com/crossplane/crossplane/proto/fn/v1" ;
30
+ option go_package = "github.com/crossplane/crossplane/v2/ proto/fn/v1" ;
31
31
32
32
// A FunctionRunnerService is a function.
33
33
service FunctionRunnerService {
@@ -69,15 +69,27 @@ message RunFunctionRequest {
69
69
70
70
// Optional resources that the function specified in its requirements. Note
71
71
// that resources is a map to Resources, plural. The map key corresponds to
72
- // the key in a RunFunctionResponse's requirements.resources field. If a
73
- // function requested required resources that did not exist, Crossplane sets
72
+ // the key in a RunFunctionResponse's requirements.extra_resources field. If a
73
+ // function requested extra resources that did not exist, Crossplane sets
74
74
// the map key to an empty Resources message to indicate that it attempted to
75
- // satisfy the request.
76
- map <string , Resources > required_resources = 6 ;
75
+ // satisfy the request. This field is only populated when the function uses
76
+ // extra_resources in its requirements.
77
+ //
78
+ // Deprecated: Use required_resources instead.
79
+ map <string , Resources > extra_resources = 6 [deprecated = true ];
77
80
78
81
// Optional credentials that this function may use to communicate with an
79
82
// external system.
80
83
map <string , Credentials > credentials = 7 ;
84
+
85
+ // Optional resources that the function specified in its requirements. Note
86
+ // that resources is a map to Resources, plural. The map key corresponds to
87
+ // the key in a RunFunctionResponse's requirements.resources field. If a
88
+ // function requested required resources that did not exist, Crossplane sets
89
+ // the map key to an empty Resources message to indicate that it attempted to
90
+ // satisfy the request. This field is only populated when the function uses
91
+ // resources in its requirements.
92
+ map <string , Resources > required_resources = 8 ;
81
93
}
82
94
83
95
// Credentials that a function may use to communicate with an external system.
@@ -150,7 +162,13 @@ message RequestMeta {
150
162
message Requirements {
151
163
// Resources that this function requires. The map key uniquely identifies the
152
164
// group of resources.
153
- map <string , ResourceSelector > resources = 1 ;
165
+ //
166
+ // Deprecated: Use resources instead.
167
+ map <string , ResourceSelector > extra_resources = 1 [deprecated = true ];
168
+
169
+ // Resources that this function requires. The map key uniquely identifies the
170
+ // group of resources.
171
+ map <string , ResourceSelector > resources = 2 ;
154
172
}
155
173
156
174
// ResourceSelector selects a group of resources, either by name or by label.
@@ -349,4 +367,4 @@ enum Status {
349
367
STATUS_CONDITION_TRUE = 2 ;
350
368
351
369
STATUS_CONDITION_FALSE = 3 ;
352
- }
370
+ }
0 commit comments