Skip to content

Commit

Permalink
fix: adding a v1beta1 deprecation notice (6000)
Browse files Browse the repository at this point in the history
fix: adding a v1beta1 deprecation notice

closes: #5947
---
chore: added deprecation logs and warnings

Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
shawkins committed May 13, 2024
1 parent e3fa9c8 commit 74dac08
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#### _**Note**_: Breaking changes
* Fix #5960: The KubernetesSerializer will now by default serialize time related types to strings - rather than object, integer, number, or arrays of integer / number. If you are using these types in a custom object and were not including JsonFormat annotations to adjust the serialization they were likely being serialized in a non-standard way that would not be usable other Kubernetes clients, nor match the generated custom resource definition if one was being produced. Please open an issue if you need the previous behavior for whatever reason - there is a workaround by creating a customized KubernetesSerializer.
* `storagemigration.k8s.io/v1alpha1` `StorageVersionMigration` introduced in Kubernetes 1.30.0 is added to [kubernetes-model-storageclass](https://github.com/fabric8io/kubernetes-client/tree/main/kubernetes-model-generator/kubernetes-model-storageclass) module. A dedicated module hasn't been created for this new ApiGroup.
* Fix #5947: CRD generation using the v1beta1 version is deprecated. Please use only v1 instead.

### 6.12.1 (2024-04-18)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public CRDGenerator forCRDVersions(String... versions) {
s -> new CustomResourceHandler(resources, parallel));
break;
case io.fabric8.crd.generator.v1beta1.CustomResourceHandler.VERSION:
LOGGER.warn("CRD generator for v1beta1 is deprecated, consider using v1 instead.");
handlers.computeIfAbsent(io.fabric8.crd.generator.v1beta1.CustomResourceHandler.VERSION,
s -> new io.fabric8.crd.generator.v1beta1.CustomResourceHandler(resources, parallel));
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@

import java.util.Optional;

/**
* @deprecated Use {@link io.fabric8.crd.generator.v1.CustomResourceHandler} instead.
*/
@Deprecated
public class CustomResourceHandler extends AbstractCustomResourceHandler {

/**
* @deprecated Use {@link io.fabric8.crd.generator.v1.CustomResourceHandler#VERSION} instead.
*/
@Deprecated
public static final String VERSION = "v1beta1";

public CustomResourceHandler(Resources resources, boolean parallel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

import static io.fabric8.crd.generator.CRDGenerator.YAML_MAPPER;

/**
* @deprecated Use {@link io.fabric8.crd.generator.v1.JsonSchema} instead.
*/
@Deprecated
public class JsonSchema extends AbstractJsonSchema<JSONSchemaProps, JSONSchemaPropsBuilder> {

private static final JsonSchema instance = new JsonSchema();
Expand Down

0 comments on commit 74dac08

Please sign in to comment.