diff --git a/CHANGELOG.md b/CHANGELOG.md index 369666fd39f..d964407d9ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/AutoscalingAPIGroupClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/AutoscalingAPIGroupClient.java index 7dac237f8a9..98544440790 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/AutoscalingAPIGroupClient.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/AutoscalingAPIGroupClient.java @@ -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> 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); } } diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupClient.java new file mode 100644 index 00000000000..0944e17b38e --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupClient.java @@ -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> horizontalPodAutoscalers() { + return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration()); + } +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupDSL.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupDSL.java new file mode 100644 index 00000000000..00f5fad7ab9 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupDSL.java @@ -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> horizontalPodAutoscalers(); +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupExtensionAdapter.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupExtensionAdapter.java new file mode 100644 index 00000000000..3afcd59099b --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1AutoscalingAPIGroupExtensionAdapter.java @@ -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 { + + @Override + protected String getAPIGroupName() { + return "autoscaling/v1"; + } + + @Override + public Class getExtensionType() { + return V1AutoscalingAPIGroupClient.class; + } + + @Override + protected V1AutoscalingAPIGroupClient newInstance(Client client) { + return new V1AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); + } + +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupClient.java new file mode 100644 index 00000000000..133487bd6cc --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupClient.java @@ -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> horizontalPodAutoscalers() { + return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration()); + } +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupDSL.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupDSL.java new file mode 100644 index 00000000000..a50e1cbdf02 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupDSL.java @@ -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> horizontalPodAutoscalers(); +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupExtensionAdapter.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupExtensionAdapter.java new file mode 100644 index 00000000000..aea9d19c604 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta1AutoscalingAPIGroupExtensionAdapter.java @@ -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 { + + @Override + protected String getAPIGroupName() { + return "autoscaling/v2beta1"; + } + + @Override + public Class getExtensionType() { + return V2beta1AutoscalingAPIGroupClient.class; + } + + @Override + protected V2beta1AutoscalingAPIGroupClient newInstance(Client client) { + return new V2beta1AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); + } + +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupClient.java new file mode 100644 index 00000000000..4aa1aa38cd0 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupClient.java @@ -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> horizontalPodAutoscalers() { + return new HorizontalPodAutoscalerOperationsImpl(httpClient, getConfiguration()); + } +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupDSL.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupDSL.java new file mode 100644 index 00000000000..84e5535afa9 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupDSL.java @@ -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> horizontalPodAutoscalers(); +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupExtensionAdapter.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupExtensionAdapter.java new file mode 100644 index 00000000000..69822151e7c --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2beta2AutoscalingAPIGroupExtensionAdapter.java @@ -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 { + + @Override + protected String getAPIGroupName() { + return "autoscaling/v2beta2"; + } + + @Override + public Class getExtensionType() { + return V2beta2AutoscalingAPIGroupClient.class; + } + + @Override + protected V2beta2AutoscalingAPIGroupClient newInstance(Client client) { + return new V2beta2AutoscalingAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); + } + +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/AutoscalingAPIGroupDSL.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/AutoscalingAPIGroupDSL.java index a21555289df..7807475e0f5 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/AutoscalingAPIGroupDSL.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/AutoscalingAPIGroupDSL.java @@ -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> horizontalPodAutoscalers(); + V1AutoscalingAPIGroupDSL v1(); + V2beta1AutoscalingAPIGroupDSL v2beta1(); + V2beta2AutoscalingAPIGroupDSL v2beta2(); } diff --git a/kubernetes-client/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter b/kubernetes-client/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter index a3928788709..65c12c931df 100644 --- a/kubernetes-client/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter +++ b/kubernetes-client/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter @@ -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 diff --git a/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/HorizontalPodAutoscalerExample.java b/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/HorizontalPodAutoscalerExample.java index c52258dc80a..569776999c9 100644 --- a/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/HorizontalPodAutoscalerExample.java +++ b/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/HorizontalPodAutoscalerExample.java @@ -19,7 +19,6 @@ import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler; import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerBuilder; import io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricSpecBuilder; -import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.ConfigBuilder; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; @@ -39,27 +38,41 @@ public static void main(String[] args) { HorizontalPodAutoscaler horizontalPodAutoscaler = new HorizontalPodAutoscalerBuilder() .withNewMetadata().withName("the-hpa").withNamespace("default").endMetadata() .withNewSpec() - .withNewScaleTargetRef() - .withApiVersion("apps/v1") - .withKind("Deployment") - .withName("the-deployment") - .endScaleTargetRef() - .withMinReplicas(1) - .withMaxReplicas(10) - .addToMetrics(new MetricSpecBuilder() - .withType("Resource") - .withNewResource() - .withName("cpu") - .withNewTarget() - .withType("Utilization") - .withAverageUtilization(50) - .endTarget() - .endResource() - .build()) + .withNewScaleTargetRef() + .withApiVersion("apps/v1") + .withKind("Deployment") + .withName("the-deployment") + .endScaleTargetRef() + .withMinReplicas(1) + .withMaxReplicas(10) + .addToMetrics(new MetricSpecBuilder() + .withType("Resource") + .withNewResource() + .withName("cpu") + .withNewTarget() + .withType("Utilization") + .withAverageUtilization(50) + .endTarget() + .endResource() + .build()) + .withNewBehavior() + .withNewScaleDown() + .addNewPolicy() + .withType("Pods") + .withValue(4) + .withPeriodSeconds(60) + .endPolicy() + .addNewPolicy() + .withType("Percent") + .withValue(10) + .withPeriodSeconds(60) + .endPolicy() + .endScaleDown() + .endBehavior() .endSpec() .build(); - client.autoscaling().horizontalPodAutoscalers().inNamespace("default").create(horizontalPodAutoscaler); + client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("default").create(horizontalPodAutoscaler); } catch (KubernetesClientException e) { logger.error(e.getMessage(), e); } diff --git a/kubernetes-model/kubernetes-model-annotator/src/main/java/io/fabric8/kubernetes/annotator/KubernetesCoreTypeAnnotator.java b/kubernetes-model/kubernetes-model-annotator/src/main/java/io/fabric8/kubernetes/annotator/KubernetesCoreTypeAnnotator.java index c4eebf42a10..003410c032f 100644 --- a/kubernetes-model/kubernetes-model-annotator/src/main/java/io/fabric8/kubernetes/annotator/KubernetesCoreTypeAnnotator.java +++ b/kubernetes-model/kubernetes-model-annotator/src/main/java/io/fabric8/kubernetes/annotator/KubernetesCoreTypeAnnotator.java @@ -181,7 +181,7 @@ public boolean shouldIncludeClass(String className) { className.equals("BuildRequest") || className.equals("ImageSignature") || className.equals("ImageStreamImport") || - className.equals("OpenshiftRoleBindingRestriction") || + className.equals("RoleBindingRestriction") || className.equals("Scale") || className.equals("Status") || className.equals("TokenReview") || diff --git a/kubernetes-model/kubernetes-model-autoscaling/cmd/generate/generate.go b/kubernetes-model/kubernetes-model-autoscaling/cmd/generate/generate.go index 5c951573f26..6a9ee44aa62 100644 --- a/kubernetes-model/kubernetes-model-autoscaling/cmd/generate/generate.go +++ b/kubernetes-model/kubernetes-model-autoscaling/cmd/generate/generate.go @@ -25,7 +25,8 @@ import ( apimachineryversion "k8s.io/apimachinery/pkg/version" autoscalingapiv1 "k8s.io/api/autoscaling/v1" - autoscalingapi "k8s.io/api/autoscaling/v2beta2" + autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1" + autoscalingapiv2beta2 "k8s.io/api/autoscaling/v2beta2" "log" "reflect" @@ -57,9 +58,12 @@ type Schema struct { Quantity resource.Quantity Scale autoscalingapiv1.Scale - HorizontalPodAutoscaler autoscalingapi.HorizontalPodAutoscaler - HorizontalPodAutoscalerSpec autoscalingapi.HorizontalPodAutoscalerSpec - HorizontalPodAutoscalerList autoscalingapi.HorizontalPodAutoscalerList + V1HorizontalPodAutoscaler autoscalingapiv1.HorizontalPodAutoscaler + V1HorizontalPodAutoscalerList autoscalingapiv1.HorizontalPodAutoscalerList + V2beta1HorizontalPodAutoscaler autoscalingapiv2beta1.HorizontalPodAutoscaler + V2beta1HorizontalPodAutoscalerList autoscalingapiv2beta1.HorizontalPodAutoscalerList + V2beta2HorizontalPodAutoscaler autoscalingapiv2beta2.HorizontalPodAutoscaler + V2beta2HorizontalPodAutoscalerList autoscalingapiv2beta2.HorizontalPodAutoscalerList } func main() { @@ -74,7 +78,8 @@ func main() { {"k8s.io/apimachinery/pkg/version", "", "io.fabric8.kubernetes.api.model.version", "kubernetes_apimachinery_pkg_version_"}, {"k8s.io/apimachinery/pkg/apis/meta/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_"}, {"k8s.io/apimachinery/pkg/api/resource", "", "io.fabric8.kubernetes.api.model", "kubernetes_resource_"}, - {"k8s.io/api/autoscaling/v2beta2", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2beta2", "kubernetes_autoscaling_"}, + {"k8s.io/api/autoscaling/v2beta2", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2beta2", "kubernetes_autoscaling_v2beta2_"}, + {"k8s.io/api/autoscaling/v2beta1", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2beta1", "kubernetes_autoscaling_v2beta1_"}, {"k8s.io/api/autoscaling/v1", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v1", "kubernetes_autoscaling_v1_"}, } diff --git a/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json b/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json index 00343c036a5..529b0379bd1 100644 --- a/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json @@ -925,7 +925,700 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_CrossVersionObjectReference": { + "kubernetes_autoscaling_v1_CrossVersionObjectReference": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "" + }, + "kind": { + "type": "string", + "description": "" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscaler": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerList": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "items": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "javaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerSpec": { + "type": "object", + "description": "", + "properties": { + "maxReplicas": { + "type": "integer", + "description": "" + }, + "minReplicas": { + "type": "integer", + "description": "" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "type": "integer", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerStatus": { + "type": "object", + "description": "", + "properties": { + "currentCPUUtilizationPercentage": { + "type": "integer", + "description": "" + }, + "currentReplicas": { + "type": "integer", + "description": "" + }, + "desiredReplicas": { + "type": "integer", + "description": "" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "observedGeneration": { + "type": "integer", + "description": "", + "javaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_Scale": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "Scale", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.Scale", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v1_ScaleSpec": { + "type": "object", + "description": "", + "properties": { + "replicas": { + "type": "integer", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_ScaleStatus": { + "type": "object", + "description": "", + "properties": { + "replicas": { + "type": "integer", + "description": "" + }, + "selector": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_CrossVersionObjectReference": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "" + }, + "kind": { + "type": "string", + "description": "" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ExternalMetricSource": { + "type": "object", + "description": "", + "properties": { + "metricName": { + "type": "string", + "description": "" + }, + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ExternalMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v2beta1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerCondition": { + "type": "object", + "description": "", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "message": { + "type": "string", + "description": "" + }, + "reason": { + "type": "string", + "description": "" + }, + "status": { + "type": "string", + "description": "" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerCondition", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerList": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v2beta1", + "required": true + }, + "items": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "javaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerSpec": { + "type": "object", + "description": "", + "properties": { + "maxReplicas": { + "type": "integer", + "description": "" + }, + "metrics": { + "type": "array", + "description": "", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_MetricSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricSpec" + } + }, + "minReplicas": { + "type": "integer", + "description": "" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerStatus": { + "type": "object", + "description": "", + "properties": { + "conditions": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerCondition", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_MetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricStatus" + } + }, + "currentReplicas": { + "type": "integer", + "description": "" + }, + "desiredReplicas": { + "type": "integer", + "description": "" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "observedGeneration": { + "type": "integer", + "description": "", + "javaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_MetricSpec": { + "type": "object", + "description": "", + "properties": { + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ExternalMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricSource" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ObjectMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricSource" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_PodsMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricSource" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ResourceMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricSource" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_MetricStatus": { + "type": "object", + "description": "", + "properties": { + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ExternalMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricStatus" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ObjectMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricStatus" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_PodsMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricStatus" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ResourceMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricStatus" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ObjectMetricSource": { + "type": "object", + "description": "", + "properties": { + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ObjectMetricStatus": { + "type": "object", + "description": "", + "properties": { + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_PodsMetricSource": { + "type": "object", + "description": "", + "properties": { + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_PodsMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ResourceMetricSource": { + "type": "object", + "description": "", + "properties": { + "name": { + "type": "string", + "description": "" + }, + "targetAverageUtilization": { + "type": "integer", + "description": "" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ResourceMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageUtilization": { + "type": "integer", + "description": "" + }, + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta2_CrossVersionObjectReference": { "type": "object", "description": "", "properties": { @@ -948,16 +1641,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ExternalMetricSource": { + "kubernetes_autoscaling_v2beta2_ExternalMetricSource": { "type": "object", "description": "", "properties": { "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -967,16 +1660,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ExternalMetricStatus": { + "kubernetes_autoscaling_v2beta2_ExternalMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -986,7 +1679,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HPAScalingPolicy": { + "kubernetes_autoscaling_v2beta2_HPAScalingPolicy": { "type": "object", "description": "", "properties": { @@ -1009,7 +1702,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HPAScalingRules": { + "kubernetes_autoscaling_v2beta2_HPAScalingRules": { "type": "object", "description": "", "properties": { @@ -1018,7 +1711,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingPolicy", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingPolicy", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingPolicy" } }, @@ -1037,7 +1730,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscaler": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler": { "type": "object", "description": "", "properties": { @@ -1058,11 +1751,11 @@ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" }, "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" }, "status": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" } }, @@ -1072,16 +1765,16 @@ "io.fabric8.kubernetes.api.model.HasMetadata" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerBehavior": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior": { "type": "object", "description": "", "properties": { "scaleDown": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" }, "scaleUp": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" } }, @@ -1091,7 +1784,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerCondition": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerCondition": { "type": "object", "description": "", "properties": { @@ -1122,7 +1815,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerList": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerList": { "type": "object", "description": "", "properties": { @@ -1136,7 +1829,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscaler", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" } }, @@ -1158,12 +1851,12 @@ "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler\u003e" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerSpec": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec": { "type": "object", "description": "", "properties": { "behavior": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerBehavior", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior" }, "maxReplicas": { @@ -1175,7 +1868,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricSpec" } }, @@ -1184,7 +1877,7 @@ "description": "" }, "scaleTargetRef": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" } }, @@ -1194,7 +1887,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerStatus": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus": { "type": "object", "description": "", "properties": { @@ -1202,7 +1895,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerCondition", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerCondition", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" } }, @@ -1210,7 +1903,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricStatus" } }, @@ -1238,7 +1931,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricIdentifier": { + "kubernetes_autoscaling_v2beta2_MetricIdentifier": { "type": "object", "description": "", "properties": { @@ -1257,24 +1950,24 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricSpec": { + "kubernetes_autoscaling_v2beta2_MetricSpec": { "type": "object", "description": "", "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricSource" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricSource" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricSource" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricSource" }, "type": { @@ -1288,24 +1981,24 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricStatus": { + "kubernetes_autoscaling_v2beta2_MetricStatus": { "type": "object", "description": "", "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricStatus" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricStatus" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricStatus" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricStatus" }, "type": { @@ -1319,7 +2012,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricTarget": { + "kubernetes_autoscaling_v2beta2_MetricTarget": { "type": "object", "description": "", "properties": { @@ -1346,7 +2039,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricValueStatus": { + "kubernetes_autoscaling_v2beta2_MetricValueStatus": { "type": "object", "description": "", "properties": { @@ -1369,20 +2062,20 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ObjectMetricSource": { + "kubernetes_autoscaling_v2beta2_ObjectMetricSource": { "type": "object", "description": "", "properties": { "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1392,20 +2085,20 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ObjectMetricStatus": { + "kubernetes_autoscaling_v2beta2_ObjectMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -1415,16 +2108,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_PodsMetricSource": { + "kubernetes_autoscaling_v2beta2_PodsMetricSource": { "type": "object", "description": "", "properties": { "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1434,16 +2127,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_PodsMetricStatus": { + "kubernetes_autoscaling_v2beta2_PodsMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -1453,7 +2146,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ResourceMetricSource": { + "kubernetes_autoscaling_v2beta2_ResourceMetricSource": { "type": "object", "description": "", "properties": { @@ -1462,7 +2155,7 @@ "description": "" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1472,12 +2165,12 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ResourceMetricStatus": { + "kubernetes_autoscaling_v2beta2_ResourceMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "name": { @@ -1491,75 +2184,6 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_v1_Scale": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "autoscaling/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "Scale", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleSpec", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec" - }, - "status": { - "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleStatus", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.Scale", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_autoscaling_v1_ScaleSpec": { - "type": "object", - "description": "", - "properties": { - "replicas": { - "type": "integer", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_autoscaling_v1_ScaleStatus": { - "type": "object", - "description": "", - "properties": { - "replicas": { - "type": "integer", - "description": "" - }, - "selector": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, "kubernetes_resource_Quantity": { "type": "object", "description": "", @@ -1602,18 +2226,6 @@ "$ref": "#/definitions/kubernetes_apimachinery_GetOptions", "javaType": "io.fabric8.kubernetes.api.model.GetOptions" }, - "HorizontalPodAutoscaler": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscaler", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" - }, - "HorizontalPodAutoscalerList": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerList", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList" - }, - "HorizontalPodAutoscalerSpec": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerSpec", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" - }, "Info": { "$ref": "#/definitions/kubernetes_apimachinery_pkg_version_Info", "javaType": "io.fabric8.kubernetes.api.model.version.Info" @@ -1661,6 +2273,30 @@ "UpdateOptions": { "$ref": "#/definitions/kubernetes_apimachinery_UpdateOptions", "javaType": "io.fabric8.kubernetes.api.model.UpdateOptions" + }, + "V1HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler" + }, + "V1HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList" + }, + "V2beta1HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" + }, + "V2beta1HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList" + }, + "V2beta2HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" + }, + "V2beta2HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList" } }, "additionalProperties": true diff --git a/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json b/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json index f74d4b06efc..cb8d7ba4fe9 100644 --- a/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json @@ -925,7 +925,700 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_CrossVersionObjectReference": { + "kubernetes_autoscaling_v1_CrossVersionObjectReference": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "" + }, + "kind": { + "type": "string", + "description": "" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscaler": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerList": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "items": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "javaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerSpec": { + "type": "object", + "description": "", + "properties": { + "maxReplicas": { + "type": "integer", + "description": "" + }, + "minReplicas": { + "type": "integer", + "description": "" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "type": "integer", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_HorizontalPodAutoscalerStatus": { + "type": "object", + "description": "", + "properties": { + "currentCPUUtilizationPercentage": { + "type": "integer", + "description": "" + }, + "currentReplicas": { + "type": "integer", + "description": "" + }, + "desiredReplicas": { + "type": "integer", + "description": "" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "observedGeneration": { + "type": "integer", + "description": "", + "javaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_Scale": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "Scale", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.Scale", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v1_ScaleSpec": { + "type": "object", + "description": "", + "properties": { + "replicas": { + "type": "integer", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v1_ScaleStatus": { + "type": "object", + "description": "", + "properties": { + "replicas": { + "type": "integer", + "description": "" + }, + "selector": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_CrossVersionObjectReference": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "" + }, + "kind": { + "type": "string", + "description": "" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ExternalMetricSource": { + "type": "object", + "description": "", + "properties": { + "metricName": { + "type": "string", + "description": "" + }, + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ExternalMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v2beta1", + "required": true + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerCondition": { + "type": "object", + "description": "", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "message": { + "type": "string", + "description": "" + }, + "reason": { + "type": "string", + "description": "" + }, + "status": { + "type": "string", + "description": "" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerCondition", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerList": { + "type": "object", + "description": "", + "properties": { + "apiVersion": { + "type": "string", + "description": "", + "default": "autoscaling/v2beta1", + "required": true + }, + "items": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "description": "", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "javaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerSpec": { + "type": "object", + "description": "", + "properties": { + "maxReplicas": { + "type": "integer", + "description": "" + }, + "metrics": { + "type": "array", + "description": "", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_MetricSpec", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricSpec" + } + }, + "minReplicas": { + "type": "integer", + "description": "" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerStatus": { + "type": "object", + "description": "", + "properties": { + "conditions": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerCondition", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "type": "array", + "description": "", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_MetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricStatus" + } + }, + "currentReplicas": { + "type": "integer", + "description": "" + }, + "desiredReplicas": { + "type": "integer", + "description": "" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "javaType": "String" + }, + "observedGeneration": { + "type": "integer", + "description": "", + "javaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_MetricSpec": { + "type": "object", + "description": "", + "properties": { + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ExternalMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricSource" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ObjectMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricSource" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_PodsMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricSource" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ResourceMetricSource", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricSource" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_MetricStatus": { + "type": "object", + "description": "", + "properties": { + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ExternalMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ExternalMetricStatus" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ObjectMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricStatus" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_PodsMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricStatus" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_ResourceMetricStatus", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricStatus" + }, + "type": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ObjectMetricSource": { + "type": "object", + "description": "", + "properties": { + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ObjectMetricStatus": { + "type": "object", + "description": "", + "properties": { + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ObjectMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_PodsMetricSource": { + "type": "object", + "description": "", + "properties": { + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_PodsMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.PodsMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ResourceMetricSource": { + "type": "object", + "description": "", + "properties": { + "name": { + "type": "string", + "description": "" + }, + "targetAverageUtilization": { + "type": "integer", + "description": "" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta1_ResourceMetricStatus": { + "type": "object", + "description": "", + "properties": { + "currentAverageUtilization": { + "type": "integer", + "description": "" + }, + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "name": { + "type": "string", + "description": "" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.ResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2beta2_CrossVersionObjectReference": { "type": "object", "description": "", "properties": { @@ -948,16 +1641,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ExternalMetricSource": { + "kubernetes_autoscaling_v2beta2_ExternalMetricSource": { "type": "object", "description": "", "properties": { "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -967,16 +1660,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ExternalMetricStatus": { + "kubernetes_autoscaling_v2beta2_ExternalMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -986,7 +1679,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HPAScalingPolicy": { + "kubernetes_autoscaling_v2beta2_HPAScalingPolicy": { "type": "object", "description": "", "properties": { @@ -1009,7 +1702,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HPAScalingRules": { + "kubernetes_autoscaling_v2beta2_HPAScalingRules": { "type": "object", "description": "", "properties": { @@ -1018,7 +1711,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingPolicy", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingPolicy", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingPolicy" } }, @@ -1037,7 +1730,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscaler": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler": { "type": "object", "description": "", "properties": { @@ -1058,11 +1751,11 @@ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" }, "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" }, "status": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" } }, @@ -1072,16 +1765,16 @@ "io.fabric8.kubernetes.api.model.HasMetadata" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerBehavior": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior": { "type": "object", "description": "", "properties": { "scaleDown": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" }, "scaleUp": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" } }, @@ -1091,7 +1784,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerCondition": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerCondition": { "type": "object", "description": "", "properties": { @@ -1122,7 +1815,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerList": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerList": { "type": "object", "description": "", "properties": { @@ -1136,7 +1829,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscaler", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" } }, @@ -1158,12 +1851,12 @@ "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler\u003e" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerSpec": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec": { "type": "object", "description": "", "properties": { "behavior": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerBehavior", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior" }, "maxReplicas": { @@ -1175,7 +1868,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricSpec" } }, @@ -1184,7 +1877,7 @@ "description": "" }, "scaleTargetRef": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" } }, @@ -1194,7 +1887,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_HorizontalPodAutoscalerStatus": { + "kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus": { "type": "object", "description": "", "properties": { @@ -1202,7 +1895,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerCondition", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerCondition", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" } }, @@ -1210,7 +1903,7 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricStatus" } }, @@ -1238,7 +1931,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricIdentifier": { + "kubernetes_autoscaling_v2beta2_MetricIdentifier": { "type": "object", "description": "", "properties": { @@ -1257,24 +1950,24 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricSpec": { + "kubernetes_autoscaling_v2beta2_MetricSpec": { "type": "object", "description": "", "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricSource" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricSource" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricSource" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricSource" }, "type": { @@ -1288,24 +1981,24 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricStatus": { + "kubernetes_autoscaling_v2beta2_MetricStatus": { "type": "object", "description": "", "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricStatus" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricStatus" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricStatus" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricStatus" }, "type": { @@ -1319,7 +2012,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricTarget": { + "kubernetes_autoscaling_v2beta2_MetricTarget": { "type": "object", "description": "", "properties": { @@ -1346,7 +2039,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_MetricValueStatus": { + "kubernetes_autoscaling_v2beta2_MetricValueStatus": { "type": "object", "description": "", "properties": { @@ -1369,20 +2062,20 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ObjectMetricSource": { + "kubernetes_autoscaling_v2beta2_ObjectMetricSource": { "type": "object", "description": "", "properties": { "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1392,20 +2085,20 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ObjectMetricStatus": { + "kubernetes_autoscaling_v2beta2_ObjectMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -1415,16 +2108,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_PodsMetricSource": { + "kubernetes_autoscaling_v2beta2_PodsMetricSource": { "type": "object", "description": "", "properties": { "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1434,16 +2127,16 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_PodsMetricStatus": { + "kubernetes_autoscaling_v2beta2_PodsMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -1453,7 +2146,7 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ResourceMetricSource": { + "kubernetes_autoscaling_v2beta2_ResourceMetricSource": { "type": "object", "description": "", "properties": { @@ -1462,7 +2155,7 @@ "description": "" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -1472,12 +2165,12 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_ResourceMetricStatus": { + "kubernetes_autoscaling_v2beta2_ResourceMetricStatus": { "type": "object", "description": "", "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "name": { @@ -1491,75 +2184,6 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_autoscaling_v1_Scale": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "autoscaling/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "Scale", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleSpec", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec" - }, - "status": { - "$ref": "#/definitions/kubernetes_autoscaling_v1_ScaleStatus", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.Scale", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_autoscaling_v1_ScaleSpec": { - "type": "object", - "description": "", - "properties": { - "replicas": { - "type": "integer", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleSpec", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_autoscaling_v1_ScaleStatus": { - "type": "object", - "description": "", - "properties": { - "replicas": { - "type": "integer", - "description": "" - }, - "selector": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.ScaleStatus", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, "kubernetes_resource_Quantity": { "type": "object", "description": "", @@ -1602,18 +2226,6 @@ "$ref": "#/definitions/kubernetes_apimachinery_GetOptions", "javaType": "io.fabric8.kubernetes.api.model.GetOptions" }, - "HorizontalPodAutoscaler": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscaler", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" - }, - "HorizontalPodAutoscalerList": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerList", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList" - }, - "HorizontalPodAutoscalerSpec": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerSpec", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" - }, "Info": { "$ref": "#/definitions/kubernetes_apimachinery_pkg_version_Info", "javaType": "io.fabric8.kubernetes.api.model.version.Info" @@ -1661,6 +2273,30 @@ "UpdateOptions": { "$ref": "#/definitions/kubernetes_apimachinery_UpdateOptions", "javaType": "io.fabric8.kubernetes.api.model.UpdateOptions" + }, + "V1HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler" + }, + "V1HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList" + }, + "V2beta1HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" + }, + "V2beta1HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList" + }, + "V2beta2HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" + }, + "V2beta2HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerList", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList" } }, "additionalProperties": true, @@ -1824,26 +2460,42 @@ }, "externalmetricsource": { "properties": { - "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" + "metricName": { + "type": "string", + "description": "" }, - "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" } }, "additionalProperties": true }, "externalmetricstatus": { "properties": { - "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" + "currentAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" }, - "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "metricName": { + "type": "string", + "description": "" + }, + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" } }, "additionalProperties": true @@ -1904,11 +2556,11 @@ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" }, "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" }, "status": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" } }, @@ -1917,11 +2569,11 @@ "horizontalpodautoscalerbehavior": { "properties": { "scaleDown": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" }, "scaleUp": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingRules", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" } }, @@ -1957,15 +2609,15 @@ "apiVersion": { "type": "string", "description": "", - "default": "autoscaling/v2beta2", + "default": "autoscaling/v2beta1", "required": true }, "items": { "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscaler", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" } }, "kind": { @@ -1984,7 +2636,7 @@ "horizontalpodautoscalerspec": { "properties": { "behavior": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerBehavior", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior" }, "maxReplicas": { @@ -1996,7 +2648,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricSpec", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricSpec", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricSpec" } }, @@ -2005,7 +2657,7 @@ "description": "" }, "scaleTargetRef": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" } }, @@ -2013,21 +2665,9 @@ }, "horizontalpodautoscalerstatus": { "properties": { - "conditions": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HorizontalPodAutoscalerCondition", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" - } - }, - "currentMetrics": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricStatus", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricStatus" - } + "currentCPUUtilizationPercentage": { + "type": "integer", + "description": "" }, "currentReplicas": { "type": "integer", @@ -2073,7 +2713,7 @@ "description": "", "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_HPAScalingPolicy", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingPolicy", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingPolicy" } }, @@ -2324,19 +2964,19 @@ "metricspec": { "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricSource" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricSource" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricSource" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricSource", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricSource", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricSource" }, "type": { @@ -2349,19 +2989,19 @@ "metricstatus": { "properties": { "external": { - "$ref": "#/definitions/kubernetes_autoscaling_ExternalMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricStatus" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_ObjectMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricStatus" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_PodsMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricStatus" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_ResourceMetricStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricStatus" }, "type": { @@ -2510,15 +3150,15 @@ "objectmetricsource": { "properties": { "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_CrossVersionObjectReference", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -2526,17 +3166,25 @@ }, "objectmetricstatus": { "properties": { - "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" }, - "describedObject": { - "$ref": "#/definitions/kubernetes_autoscaling_CrossVersionObjectReference", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.CrossVersionObjectReference" + "currentValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "javaType": "io.fabric8.kubernetes.api.model.Quantity" }, - "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", - "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" + "metricName": { + "type": "string", + "description": "" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "javaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" } }, "additionalProperties": true @@ -2610,11 +3258,11 @@ "podsmetricsource": { "properties": { "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -2623,11 +3271,11 @@ "podsmetricstatus": { "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricIdentifier", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, @@ -2665,7 +3313,7 @@ "description": "" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricTarget", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" } }, @@ -2674,7 +3322,7 @@ "resourcemetricstatus": { "properties": { "current": { - "$ref": "#/definitions/kubernetes_autoscaling_MetricValueStatus", + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "name": { diff --git a/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/kube-schema.json b/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/kube-schema.json index 5dd78a73b4c..4873a40b8aa 100644 --- a/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/kube-schema.json @@ -3348,7 +3348,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.PodTemplateList", + "javaType": "io.fabric8.kubernetes.api.model.PodTemplate", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -4466,7 +4466,7 @@ }, "PodTemplateList": { "$ref": "#/definitions/kubernetes_core_PodTemplate", - "javaType": "io.fabric8.kubernetes.api.model.PodTemplateList" + "javaType": "io.fabric8.kubernetes.api.model.PodTemplate" }, "Quantity": { "$ref": "#/definitions/k8s_io_apimachinery_pkg_api_resource_Quantity", diff --git a/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/validation-schema.json b/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/validation-schema.json index d67191770d8..507694691a4 100644 --- a/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model/kubernetes-model-batch/src/main/resources/schema/validation-schema.json @@ -3348,7 +3348,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.PodTemplateList", + "javaType": "io.fabric8.kubernetes.api.model.PodTemplate", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -4466,7 +4466,7 @@ }, "PodTemplateList": { "$ref": "#/definitions/kubernetes_core_PodTemplate", - "javaType": "io.fabric8.kubernetes.api.model.PodTemplateList" + "javaType": "io.fabric8.kubernetes.api.model.PodTemplate" }, "Quantity": { "$ref": "#/definitions/k8s_io_apimachinery_pkg_api_resource_Quantity", diff --git a/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/kube-schema.json b/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/kube-schema.json index b163626f70a..57527a0e094 100644 --- a/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/kube-schema.json @@ -1001,7 +1001,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort", + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -1043,7 +1043,7 @@ "description": "", "items": { "$ref": "#/definitions/kubernetes_discovery_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort" + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort" } } }, @@ -1114,7 +1114,7 @@ }, "DiscoveryEndpointPort": { "$ref": "#/definitions/kubernetes_discovery_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort" + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort" }, "EndpointSlice": { "$ref": "#/definitions/kubernetes_discovery_EndpointSlice", diff --git a/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/validation-schema.json b/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/validation-schema.json index 4ed33e0b016..d8a52e25f31 100644 --- a/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model/kubernetes-model-discovery/src/main/resources/schema/validation-schema.json @@ -1001,7 +1001,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort", + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -1043,7 +1043,7 @@ "description": "", "items": { "$ref": "#/definitions/kubernetes_discovery_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort" + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort" } } }, @@ -1114,7 +1114,7 @@ }, "DiscoveryEndpointPort": { "$ref": "#/definitions/kubernetes_discovery_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort" + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort" }, "EndpointSlice": { "$ref": "#/definitions/kubernetes_discovery_EndpointSlice", @@ -1420,7 +1420,7 @@ "description": "", "items": { "$ref": "#/definitions/kubernetes_discovery_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.discovery.DiscoveryEndpointPort" + "javaType": "io.fabric8.kubernetes.api.model.discovery.EndpointPort" } } }, diff --git a/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/kube-schema.json b/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/kube-schema.json index cb39c4460b4..559bb79dbcb 100644 --- a/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/kube-schema.json @@ -1477,7 +1477,7 @@ }, "runAsUser": { "$ref": "#/definitions/kubernetes_policy_RunAsUserStrategyOptions", - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions" + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions" }, "runtimeClass": { "$ref": "#/definitions/kubernetes_policy_RuntimeClassStrategyOptions", @@ -1550,7 +1550,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions", + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -1654,7 +1654,7 @@ }, "KubernetesRunAsUserStrategyOptions": { "$ref": "#/definitions/kubernetes_policy_RunAsUserStrategyOptions", - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions" + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions" }, "ListOptions": { "$ref": "#/definitions/kubernetes_apimachinery_ListOptions", diff --git a/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/validation-schema.json b/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/validation-schema.json index 910c9e1e747..b3095d83955 100644 --- a/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model/kubernetes-model-policy/src/main/resources/schema/validation-schema.json @@ -1477,7 +1477,7 @@ }, "runAsUser": { "$ref": "#/definitions/kubernetes_policy_RunAsUserStrategyOptions", - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions" + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions" }, "runtimeClass": { "$ref": "#/definitions/kubernetes_policy_RuntimeClassStrategyOptions", @@ -1550,7 +1550,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions", + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -1654,7 +1654,7 @@ }, "KubernetesRunAsUserStrategyOptions": { "$ref": "#/definitions/kubernetes_policy_RunAsUserStrategyOptions", - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions" + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions" }, "ListOptions": { "$ref": "#/definitions/kubernetes_apimachinery_ListOptions", @@ -2702,7 +2702,7 @@ }, "runAsUser": { "$ref": "#/definitions/kubernetes_policy_RunAsUserStrategyOptions", - "javaType": "io.fabric8.kubernetes.api.model.policy.KubernetesRunAsUserStrategyOptions" + "javaType": "io.fabric8.kubernetes.api.model.policy.RunAsUserStrategyOptions" }, "runtimeClass": { "$ref": "#/definitions/kubernetes_policy_RuntimeClassStrategyOptions", diff --git a/kubernetes-model/openshift-model/cmd/generate/generate.go b/kubernetes-model/openshift-model/cmd/generate/generate.go index 58d3d25328c..56884b851a6 100644 --- a/kubernetes-model/openshift-model/cmd/generate/generate.go +++ b/kubernetes-model/openshift-model/cmd/generate/generate.go @@ -117,16 +117,8 @@ type Schema struct { // Added JSONSchemaPropsorStringArray here because of // https://github.com/joelittlejohn/jsonschema2pojo/issues/866 AggregationRule rbac.AggregationRule - Role rbac.Role - RoleList rbac.RoleList - RoleBinding rbac.RoleBinding - RoleBindingList rbac.RoleBindingList NetNamespace networkapi.NetNamespace NetNamespaceList networkapi.NetNamespaceList - ClusterRole rbac.ClusterRole - ClusterRoleList rbac.ClusterRoleList - ClusterRoleBinding rbac.ClusterRoleBinding - ClusterRoleBindingList rbac.ClusterRoleBindingList ClusterVersion openshiftconfigapi.ClusterVersion ClusterVersionList openshiftconfigapi.ClusterVersionList } diff --git a/kubernetes-model/openshift-model/src/main/resources/schema/kube-schema.json b/kubernetes-model/openshift-model/src/main/resources/schema/kube-schema.json index 6f352dcc30b..7d6a01511ce 100644 --- a/kubernetes-model/openshift-model/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model/openshift-model/src/main/resources/schema/kube-schema.json @@ -4590,409 +4590,6 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_rbac_ClusterRole": { - "type": "object", - "description": "", - "properties": { - "aggregationRule": { - "$ref": "#/definitions/kubernetes_rbac_AggregationRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.AggregationRule" - }, - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRole", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "rules": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_PolicyRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_ClusterRoleBinding": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleBinding", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "roleRef": { - "$ref": "#/definitions/kubernetes_rbac_RoleRef", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef" - }, - "subjects": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "$ref": "#/definitions/kubernetes_rbac_Subject", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_ClusterRoleBindingList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleBindingList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBindingList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding\u003e" - ] - }, - "kubernetes_rbac_ClusterRoleList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRole", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.ClusterRole\u003e" - ] - }, - "kubernetes_rbac_PolicyRule": { - "type": "object", - "description": "", - "properties": { - "apiGroups": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "nonResourceURLs": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "resourceNames": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "resources": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "verbs": { - "type": "array", - "description": "", - "items": { - "type": "string", - "description": "" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_rbac_Role": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "Role", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "rules": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_PolicyRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_RoleBinding": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleBinding", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "roleRef": { - "$ref": "#/definitions/kubernetes_rbac_RoleRef", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef" - }, - "subjects": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "$ref": "#/definitions/kubernetes_rbac_Subject", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_RoleBindingList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_RoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleBindingList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBindingList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.RoleBinding\u003e" - ] - }, - "kubernetes_rbac_RoleList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_Role", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.Role\u003e" - ] - }, - "kubernetes_rbac_RoleRef": { - "type": "object", - "description": "", - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_rbac_Subject": { - "type": "object", - "description": "", - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - }, - "namespace": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, "kubernetes_resource_Quantity": { "type": "object", "description": "", @@ -5089,7 +4686,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole", + "javaType": "io.fabric8.openshift.api.model.ClusterRole", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5144,7 +4741,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5164,7 +4761,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_ClusterRoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding" } }, "kind": { @@ -5179,10 +4776,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftClusterRoleBinding\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.ClusterRoleBinding\u003e" ] }, "os_authorization_ClusterRoleList": { @@ -5200,7 +4797,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_ClusterRole", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole" + "javaType": "io.fabric8.openshift.api.model.ClusterRole" } }, "kind": { @@ -5215,10 +4812,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleList", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftClusterRole\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.ClusterRole\u003e" ] }, "os_authorization_GroupRestriction": { @@ -5415,7 +5012,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole", + "javaType": "io.fabric8.openshift.api.model.Role", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5470,7 +5067,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding", + "javaType": "io.fabric8.openshift.api.model.RoleBinding", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5490,7 +5087,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_RoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding" + "javaType": "io.fabric8.openshift.api.model.RoleBinding" } }, "kind": { @@ -5505,10 +5102,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingList", + "javaType": "io.fabric8.openshift.api.model.RoleBindingList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftRoleBinding\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.RoleBinding\u003e" ] }, "os_authorization_RoleBindingRestriction": { @@ -5533,11 +5130,11 @@ }, "spec": { "$ref": "#/definitions/os_authorization_RoleBindingRestrictionSpec", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec" } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestriction", + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestriction", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5560,7 +5157,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec", + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -5580,7 +5177,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_Role", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole" + "javaType": "io.fabric8.openshift.api.model.Role" } }, "kind": { @@ -5595,10 +5192,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleList", + "javaType": "io.fabric8.openshift.api.model.RoleList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftRole\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.Role\u003e" ] }, "os_authorization_ServiceAccountReference": { @@ -9152,7 +8749,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -9567,7 +9164,7 @@ "properties": { "clusterRole": { "$ref": "#/definitions/os_oauth_ClusterRoleScopeRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction" }, "literals": { "type": "array", @@ -10751,22 +10348,6 @@ "$ref": "#/definitions/os_build_BuildRequest", "javaType": "io.fabric8.openshift.api.model.BuildRequest" }, - "ClusterRole": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRole", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole" - }, - "ClusterRoleBinding": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding" - }, - "ClusterRoleBindingList": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBindingList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBindingList" - }, - "ClusterRoleList": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleList" - }, "ClusterVersion": { "$ref": "#/definitions/os_config_ClusterVersion", "javaType": "io.fabric8.openshift.api.model.ClusterVersion" @@ -10889,47 +10470,47 @@ }, "OpenshiftClusterRole": { "$ref": "#/definitions/os_authorization_ClusterRole", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole" + "javaType": "io.fabric8.openshift.api.model.ClusterRole" }, "OpenshiftClusterRoleBinding": { "$ref": "#/definitions/os_authorization_ClusterRoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding" }, "OpenshiftClusterRoleBindingList": { "$ref": "#/definitions/os_authorization_ClusterRoleBindingList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList" }, "OpenshiftClusterRoleList": { "$ref": "#/definitions/os_authorization_ClusterRoleList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleList" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleList" }, "OpenshiftClusterRoleScopeRestriction": { "$ref": "#/definitions/os_oauth_ClusterRoleScopeRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction" }, "OpenshiftRole": { "$ref": "#/definitions/os_authorization_Role", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole" + "javaType": "io.fabric8.openshift.api.model.Role" }, "OpenshiftRoleBinding": { "$ref": "#/definitions/os_authorization_RoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding" + "javaType": "io.fabric8.openshift.api.model.RoleBinding" }, "OpenshiftRoleBindingList": { "$ref": "#/definitions/os_authorization_RoleBindingList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingList" + "javaType": "io.fabric8.openshift.api.model.RoleBindingList" }, "OpenshiftRoleBindingRestriction": { "$ref": "#/definitions/os_authorization_RoleBindingRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestriction" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestriction" }, "OpenshiftRoleBindingRestrictionSpec": { "$ref": "#/definitions/os_authorization_RoleBindingRestrictionSpec", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec" }, "OpenshiftRoleList": { "$ref": "#/definitions/os_authorization_RoleList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleList" + "javaType": "io.fabric8.openshift.api.model.RoleList" }, "Patch": { "$ref": "#/definitions/kubernetes_apimachinery_Patch", @@ -10955,22 +10536,6 @@ "$ref": "#/definitions/kubernetes_resource_Quantity", "javaType": "io.fabric8.kubernetes.api.model.Quantity" }, - "Role": { - "$ref": "#/definitions/kubernetes_rbac_Role", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role" - }, - "RoleBinding": { - "$ref": "#/definitions/kubernetes_rbac_RoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding" - }, - "RoleBindingList": { - "$ref": "#/definitions/kubernetes_rbac_RoleBindingList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBindingList" - }, - "RoleList": { - "$ref": "#/definitions/kubernetes_rbac_RoleList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleList" - }, "RootPaths": { "$ref": "#/definitions/kubernetes_apimachinery_RootPaths", "javaType": "io.fabric8.kubernetes.api.model.RootPaths" diff --git a/kubernetes-model/openshift-model/src/main/resources/schema/validation-schema.json b/kubernetes-model/openshift-model/src/main/resources/schema/validation-schema.json index 37bf8831d5d..bcf2a3349da 100644 --- a/kubernetes-model/openshift-model/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model/openshift-model/src/main/resources/schema/validation-schema.json @@ -4590,409 +4590,6 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, - "kubernetes_rbac_ClusterRole": { - "type": "object", - "description": "", - "properties": { - "aggregationRule": { - "$ref": "#/definitions/kubernetes_rbac_AggregationRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.AggregationRule" - }, - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRole", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "rules": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_PolicyRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_ClusterRoleBinding": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleBinding", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "roleRef": { - "$ref": "#/definitions/kubernetes_rbac_RoleRef", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef" - }, - "subjects": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "$ref": "#/definitions/kubernetes_rbac_Subject", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_ClusterRoleBindingList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleBindingList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBindingList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding\u003e" - ] - }, - "kubernetes_rbac_ClusterRoleList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRole", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "ClusterRoleList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.ClusterRole\u003e" - ] - }, - "kubernetes_rbac_PolicyRule": { - "type": "object", - "description": "", - "properties": { - "apiGroups": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "nonResourceURLs": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "resourceNames": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "resources": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "type": "string", - "description": "" - } - }, - "verbs": { - "type": "array", - "description": "", - "items": { - "type": "string", - "description": "" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_rbac_Role": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "Role", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "rules": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_PolicyRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_RoleBinding": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleBinding", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "roleRef": { - "$ref": "#/definitions/kubernetes_rbac_RoleRef", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef" - }, - "subjects": { - "type": "array", - "description": "", - "javaOmitEmpty": true, - "items": { - "$ref": "#/definitions/kubernetes_rbac_Subject", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_rbac_RoleBindingList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_RoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleBindingList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBindingList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.RoleBinding\u003e" - ] - }, - "kubernetes_rbac_RoleList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "rbac.authorization.k8s.io/v1", - "required": true - }, - "items": { - "type": "array", - "description": "", - "items": { - "$ref": "#/definitions/kubernetes_rbac_Role", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role" - } - }, - "kind": { - "type": "string", - "description": "", - "default": "RoleList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.rbac.Role\u003e" - ] - }, - "kubernetes_rbac_RoleRef": { - "type": "object", - "description": "", - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "kubernetes_rbac_Subject": { - "type": "object", - "description": "", - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - }, - "namespace": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, "kubernetes_resource_Quantity": { "type": "object", "description": "", @@ -5089,7 +4686,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole", + "javaType": "io.fabric8.openshift.api.model.ClusterRole", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5144,7 +4741,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5164,7 +4761,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_ClusterRoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding" } }, "kind": { @@ -5179,10 +4776,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftClusterRoleBinding\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.ClusterRoleBinding\u003e" ] }, "os_authorization_ClusterRoleList": { @@ -5200,7 +4797,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_ClusterRole", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole" + "javaType": "io.fabric8.openshift.api.model.ClusterRole" } }, "kind": { @@ -5215,10 +4812,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleList", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftClusterRole\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.ClusterRole\u003e" ] }, "os_authorization_GroupRestriction": { @@ -5415,7 +5012,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole", + "javaType": "io.fabric8.openshift.api.model.Role", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5470,7 +5067,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding", + "javaType": "io.fabric8.openshift.api.model.RoleBinding", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5490,7 +5087,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_RoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding" + "javaType": "io.fabric8.openshift.api.model.RoleBinding" } }, "kind": { @@ -5505,10 +5102,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingList", + "javaType": "io.fabric8.openshift.api.model.RoleBindingList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftRoleBinding\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.RoleBinding\u003e" ] }, "os_authorization_RoleBindingRestriction": { @@ -5533,11 +5130,11 @@ }, "spec": { "$ref": "#/definitions/os_authorization_RoleBindingRestrictionSpec", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec" } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestriction", + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestriction", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.HasMetadata" ] @@ -5560,7 +5157,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec", + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -5580,7 +5177,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_Role", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole" + "javaType": "io.fabric8.openshift.api.model.Role" } }, "kind": { @@ -5595,10 +5192,10 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleList", + "javaType": "io.fabric8.openshift.api.model.RoleList", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.OpenshiftRole\u003e" + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.Role\u003e" ] }, "os_authorization_ServiceAccountReference": { @@ -9152,7 +8749,7 @@ } }, "additionalProperties": true, - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction", + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction", "javaInterfaces": [ "io.fabric8.kubernetes.api.model.KubernetesResource" ] @@ -9567,7 +9164,7 @@ "properties": { "clusterRole": { "$ref": "#/definitions/os_oauth_ClusterRoleScopeRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction" }, "literals": { "type": "array", @@ -10751,22 +10348,6 @@ "$ref": "#/definitions/os_build_BuildRequest", "javaType": "io.fabric8.openshift.api.model.BuildRequest" }, - "ClusterRole": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRole", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole" - }, - "ClusterRoleBinding": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding" - }, - "ClusterRoleBindingList": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleBindingList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleBindingList" - }, - "ClusterRoleList": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRoleList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRoleList" - }, "ClusterVersion": { "$ref": "#/definitions/os_config_ClusterVersion", "javaType": "io.fabric8.openshift.api.model.ClusterVersion" @@ -10889,47 +10470,47 @@ }, "OpenshiftClusterRole": { "$ref": "#/definitions/os_authorization_ClusterRole", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRole" + "javaType": "io.fabric8.openshift.api.model.ClusterRole" }, "OpenshiftClusterRoleBinding": { "$ref": "#/definitions/os_authorization_ClusterRoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding" }, "OpenshiftClusterRoleBindingList": { "$ref": "#/definitions/os_authorization_ClusterRoleBindingList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList" }, "OpenshiftClusterRoleList": { "$ref": "#/definitions/os_authorization_ClusterRoleList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleList" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleList" }, "OpenshiftClusterRoleScopeRestriction": { "$ref": "#/definitions/os_oauth_ClusterRoleScopeRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction" }, "OpenshiftRole": { "$ref": "#/definitions/os_authorization_Role", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole" + "javaType": "io.fabric8.openshift.api.model.Role" }, "OpenshiftRoleBinding": { "$ref": "#/definitions/os_authorization_RoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBinding" + "javaType": "io.fabric8.openshift.api.model.RoleBinding" }, "OpenshiftRoleBindingList": { "$ref": "#/definitions/os_authorization_RoleBindingList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingList" + "javaType": "io.fabric8.openshift.api.model.RoleBindingList" }, "OpenshiftRoleBindingRestriction": { "$ref": "#/definitions/os_authorization_RoleBindingRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestriction" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestriction" }, "OpenshiftRoleBindingRestrictionSpec": { "$ref": "#/definitions/os_authorization_RoleBindingRestrictionSpec", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec" }, "OpenshiftRoleList": { "$ref": "#/definitions/os_authorization_RoleList", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleList" + "javaType": "io.fabric8.openshift.api.model.RoleList" }, "Patch": { "$ref": "#/definitions/kubernetes_apimachinery_Patch", @@ -10955,22 +10536,6 @@ "$ref": "#/definitions/kubernetes_resource_Quantity", "javaType": "io.fabric8.kubernetes.api.model.Quantity" }, - "Role": { - "$ref": "#/definitions/kubernetes_rbac_Role", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Role" - }, - "RoleBinding": { - "$ref": "#/definitions/kubernetes_rbac_RoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding" - }, - "RoleBindingList": { - "$ref": "#/definitions/kubernetes_rbac_RoleBindingList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBindingList" - }, - "RoleList": { - "$ref": "#/definitions/kubernetes_rbac_RoleList", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleList" - }, "RootPaths": { "$ref": "#/definitions/kubernetes_apimachinery_RootPaths", "javaType": "io.fabric8.kubernetes.api.model.RootPaths" @@ -12141,7 +11706,7 @@ "apiVersion": { "type": "string", "description": "", - "default": "rbac.authorization.k8s.io/v1", + "default": "authorization.openshift.io/v1", "required": true }, "kind": { @@ -12158,8 +11723,8 @@ "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_rbac_PolicyRule", - "javaType": "io.fabric8.kubernetes.api.model.rbac.PolicyRule" + "$ref": "#/definitions/os_authorization_PolicyRule", + "javaType": "io.fabric8.openshift.api.model.PolicyRule" } } }, @@ -12170,9 +11735,17 @@ "apiVersion": { "type": "string", "description": "", - "default": "rbac.authorization.k8s.io/v1", + "default": "authorization.openshift.io/v1", "required": true }, + "groupNames": { + "type": "array", + "description": "", + "items": { + "type": "string", + "description": "" + } + }, "kind": { "type": "string", "description": "", @@ -12184,16 +11757,23 @@ "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" }, "roleRef": { - "$ref": "#/definitions/kubernetes_rbac_RoleRef", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleRef" + "$ref": "#/definitions/kubernetes_core_ObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.ObjectReference" }, "subjects": { "type": "array", "description": "", - "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_rbac_Subject", - "javaType": "io.fabric8.kubernetes.api.model.rbac.Subject" + "$ref": "#/definitions/kubernetes_core_ObjectReference", + "javaType": "io.fabric8.kubernetes.api.model.ObjectReference" + } + }, + "userNames": { + "type": "array", + "description": "", + "items": { + "type": "string", + "description": "" } } }, @@ -12212,7 +11792,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_ClusterRoleBinding", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding" } }, "kind": { @@ -12233,15 +11813,15 @@ "apiVersion": { "type": "string", "description": "", - "default": "rbac.authorization.k8s.io/v1", + "default": "authorization.openshift.io/v1", "required": true }, "items": { "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_rbac_ClusterRole", - "javaType": "io.fabric8.kubernetes.api.model.rbac.ClusterRole" + "$ref": "#/definitions/os_authorization_ClusterRole", + "javaType": "io.fabric8.openshift.api.model.ClusterRole" } }, "kind": { @@ -17243,15 +16823,15 @@ "apiVersion": { "type": "string", "description": "", - "default": "rbac.authorization.k8s.io/v1", + "default": "authorization.openshift.io/v1", "required": true }, "items": { "type": "array", "description": "", "items": { - "$ref": "#/definitions/kubernetes_rbac_RoleBinding", - "javaType": "io.fabric8.kubernetes.api.model.rbac.RoleBinding" + "$ref": "#/definitions/os_authorization_RoleBinding", + "javaType": "io.fabric8.openshift.api.model.RoleBinding" } }, "kind": { @@ -17287,7 +16867,7 @@ }, "spec": { "$ref": "#/definitions/os_authorization_RoleBindingRestrictionSpec", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRoleBindingRestrictionSpec" + "javaType": "io.fabric8.openshift.api.model.RoleBindingRestrictionSpec" } }, "additionalProperties": true @@ -17322,7 +16902,7 @@ "description": "", "items": { "$ref": "#/definitions/os_authorization_Role", - "javaType": "io.fabric8.openshift.api.model.OpenshiftRole" + "javaType": "io.fabric8.openshift.api.model.Role" } }, "kind": { @@ -17338,23 +16918,6 @@ }, "additionalProperties": true }, - "roleref": { - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true - }, "rollingdeploymentstrategyparams": { "properties": { "intervalSeconds": { @@ -17672,7 +17235,7 @@ "properties": { "clusterRole": { "$ref": "#/definitions/os_oauth_ClusterRoleScopeRestriction", - "javaType": "io.fabric8.openshift.api.model.OpenshiftClusterRoleScopeRestriction" + "javaType": "io.fabric8.openshift.api.model.ClusterRoleScopeRestriction" }, "literals": { "type": "array", @@ -18438,27 +18001,6 @@ }, "additionalProperties": true }, - "subject": { - "properties": { - "apiGroup": { - "type": "string", - "description": "" - }, - "kind": { - "type": "string", - "description": "" - }, - "name": { - "type": "string", - "description": "" - }, - "namespace": { - "type": "string", - "description": "" - } - }, - "additionalProperties": true - }, "subjectaccessreview": { "properties": { "apiVersion": { diff --git a/kubernetes-model/pkg/schemagen/generate.go b/kubernetes-model/pkg/schemagen/generate.go index 3cb337ece02..74ba094c2f5 100644 --- a/kubernetes-model/pkg/schemagen/generate.go +++ b/kubernetes-model/pkg/schemagen/generate.go @@ -159,6 +159,8 @@ func (g *schemaGenerator) javaType(t reflect.Type) string { return "io.fabric8.kubernetes.api.model.HasMetadata" case "List": return pkgDesc.JavaPackage + ".BaseKubernetesList" + default: + return pkgDesc.JavaPackage + "." + t.Name() } typeName, ok := g.typeNames[t] if ok { diff --git a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V1HorizontalPodAutoscalerTest.java b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V1HorizontalPodAutoscalerTest.java new file mode 100644 index 00000000000..02ee9608d16 --- /dev/null +++ b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V1HorizontalPodAutoscalerTest.java @@ -0,0 +1,185 @@ +/** + * 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.mock; + +import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler; +import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList; +import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerBuilder; +import io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerListBuilder; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.server.mock.KubernetesServer; +import io.fabric8.kubernetes.client.utils.Utils; +import org.junit.Rule; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; + +@EnableRuleMigrationSupport +public class V1HorizontalPodAutoscalerTest { + @Rule + public KubernetesServer server = new KubernetesServer(); + + @Test + public void testList() { + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers").andReturn(200, new HorizontalPodAutoscalerListBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v1/namespaces/ns1/horizontalpodautoscalers").andReturn(200, new HorizontalPodAutoscalerListBuilder() + .addNewItem().and() + .addNewItem().and() + .build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(0, horizontalPodAutoscalerList.getItems().size()); + + horizontalPodAutoscalerList = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("ns1").list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(2, horizontalPodAutoscalerList.getItems().size()); + } + + @Test + public void testListWithLabels() { + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers?labelSelector=" + Utils.toUrlEncoded("key1=value1,key2=value2,key3=value3")).andReturn(200, new HorizontalPodAutoscalerListBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v1/namespaces/ns1/horizontalpodautoscalers?labelSelector=" + Utils.toUrlEncoded("key1=value1,key2=value2")).andReturn(200, new HorizontalPodAutoscalerListBuilder() + .addNewItem().and() + .addNewItem().and() + .addNewItem().and() + .build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v1().horizontalPodAutoscalers() + .withLabel("key1", "value1") + .withLabel("key2","value2") + .withLabel("key3","value3") + .list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(0, horizontalPodAutoscalerList.getItems().size()); + + horizontalPodAutoscalerList = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("ns1") + .withLabel("key1", "value1") + .withLabel("key2","value2") + .list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(3, horizontalPodAutoscalerList.getItems().size()); + } + + @Test + public void testGet() { + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").get(); + assertNotNull(horizontalPodAutoscaler); + + horizontalPodAutoscaler = client.autoscaling().v1().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").get(); + assertNull(horizontalPodAutoscaler); + + horizontalPodAutoscaler = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").get(); + assertNotNull(horizontalPodAutoscaler); + } + + @Test + public void testEditMissing() { + + Assertions.assertThrows(KubernetesClientException.class, () -> { + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler").andReturn(404, "error message from kubernetes").always(); + KubernetesClient client = server.getClient(); + + client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler").edit(); + }); + } + + @Test + public void testDelete() { + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + + KubernetesClient client = server.getClient(); + Boolean deleted = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").delete(); + assertTrue(deleted); + + deleted = client.autoscaling().v1().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").delete(); + assertFalse(deleted); + + deleted = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").delete(); + assertTrue(deleted); + } + + @Test + public void testDeleteMulti() { + HorizontalPodAutoscaler horizontalPodAutoscaler1 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler1").withNamespace("test").endMetadata().build(); + HorizontalPodAutoscaler horizontalPodAutoscaler2 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler2").withNamespace("ns1").endMetadata().build(); + HorizontalPodAutoscaler horizontalPodAutoscaler3 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler3").withNamespace("any").endMetadata().build(); + + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, horizontalPodAutoscaler1).once(); + server.expect().withPath("/apis/autoscaling/v1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, horizontalPodAutoscaler2).once(); + + KubernetesClient client = server.getClient(); + Boolean deleted = client.autoscaling().v1().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler1, horizontalPodAutoscaler2); + assertTrue(deleted); + + deleted = client.autoscaling().v1().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler3); + assertFalse(deleted); + } + + @Test + public void testCreateWithNameMismatch() { + Assertions.assertThrows(KubernetesClientException.class, () -> { + HorizontalPodAutoscaler horizontalPodAutoscaler1 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler1").withNamespace("test").endMetadata().build(); + KubernetesClient client = server.getClient(); + client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").create(horizontalPodAutoscaler1); + }); + } + + @Test + public void testLoadFromFile() { + KubernetesClient client = server.getClient(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v1().horizontalPodAutoscalers().load(getClass().getResourceAsStream("/test-horizontalpodautoscaler.yml")).get(); + assertEquals("php-apache", horizontalPodAutoscaler.getMetadata().getName()); + } + + @Test + public void testBuild() { + HorizontalPodAutoscaler horizontalPodAutoscaler = new HorizontalPodAutoscalerBuilder() + .withNewMetadata().withName("test-hpa").withNamespace("test").endMetadata() + .withNewSpec() + .withNewScaleTargetRef() + .withApiVersion("apps/v1") + .withKind("Deployment") + .withName("the-deployment") + .endScaleTargetRef() + .withMinReplicas(1) + .withMaxReplicas(10) + .endSpec() + .build(); + + server.expect().withPath("/apis/autoscaling/v1/namespaces/test/horizontalpodautoscalers/test-hpa").andReturn(200, horizontalPodAutoscaler).once(); + + KubernetesClient client = server.getClient(); + horizontalPodAutoscaler = client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("test").withName("test-hpa").get(); + assertNotNull(horizontalPodAutoscaler); + } + +} diff --git a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta1HorizontalPodAutoscalerTest.java b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta1HorizontalPodAutoscalerTest.java new file mode 100644 index 00000000000..89ecd779643 --- /dev/null +++ b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta1HorizontalPodAutoscalerTest.java @@ -0,0 +1,185 @@ +/** + * 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.mock; + +import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler; +import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList; +import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerBuilder; +import io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerListBuilder; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.server.mock.KubernetesServer; +import io.fabric8.kubernetes.client.utils.Utils; +import org.junit.Rule; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; + +@EnableRuleMigrationSupport +public class V2beta1HorizontalPodAutoscalerTest { + @Rule + public KubernetesServer server = new KubernetesServer(); + + @Test + public void testList() { + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers").andReturn(200, new HorizontalPodAutoscalerListBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/ns1/horizontalpodautoscalers").andReturn(200, new HorizontalPodAutoscalerListBuilder() + .addNewItem().and() + .addNewItem().and() + .build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(0, horizontalPodAutoscalerList.getItems().size()); + + horizontalPodAutoscalerList = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("ns1").list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(2, horizontalPodAutoscalerList.getItems().size()); + } + + @Test + public void testListWithLabels() { + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers?labelSelector=" + Utils.toUrlEncoded("key1=value1,key2=value2,key3=value3")).andReturn(200, new HorizontalPodAutoscalerListBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/ns1/horizontalpodautoscalers?labelSelector=" + Utils.toUrlEncoded("key1=value1,key2=value2")).andReturn(200, new HorizontalPodAutoscalerListBuilder() + .addNewItem().and() + .addNewItem().and() + .addNewItem().and() + .build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v2beta1().horizontalPodAutoscalers() + .withLabel("key1", "value1") + .withLabel("key2","value2") + .withLabel("key3","value3") + .list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(0, horizontalPodAutoscalerList.getItems().size()); + + horizontalPodAutoscalerList = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("ns1") + .withLabel("key1", "value1") + .withLabel("key2","value2") + .list(); + assertNotNull(horizontalPodAutoscalerList); + assertEquals(3, horizontalPodAutoscalerList.getItems().size()); + } + + @Test + public void testGet() { + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + + KubernetesClient client = server.getClient(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").get(); + assertNotNull(horizontalPodAutoscaler); + + horizontalPodAutoscaler = client.autoscaling().v2beta1().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").get(); + assertNull(horizontalPodAutoscaler); + + horizontalPodAutoscaler = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").get(); + assertNotNull(horizontalPodAutoscaler); + } + + @Test + public void testEditMissing() { + + Assertions.assertThrows(KubernetesClientException.class, () -> { + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler").andReturn(404, "error message from kubernetes").always(); + KubernetesClient client = server.getClient(); + + client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler").edit(); + }); + } + + @Test + public void testDelete() { + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); + + KubernetesClient client = server.getClient(); + Boolean deleted = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").delete(); + assertTrue(deleted); + + deleted = client.autoscaling().v2beta1().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").delete(); + assertFalse(deleted); + + deleted = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").delete(); + assertTrue(deleted); + } + + @Test + public void testDeleteMulti() { + HorizontalPodAutoscaler horizontalPodAutoscaler1 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler1").withNamespace("test").endMetadata().build(); + HorizontalPodAutoscaler horizontalPodAutoscaler2 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler2").withNamespace("ns1").endMetadata().build(); + HorizontalPodAutoscaler horizontalPodAutoscaler3 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler3").withNamespace("any").endMetadata().build(); + + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler1").andReturn(200, horizontalPodAutoscaler1).once(); + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, horizontalPodAutoscaler2).once(); + + KubernetesClient client = server.getClient(); + Boolean deleted = client.autoscaling().v2beta1().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler1, horizontalPodAutoscaler2); + assertTrue(deleted); + + deleted = client.autoscaling().v2beta1().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler3); + assertFalse(deleted); + } + + @Test + public void testCreateWithNameMismatch() { + Assertions.assertThrows(KubernetesClientException.class, () -> { + HorizontalPodAutoscaler horizontalPodAutoscaler1 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler1").withNamespace("test").endMetadata().build(); + KubernetesClient client = server.getClient(); + client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").create(horizontalPodAutoscaler1); + }); + } + + @Test + public void testLoadFromFile() { + KubernetesClient client = server.getClient(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v2beta1().horizontalPodAutoscalers().load(getClass().getResourceAsStream("/test-horizontalpodautoscaler.yml")).get(); + assertEquals("php-apache", horizontalPodAutoscaler.getMetadata().getName()); + } + + @Test + public void testBuild() { + HorizontalPodAutoscaler horizontalPodAutoscaler = new HorizontalPodAutoscalerBuilder() + .withNewMetadata().withName("test-hpa").withNamespace("test").endMetadata() + .withNewSpec() + .withNewScaleTargetRef() + .withApiVersion("apps/v1") + .withKind("Deployment") + .withName("the-deployment") + .endScaleTargetRef() + .withMinReplicas(1) + .withMaxReplicas(10) + .endSpec() + .build(); + + server.expect().withPath("/apis/autoscaling/v2beta1/namespaces/test/horizontalpodautoscalers/test-hpa").andReturn(200, horizontalPodAutoscaler).once(); + + KubernetesClient client = server.getClient(); + horizontalPodAutoscaler = client.autoscaling().v2beta1().horizontalPodAutoscalers().inNamespace("test").withName("test-hpa").get(); + assertNotNull(horizontalPodAutoscaler); + } + +} diff --git a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/HorizontalPodAutoscalerTest.java b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta2HorizontalPodAutoscalerTest.java similarity index 79% rename from kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/HorizontalPodAutoscalerTest.java rename to kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta2HorizontalPodAutoscalerTest.java index bc634b6b3c1..48e16107201 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/HorizontalPodAutoscalerTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/V2beta2HorizontalPodAutoscalerTest.java @@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; @EnableRuleMigrationSupport -public class HorizontalPodAutoscalerTest { +public class V2beta2HorizontalPodAutoscalerTest { @Rule public KubernetesServer server = new KubernetesServer(); @@ -49,11 +49,11 @@ public void testList() { .build()).once(); KubernetesClient client = server.getClient(); - HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().horizontalPodAutoscalers().inNamespace("test").list(); + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").list(); assertNotNull(horizontalPodAutoscalerList); assertEquals(0, horizontalPodAutoscalerList.getItems().size()); - horizontalPodAutoscalerList = client.autoscaling().horizontalPodAutoscalers().inNamespace("ns1").list(); + horizontalPodAutoscalerList = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("ns1").list(); assertNotNull(horizontalPodAutoscalerList); assertEquals(2, horizontalPodAutoscalerList.getItems().size()); } @@ -68,7 +68,7 @@ public void testListWithLabels() { .build()).once(); KubernetesClient client = server.getClient(); - HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().horizontalPodAutoscalers() + HorizontalPodAutoscalerList horizontalPodAutoscalerList = client.autoscaling().v2beta2().horizontalPodAutoscalers() .withLabel("key1", "value1") .withLabel("key2","value2") .withLabel("key3","value3") @@ -76,7 +76,7 @@ public void testListWithLabels() { assertNotNull(horizontalPodAutoscalerList); assertEquals(0, horizontalPodAutoscalerList.getItems().size()); - horizontalPodAutoscalerList = client.autoscaling().horizontalPodAutoscalers().inNamespace("ns1") + horizontalPodAutoscalerList = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("ns1") .withLabel("key1", "value1") .withLabel("key2","value2") .list(); @@ -90,13 +90,13 @@ public void testGet() { server.expect().withPath("/apis/autoscaling/v2beta2/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); KubernetesClient client = server.getClient(); - HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").get(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").get(); assertNotNull(horizontalPodAutoscaler); - horizontalPodAutoscaler = client.autoscaling().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").get(); + horizontalPodAutoscaler = client.autoscaling().v2beta2().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").get(); assertNull(horizontalPodAutoscaler); - horizontalPodAutoscaler = client.autoscaling().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").get(); + horizontalPodAutoscaler = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").get(); assertNotNull(horizontalPodAutoscaler); } @@ -107,7 +107,7 @@ public void testEditMissing() { server.expect().withPath("/apis/autoscaling/v2beta2/namespaces/test/horizontalpodautoscalers/horizontalpodautoscaler").andReturn(404, "error message from kubernetes").always(); KubernetesClient client = server.getClient(); - client.autoscaling().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler").edit(); + client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler").edit(); }); } @@ -117,13 +117,13 @@ public void testDelete() { server.expect().withPath("/apis/autoscaling/v2beta2/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, new HorizontalPodAutoscalerBuilder().build()).once(); KubernetesClient client = server.getClient(); - Boolean deleted = client.autoscaling().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").delete(); + Boolean deleted = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").delete(); assertTrue(deleted); - deleted = client.autoscaling().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").delete(); + deleted = client.autoscaling().v2beta2().horizontalPodAutoscalers().withName("horizontalpodautoscaler2").delete(); assertFalse(deleted); - deleted = client.autoscaling().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").delete(); + deleted = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("ns1").withName("horizontalpodautoscaler2").delete(); assertTrue(deleted); } @@ -137,10 +137,10 @@ public void testDeleteMulti() { server.expect().withPath("/apis/autoscaling/v2beta2/namespaces/ns1/horizontalpodautoscalers/horizontalpodautoscaler2").andReturn(200, horizontalPodAutoscaler2).once(); KubernetesClient client = server.getClient(); - Boolean deleted = client.autoscaling().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler1, horizontalPodAutoscaler2); + Boolean deleted = client.autoscaling().v2beta2().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler1, horizontalPodAutoscaler2); assertTrue(deleted); - deleted = client.autoscaling().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler3); + deleted = client.autoscaling().v2beta2().horizontalPodAutoscalers().inAnyNamespace().delete(horizontalPodAutoscaler3); assertFalse(deleted); } @@ -149,14 +149,14 @@ public void testCreateWithNameMismatch() { Assertions.assertThrows(KubernetesClientException.class, () -> { HorizontalPodAutoscaler horizontalPodAutoscaler1 = new HorizontalPodAutoscalerBuilder().withNewMetadata().withName("horizontalpodautoscaler1").withNamespace("test").endMetadata().build(); KubernetesClient client = server.getClient(); - client.autoscaling().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").create(horizontalPodAutoscaler1); + client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").withName("horizontalpodautoscaler1").create(horizontalPodAutoscaler1); }); } @Test public void testLoadFromFile() { KubernetesClient client = server.getClient(); - HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().horizontalPodAutoscalers().load(getClass().getResourceAsStream("/test-horizontalpodautoscaler.yml")).get(); + HorizontalPodAutoscaler horizontalPodAutoscaler = client.autoscaling().v2beta2().horizontalPodAutoscalers().load(getClass().getResourceAsStream("/test-horizontalpodautoscaler.yml")).get(); assertEquals("php-apache", horizontalPodAutoscaler.getMetadata().getName()); } @@ -178,7 +178,7 @@ public void testBuild() { server.expect().withPath("/apis/autoscaling/v2beta2/namespaces/test/horizontalpodautoscalers/test-hpa").andReturn(200, horizontalPodAutoscaler).once(); KubernetesClient client = server.getClient(); - horizontalPodAutoscaler = client.autoscaling().horizontalPodAutoscalers().inNamespace("test").withName("test-hpa").get(); + horizontalPodAutoscaler = client.autoscaling().v2beta2().horizontalPodAutoscalers().inNamespace("test").withName("test-hpa").get(); assertNotNull(horizontalPodAutoscaler); } diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleBindingTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleBindingTest.java index aaf0c0b8a88..8e99ef4fe35 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleBindingTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleBindingTest.java @@ -16,8 +16,8 @@ package io.fabric8.openshift.client.server.mock; import com.fasterxml.jackson.databind.ObjectMapper; -import io.fabric8.openshift.api.model.OpenshiftRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftRoleBindingBuilder; +import io.fabric8.openshift.api.model.RoleBinding; +import io.fabric8.openshift.api.model.RoleBindingBuilder; import io.fabric8.openshift.client.NamespacedOpenShiftClient; import okhttp3.mockwebserver.RecordedRequest; import org.junit.Rule; @@ -31,7 +31,7 @@ public class OpenshiftRoleBindingTest { @Rule public OpenShiftServer server = new OpenShiftServer(); - private OpenshiftRoleBinding expectedOpenshiftRoleBinding = new OpenshiftRoleBindingBuilder() + private RoleBinding expectedRoleBinding = new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") @@ -43,12 +43,12 @@ public class OpenshiftRoleBindingTest { @Test public void testCreateWithOnlySubjects() throws Exception { - server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedOpenshiftRoleBinding).once(); + server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().create( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().create( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addNewSubject().withKind("User").withName("testuser1").endSubject() .addNewSubject().withKind("User").withName("testuser2").endSubject() @@ -56,60 +56,60 @@ public void testCreateWithOnlySubjects() throws Exception { .addNewSubject().withKind("Group").withName("testgroup").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().readByteArray())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().readByteArray())); } @Test public void testCreateWithUserNamesAndGroupsAndNoSubjects() throws Exception { - server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedOpenshiftRoleBinding).once(); + server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().create( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().create( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } @Test public void testCreateWithUserNamesAndGroupsAndOverwriteSubjects() throws Exception { - server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedOpenshiftRoleBinding).once(); + server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().create( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().create( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .addNewSubject().withKind("User").withName("unexpected").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } @Test public void testReplaceWithOnlySubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); - server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); + server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").replace( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").replace( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addNewSubject().withKind("User").withName("testuser1").endSubject() .addNewSubject().withKind("User").withName("testuser2").endSubject() @@ -117,63 +117,63 @@ public void testReplaceWithOnlySubjects() throws Exception { .addNewSubject().withKind("Group").withName("testgroup").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } @Test public void testReplaceWithUserNamesAndGroupsAndNoSubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); - server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); + server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").replace( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").replace( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } @Test public void testReplaceWithUserNamesAndGroupsAndOverwriteSubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); - server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); + server.expect().put().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").replace( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").replace( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .addNewSubject().withKind("User").withName("unexpected").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } @Test public void testPatchWithOnlySubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new OpenshiftRoleBindingBuilder().addToUserNames("unexpected").build()).once(); - server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new RoleBindingBuilder().addToUserNames("unexpected").build()).once(); + server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").patch( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").patch( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addNewSubject().withKind("User").withName("testuser1").endSubject() .addNewSubject().withKind("User").withName("testuser2").endSubject() @@ -181,7 +181,7 @@ public void testPatchWithOnlySubjects() throws Exception { .addNewSubject().withKind("Group").withName("testgroup").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); assertEquals( @@ -192,19 +192,19 @@ public void testPatchWithOnlySubjects() throws Exception { @Test public void testPatchWithUserNamesAndGroupsAndNoSubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new OpenshiftRoleBindingBuilder().addToUserNames("unexpected").build()).once(); - server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new RoleBindingBuilder().addToUserNames("unexpected").build()).once(); + server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").patch( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").patch( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); assertEquals( @@ -215,20 +215,20 @@ public void testPatchWithUserNamesAndGroupsAndNoSubjects() throws Exception { @Test public void testPatchWithUserNamesAndGroupsAndOverwriteSubjects() throws Exception { - server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new OpenshiftRoleBindingBuilder().addToUserNames("unexpected").build()).once(); - server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedOpenshiftRoleBinding).once(); + server.expect().get().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, new RoleBindingBuilder().addToUserNames("unexpected").build()).once(); + server.expect().patch().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings/testrb").andReturn(200, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().withName("testrb").patch( - new OpenshiftRoleBindingBuilder() + RoleBinding response = client.roleBindings().withName("testrb").patch( + new RoleBindingBuilder() .withNewMetadata().endMetadata() .addToUserNames("testuser1", "testuser2", "system:serviceaccount:test:svcacct") .addToGroupNames("testgroup") .addNewSubject().withKind("User").withName("unexpected").endSubject() .build() ); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); assertEquals( @@ -239,21 +239,21 @@ public void testPatchWithUserNamesAndGroupsAndOverwriteSubjects() throws Excepti @Test public void testCreateInline() throws Exception { - server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedOpenshiftRoleBinding).once(); + server.expect().post().withPath("/apis/authorization.openshift.io/v1/namespaces/test/rolebindings").andReturn(201, expectedRoleBinding).once(); NamespacedOpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleBinding response = client.roleBindings().createNew() + RoleBinding response = client.roleBindings().createNew() .withNewMetadata().endMetadata() .addNewSubject().withKind("User").withName("testuser1").endSubject() .addNewSubject().withKind("User").withName("testuser2").endSubject() .addNewSubject().withKind("ServiceAccount").withName("svcacct").endSubject() .addNewSubject().withKind("Group").withName("testgroup").endSubject() .done(); - assertEquals(expectedOpenshiftRoleBinding, response); + assertEquals(expectedRoleBinding, response); RecordedRequest request = server.getLastRequest(); - assertEquals(expectedOpenshiftRoleBinding, new ObjectMapper().readerFor(OpenshiftRoleBinding.class).readValue(request.getBody().inputStream())); + assertEquals(expectedRoleBinding, new ObjectMapper().readerFor(RoleBinding.class).readValue(request.getBody().inputStream())); } } diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleTest.java index f721220815d..9a3f1aeb09a 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenshiftRoleTest.java @@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport; -import io.fabric8.openshift.api.model.OpenshiftRole; -import io.fabric8.openshift.api.model.OpenshiftRoleBuilder; -import io.fabric8.openshift.api.model.OpenshiftRoleList; -import io.fabric8.openshift.api.model.OpenshiftRoleListBuilder; +import io.fabric8.openshift.api.model.Role; +import io.fabric8.openshift.api.model.RoleBuilder; +import io.fabric8.openshift.api.model.RoleList; +import io.fabric8.openshift.api.model.RoleListBuilder; import io.fabric8.openshift.client.OpenShiftClient; @EnableRuleMigrationSupport @@ -38,8 +38,8 @@ public class OpenshiftRoleTest { @Test public void testList() { - server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/test/roles").andReturn(200, new OpenshiftRoleListBuilder().build()).once(); - server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/ns1/roles").andReturn(200, new OpenshiftRoleListBuilder() + server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/test/roles").andReturn(200, new RoleListBuilder().build()).once(); + server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/ns1/roles").andReturn(200, new RoleListBuilder() .addNewItem().and() .addNewItem().and().build()).once(); server.expect().withPath("/apis").andReturn(200, new APIGroupListBuilder() @@ -53,7 +53,7 @@ public void testList() { .endGroup() .build()).always(); - server.expect().withPath("/apis/authorization.openshift.io/v1/roles").andReturn(200, new OpenshiftRoleListBuilder() + server.expect().withPath("/apis/authorization.openshift.io/v1/roles").andReturn(200, new RoleListBuilder() .addNewItem().and() .addNewItem().and() .addNewItem() @@ -61,7 +61,7 @@ public void testList() { OpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRoleList roleList = client.roles().list(); + RoleList roleList = client.roles().list(); assertNotNull(roleList); assertEquals(0, roleList.getItems().size()); @@ -76,17 +76,17 @@ public void testList() { @Test public void testGet() { - server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/test/roles/role1").andReturn(200, new OpenshiftRoleBuilder() + server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/test/roles/role1").andReturn(200, new RoleBuilder() .withNewMetadata().withName("role1").endMetadata() .build()).once(); - server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/ns1/roles/role2").andReturn(200, new OpenshiftRoleBuilder() + server.expect().withPath("/apis/authorization.openshift.io/v1/namespaces/ns1/roles/role2").andReturn(200, new RoleBuilder() .withNewMetadata().withName("role2").endMetadata() .build()).once(); OpenShiftClient client = server.getOpenshiftClient(); - OpenshiftRole role = client.roles().withName("role1").get(); + Role role = client.roles().withName("role1").get(); assertNotNull(role); assertEquals("role1", role.getMetadata().getName()); diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java index 7824f7e3a38..c0ec7a21283 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java @@ -67,9 +67,9 @@ import io.fabric8.openshift.api.model.DoneableOAuthAccessToken; import io.fabric8.openshift.api.model.DoneableOAuthAuthorizeToken; import io.fabric8.openshift.api.model.DoneableOAuthClient; -import io.fabric8.openshift.api.model.DoneableOpenshiftClusterRoleBinding; -import io.fabric8.openshift.api.model.DoneableOpenshiftRole; -import io.fabric8.openshift.api.model.DoneableOpenshiftRoleBinding; +import io.fabric8.openshift.api.model.DoneableClusterRoleBinding; +import io.fabric8.openshift.api.model.DoneableRole; +import io.fabric8.openshift.api.model.DoneableRoleBinding; import io.fabric8.openshift.api.model.DoneableProject; import io.fabric8.openshift.api.model.DoneableRoute; import io.fabric8.openshift.api.model.DoneableSecurityContextConstraints; @@ -87,12 +87,12 @@ import io.fabric8.openshift.api.model.OAuthAuthorizeTokenList; import io.fabric8.openshift.api.model.OAuthClient; import io.fabric8.openshift.api.model.OAuthClientList; -import io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList; -import io.fabric8.openshift.api.model.OpenshiftRole; -import io.fabric8.openshift.api.model.OpenshiftRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftRoleBindingList; -import io.fabric8.openshift.api.model.OpenshiftRoleList; +import io.fabric8.openshift.api.model.ClusterRoleBinding; +import io.fabric8.openshift.api.model.ClusterRoleBindingList; +import io.fabric8.openshift.api.model.Role; +import io.fabric8.openshift.api.model.RoleBinding; +import io.fabric8.openshift.api.model.RoleBindingList; +import io.fabric8.openshift.api.model.RoleList; import io.fabric8.openshift.api.model.Project; import io.fabric8.openshift.api.model.ProjectList; import io.fabric8.openshift.api.model.Route; @@ -107,6 +107,7 @@ import io.fabric8.openshift.client.dsl.internal.*; import io.fabric8.openshift.client.dsl.internal.BuildConfigOperationsImpl; import io.fabric8.openshift.client.dsl.internal.BuildOperationsImpl; +import io.fabric8.openshift.client.dsl.internal.ClusterRoleBindingOperationsImpl; import io.fabric8.openshift.client.dsl.internal.DeploymentConfigOperationsImpl; import io.fabric8.openshift.client.dsl.internal.GroupOperationsImpl; import io.fabric8.openshift.client.dsl.internal.ImageStreamOperationsImpl; @@ -114,9 +115,6 @@ import io.fabric8.openshift.client.dsl.internal.OAuthAccessTokenOperationsImpl; import io.fabric8.openshift.client.dsl.internal.OAuthAuthorizeTokenOperationsImpl; import io.fabric8.openshift.client.dsl.internal.OAuthClientOperationsImpl; -import io.fabric8.openshift.client.dsl.internal.OpenshiftClusterRoleBindingOperationsImpl; -import io.fabric8.openshift.client.dsl.internal.OpenshiftRoleBindingOperationsImpl; -import io.fabric8.openshift.client.dsl.internal.OpenshiftRoleOperationsImpl; import io.fabric8.openshift.client.dsl.internal.ProjectOperationsImpl; import io.fabric8.openshift.client.dsl.internal.RouteOperationsImpl; import io.fabric8.openshift.client.dsl.internal.SecurityContextConstraintsOperationsImpl; @@ -433,13 +431,13 @@ public ProjectRequestOperation projectrequests() { } @Override - public MixedOperation> roles() { - return new OpenshiftRoleOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); + public MixedOperation> roles() { + return new RoleOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); } @Override - public MixedOperation> roleBindings() { - return new OpenshiftRoleBindingOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); + public MixedOperation> roleBindings() { + return new RoleBindingOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); } @Override @@ -463,8 +461,8 @@ public SubjectAccessReviewOperation> clusterRoleBindings() { - return new OpenshiftClusterRoleBindingOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); + public MixedOperation> clusterRoleBindings() { + return new ClusterRoleBindingOperationsImpl(httpClient, OpenShiftConfig.wrap(getConfiguration())); } @Override diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java index daf2ffbf24c..bc24027e28b 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java @@ -22,6 +22,23 @@ import io.fabric8.kubernetes.client.VersionInfo; import io.fabric8.kubernetes.client.dsl.*; import io.fabric8.openshift.api.model.*; +import io.fabric8.openshift.api.model.DoneableBuild; +import io.fabric8.openshift.api.model.DoneableBuildConfig; +import io.fabric8.openshift.api.model.DoneableClusterRoleBinding; +import io.fabric8.openshift.api.model.DoneableDeploymentConfig; +import io.fabric8.openshift.api.model.DoneableGroup; +import io.fabric8.openshift.api.model.DoneableImageStream; +import io.fabric8.openshift.api.model.DoneableImageStreamTag; +import io.fabric8.openshift.api.model.DoneableOAuthAccessToken; +import io.fabric8.openshift.api.model.DoneableOAuthAuthorizeToken; +import io.fabric8.openshift.api.model.DoneableOAuthClient; +import io.fabric8.openshift.api.model.DoneableProject; +import io.fabric8.openshift.api.model.DoneableRole; +import io.fabric8.openshift.api.model.DoneableRoleBinding; +import io.fabric8.openshift.api.model.DoneableRoute; +import io.fabric8.openshift.api.model.DoneableSecurityContextConstraints; +import io.fabric8.openshift.api.model.DoneableTemplate; +import io.fabric8.openshift.api.model.DoneableUser; import io.fabric8.openshift.client.dsl.*; import java.net.URL; @@ -72,9 +89,9 @@ public interface OpenShiftClient extends KubernetesClient { ProjectRequestOperation projectrequests(); - MixedOperation> roles(); + MixedOperation> roles(); - MixedOperation> + MixedOperation> roleBindings(); MixedOperation> routes(); @@ -87,7 +104,7 @@ public interface OpenShiftClient extends KubernetesClient { SubjectAccessReviewOperation subjectAccessReviews(); - MixedOperation> clusterRoleBindings(); + MixedOperation> clusterRoleBindings(); FunctionCallable withRequestConfig(RequestConfig requestConfig); diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftClusterRoleBindingOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ClusterRoleBindingOperationsImpl.java similarity index 53% rename from openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftClusterRoleBindingOperationsImpl.java rename to openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ClusterRoleBindingOperationsImpl.java index 86023931e78..b9acd32952d 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftClusterRoleBindingOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ClusterRoleBindingOperationsImpl.java @@ -18,29 +18,29 @@ import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.base.OperationContext; import okhttp3.OkHttpClient; -import io.fabric8.openshift.api.model.OpenshiftClusterRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftClusterRoleBindingList; -import io.fabric8.openshift.api.model.DoneableOpenshiftClusterRoleBinding; +import io.fabric8.openshift.api.model.ClusterRoleBinding; +import io.fabric8.openshift.api.model.ClusterRoleBindingList; +import io.fabric8.openshift.api.model.DoneableClusterRoleBinding; import io.fabric8.openshift.client.OpenShiftConfig; import static io.fabric8.openshift.client.OpenShiftAPIGroups.AUTHORIZATION; -public class OpenshiftClusterRoleBindingOperationsImpl extends OpenShiftOperation> { +public class ClusterRoleBindingOperationsImpl extends OpenShiftOperation> { - public OpenshiftClusterRoleBindingOperationsImpl(OkHttpClient client, OpenShiftConfig config) { + public ClusterRoleBindingOperationsImpl(OkHttpClient client, OpenShiftConfig config) { this(new OperationContext().withOkhttpClient(client).withConfig(config)); } - public OpenshiftClusterRoleBindingOperationsImpl(OperationContext context) { + public ClusterRoleBindingOperationsImpl(OperationContext context) { super(context.withApiGroupName(AUTHORIZATION) .withPlural("clusterrolebindings")); - this.type = OpenshiftClusterRoleBinding.class; - this.listType = OpenshiftClusterRoleBindingList.class; - this.doneableType = DoneableOpenshiftClusterRoleBinding.class; + this.type = ClusterRoleBinding.class; + this.listType = ClusterRoleBindingList.class; + this.doneableType = DoneableClusterRoleBinding.class; } @Override - public OpenshiftClusterRoleBindingOperationsImpl newInstance(OperationContext context) { - return new OpenshiftClusterRoleBindingOperationsImpl(context); + public ClusterRoleBindingOperationsImpl newInstance(OperationContext context) { + return new ClusterRoleBindingOperationsImpl(context); } } diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleBindingOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleBindingOperationsImpl.java similarity index 56% rename from openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleBindingOperationsImpl.java rename to openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleBindingOperationsImpl.java index 3f7bbbda54f..db9f1b6af70 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleBindingOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleBindingOperationsImpl.java @@ -18,62 +18,63 @@ import io.fabric8.kubernetes.api.builder.TypedVisitor; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder; -import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.base.OperationContext; -import io.fabric8.openshift.api.model.DoneableOpenshiftRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftRoleBinding; -import io.fabric8.openshift.api.model.OpenshiftRoleBindingBuilder; -import io.fabric8.openshift.api.model.OpenshiftRoleBindingList; +import io.fabric8.openshift.api.model.DoneableRoleBinding; +import io.fabric8.openshift.api.model.RoleBinding; +import io.fabric8.openshift.api.model.RoleBindingBuilder; +import io.fabric8.openshift.api.model.RoleBindingList; import io.fabric8.openshift.client.OpenShiftConfig; import okhttp3.OkHttpClient; import java.io.IOException; import java.util.List; -import java.util.Map; -import java.util.TreeMap; import java.util.concurrent.ExecutionException; import static io.fabric8.openshift.client.OpenShiftAPIGroups.AUTHORIZATION; -public class OpenshiftRoleBindingOperationsImpl extends OpenShiftOperation> { +public class RoleBindingOperationsImpl extends OpenShiftOperation> { - public OpenshiftRoleBindingOperationsImpl(OkHttpClient client, OpenShiftConfig config) { + public static final String SERVICE_ACCOUNT = "ServiceAccount"; + public static final String USER = "User"; + public static final String GROUP = "Group"; + + public RoleBindingOperationsImpl(OkHttpClient client, OpenShiftConfig config) { this(new OperationContext().withOkhttpClient(client).withConfig(config)); } - public OpenshiftRoleBindingOperationsImpl(OperationContext context) { + public RoleBindingOperationsImpl(OperationContext context) { super(context.withApiGroupName(AUTHORIZATION) .withPlural("rolebindings")); - this.type = OpenshiftRoleBinding.class; - this.listType = OpenshiftRoleBindingList.class; - this.doneableType = DoneableOpenshiftRoleBinding.class; + this.type = RoleBinding.class; + this.listType = RoleBindingList.class; + this.doneableType = DoneableRoleBinding.class; } @Override - public OpenshiftRoleBindingOperationsImpl newInstance(OperationContext context) { - return new OpenshiftRoleBindingOperationsImpl(context); + public RoleBindingOperationsImpl newInstance(OperationContext context) { + return new RoleBindingOperationsImpl(context); } @Override - public OpenshiftRoleBinding replace(OpenshiftRoleBinding item) { - OpenshiftRoleBinding enriched = enrichRoleBinding(item); + public RoleBinding replace(RoleBinding item) { + RoleBinding enriched = enrichRoleBinding(item); return super.replace(enriched); } @Override - public OpenshiftRoleBinding patch(OpenshiftRoleBinding item) { - OpenshiftRoleBinding enriched = enrichRoleBinding(item); + public RoleBinding patch(RoleBinding item) { + RoleBinding enriched = enrichRoleBinding(item); return super.patch(enriched); } @Override - protected OpenshiftRoleBinding handleCreate(OpenshiftRoleBinding resource) throws ExecutionException, InterruptedException, KubernetesClientException, IOException { + protected RoleBinding handleCreate(RoleBinding resource) throws ExecutionException, InterruptedException, IOException { return super.handleCreate(enrichRoleBinding(resource)); } - private OpenshiftRoleBinding enrichRoleBinding(OpenshiftRoleBinding binding) { - OpenshiftRoleBindingBuilder builder = new OpenshiftRoleBindingBuilder(binding); + private RoleBinding enrichRoleBinding(RoleBinding binding) { + RoleBindingBuilder builder = new RoleBindingBuilder(binding); if ((binding.getUserNames() != null && !binding.getUserNames().isEmpty()) || (binding.getGroupNames() != null && !binding.getGroupNames().isEmpty())) { @@ -86,18 +87,18 @@ private OpenshiftRoleBinding enrichRoleBinding(OpenshiftRoleBinding binding) { return builder.build(); } - private void enrichSubjectsNamespace(OpenshiftRoleBindingBuilder builder) { + private void enrichSubjectsNamespace(RoleBindingBuilder builder) { builder.accept(new TypedVisitor() { @Override public void visit(ObjectReferenceBuilder o) { - if (o.getKind() != null && o.getKind().equals("ServiceAccount") && (o.getNamespace() == null || o.getNamespace().isEmpty())) { + if (o.getKind() != null && o.getKind().equals(SERVICE_ACCOUNT) && (o.getNamespace() == null || o.getNamespace().isEmpty())) { o.withNamespace(getNamespace()); } } }); } - private void enrichFromUsersAndGroups(OpenshiftRoleBindingBuilder builder, List userNames, List groupNames) { + private void enrichFromUsersAndGroups(RoleBindingBuilder builder, List userNames, List groupNames) { builder.withSubjects(); if (userNames != null) { @@ -105,36 +106,36 @@ private void enrichFromUsersAndGroups(OpenshiftRoleBindingBuilder builder, List< if (userName.startsWith("system:serviceaccount:")) { String[] splitUserName = userName.split(":"); if (splitUserName.length == 4) { - builder.addNewSubject().withKind("ServiceAccount").withNamespace(splitUserName[2]).withName(splitUserName[3]).endSubject(); + builder.addNewSubject().withKind(SERVICE_ACCOUNT).withNamespace(splitUserName[2]).withName(splitUserName[3]).endSubject(); continue; } } - builder.addNewSubject().withKind("User").withName(userName).endSubject(); + builder.addNewSubject().withKind(USER).withName(userName).endSubject(); } } if (groupNames != null) { for (String groupName : groupNames) { - builder.addNewSubject().withKind("Group").withName(groupName).endSubject(); + builder.addNewSubject().withKind(GROUP).withName(groupName).endSubject(); } } } - private void enrichFromSubjects(OpenshiftRoleBindingBuilder builder, List subjects) { + private void enrichFromSubjects(RoleBindingBuilder builder, List subjects) { for (ObjectReference ref : subjects) { switch (ref.getKind()) { - case "User": + case USER: builder.addToUserNames(ref.getName()); break; - case "ServiceAccount": + case SERVICE_ACCOUNT: String namespace = ref.getNamespace(); if (namespace == null || namespace.isEmpty()) { namespace = getNamespace(); } builder.addToUserNames("system:serviceaccount:" + namespace + ":" + ref.getName()); break; - case "Group": + case GROUP: builder.addToGroupNames(ref.getName()); break; } diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleOperationsImpl.java similarity index 59% rename from openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleOperationsImpl.java rename to openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleOperationsImpl.java index 55f29254376..4e923863786 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenshiftRoleOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/RoleOperationsImpl.java @@ -17,29 +17,30 @@ import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.base.OperationContext; -import io.fabric8.openshift.api.model.DoneableOpenshiftRole; -import io.fabric8.openshift.api.model.OpenshiftRole; -import io.fabric8.openshift.api.model.OpenshiftRoleList; +import io.fabric8.openshift.api.model.DoneableRole; +import io.fabric8.openshift.api.model.Role; +import io.fabric8.openshift.api.model.RoleList; import io.fabric8.openshift.client.OpenShiftConfig; import okhttp3.OkHttpClient; import static io.fabric8.openshift.client.OpenShiftAPIGroups.AUTHORIZATION; -public class OpenshiftRoleOperationsImpl extends OpenShiftOperation> { +public class RoleOperationsImpl extends OpenShiftOperation> { - public OpenshiftRoleOperationsImpl(OkHttpClient client, OpenShiftConfig config) { + public RoleOperationsImpl(OkHttpClient client, OpenShiftConfig config) { this((new OperationContext()).withOkhttpClient(client).withConfig(config)); } - public OpenshiftRoleOperationsImpl(OperationContext context) { + public RoleOperationsImpl(OperationContext context) { super(context.withApiGroupName(AUTHORIZATION).withApiGroupVersion("v1").withPlural("roles")); - this.type = OpenshiftRole.class; - this.listType = OpenshiftRoleList.class; - this.doneableType = DoneableOpenshiftRole.class; + this.type = Role.class; + this.listType = RoleList.class; + this.doneableType = DoneableRole.class; } - public OpenshiftRoleOperationsImpl newInstance(OperationContext context) { - return new OpenshiftRoleOperationsImpl(context); + @Override + public RoleOperationsImpl newInstance(OperationContext context) { + return new RoleOperationsImpl(context); } } diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/osgi/ManagedOpenShiftClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/osgi/ManagedOpenShiftClient.java index c0e64314197..645986fe880 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/osgi/ManagedOpenShiftClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/osgi/ManagedOpenShiftClient.java @@ -39,6 +39,8 @@ import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.informers.SharedInformerFactory; import io.fabric8.openshift.api.model.*; +import io.fabric8.openshift.api.model.DoneableRole; +import io.fabric8.openshift.api.model.DoneableRoleBinding; import io.fabric8.openshift.client.DefaultOpenShiftClient; import io.fabric8.openshift.client.NamespacedOpenShiftClient; import io.fabric8.openshift.client.OpenShiftClient; @@ -239,12 +241,12 @@ public ProjectRequestOperation projectrequests() { } @Override - public MixedOperation> roles() { + public MixedOperation> roles() { return delegate.roles(); } @Override - public MixedOperation> roleBindings() { + public MixedOperation> roleBindings() { return delegate.roleBindings(); } @@ -269,7 +271,7 @@ public SubjectAccessReviewOperation> clusterRoleBindings() { + public MixedOperation> clusterRoleBindings() { return delegate.clusterRoleBindings(); }