Skip to content

Commit

Permalink
Merge pull request fabric8io#2169 from rohanKanojia/pr/issue2015
Browse files Browse the repository at this point in the history
  • Loading branch information
fusesource-ci authored Apr 28, 2020
2 parents a97aeb9 + 68920ed commit 791fbac
Show file tree
Hide file tree
Showing 39 changed files with 2,666 additions and 1,555 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#### New Features
* Fix #2115: Keep tekton v1alpha1 api
* Fix #2002: DSL Support for PodTemplate
* Fix #2015: Add Support for v1, v2beta1, and v2beta2 apiVersions in case of HorizontalPodAutoscaler

### 4.9.1 (2020-04-17)
#### Bugs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,31 @@
*/
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.*;
import io.fabric8.kubernetes.client.dsl.internal.autoscaling.v2beta2.HorizontalPodAutoscalerOperationsImpl;
import okhttp3.OkHttpClient;

public class AutoscalingAPIGroupClient extends BaseClient implements AutoscalingAPIGroupDSL {

public AutoscalingAPIGroupClient() throws KubernetesClientException {
public AutoscalingAPIGroupClient() {
super();
}

public AutoscalingAPIGroupClient(OkHttpClient httpClient, final Config config) throws KubernetesClientException {
public AutoscalingAPIGroupClient(OkHttpClient httpClient, final Config config) {
super(httpClient, config);
}

public MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers() {
return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration());
@Override
public V1AutoscalingAPIGroupDSL v1() {
return adapt(V1AutoscalingAPIGroupClient.class);
}

@Override
public V2beta1AutoscalingAPIGroupDSL v2beta1() {
return adapt(V2beta1AutoscalingAPIGroupClient.class);
}

@Override
public V2beta2AutoscalingAPIGroupDSL v2beta2() {
return adapt(V2beta2AutoscalingAPIGroupClient.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v1.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.internal.autoscaling.v1.HorizontalPodAutoscalerOperationsImpl;
import okhttp3.OkHttpClient;

public class V1AutoscalingAPIGroupClient extends BaseClient implements V1AutoscalingAPIGroupDSL {

public V1AutoscalingAPIGroupClient() {
super();
}

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

public MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers() {
return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v1.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

public interface V1AutoscalingAPIGroupDSL extends Client {
MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* 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;

import okhttp3.OkHttpClient;

public class V1AutoscalingAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1AutoscalingAPIGroupClient> {

@Override
protected String getAPIGroupName() {
return "autoscaling/v1";
}

@Override
public Class<V1AutoscalingAPIGroupClient> getExtensionType() {
return V1AutoscalingAPIGroupClient.class;
}

@Override
protected V1AutoscalingAPIGroupClient newInstance(Client client) {
return new V1AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.internal.autoscaling.v2beta1.HorizontalPodAutoscalerOperationsImpl;
import okhttp3.OkHttpClient;

public class V2beta1AutoscalingAPIGroupClient extends BaseClient implements V2beta1AutoscalingAPIGroupDSL {

public V2beta1AutoscalingAPIGroupClient() {
super();
}

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

public MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers() {
return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

public interface V2beta1AutoscalingAPIGroupDSL extends Client {
MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* 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;

import okhttp3.OkHttpClient;

public class V2beta1AutoscalingAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V2beta1AutoscalingAPIGroupClient> {

@Override
protected String getAPIGroupName() {
return "autoscaling/v2beta1";
}

@Override
public Class<V2beta1AutoscalingAPIGroupClient> getExtensionType() {
return V2beta1AutoscalingAPIGroupClient.class;
}

@Override
protected V2beta1AutoscalingAPIGroupClient newInstance(Client client) {
return new V2beta1AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.internal.autoscaling.v2beta2.HorizontalPodAutoscalerOperationsImpl;
import okhttp3.OkHttpClient;

public class V2beta2AutoscalingAPIGroupClient extends BaseClient implements V2beta2AutoscalingAPIGroupDSL {

public V2beta2AutoscalingAPIGroupClient() {
super();
}

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

public MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers() {
return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* 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;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

public interface V2beta2AutoscalingAPIGroupDSL extends Client {
MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* 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;

import okhttp3.OkHttpClient;

public class V2beta2AutoscalingAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V2beta2AutoscalingAPIGroupClient> {

@Override
protected String getAPIGroupName() {
return "autoscaling/v2beta2";
}

@Override
public Class<V2beta2AutoscalingAPIGroupClient> getExtensionType() {
return V2beta2AutoscalingAPIGroupClient.class;
}

@Override
protected V2beta2AutoscalingAPIGroupClient newInstance(Client client) {
return new V2beta2AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

package io.fabric8.kubernetes.client.dsl;

import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.DoneableHorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler;
import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList;
import io.fabric8.kubernetes.client.Client;
import io.fabric8.kubernetes.client.V1AutoscalingAPIGroupDSL;
import io.fabric8.kubernetes.client.V2beta1AutoscalingAPIGroupDSL;
import io.fabric8.kubernetes.client.V2beta2AutoscalingAPIGroupDSL;

public interface AutoscalingAPIGroupDSL extends Client {
MixedOperation<HorizontalPodAutoscaler, HorizontalPodAutoscalerList, DoneableHorizontalPodAutoscaler, Resource<HorizontalPodAutoscaler, DoneableHorizontalPodAutoscaler>> horizontalPodAutoscalers();
V1AutoscalingAPIGroupDSL v1();
V2beta1AutoscalingAPIGroupDSL v2beta1();
V2beta2AutoscalingAPIGroupDSL v2beta2();
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

io.fabric8.kubernetes.client.AppsAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.AutoscalingAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.V1AutoscalingAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.V2beta1AutoscalingAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.V2beta2AutoscalingAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.BatchAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.ExtensionsAPIGroupExtensionAdapter
io.fabric8.kubernetes.client.MetricAPIGroupExtensionAdapter
Expand Down
Loading

0 comments on commit 791fbac

Please sign in to comment.