Skip to content

Commit 711482c

Browse files
rohanKanojiamanusa
authored andcommitted
fix (kubernetes-model-generator) : Update Kubernetes Model to v1.25.0
+ Update Kubernetes Model to v1.25.0 + Add autoscaling/v2 HorizontalPodAutoscaler model and DSL + Force `containerd/containerd`, `docker/distribution` and `opencontainers/image-spec` to not use vulnerable versions (#4327) Signed-off-by: Rohan Kumar <[email protected]>
1 parent 6498e28 commit 711482c

File tree

163 files changed

+12932
-1483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+12932
-1483
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Fix #4243: Update Tekton pipeline model to v0.39.0
1717
* Fix #4243: Update Tekton triggers model to v0.20.2
1818
* Fix #4383: bump snakeyaml from 1.30 to 1.31
19+
* Fix #4347: Update Kubernetes Model to v1.25.0
1920

2021
#### New Features
2122
* Fix #4398: add annotation @PreserveUnknownFields for marking generated field have `x-kubernetes-preserve-unknown-fields: true` defined
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright (C) 2015 Red Hat, Inc.
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+
package io.fabric8.kubernetes.client;
17+
18+
import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler;
19+
import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList;
20+
import io.fabric8.kubernetes.client.dsl.MixedOperation;
21+
import io.fabric8.kubernetes.client.dsl.Resource;
22+
23+
public interface V2AutoscalingAPIGroupDSL extends Client {
24+
MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, Resource<HorizontalPodAutoscaler>> horizontalPodAutoscalers();
25+
}

kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/dsl/AutoscalingAPIGroupDSL.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@
1818

1919
import io.fabric8.kubernetes.client.Client;
2020
import io.fabric8.kubernetes.client.V1AutoscalingAPIGroupDSL;
21+
import io.fabric8.kubernetes.client.V2AutoscalingAPIGroupDSL;
2122
import io.fabric8.kubernetes.client.V2beta1AutoscalingAPIGroupDSL;
2223
import io.fabric8.kubernetes.client.V2beta2AutoscalingAPIGroupDSL;
2324

2425
public interface AutoscalingAPIGroupDSL extends Client {
26+
V2AutoscalingAPIGroupDSL v2();
27+
2528
V1AutoscalingAPIGroupDSL v1();
29+
2630
V2beta1AutoscalingAPIGroupDSL v2beta1();
31+
2732
V2beta2AutoscalingAPIGroupDSL v2beta2();
2833
}

kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/dsl/FlowControlAPIGroupDSL.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919

2020
public interface FlowControlAPIGroupDSL extends Client {
2121
V1beta1FlowControlAPIGroupDSL v1beta1();
22+
23+
V1beta2FlowControlAPIGroupDSL v1beta2();
2224
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright (C) 2015 Red Hat, Inc.
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+
package io.fabric8.kubernetes.client.dsl;
17+
18+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.FlowSchema;
19+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.FlowSchemaList;
20+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.PriorityLevelConfiguration;
21+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.PriorityLevelConfigurationList;
22+
import io.fabric8.kubernetes.client.Client;
23+
24+
public interface V1beta2FlowControlAPIGroupDSL extends Client {
25+
/**
26+
* DSL entrypoint for flowcontrol.apiserver.k8s.io/v1beta2 FlowSchema
27+
*
28+
* @return {@link NonNamespaceOperation} for FlowSchema resource
29+
*/
30+
NonNamespaceOperation<FlowSchema, FlowSchemaList, Resource<FlowSchema>> flowSchema();
31+
32+
/**
33+
* DSL entrypoint for flowcontrol.apiserver.k8s.io/v1beta2 PriorityLevelConfiguration
34+
*
35+
* @return {@link NonNamespaceOperation} for PriorityLevelConfiguration resource
36+
*/
37+
NonNamespaceOperation<PriorityLevelConfiguration, PriorityLevelConfigurationList, Resource<PriorityLevelConfiguration>> priorityLevelConfigurations();
38+
}

kubernetes-client/src/main/java/io/fabric8/kubernetes/client/AutoscalingAPIGroupClient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020

2121
public class AutoscalingAPIGroupClient extends ClientAdapter<AutoscalingAPIGroupClient> implements AutoscalingAPIGroupDSL {
2222

23+
@Override
24+
public V2AutoscalingAPIGroupDSL v2() {
25+
return adapt(V2AutoscalingAPIGroupClient.class);
26+
}
27+
2328
@Override
2429
public V1AutoscalingAPIGroupDSL v1() {
2530
return adapt(V1AutoscalingAPIGroupClient.class);

kubernetes-client/src/main/java/io/fabric8/kubernetes/client/DefaultKubernetesClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
import io.fabric8.kubernetes.client.dsl.V1beta1FlowControlAPIGroupDSL;
113113
import io.fabric8.kubernetes.client.dsl.V1beta1PolicyAPIGroupDSL;
114114
import io.fabric8.kubernetes.client.dsl.V1beta1SchedulingAPIGroupDSL;
115+
import io.fabric8.kubernetes.client.dsl.V1beta2FlowControlAPIGroupDSL;
115116
import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext;
116117
import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation;
117118
import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl;
@@ -179,6 +180,7 @@ public DefaultKubernetesClient(HttpClient httpClient, Config config, ExecutorSup
179180
this.getAdapters().registerClient(ApiextensionsAPIGroupDSL.class, new ApiextensionsAPIGroupClient());
180181
this.getAdapters().registerClient(AuthorizationAPIGroupDSL.class, new AuthorizationAPIGroupClient());
181182
this.getAdapters().registerClient(V1AutoscalingAPIGroupDSL.class, new V1AutoscalingAPIGroupClient());
183+
this.getAdapters().registerClient(V2AutoscalingAPIGroupDSL.class, new V2AutoscalingAPIGroupClient());
182184
this.getAdapters().registerClient(V2beta1AutoscalingAPIGroupDSL.class, new V2beta1AutoscalingAPIGroupClient());
183185
this.getAdapters().registerClient(V2beta2AutoscalingAPIGroupDSL.class, new V2beta2AutoscalingAPIGroupClient());
184186
this.getAdapters().registerClient(BatchAPIGroupDSL.class, new BatchAPIGroupClient());
@@ -190,6 +192,7 @@ public DefaultKubernetesClient(HttpClient httpClient, Config config, ExecutorSup
190192
this.getAdapters().registerClient(V1beta1EventingAPIGroupDSL.class, new V1beta1EventingAPIGroupClient());
191193
this.getAdapters().registerClient(FlowControlAPIGroupDSL.class, new FlowControlAPIGroupClient());
192194
this.getAdapters().registerClient(V1beta1FlowControlAPIGroupDSL.class, new V1beta1FlowControlAPIGroupClient());
195+
this.getAdapters().registerClient(V1beta2FlowControlAPIGroupDSL.class, new V1beta2FlowControlAPIGroupClient());
193196
this.getAdapters().registerClient(MetricAPIGroupDSL.class, new MetricAPIGroupClient());
194197
this.getAdapters().registerClient(NetworkAPIGroupDSL.class, new NetworkAPIGroupClient());
195198
this.getAdapters().registerClient(PolicyAPIGroupDSL.class, new PolicyAPIGroupClient());

kubernetes-client/src/main/java/io/fabric8/kubernetes/client/FlowControlAPIGroupClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import io.fabric8.kubernetes.client.dsl.FlowControlAPIGroupDSL;
1919
import io.fabric8.kubernetes.client.dsl.V1beta1FlowControlAPIGroupDSL;
20+
import io.fabric8.kubernetes.client.dsl.V1beta2FlowControlAPIGroupDSL;
2021
import io.fabric8.kubernetes.client.extension.ClientAdapter;
2122

2223
public class FlowControlAPIGroupClient extends ClientAdapter<FlowControlAPIGroupClient> implements FlowControlAPIGroupDSL {
@@ -26,6 +27,11 @@ public V1beta1FlowControlAPIGroupDSL v1beta1() {
2627
return adapt(V1beta1FlowControlAPIGroupClient.class);
2728
}
2829

30+
@Override
31+
public V1beta2FlowControlAPIGroupDSL v1beta2() {
32+
return adapt(V1beta2FlowControlAPIGroupClient.class);
33+
}
34+
2935
@Override
3036
public FlowControlAPIGroupClient newInstance() {
3137
return new FlowControlAPIGroupClient();
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright (C) 2015 Red Hat, Inc.
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+
package io.fabric8.kubernetes.client;
17+
18+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.FlowSchema;
19+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.FlowSchemaList;
20+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.PriorityLevelConfiguration;
21+
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta2.PriorityLevelConfigurationList;
22+
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation;
23+
import io.fabric8.kubernetes.client.dsl.Resource;
24+
import io.fabric8.kubernetes.client.dsl.V1beta2FlowControlAPIGroupDSL;
25+
import io.fabric8.kubernetes.client.extension.ClientAdapter;
26+
27+
public class V1beta2FlowControlAPIGroupClient extends ClientAdapter<V1beta2FlowControlAPIGroupClient>
28+
implements V1beta2FlowControlAPIGroupDSL {
29+
30+
@Override
31+
public NonNamespaceOperation<FlowSchema, FlowSchemaList, Resource<FlowSchema>> flowSchema() {
32+
return resources(FlowSchema.class, FlowSchemaList.class);
33+
}
34+
35+
@Override
36+
public NonNamespaceOperation<PriorityLevelConfiguration, PriorityLevelConfigurationList, Resource<PriorityLevelConfiguration>> priorityLevelConfigurations() {
37+
return resources(PriorityLevelConfiguration.class, PriorityLevelConfigurationList.class);
38+
}
39+
40+
@Override
41+
public V1beta2FlowControlAPIGroupClient newInstance() {
42+
return new V1beta2FlowControlAPIGroupClient();
43+
}
44+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright (C) 2015 Red Hat, Inc.
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+
package io.fabric8.kubernetes.client;
17+
18+
import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler;
19+
import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList;
20+
import io.fabric8.kubernetes.client.dsl.MixedOperation;
21+
import io.fabric8.kubernetes.client.dsl.Resource;
22+
import io.fabric8.kubernetes.client.extension.ClientAdapter;
23+
24+
public class V2AutoscalingAPIGroupClient extends ClientAdapter<V2AutoscalingAPIGroupClient>
25+
implements V2AutoscalingAPIGroupDSL {
26+
27+
@Override
28+
public MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, Resource<HorizontalPodAutoscaler>> horizontalPodAutoscalers() {
29+
return resources(HorizontalPodAutoscaler.class, HorizontalPodAutoscalerList.class);
30+
}
31+
32+
@Override
33+
public V2AutoscalingAPIGroupClient newInstance() {
34+
return new V2AutoscalingAPIGroupClient();
35+
}
36+
}

0 commit comments

Comments
 (0)