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

Creating an api module #3654

Merged
merged 10 commits into from
Feb 10, 2022
Merged
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion doc/CHEATSHEET.md
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ GenericKubernetesResource result = client.genericKubernetesResources(resourceDef
```java

final CountDownLatch closeLatch = new CountDownLatch(1);
client.customResource(crdContext).inNamespace(namespace).watch(new Watcher<GenericKubernetesResource>() {
client.genericKubernetesResources(crdContext).inNamespace(namespace).watch(new Watcher<GenericKubernetesResource>() {
@Override
public void eventReceived(Action action, GenericKubernetesResource resource) {
logger.info("{}: {}", action, resource);
Expand Down
327 changes: 327 additions & 0 deletions kubernetes-client-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
<?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>kubernetes-client-project</artifactId>
<version>6.0-SNAPSHOT</version>
</parent>

<artifactId>kubernetes-client-api</artifactId>
<packaging>jar</packaging>
<name>Fabric8 :: Kubernetes :: Java Client API</name>

<properties>
<osgi.require-capability>
osgi.extender;
filter:="(osgi.extender=osgi.serviceloader.processor)",
</osgi.require-capability>
<osgi.import>
!android.util*,
*,
</osgi.import>
<osgi.export>
io.fabric8.kubernetes.client*;-noimport:=true,
io.fabric8.kubernetes.internal;-noimport:=true,
</osgi.export>
<osgi.private>
io.fabric8.kubernetes.client.internal
</osgi.private>
</properties>

<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-rbac</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-admissionregistration</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-apps</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-autoscaling</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-apiextensions</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-batch</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-certificates</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-coordination</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-discovery</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-events</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-extensions</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-flowcontrol</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-networking</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-metrics</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-policy</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-scheduling</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-storageclass</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-node</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-ext-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
<optional>true</optional>
</dependency>

<!-- Compile Only Dependencies -->
<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.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
<version>${scr.annotations.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<!-- Testing Dependencies -->
<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>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<!-- We cleanup system properties an env vars, so that we can test in a predictable env -->
<environmentVariables>
<KUBERNETES_MASTER />
<KUBERNETES_API_VERSION />
<KUBERNETES_TRUST_CERTIFICATES />
<KUBERNETES_CERTS_CA_FILE />
<KUBERNETES_CERTS_CA_DATA />
<KUBERNETES_CERTS_CLIENT_FILE />
<KUBERNETES_CERTS_CLIENT_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_FILE />
<KUBERNETES_CERTS_CLIENT_KEY_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_ALGO />
<KUBERNETES_CERTS_CLIENT_KEY_PASSPHRASE />
<KUBERNETES_AUTH_BASIC_USERNAME />
<KUBERNETES_AUTH_BASIC_PASSWORD />
<KUBERNETES_AUTH_TRYKUBECONFIG />
<KUBERNETES_AUTH_TRYSERVICEACCOUNT />
<KUBERNETES_AUTH_TOKEN />
<KUBERNETES_WATCH_RECONNECTINTERVAL />
<KUBERNETES_WATCH_RECONNECTLIMIT />
<KUBERNETES_REQUEST_TIMEOUT />
<KUBERNETES_MAX_CONCURRENT_REQUESTS_PER_HOST />
<KUBERNETES_NAMESPACE />
<KUBERNETES_TLS_VERSIONS />
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>resource-*.vm</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>${maven.scr.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>scr</goal>
</goals>
<configuration>
<specVersion>1.2</specVersion>
<strictMode>true</strictMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
<instructions>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Export-Package>${osgi.export}</Export-Package>
<Import-Package>${osgi.import}</Import-Package>
<DynamicImport-Package>${osgi.dynamic.import}</DynamicImport-Package>
<Require-Capability>${osgi.require-capability}</Require-Capability>
<Provide-Capability>${osgi.provide-capability}</Provide-Capability>
<Private-Package>${osgi.private}</Private-Package>
<Require-Bundle>${osgi.bundles}</Require-Bundle>
<Bundle-Activator>${osgi.activator}</Bundle-Activator>
<Export-Service>${osgi.export.service}</Export-Service>
</instructions>
<classifier>bundle</classifier>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* 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.kubernetes.client;

public final class Version {
public static String clientVersion() {
return "${project.version}";
}

private Version() {
}
}
Loading