Skip to content

Commit be2051a

Browse files
committed
feat: Update Dapr to 1.3.0
1 parent cbe6cc4 commit be2051a

File tree

10 files changed

+249
-28
lines changed

10 files changed

+249
-28
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Chaos Mesh is chaos engineering platform that orchestrates chaos on Kubernetes e
154154
](https://javadoc.io/doc/com.marcnuri.yakc.apis/dapr)
155155

156156
[Retrofit](https://square.github.io/retrofit/) API client Java interfaces for
157-
[Dapr](https://dapr.io/) - Distributed Application Runtime (1.0.1).
157+
[Dapr](https://dapr.io/) - Distributed Application Runtime (1.3.0).
158158

159159
Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
160160

apis/dapr/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ sourceSets.main.java.srcDirs = ['src/api/java', 'src/main/java', 'src/model/java
2121
def templatesDirs = new File(rootProject.projectDir, "schema/templates")
2222
def schemaDir = new File(projectDir, "schema")
2323
def availableSchemaNames = Arrays.asList(
24-
"dapr-1.0.1.json"
24+
"dapr-1.0.1.json",
25+
"dapr-1.3.0.json"
2526
)
2627
def availableSchemas = availableSchemaNames.stream()
2728
.map { s -> new File(schemaDir, s) }

apis/dapr/schema/dapr-1.3.0.json

+1
Large diffs are not rendered by default.

apis/dapr/src/api/java/com/marcnuri/yakc/api/daprio/v1alpha1/DaprIoV1alpha1Api.java

+24-26
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import com.marcnuri.yakc.model.io.dapr.v1alpha1.ConfigurationList;
2626
import com.marcnuri.yakc.model.io.dapr.v1alpha1.Subscription;
2727
import com.marcnuri.yakc.model.io.dapr.v1alpha1.SubscriptionList;
28-
import com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions;
29-
import com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status;
3028
import java.util.HashMap;
3129
import retrofit2.http.Body;
3230
import retrofit2.http.HTTP;
@@ -262,7 +260,7 @@ public ListConfigurationForAllNamespaces watch(Boolean watch) {
262260
@Headers({
263261
"Accept: */*"
264262
})
265-
KubernetesCall<Status> deleteCollectionNamespacedComponent(
263+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(
266264
@Path("namespace") String namespace);
267265

268266
/**
@@ -277,7 +275,7 @@ KubernetesCall<Status> deleteCollectionNamespacedComponent(
277275
@Headers({
278276
"Accept: */*"
279277
})
280-
KubernetesCall<Status> deleteCollectionNamespacedComponent(
278+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedComponent(
281279
@Path("namespace") String namespace,
282280
@QueryMap DeleteCollectionNamespacedComponent queryParameters);
283281

@@ -554,10 +552,10 @@ public CreateNamespacedComponent fieldManager(String fieldManager) {
554552
"Content-Type: application/json",
555553
"Accept: */*"
556554
})
557-
KubernetesCall<Status> deleteNamespacedComponent(
555+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedComponent(
558556
@Path("name") String name,
559557
@Path("namespace") String namespace,
560-
@Body DeleteOptions body);
558+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body);
561559

562560
/**
563561
* delete a Component
@@ -574,7 +572,7 @@ KubernetesCall<Status> deleteNamespacedComponent(
574572
"Content-Type: application/json",
575573
"Accept: */*"
576574
})
577-
KubernetesCall<Status> deleteNamespacedComponent(
575+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedComponent(
578576
@Path("name") String name,
579577
@Path("namespace") String namespace);
580578

@@ -593,10 +591,10 @@ KubernetesCall<Status> deleteNamespacedComponent(
593591
"Content-Type: application/json",
594592
"Accept: */*"
595593
})
596-
KubernetesCall<Status> deleteNamespacedComponent(
594+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedComponent(
597595
@Path("name") String name,
598596
@Path("namespace") String namespace,
599-
@Body DeleteOptions body,
597+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body,
600598
@QueryMap DeleteNamespacedComponent queryParameters);
601599

602600
/**
@@ -614,7 +612,7 @@ KubernetesCall<Status> deleteNamespacedComponent(
614612
"Content-Type: application/json",
615613
"Accept: */*"
616614
})
617-
KubernetesCall<Status> deleteNamespacedComponent(
615+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedComponent(
618616
@Path("name") String name,
619617
@Path("namespace") String namespace,
620618
@QueryMap DeleteNamespacedComponent queryParameters);
@@ -860,7 +858,7 @@ public ReplaceNamespacedComponent fieldManager(String fieldManager) {
860858
@Headers({
861859
"Accept: */*"
862860
})
863-
KubernetesCall<Status> deleteCollectionNamespacedConfiguration(
861+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(
864862
@Path("namespace") String namespace);
865863

866864
/**
@@ -875,7 +873,7 @@ KubernetesCall<Status> deleteCollectionNamespacedConfiguration(
875873
@Headers({
876874
"Accept: */*"
877875
})
878-
KubernetesCall<Status> deleteCollectionNamespacedConfiguration(
876+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(
879877
@Path("namespace") String namespace,
880878
@QueryMap DeleteCollectionNamespacedConfiguration queryParameters);
881879

@@ -1152,10 +1150,10 @@ public CreateNamespacedConfiguration fieldManager(String fieldManager) {
11521150
"Content-Type: application/json",
11531151
"Accept: */*"
11541152
})
1155-
KubernetesCall<Status> deleteNamespacedConfiguration(
1153+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedConfiguration(
11561154
@Path("name") String name,
11571155
@Path("namespace") String namespace,
1158-
@Body DeleteOptions body);
1156+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body);
11591157

11601158
/**
11611159
* delete a Configuration
@@ -1172,7 +1170,7 @@ KubernetesCall<Status> deleteNamespacedConfiguration(
11721170
"Content-Type: application/json",
11731171
"Accept: */*"
11741172
})
1175-
KubernetesCall<Status> deleteNamespacedConfiguration(
1173+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedConfiguration(
11761174
@Path("name") String name,
11771175
@Path("namespace") String namespace);
11781176

@@ -1191,10 +1189,10 @@ KubernetesCall<Status> deleteNamespacedConfiguration(
11911189
"Content-Type: application/json",
11921190
"Accept: */*"
11931191
})
1194-
KubernetesCall<Status> deleteNamespacedConfiguration(
1192+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedConfiguration(
11951193
@Path("name") String name,
11961194
@Path("namespace") String namespace,
1197-
@Body DeleteOptions body,
1195+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body,
11981196
@QueryMap DeleteNamespacedConfiguration queryParameters);
11991197

12001198
/**
@@ -1212,7 +1210,7 @@ KubernetesCall<Status> deleteNamespacedConfiguration(
12121210
"Content-Type: application/json",
12131211
"Accept: */*"
12141212
})
1215-
KubernetesCall<Status> deleteNamespacedConfiguration(
1213+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedConfiguration(
12161214
@Path("name") String name,
12171215
@Path("namespace") String namespace,
12181216
@QueryMap DeleteNamespacedConfiguration queryParameters);
@@ -1458,7 +1456,7 @@ public ReplaceNamespacedConfiguration fieldManager(String fieldManager) {
14581456
@Headers({
14591457
"Accept: */*"
14601458
})
1461-
KubernetesCall<Status> deleteCollectionNamespacedSubscription(
1459+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(
14621460
@Path("namespace") String namespace);
14631461

14641462
/**
@@ -1473,7 +1471,7 @@ KubernetesCall<Status> deleteCollectionNamespacedSubscription(
14731471
@Headers({
14741472
"Accept: */*"
14751473
})
1476-
KubernetesCall<Status> deleteCollectionNamespacedSubscription(
1474+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedSubscription(
14771475
@Path("namespace") String namespace,
14781476
@QueryMap DeleteCollectionNamespacedSubscription queryParameters);
14791477

@@ -1750,10 +1748,10 @@ public CreateNamespacedSubscription fieldManager(String fieldManager) {
17501748
"Content-Type: application/json",
17511749
"Accept: */*"
17521750
})
1753-
KubernetesCall<Status> deleteNamespacedSubscription(
1751+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedSubscription(
17541752
@Path("name") String name,
17551753
@Path("namespace") String namespace,
1756-
@Body DeleteOptions body);
1754+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body);
17571755

17581756
/**
17591757
* delete a Subscription
@@ -1770,7 +1768,7 @@ KubernetesCall<Status> deleteNamespacedSubscription(
17701768
"Content-Type: application/json",
17711769
"Accept: */*"
17721770
})
1773-
KubernetesCall<Status> deleteNamespacedSubscription(
1771+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedSubscription(
17741772
@Path("name") String name,
17751773
@Path("namespace") String namespace);
17761774

@@ -1789,10 +1787,10 @@ KubernetesCall<Status> deleteNamespacedSubscription(
17891787
"Content-Type: application/json",
17901788
"Accept: */*"
17911789
})
1792-
KubernetesCall<Status> deleteNamespacedSubscription(
1790+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedSubscription(
17931791
@Path("name") String name,
17941792
@Path("namespace") String namespace,
1795-
@Body DeleteOptions body,
1793+
@Body com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions body,
17961794
@QueryMap DeleteNamespacedSubscription queryParameters);
17971795

17981796
/**
@@ -1810,7 +1808,7 @@ KubernetesCall<Status> deleteNamespacedSubscription(
18101808
"Content-Type: application/json",
18111809
"Accept: */*"
18121810
})
1813-
KubernetesCall<Status> deleteNamespacedSubscription(
1811+
KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteNamespacedSubscription(
18141812
@Path("name") String name,
18151813
@Path("namespace") String namespace,
18161814
@QueryMap DeleteNamespacedSubscription queryParameters);

apis/dapr/src/model/java/com/marcnuri/yakc/model/io/dapr/v1alpha1/ConfigurationSpec.java

+12
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.Model;
21+
import java.util.List;
2122
import lombok.AllArgsConstructor;
2223
import lombok.Builder;
2324
import lombok.Data;
2425
import lombok.NoArgsConstructor;
26+
import lombok.Singular;
2527
import lombok.ToString;
2628

2729
/**
@@ -39,6 +41,13 @@ public class ConfigurationSpec implements Model {
3941
@JsonProperty("accessControl")
4042
private ConfigurationSpecAccessControl accessControl;
4143

44+
@JsonProperty("api")
45+
private ConfigurationSpecApi api;
46+
47+
@JsonProperty("features")
48+
@Singular(value = "addToFeatures", ignoreNullCollections = true)
49+
private List<ConfigurationSpecFeatures> features;
50+
4251
@JsonProperty("httpPipeline")
4352
private ConfigurationSpecHttpPipeline httpPipeline;
4453

@@ -48,6 +57,9 @@ public class ConfigurationSpec implements Model {
4857
@JsonProperty("mtls")
4958
private ConfigurationSpecMtls mtls;
5059

60+
@JsonProperty("nameResolution")
61+
private ConfigurationSpecNameResolution nameResolution;
62+
5163
@JsonProperty("secrets")
5264
private ConfigurationSpecSecrets secrets;
5365

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2020 Marc Nuri
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.marcnuri.yakc.model.io.dapr.v1alpha1;
18+
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.marcnuri.yakc.model.Model;
21+
import java.util.List;
22+
import lombok.AllArgsConstructor;
23+
import lombok.Builder;
24+
import lombok.Data;
25+
import lombok.NoArgsConstructor;
26+
import lombok.Singular;
27+
import lombok.ToString;
28+
29+
/**
30+
* APISpec describes the configuration for Dapr APIs
31+
*/
32+
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
33+
@Builder(toBuilder = true, builderClassName = "Builder")
34+
@AllArgsConstructor
35+
@NoArgsConstructor
36+
@Data
37+
@ToString
38+
public class ConfigurationSpecApi implements Model {
39+
40+
41+
@JsonProperty("allowed")
42+
@Singular(value = "addToAllowed", ignoreNullCollections = true)
43+
private List<ConfigurationSpecApiAllowed> allowed;
44+
45+
}
46+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright 2020 Marc Nuri
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.marcnuri.yakc.model.io.dapr.v1alpha1;
18+
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.marcnuri.yakc.model.Model;
21+
import lombok.AllArgsConstructor;
22+
import lombok.Builder;
23+
import lombok.Data;
24+
import lombok.NoArgsConstructor;
25+
import lombok.NonNull;
26+
import lombok.ToString;
27+
28+
/**
29+
* APIAccessRule describes an access rule for allowing a Dapr API to be enabled and accessible by an app
30+
*/
31+
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
32+
@Builder(toBuilder = true, builderClassName = "Builder")
33+
@AllArgsConstructor
34+
@NoArgsConstructor
35+
@Data
36+
@ToString
37+
public class ConfigurationSpecApiAllowed implements Model {
38+
39+
40+
@NonNull
41+
@JsonProperty("name")
42+
private String name;
43+
44+
@JsonProperty("protocol")
45+
private String protocol;
46+
47+
@NonNull
48+
@JsonProperty("version")
49+
private String version;
50+
51+
}
52+

0 commit comments

Comments
 (0)