Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fabric8io/kubernetes-client into
Browse files Browse the repository at this point in the history
okhttp

# Conflicts:
#	kubernetes-itests/src/test/java/io/fabric8/kubernetes/CustomResourceDefinitionIT.java
  • Loading branch information
shawkins committed Nov 3, 2021
2 parents 0d0b45d + 52e2bed commit 33772fb
Show file tree
Hide file tree
Showing 55 changed files with 3,093 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
java: [8,11]
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup Java
uses: actions/setup-java@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Cache .m2 registry
uses: actions/cache@v2.1.6
with:
Expand All @@ -55,11 +55,11 @@ jobs:
kubernetes: [v1.22.1,v1.20.1,v1.19.2,v1.12.0]
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.4.2
with:
minikube version: v1.23.0
minikube version: v1.23.2
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=metrics-server --force'
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
openshift: [v3.11.0,v3.10.0]
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup OpenShift
uses: manusa/actions-setup-openshift@v1.1.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Build Project
run: |
./kubernetes-model-generator/generateModelDocker.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup Java 8
uses: actions/setup-java@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup Java 8
uses: actions/setup-java@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
SONAR_LOGIN_TOKEN: ${{ secrets.SONAR_LOGIN_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
java: [11]
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Setup Java
uses: actions/setup-java@v1
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Dependency Upgrade

#### New Features
* Fix #3430: Support Vertical Pod Autoscaler

#### _**Note**_: Breaking changes in the API

Expand Down
1 change: 0 additions & 1 deletion extensions/certmanager/generateModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#

declare -a modules=("generator-v1alpha2" "generator-v1alpha3" "generator-v1beta1" "generator-v1")
)

for module in ${modules[*]}
do
Expand Down
1 change: 1 addition & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<module>chaosmesh</module>
<module>camel-k</module>
<module>certmanager</module>
<module>verticalpodautoscaler</module>
</modules>

</project>
101 changes: 101 additions & 0 deletions extensions/verticalpodautoscaler/client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?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>verticalpodautoscaler-extension-pom</artifactId>
<version>5.10-SNAPSHOT</version>
</parent>

<artifactId>verticalpodautoscaler-client</artifactId>
<packaging>bundle</packaging>
<name>Fabric8 :: Vertical Pod Autoscaler :: Client</name>

<properties>
<osgi.require-capability>
osgi.extender;
filter:="(osgi.extender=osgi.serviceloader.registrar)"
</osgi.require-capability>
<osgi.import>
io.fabric8.kubernetes.api.builder,
!io.fabric8.verticalpodautoscaler.client.*,
*
</osgi.import>
<osgi.export>
io.fabric8.verticalpodautoscaler.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.sundr</groupId>
<artifactId>builder-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.sundr</groupId>
<artifactId>transform-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>verticalpodautoscaler-model-v1</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</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>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<useAgent>true</useAgent>
</configuration>
</plugin>
</plugins>
</build>

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

import io.fabric8.verticalpodautoscaler.client.dsl.V1APIGroupDSL;
import io.fabric8.kubernetes.client.*;
import io.fabric8.kubernetes.client.dsl.FunctionCallable;
import okhttp3.OkHttpClient;

public class DefaultVerticalPodAutoscalerClient extends BaseClient implements NamespacedVerticalPodAutoscalerClient {

public DefaultVerticalPodAutoscalerClient() {
super();
}

public DefaultVerticalPodAutoscalerClient(Config configuration) {
super(configuration);
}

public DefaultVerticalPodAutoscalerClient(OkHttpClient httpClient, Config configuration) {
super(httpClient, configuration);
}

@Override
public NamespacedVerticalPodAutoscalerClient inAnyNamespace() {
return inNamespace(null);
}

@Override
public NamespacedVerticalPodAutoscalerClient inNamespace(String namespace) {
Config updated = new ConfigBuilder(getConfiguration())
.withNamespace(namespace)
.build();

return new DefaultVerticalPodAutoscalerClient(getHttpClient(), updated);
}

@Override
public FunctionCallable<NamespacedVerticalPodAutoscalerClient> withRequestConfig(RequestConfig requestConfig) {
return new WithRequestCallable<>(this, requestConfig);
}

@Override
public V1APIGroupDSL v1() { return adapt(V1APIGroupClient.class); }

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* 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.verticalpodautoscaler.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 GenericVerticalPodAutoscalerClient<C extends Client> extends Client, VerticalPodAutoscalerClient,
Namespaceable<C>,
AnyNamespaceable<C>,
RequestConfigurable<C> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* 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.verticalpodautoscaler.client;

public interface NamespacedVerticalPodAutoscalerClient extends VerticalPodAutoscalerClient, GenericVerticalPodAutoscalerClient<NamespacedVerticalPodAutoscalerClient> {
}
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.verticalpodautoscaler.client;

import io.fabric8.kubernetes.client.BaseClient;
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.verticalpodautoscaler.client.dsl.V1APIGroupDSL;
import io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscaler;
import io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscalerCheckpoint;
import io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscalerCheckpointList;
import io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscalerList;
import okhttp3.OkHttpClient;

public class V1APIGroupClient extends BaseClient implements V1APIGroupDSL {
public V1APIGroupClient() {super();}

public V1APIGroupClient(OkHttpClient httpClient, final Config config) {
super(httpClient, config);
}

@Override
public MixedOperation<VerticalPodAutoscaler, VerticalPodAutoscalerList, Resource<VerticalPodAutoscaler>> verticalpodautoscalers() {
return Handlers.getOperation(VerticalPodAutoscaler.class, VerticalPodAutoscalerList.class, this.getHttpClient(), this.getConfiguration());
}

@Override
public MixedOperation<VerticalPodAutoscalerCheckpoint, VerticalPodAutoscalerCheckpointList, Resource<VerticalPodAutoscalerCheckpoint>> verticalpodautoscalercheckpoints() {
return Handlers.getOperation(VerticalPodAutoscalerCheckpoint.class, VerticalPodAutoscalerCheckpointList.class, this.getHttpClient(), this.getConfiguration());
}
}
Loading

0 comments on commit 33772fb

Please sign in to comment.