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

Release 0.1 #63

Merged
merged 5 commits into from
Aug 11, 2017
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ Add this dependency to your project's POM:
```xml
<dependency>
<groupId>io.kubernetes</groupId>
<artifactId>client-java</artifactId>
<version>1.0-SNAPSHOT</version>
<artifactId>client-java-util</artifactId>
<version>0.1</version>
<scope>compile</scope>
</dependency>
```

### Gradle users

```groovy
compile 'io.kubernetes:client-java-util:0.1'
```

### Others

At first generate the JAR by executing:
Expand All @@ -43,7 +49,7 @@ mvn package

Then manually install the following JARs:

* target/client-java-1.0-SNAPSHOT.jar
* target/client-java-0.2-SNAPSHOT.jar
* target/lib/*.jar

## Example
Expand Down
17 changes: 11 additions & 6 deletions examples/pom.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<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">
<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>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>client-java-examples</name>
<url>https://github.com/kubernetes-client/java</url>

<parent>
<groupId>io.kubernetes</groupId>
<artifactId>client-java</artifactId>
<version>0.2-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-api</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-util</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
33 changes: 8 additions & 25 deletions kubernetes/pom.xml
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-api</artifactId>
<packaging>jar</packaging>
<name>client-java-api</name>
<version>1.0-SNAPSHOT</version>
<url>https://github.com/swagger-api/swagger-codegen</url>
<version>0.2-SNAPSHOT</version>
<url>https://github.com/kubernetes-client/java</url>
<description>Swagger Java</description>
<scm>
<connection>scm:git:git@github.com:kubernetes-client/java.git</connection>
<developerConnection>scm:git:git@github.com:kubernetes-client/java.git</developerConnection>
<url>https://github.com/kubernetes-client/java</url>
</scm>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<name>The Kubernetes Authors</name>
<email>kubernetes-dev@googlegroups.com</email>
<organization>Kubernetes</organization>
<organizationUrl>https://kubernetes.io</organizationUrl>
</developer>
</developers>
<parent>
<groupId>io.kubernetes</groupId>
<artifactId>client-java</artifactId>
<version>0.2-SNAPSHOT</version>
</parent>

<build>
<plugins>
Expand Down
25 changes: 11 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<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">
<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>
<artifactId>client-java</artifactId>
<groupId>io.kubernetes</groupId>
<version>0.1-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Kubernetes Client API</name>
<url>https://github.com/kubernetes-client/java</url>
<description>Kubernetes Client Library</description>

<modules>
<module>kubernetes</module>
<module>examples</module>
<module>util</module>
<module>examples</module>
<module>kubernetes</module>
</modules>

<scm>
<connection>scm:git:git@github.com:kubernetes-client/java.git</connection>
<developerConnection>scm:git:git@github.com:kubernetes-client/java.git</developerConnection>
<url>https://github.com/kubernetes-client/java</url>
<tag>HEAD</tag>
</scm>

<prerequisites>
Expand Down Expand Up @@ -45,10 +46,12 @@
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
<layout>default</layout>
</repository>
</distributionManagement>

Expand All @@ -60,7 +63,7 @@
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>release</releaseProfiles>
<releaseProfiles>release-sign-artifacts</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
Expand All @@ -69,12 +72,6 @@
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>release</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
Expand Down
13 changes: 8 additions & 5 deletions util/pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<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">
<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>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-util</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>client-java-util</name>
<url>https://github.com/kubernetes-client/java</url>
<parent>
<groupId>io.kubernetes</groupId>
<artifactId>client-java</artifactId>
<version>0.2-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-api</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
Expand Down
5 changes: 2 additions & 3 deletions util/src/main/java/io/kubernetes/client/Attach.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Attach(ApiClient apiClient) {

/**
* Get the API client for these Attach operations.
* @returns The API client that will be used.
* @return The API client that will be used.
*/
public ApiClient getApiClient() {
return apiClient;
Expand Down Expand Up @@ -78,8 +78,7 @@ private String makePath(String namespace, String name, String container, boolean
*
* @param namespace The namespace of the Pod
* @param name The name of the Pod
* @param command The command to run
* @param stdin If true, pass a stdin stream into the container
* @param stdin If true, pass a stdin stream into the container
*/
public AttachResult attach(String namespace, String name, boolean stdin) throws ApiException, IOException {
return attach(namespace, name, null, stdin, false);
Expand Down
2 changes: 1 addition & 1 deletion util/src/main/java/io/kubernetes/client/Exec.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Exec(ApiClient apiClient) {

/**
* Get the API client for these exec operations.
* @returns The API client that will be used.
* @return The API client that will be used.
*/
public ApiClient getApiClient() {
return apiClient;
Expand Down
12 changes: 6 additions & 6 deletions util/src/main/java/io/kubernetes/client/util/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ public static ApiClient fromConfig(Reader input) {
/**
* Easy client creation, follows this plan
* <ul>
* <li>If $KUBECONFIG is defined, use that config file
* <li>If $HOME/.kube/confg can be found, use that.
* <li>If the in-cluster service account can be found, assume in cluster config.
* <li>Default to localhost:8080 as a last resort.
* <ul>
* <li>If $KUBECONFIG is defined, use that config file.</li>
* <li>If $HOME/.kube/confg can be found, use that.</li>
* <li>If the in-cluster service account can be found, assume in cluster config.</li>
* <li>Default to localhost:8080 as a last resort.</li>
* </ul>
*
* @returns The best APIClient given the previously described rules
* @return The best APIClient given the previously described rules
*/
public static ApiClient defaultClient() throws IOException {
String kubeConfig = System.getenv(ENV_KUBECONFIG);
Expand Down
4 changes: 2 additions & 2 deletions util/src/main/java/io/kubernetes/client/util/Watch.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public static class Response<T> {
* @param client the API client
* @param call the call object returned by api.{ListOperation}Call(...)
* method. Make sure watch flag is set in the call.
* @param watchType The type of the WatchResponse<T>. Use something like
* new TypeToken<Watch.Response<TYPENAME>>(){}.getType()
* @param watchType The type of the WatchResponse&lt;T&gt;. Use something like
* new TypeToken&lt;Watch.Response&lt;TYPENAME&gt;&gt;(){}.getType()
* @param <T> TYPENAME.
* @return Watch object on TYPENAME
* @throws ApiException on IO exceptions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void close() {
/**
* Get a specific input stream using its identifier
* @param stream The stream to return
* @returns The specified stream.
* @return The specified stream.
*/
public synchronized InputStream getInputStream(int stream) {
if (!input.containsKey(stream)) {
Expand All @@ -129,7 +129,7 @@ public synchronized InputStream getInputStream(int stream) {
/**
* Gets a specific output stream using it's identified
* @param stream The stream to return
* @returns The specified stream.
* @return The specified stream.
*/
public OutputStream getOutputStream(int stream) {
return new WebSocketOutputStream(stream);
Expand All @@ -139,7 +139,7 @@ public OutputStream getOutputStream(int stream) {
* Get the pipe to write data to a specific InputStream. This is called when
* new data is read from the web socket, to send the data on to the right stream.
* @param stream The stream to return
* @returns The specified stream.
* @return The specified stream.
*/
private synchronized OutputStream getSocketInputOutputStream(int stream) {
if (!output.containsKey(stream)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface Authenticator {
/**
* Get a token from this authenticator.
* @param config The configuration information for this authenticator
* @returns The new token, null of no such token can be found/generated
* @return The new token, null of no such token can be found/generated
*/
public String getToken(Map<String, Object> config);

Expand Down