Skip to content

Commit 94b1b86

Browse files
committed
feat: Upgraded Istio API to 1.8.0
1 parent 6fa0c13 commit 94b1b86

40 files changed

+1733
-69
lines changed

apis/istio/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-
"istio-1.7.4.json"
24+
"istio-1.7.4.json",
25+
"istio-1.8.0.json"
2526
)
2627
def availableSchemas = availableSchemaNames.stream()
2728
.map { s -> new File(schemaDir, s) }

apis/istio/schema/istio-1.8.0.json

+1
Large diffs are not rendered by default.

apis/istio/src/api/java/com/marcnuri/yakc/api/networkingistioio/v1alpha3/NetworkingIstioIoV1alpha3Api.java

+870
Large diffs are not rendered by default.

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/DestinationRuleList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class DestinationRuleList implements Model, ListModel<DestinationRule> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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.istio.networking.v1alpha3;
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.ToString;
26+
27+
/**
28+
* ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
29+
*/
30+
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
31+
@Builder(toBuilder = true, builderClassName = "Builder")
32+
@AllArgsConstructor
33+
@NoArgsConstructor
34+
@Data
35+
@ToString
36+
public class DestinationRuleListMetadata implements Model {
37+
38+
39+
/**
40+
* continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
41+
*/
42+
@JsonProperty("continue")
43+
private String continues;
44+
45+
/**
46+
* remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is &#42;estimating&#42; the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
47+
*/
48+
@JsonProperty("remainingItemCount")
49+
private Number remainingItemCount;
50+
51+
/**
52+
* String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
53+
*/
54+
@JsonProperty("resourceVersion")
55+
private String resourceVersion;
56+
57+
/**
58+
* selfLink is a URL representing this object. Populated by the system. Read-only.<br><p> <br><p> DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.
59+
*/
60+
@JsonProperty("selfLink")
61+
private String selfLink;
62+
63+
}
64+

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/DestinationRuleSpecTrafficPolicyConnectionPoolHttp.java

+6
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,11 @@ public class DestinationRuleSpecTrafficPolicyConnectionPoolHttp implements Model
6969
@JsonProperty("maxRetries")
7070
private Number maxRetries;
7171

72+
/**
73+
* If set to true, client protocol will be preserved while initiating connection to backend.
74+
*/
75+
@JsonProperty("useClientProtocol")
76+
private Boolean useClientProtocol;
77+
7278
}
7379

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/EnvoyFilter.java

-25
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@
1616

1717
package com.marcnuri.yakc.model.io.istio.networking.v1alpha3;
1818

19-
import com.fasterxml.jackson.annotation.JsonProperty;
2019
import com.marcnuri.yakc.model.Model;
21-
import com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta;
2220
import lombok.AllArgsConstructor;
2321
import lombok.Builder;
2422
import lombok.Data;
25-
import lombok.NoArgsConstructor;
2623
import lombok.ToString;
2724

2825
/**
@@ -31,32 +28,10 @@
3128
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
3229
@Builder(toBuilder = true, builderClassName = "Builder")
3330
@AllArgsConstructor
34-
@NoArgsConstructor
3531
@Data
3632
@ToString
3733
public class EnvoyFilter implements Model {
3834

3935

40-
/**
41-
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
42-
*/
43-
@JsonProperty("apiVersion")
44-
private String apiVersion;
45-
46-
/**
47-
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
48-
*/
49-
@JsonProperty("kind")
50-
private String kind;
51-
52-
@JsonProperty("metadata")
53-
private ObjectMeta metadata;
54-
55-
@JsonProperty("spec")
56-
private EnvoyFilterSpec spec;
57-
58-
@JsonProperty("status")
59-
private Object status;
60-
6136
}
6237

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/EnvoyFilterList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class EnvoyFilterList implements Model, ListModel<EnvoyFilter> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/GatewayList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class GatewayList implements Model, ListModel<Gateway> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/ServiceEntryList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class ServiceEntryList implements Model, ListModel<ServiceEntry> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/SidecarList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class SidecarList implements Model, ListModel<Sidecar> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/SidecarSpec.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class SidecarSpec implements Model {
5050
private SidecarSpecOutboundTrafficPolicy outboundTrafficPolicy;
5151

5252
@JsonProperty("workloadSelector")
53-
private EnvoyFilterSpecWorkloadSelector workloadSelector;
53+
private SidecarSpecWorkloadSelector workloadSelector;
5454

5555
}
5656

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.istio.networking.v1alpha3;
18+
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.marcnuri.yakc.model.Model;
21+
import java.util.Map;
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+
*
31+
*/
32+
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
33+
@Builder(toBuilder = true, builderClassName = "Builder")
34+
@AllArgsConstructor
35+
@NoArgsConstructor
36+
@Data
37+
@ToString
38+
public class SidecarSpecWorkloadSelector implements Model {
39+
40+
41+
@JsonProperty("labels")
42+
@Singular(value = "putInLabels", ignoreNullCollections = true)
43+
private Map<String, String> labels;
44+
45+
}
46+

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/VirtualServiceList.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.ListModel;
2121
import com.marcnuri.yakc.model.Model;
22-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.HTTPAPISpecBindingListMetadata;
2322
import java.util.List;
2423
import lombok.AllArgsConstructor;
2524
import lombok.Builder;
@@ -62,7 +61,7 @@ public class VirtualServiceList implements Model, ListModel<VirtualService> {
6261
private String kind;
6362

6463
@JsonProperty("metadata")
65-
private HTTPAPISpecBindingListMetadata metadata;
64+
private DestinationRuleListMetadata metadata;
6665

6766
}
6867

apis/istio/src/model/java/com/marcnuri/yakc/model/io/istio/networking/v1alpha3/VirtualServiceSpecCorsPolicy.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.marcnuri.yakc.model.Model;
21-
import com.marcnuri.yakc.model.io.istio.config.v1alpha2.QuotaSpecSpecClause;
2221
import java.util.List;
2322
import lombok.AllArgsConstructor;
2423
import lombok.Builder;
@@ -65,7 +64,7 @@ public class VirtualServiceSpecCorsPolicy implements Model {
6564
*/
6665
@JsonProperty("allowOrigins")
6766
@Singular(value = "addToAllowOrigins", ignoreNullCollections = true)
68-
private List<QuotaSpecSpecClause> allowOrigins;
67+
private List<VirtualServiceSpecCorsPolicyAllowOrigins> allowOrigins;
6968

7069
@JsonProperty("exposeHeaders")
7170
@Singular(value = "addToExposeHeaders", ignoreNullCollections = true)
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.istio.networking.v1alpha3;
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.ToString;
26+
27+
/**
28+
*
29+
*/
30+
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
31+
@Builder(toBuilder = true, builderClassName = "Builder")
32+
@AllArgsConstructor
33+
@NoArgsConstructor
34+
@Data
35+
@ToString
36+
public class VirtualServiceSpecCorsPolicyAllowOrigins implements Model {
37+
38+
39+
@JsonProperty("exact")
40+
private String exact;
41+
42+
@JsonProperty("prefix")
43+
private String prefix;
44+
45+
/**
46+
* RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
47+
*/
48+
@JsonProperty("regex")
49+
private String regex;
50+
51+
}
52+

0 commit comments

Comments
 (0)