Skip to content

Commit

Permalink
Fix #2684: Update Kubernetes Model to v1.20.2
Browse files Browse the repository at this point in the history
- Updated Kubernetes Model to v1.20.2
- Remove kubernetes-model-settings as v1alpha1 PodPreset API got removed
  in Kubernetes 1.20.x
- Remove client.settings() DSL and related classes from KubernetesClient interface
- Added v1 models for scheduling, certificates, eventing and admission
  • Loading branch information
rohanKanojia authored and manusa committed Feb 1, 2021
1 parent 6d90187 commit aabc17e
Show file tree
Hide file tree
Showing 81 changed files with 3,337 additions and 8,092 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@

#### Dependency Upgrade
* update Tekton Triggers model to v0.11.1
* Fix #2684: Upgrade Kubernetes Model to v1.20.2

#### New Features

_**Note**_: Breaking changes in the API
- `client.settings()` DSL has been removed since PodPreset v1alpha1 API is no longer present in Kubernetes 1.20.x
- Classes in `io.fabric8.kubernetes.api.model.scheduling` have been moved to `io.fabric8.kubernetes.api.model.scheduling.v1` and `io.fabric8.kubernetes.api.model.scheduling.v1beta1`
- Classes in `io.fabric8.kubernetes.api.model.admission` have been moved to `io.fabric8.kubernetes.api.model.admission.v1` and `io.fabric8.kubernetes.api.model.admission.v1beta1`
- Classes in `io.fabric8.kubernetes.api.model.certificates` have been moved to `io.fabric8.kubernetes.api.model.certificates.v1` and `io.fabric8.kubernetes.api.model.certificates.v1beta1`
- Classes in `io.fabric8.kubernetes.api.model.events` have been moved to `io.fabric8.kubernetes.api.model.events.v1` and `io.fabric8.kubernetes.api.model.events.v1beta1`

### 5.0.1 (2021-01-27)

#### Bugs
Expand Down
4 changes: 0 additions & 4 deletions kubernetes-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-scheduling</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-settings</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-storageclass</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@ResourceSelector("metrics.properties"),
@ResourceSelector("policy.properties"),
@ResourceSelector("scheduling.properties"),
@ResourceSelector("settings.properties"),
@ResourceSelector("storage.properties"),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.api.model.ServiceAccount;
import io.fabric8.kubernetes.api.model.ServiceAccountList;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.authentication.TokenReview;
import io.fabric8.kubernetes.api.model.coordination.v1.Lease;
import io.fabric8.kubernetes.api.model.coordination.v1.LeaseList;
Expand Down Expand Up @@ -557,12 +557,6 @@ public AutoscalingAPIGroupDSL autoscaling() {
@Override
public RbacAPIGroupDSL rbac() { return adapt(RbacAPIGroupClient.class); }

/**
* {@inheritDoc}
*/
@Override
public SettingsAPIGroupDSL settings() { return adapt(SettingsAPIGroupClient.class); }

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.api.model.ServiceAccount;
import io.fabric8.kubernetes.api.model.ServiceAccountList;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.authentication.TokenReview;
import io.fabric8.kubernetes.api.model.coordination.v1.Lease;
import io.fabric8.kubernetes.api.model.coordination.v1.LeaseList;
Expand Down Expand Up @@ -271,13 +271,6 @@ public interface KubernetesClient extends Client {
*/
StorageAPIGroupDSL storage();

/**
* API entrypoint for kubernetes resources with APIGroup settings/v1alpha1
*
* @return SettingsAPIGroupDSL which offers entrypoint to specific resources in this APIGroup
*/
SettingsAPIGroupDSL settings();

/**
* API entrypoint for kubernetes resources with APIGroup batch/v1beta1
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.scheduling.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.PriorityClassList;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClassList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.SchedulingAPIGroupDSL;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package io.fabric8.kubernetes.client.dsl;

import io.fabric8.kubernetes.api.model.scheduling.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.PriorityClassList;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClassList;
import io.fabric8.kubernetes.client.Client;

public interface SchedulingAPIGroupDSL extends Client {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition;
import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionList;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.authentication.TokenReview;
import io.fabric8.kubernetes.api.model.coordination.v1.Lease;
import io.fabric8.kubernetes.api.model.coordination.v1.LeaseList;
Expand Down Expand Up @@ -98,7 +98,6 @@
import io.fabric8.kubernetes.client.dsl.RollableScalableResource;
import io.fabric8.kubernetes.client.dsl.SchedulingAPIGroupDSL;
import io.fabric8.kubernetes.client.dsl.ServiceResource;
import io.fabric8.kubernetes.client.dsl.SettingsAPIGroupDSL;
import io.fabric8.kubernetes.client.dsl.StorageAPIGroupDSL;
import io.fabric8.kubernetes.client.dsl.V1APIGroupDSL;
import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext;
Expand Down Expand Up @@ -390,9 +389,6 @@ public AutoscalingAPIGroupDSL autoscaling() {
@Override
public StorageAPIGroupDSL storage() { return delegate.storage(); }

@Override
public SettingsAPIGroupDSL settings() { return delegate.settings(); }

@Override
public BatchAPIGroupDSL batch() { return delegate.batch(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ io.fabric8.kubernetes.client.NetworkAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.PolicyAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.RbacAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.SchedulingAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.SettingsAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.StorageAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.V1APIGroupExtensionAdapter
io.fabric8.kubernetes.client.V1ApiextensionsAPIGroupExtensionAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import io.fabric8.kubernetes.api.model.authorization.v1.SubjectAccessReview;
import io.fabric8.kubernetes.api.model.batch.CronJob;
import io.fabric8.kubernetes.api.model.batch.Job;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.coordination.v1.Lease;
import io.fabric8.kubernetes.api.model.discovery.EndpointSlice;
import io.fabric8.kubernetes.api.model.extensions.Ingress;
Expand All @@ -59,7 +59,7 @@
import io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding;
import io.fabric8.kubernetes.api.model.rbac.Role;
import io.fabric8.kubernetes.api.model.rbac.RoleBinding;
import io.fabric8.kubernetes.api.model.scheduling.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClass;
import io.fabric8.kubernetes.api.model.storage.StorageClass;
import io.fabric8.kubernetes.api.model.storage.VolumeAttachment;
import io.fabric8.kubernetes.api.model.storage.v1beta1.CSIDriver;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import io.fabric8.kubernetes.api.model.ContainerBuilder;
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.api.model.scheduling.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.PriorityClassBuilder;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClass;
import io.fabric8.kubernetes.api.model.scheduling.v1beta1.PriorityClassBuilder;
import io.fabric8.kubernetes.client.ConfigBuilder;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package io.fabric8.kubernetes;

import io.fabric8.commons.ClusterEntity;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequestBuilder;
import io.fabric8.kubernetes.api.model.certificates.CertificateSigningRequestList;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestBuilder;
import io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList;
import io.fabric8.kubernetes.client.KubernetesClient;
import org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes;
import org.arquillian.cube.requirement.ArquillianConditionalRunner;
Expand Down
2 changes: 0 additions & 2 deletions kubernetes-model-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
[![javadoc](https://javadoc.io/badge2/io.fabric8/kubernetes-model-rbac/javadoc.svg)](https://javadoc.io/doc/io.fabric8/kubernetes-model-rbac)
* kubernetes-model-scheduling: [![Maven Central](https://img.shields.io/maven-central/v/io.fabric8/kubernetes-model-scheduling.svg?maxAge=2592000)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.fabric8%20a%3Akubernetes-model-scheduling)
[![javadoc](https://javadoc.io/badge2/io.fabric8/kubernetes-model-scheduling/javadoc.svg)](https://javadoc.io/doc/io.fabric8/kubernetes-model-scheduling)
* kubernetes-model-settings: [![Maven Central](https://img.shields.io/maven-central/v/io.fabric8/kubernetes-model-settings.svg?maxAge=2592000)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.fabric8%20a%3Akubernetes-model-settings)
[![javadoc](https://javadoc.io/badge2/io.fabric8/kubernetes-model-settings/javadoc.svg)](https://javadoc.io/doc/io.fabric8/kubernetes-model-settings)
* kubernetes-model-storageclass: [![Maven Central](https://img.shields.io/maven-central/v/io.fabric8/kubernetes-model-storageclass.svg?maxAge=2592000)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.fabric8%20a%3Akubernetes-model-storageclass)
[![javadoc](https://javadoc.io/badge2/io.fabric8/kubernetes-model-storageclass/javadoc.svg)](https://javadoc.io/doc/io.fabric8/kubernetes-model-storageclass)
* kubernetes-model-node: [![Maven Central](https://img.shields.io/maven-central/v/io.fabric8/kubernetes-model-node.svg?maxAge=2592000)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.fabric8%20a%3Akubernetes-model-node)
Expand Down
1 change: 0 additions & 1 deletion kubernetes-model-generator/generateModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ declare -a modules=(
"kubernetes-model-node"
"kubernetes-model-policy"
"kubernetes-model-scheduling"
"kubernetes-model-settings"
"kubernetes-model-storageclass"
"openshift-model"
"openshift-model-operator"
Expand Down
Loading

0 comments on commit aabc17e

Please sign in to comment.