Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: io.open-cluster-management generated from OpenAPI schemas #6571

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ openapi-generate-java-classes:
cd extensions/knative/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/open-virtual-network && mvn $(MAVEN_ARGS) -N clean install
cd extensions/open-virtual-network/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/open-cluster-management && mvn $(MAVEN_ARGS) -N clean install
cd extensions/open-cluster-management/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/tekton && mvn $(MAVEN_ARGS) -N clean install
cd extensions/tekton/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/verticalpodautoscaler && mvn $(MAVEN_ARGS) -N clean install
Expand Down
37 changes: 37 additions & 0 deletions doc/MIGRATION-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Renamed machineconfig to machineconfiguration](#openshift-machineconfig-to-machineconfiguration)
- [Cert Manager Extension](#cert-manager-extension)
- [Istio Extension](#istio-extension)
- [Open Cluster Management Extension](#open-cluster-management-extension)
- [Open Virtual Network OVN Extension](#ovn-extension)
- [Tekton Extension](#tekton-extension)
- [Vertical Pod Autoscaler Extension](#vertical-pod-autoscaler-extension)
Expand Down Expand Up @@ -147,6 +148,42 @@ The following packages are now available:
- `io.fabric8.istio.api.api.security.v1beta1`
- `io.fabric8.istio.api.api.telemetry.v1alpha1`

### Open Cluster Management Extension <a href="#open-cluster-management-extension" id="open-cluster-management-extension"/>

All the model modules for the Open Cluster Management extension have been merged into a single module `io.fabric8:open-cluster-management`.

The following table contains the resulting package changes:

| Old Package | New Package |
|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| `io.fabric8.openclustermanagement.api.model.agent.v1` | `io.fabric8.openclustermanagement.api.model.agent.v1` |
| `io.fabric8.openclustermanagement.api.model.app.k8s.v1beta1` | Deprecated and removed |
| `io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.helmrelease.v1` | Deprecated and removed |
| `io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.placementrule.v1` | `io.fabric8.openclustermanagement.api.model.apps.v1` |
| `io.fabric8.openclustermanagement.api.model.multicloudoperatorschannel.apps.v1` | `io.fabric8.openclustermanagement.api.model.apps.v1` |
| `io.fabric8.openclustermanagement.api.model.cluster.v1` | `io.fabric8.openclustermanagement.api.model.cluster.v1` |
| `io.fabric8.openclustermanagement.api.model.cluster.v1alpha1` | `io.fabric8.openclustermanagement.api.model.cluster.v1alpha1` |
| `io.fabric8.openclustermanagement.api.model.cluster.v1beta1` | `io.fabric8.openclustermanagement.api.model.cluster.v1beta1` |
| `io.fabric8.openclustermanagement.api.model.discovery.v1alpha1` | `io.fabric8.openclustermanagement.api.model.discovery.v1alpha1` |
| `io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta1` | `io.fabric8.openclustermanagement.api.model.observability.v1beta1` |
| `io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta2` | `io.fabric8.openclustermanagement.api.model.observability.v1beta2` |
| `io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.shared` | `io.fabric8.openclustermanagement.api.model.shared` |
| `io.fabric8.openclustermanagement.api.model.multiclusterhub.operator.v1` | `io.fabric8.openclustermanagement.api.model.operator.v1` |
| `io.fabric8.openclustermanagement.api.model.operator.v1` | `io.fabric8.openclustermanagement.api.model.operator.v1` |
| `io.fabric8.openclustermanagement.api.model.multicloudintegration.apps.v1beta1` | Deprecated and removed |
| `io.fabric8.openclustermanagement.api.model.multicloudoperatorsplacementrule.apps.v1` | `io.fabric8.openclustermanagement.api.model.apps.v1` |
| `io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1` | `io.fabric8.openclustermanagement.api.model.policy.v1` |
| `io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1beta1` | `io.fabric8.openclustermanagement.api.model.policy.v1beta1` |
| `io.fabric8.openclustermanagement.api.model.multicloudoperatorsplacementrule.apps.v1` | `io.fabric8.openclustermanagement.api.model.apps.v1` |
| `io.fabric8.openclustermanagement.api.model.searchoperator.v1alpha1` | Deprecated and removed |

In addition, the following DSL entry-points have been removed to adapt the `io.fabric8:open-cluster-management-client` to the new model structure:
- `OpenClusterManagementAppsAPIGroupClient.helmReleases()`
- `OpenClusterManagementAppsAPIGroupClient.applications()`
- `OpenClusterManagementAppsAPIGroupClient.gitOpsClusters()`
- `OpenClusterManagementSearchAPIGroupDSL.searchCustomizations()`
- `OpenClusterManagementSearchAPIGroupDSL.searchOperators()`

### Open Virtual Network OVN Extension <a href="#ovn-extension" id="ovn-extension"/>

The modules and artifacts related to this extension have been renamed:
Expand Down
36 changes: 2 additions & 34 deletions extensions/open-cluster-management/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,39 +56,7 @@
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-apps-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-cluster-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-discovery-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-observability-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-operator-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-placementruleapps-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-policy-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-search-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-cluster-management-agent-model</artifactId>
<artifactId>open-cluster-management-model</artifactId>
</dependency>

<dependency>
Expand All @@ -101,7 +69,7 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.app.k8s.v1beta1.Application;
import io.fabric8.openclustermanagement.api.model.app.k8s.v1beta1.ApplicationList;
import io.fabric8.openclustermanagement.api.model.multicloudintegration.apps.v1beta1.GitOpsCluster;
import io.fabric8.openclustermanagement.api.model.multicloudintegration.apps.v1beta1.GitOpsClusterList;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorschannel.apps.v1.Channel;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorschannel.apps.v1.ChannelList;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorsplacementrule.apps.v1.PlacementRule;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorsplacementrule.apps.v1.PlacementRuleList;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.helmrelease.v1.HelmRelease;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.helmrelease.v1.HelmReleaseList;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.v1.Subscription;
import io.fabric8.openclustermanagement.api.model.multicloudoperatorssubscription.apps.v1.SubscriptionList;
import io.fabric8.openclustermanagement.api.model.apps.v1.Channel;
import io.fabric8.openclustermanagement.api.model.apps.v1.ChannelList;
import io.fabric8.openclustermanagement.api.model.apps.v1.PlacementRule;
import io.fabric8.openclustermanagement.api.model.apps.v1.PlacementRuleList;
import io.fabric8.openclustermanagement.api.model.apps.v1.Subscription;
import io.fabric8.openclustermanagement.api.model.apps.v1.SubscriptionList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementAppsAPIGroupDSL;

public class OpenClusterManagementAppsAPIGroupClient extends ClientAdapter<OpenClusterManagementAppsAPIGroupClient>
Expand All @@ -50,23 +44,8 @@ public MixedOperation<Subscription, SubscriptionList, Resource<Subscription>> su
return resources(Subscription.class, SubscriptionList.class);
}

@Override
public MixedOperation<HelmRelease, HelmReleaseList, Resource<HelmRelease>> helmReleases() {
return resources(HelmRelease.class, HelmReleaseList.class);
}

@Override
public MixedOperation<Application, ApplicationList, Resource<Application>> applications() {
return resources(Application.class, ApplicationList.class);
}

@Override
public MixedOperation<PlacementRule, PlacementRuleList, Resource<PlacementRule>> placementRules() {
return resources(PlacementRule.class, PlacementRuleList.class);
}

@Override
public MixedOperation<GitOpsCluster, GitOpsClusterList, Resource<GitOpsCluster>> gitOpsClusters() {
return resources(GitOpsCluster.class, GitOpsClusterList.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.cluster.v1.ManagedCluster;
import io.fabric8.openclustermanagement.api.model.cluster.v1.ManagedClusterList;
import io.fabric8.openclustermanagement.api.model.cluster.v1alpha1.Placement;
import io.fabric8.openclustermanagement.api.model.cluster.v1alpha1.PlacementDecision;
import io.fabric8.openclustermanagement.api.model.cluster.v1alpha1.PlacementDecisionList;
import io.fabric8.openclustermanagement.api.model.cluster.v1alpha1.PlacementList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.ManagedClusterSet;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.ManagedClusterSetBinding;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.ManagedClusterSetBindingList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.ManagedClusterSetList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.Placement;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.PlacementDecision;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.PlacementDecisionList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta1.PlacementList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta2.ManagedClusterSet;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta2.ManagedClusterSetBinding;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta2.ManagedClusterSetBindingList;
import io.fabric8.openclustermanagement.api.model.cluster.v1beta2.ManagedClusterSetList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementClustersAPIGroupDSL;

public class OpenClusterManagementClustersAPIGroupClient extends ClientAdapter<OpenClusterManagementClustersAPIGroupClient>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta1.ObservabilityAddon;
import io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta1.ObservabilityAddonList;
import io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta2.MultiClusterObservability;
import io.fabric8.openclustermanagement.api.model.multiclusterobservabilityoperator.apps.v1beta2.MultiClusterObservabilityList;
import io.fabric8.openclustermanagement.api.model.observability.v1beta1.ObservabilityAddon;
import io.fabric8.openclustermanagement.api.model.observability.v1beta1.ObservabilityAddonList;
import io.fabric8.openclustermanagement.api.model.observability.v1beta2.MultiClusterObservability;
import io.fabric8.openclustermanagement.api.model.observability.v1beta2.MultiClusterObservabilityList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementObservabilityAPIGroupDSL;

public class OpenClusterManagementObservabilityAPIGroupClient extends
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.multiclusterhub.operator.v1.MultiClusterHub;
import io.fabric8.openclustermanagement.api.model.multiclusterhub.operator.v1.MultiClusterHubList;
import io.fabric8.openclustermanagement.api.model.operator.v1.ClusterManager;
import io.fabric8.openclustermanagement.api.model.operator.v1.ClusterManagerList;
import io.fabric8.openclustermanagement.api.model.operator.v1.Klusterlet;
import io.fabric8.openclustermanagement.api.model.operator.v1.KlusterletList;
import io.fabric8.openclustermanagement.api.model.operator.v1.MultiClusterHub;
import io.fabric8.openclustermanagement.api.model.operator.v1.MultiClusterHubList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementOperatorAPIGroupDSL;

public class OpenClusterManagementOperatorAPIGroupClient extends ClientAdapter<OpenClusterManagementOperatorAPIGroupClient>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1.PlacementBinding;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1.PlacementBindingList;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1.Policy;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1.PolicyList;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1beta1.PolicyAutomation;
import io.fabric8.openclustermanagement.api.model.governancepolicypropagator.policy.v1beta1.PolicyAutomationList;
import io.fabric8.openclustermanagement.api.model.policy.v1.PlacementBinding;
import io.fabric8.openclustermanagement.api.model.policy.v1.PlacementBindingList;
import io.fabric8.openclustermanagement.api.model.policy.v1.Policy;
import io.fabric8.openclustermanagement.api.model.policy.v1.PolicyList;
import io.fabric8.openclustermanagement.api.model.policy.v1beta1.PolicyAutomation;
import io.fabric8.openclustermanagement.api.model.policy.v1beta1.PolicyAutomationList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementPolicyAPIGroupDSL;

public class OpenClusterManagementPolicyAPIGroupClient extends ClientAdapter<OpenClusterManagementPolicyAPIGroupClient>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.extension.ClientAdapter;
import io.fabric8.openclustermanagement.api.model.searchoperator.v1alpha1.SearchCustomization;
import io.fabric8.openclustermanagement.api.model.searchoperator.v1alpha1.SearchCustomizationList;
import io.fabric8.openclustermanagement.api.model.searchoperator.v1alpha1.SearchOperator;
import io.fabric8.openclustermanagement.api.model.searchoperator.v1alpha1.SearchOperatorList;
import io.fabric8.openclustermanagement.api.model.search.v1alpha1.Search;
import io.fabric8.openclustermanagement.api.model.search.v1alpha1.SearchList;
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementSearchAPIGroupDSL;

public class OpenClusterManagementSearchAPIGroupClient extends ClientAdapter<OpenClusterManagementSearchAPIGroupClient>
Expand All @@ -33,12 +31,7 @@ public OpenClusterManagementSearchAPIGroupClient newInstance() {
}

@Override
public MixedOperation<SearchCustomization, SearchCustomizationList, Resource<SearchCustomization>> searchCustomizations() {
return resources(SearchCustomization.class, SearchCustomizationList.class);
}

@Override
public MixedOperation<SearchOperator, SearchOperatorList, Resource<SearchOperator>> searchOperators() {
return resources(SearchOperator.class, SearchOperatorList.class);
public MixedOperation<Search, SearchList, Resource<Search>> searches() {
return resources(Search.class, SearchList.class);
}
}
Loading
Loading