forked from fabric8io/kubernetes-client
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fabric8io#3506: Add Extension for Open Cluster Management
Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
37bdcb2
commit 3f002eb
Showing
177 changed files
with
28,378 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2015 Red Hat, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management</artifactId> | ||
<version>5.12-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>open-cluster-management-client</artifactId> | ||
<packaging>bundle</packaging> | ||
<name>Fabric8 :: Open Cluster Management :: Client</name> | ||
|
||
<properties> | ||
<useIncrementalCompilation>false</useIncrementalCompilation> | ||
<osgi.require-capability> | ||
osgi.extender; | ||
filter:="(osgi.extender=osgi.serviceloader.registrar)" | ||
</osgi.require-capability> | ||
<osgi.import> | ||
io.fabric8.kubernetes.api.builder, | ||
!io.fabric8.openclustermanagement.client.*, | ||
* | ||
</osgi.import> | ||
<osgi.export> | ||
io.fabric8.openclustermanagement.client.* | ||
</osgi.export> | ||
<osgi.include.resources> | ||
/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter=target/classes/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter | ||
</osgi.include.resources> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-apps-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-cluster-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-discovery-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-observability-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-operator-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-placementruleapps-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-policy-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-search-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>open-cluster-management-agent-model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>kubernetes-client</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>io.sundr</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.sundr</groupId> | ||
<artifactId>builder-annotations</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.sundr</groupId> | ||
<artifactId>transform-annotations</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-migrationsupport</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
105 changes: 105 additions & 0 deletions
105
...main/java/io/fabric8/openclustermanagement/client/DefaultOpenClusterManagementClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.openclustermanagement.client; | ||
|
||
import io.fabric8.kubernetes.client.BaseClient; | ||
import io.fabric8.kubernetes.client.ClientContext; | ||
import io.fabric8.kubernetes.client.Config; | ||
import io.fabric8.kubernetes.client.ConfigBuilder; | ||
import io.fabric8.kubernetes.client.RequestConfig; | ||
import io.fabric8.kubernetes.client.WithRequestCallable; | ||
import io.fabric8.kubernetes.client.dsl.FunctionCallable; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementAgentAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementAppsAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementClustersAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementDiscoveryAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementOperatorAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementPolicyAPIGroupDSL; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementSearchAPIGroupDSL; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class DefaultOpenClusterManagementClient extends BaseClient implements NamespacedOpenClusterManagementClient { | ||
public DefaultOpenClusterManagementClient() { | ||
super(); | ||
} | ||
|
||
public DefaultOpenClusterManagementClient(Config configuration) { | ||
super(configuration); | ||
} | ||
|
||
public DefaultOpenClusterManagementClient(ClientContext clientContext) { | ||
super(clientContext); | ||
} | ||
|
||
@Override | ||
public NamespacedOpenClusterManagementClient inAnyNamespace() { | ||
return inNamespace(null); | ||
} | ||
|
||
@Override | ||
public NamespacedOpenClusterManagementClient inNamespace(String namespace) { | ||
Config updated = new ConfigBuilder(getConfiguration()) | ||
.withNamespace(namespace) | ||
.build(); | ||
|
||
return new DefaultOpenClusterManagementClient(newState(updated)); | ||
} | ||
|
||
@Override | ||
public FunctionCallable<NamespacedOpenClusterManagementClient> withRequestConfig(RequestConfig requestConfig) { | ||
return new WithRequestCallable<>(this, requestConfig); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementAppsAPIGroupDSL apps() { | ||
return adapt(OpenClusterManagementAppsAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementAgentAPIGroupDSL agents() { | ||
return adapt(OpenClusterManagementAgentAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementClustersAPIGroupDSL clusters() { | ||
return adapt(OpenClusterManagementClustersAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementDiscoveryAPIGroupDSL discovery() { | ||
return adapt(OpenClusterManagementDiscoveryAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementObservabilityAPIGroupClient observability() { | ||
return adapt(OpenClusterManagementObservabilityAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementOperatorAPIGroupDSL operator() { | ||
return adapt(OpenClusterManagementOperatorAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementPolicyAPIGroupDSL policy() { | ||
return adapt(OpenClusterManagementPolicyAPIGroupClient.class); | ||
} | ||
|
||
@Override | ||
public OpenClusterManagementSearchAPIGroupDSL search() { | ||
return adapt(OpenClusterManagementSearchAPIGroupClient.class); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...main/java/io/fabric8/openclustermanagement/client/GenericOpenClusterManagementClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.openclustermanagement.client; | ||
|
||
import io.fabric8.kubernetes.client.Client; | ||
import io.fabric8.kubernetes.client.dsl.AnyNamespaceable; | ||
import io.fabric8.kubernetes.client.dsl.Namespaceable; | ||
import io.fabric8.kubernetes.client.dsl.RequestConfigurable; | ||
|
||
public interface GenericOpenClusterManagementClient<C extends Client> extends Client, OpenClusterManagementClient, | ||
Namespaceable<C>, | ||
AnyNamespaceable<C>, | ||
RequestConfigurable<C> { | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
...n/java/io/fabric8/openclustermanagement/client/NamespacedOpenClusterManagementClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.openclustermanagement.client; | ||
|
||
|
||
public interface NamespacedOpenClusterManagementClient extends OpenClusterManagementClient, | ||
GenericOpenClusterManagementClient<NamespacedOpenClusterManagementClient> { | ||
} |
46 changes: 46 additions & 0 deletions
46
...ava/io/fabric8/openclustermanagement/client/OpenClusterManagementAgentAPIGroupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.openclustermanagement.client; | ||
|
||
import io.fabric8.kubernetes.client.BaseClient; | ||
import io.fabric8.kubernetes.client.ClientContext; | ||
import io.fabric8.kubernetes.client.Config; | ||
import io.fabric8.kubernetes.client.Handlers; | ||
import io.fabric8.kubernetes.client.dsl.MixedOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.openclustermanagement.api.model.agent.v1.KlusterletAddonConfig; | ||
import io.fabric8.openclustermanagement.api.model.agent.v1.KlusterletAddonConfigList; | ||
import io.fabric8.openclustermanagement.client.dsl.OpenClusterManagementAgentAPIGroupDSL; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class OpenClusterManagementAgentAPIGroupClient extends BaseClient implements OpenClusterManagementAgentAPIGroupDSL { | ||
public OpenClusterManagementAgentAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public OpenClusterManagementAgentAPIGroupClient(Config configuration) { | ||
super(configuration); | ||
} | ||
|
||
public OpenClusterManagementAgentAPIGroupClient(ClientContext clientContext) { | ||
super(clientContext); | ||
} | ||
|
||
@Override | ||
public MixedOperation<KlusterletAddonConfig, KlusterletAddonConfigList, Resource<KlusterletAddonConfig>> klusterletAddonConfigs() { | ||
return Handlers.getOperation(KlusterletAddonConfig.class, KlusterletAddonConfigList.class, this); | ||
} | ||
} |
Oops, something went wrong.